/* The gallery page's own styles. They stood inline in
   site/gallery/index.html until issue #1056 took them out of
   the document (the weight was measured on issue #1048): a
   versioned asset caches, a no-store document does not. This
   file loads after /styles.css, exactly where the inline
   block stood. Its name dodges the /gallery* run_worker_first
   prefix (issue #1041), so the platform serves it directly. */

  .gallery-head{max-width:var(--maxw);margin:0 auto 1rem;padding:0}
  /* Fixed-height rows at natural proportions (issue #49): one row
     height per Size setting; each item is exactly as wide as its photo
     is at that height, items wrap ragged-right and the last row sits
     left-aligned at the same height, never stretched. The aspect ratio
     is reserved on the <img> before load (from API dimensions), so
     rows never reflow as images arrive. */
  .works{display:flex;flex-wrap:wrap;align-items:flex-start;gap:1.25rem;max-width:var(--maxw);margin:0 auto 3rem;padding:0;--rowh:195px}
  /* The Org Place Page (issue #123): the masthead figure, the
     place rows and the self-assembling section headings. */
  #masthead{max-width:var(--maxw);margin:0 auto 1rem}
  #masthead img{width:100%;max-height:420px;object-fit:cover;border-radius:10px;display:block;background:#eee}
  /* A heading photo narrower than the masthead space (issue
     #911) stands at its natural size instead: paintMasthead adds
     this class, and the picture is centred, never upscaled, with
     no grey box standing around it. */
  #masthead img.natural{width:auto;height:auto;max-width:100%;margin:0 auto;background:transparent}
  #placeBlock{max-width:var(--maxw);margin:0 auto 1.5rem}
  #placeAddress{font-size:1.05rem;margin:.2rem 0 .5rem}
  #placeMap iframe{width:100%;height:260px;border:1px solid var(--line);border-radius:10px;display:block}
  h2.sect{max-width:var(--maxw);margin:1.75rem auto .25rem}
  .work{flex:0 0 auto;width:calc(var(--rowh) * var(--arr,1.33333));max-width:100%;min-width:0}
  .work .imgwrap{position:relative}
  .work img{width:100%;height:auto;aspect-ratio:var(--aratio,4/3);border-radius:8px;background:#eee;display:block}
  /* Works uploaded before dimensions were recorded keep the old 4/3
     cover crop inside the reserved box, so they never distort. */
  .work img.crop{object-fit:cover}
  /* Org photo links (issue #48): the photo opens another page in a new
     tab instead of the modal. The chip sits on arbitrary photos, so it
     carries its own solid background (same treatment as .price-tag). */
  .work a.work-link{display:block;text-decoration:none}
  .work .link-chip{position:absolute;top:.5rem;right:.5rem;background:rgba(0,0,0,.72);color:#fff;font-size:.9rem;line-height:1;padding:.35rem .5rem;border-radius:99px}
  .work .price-tag{position:absolute;right:.5rem;bottom:.5rem;background:rgba(0,0,0,.72);color:#fff;font-weight:700;font-size:.95rem;padding:.3rem .7rem;border-radius:99px;max-width:calc(100% - 1rem);text-align:center}
  .work h3{margin:.5rem 0 .25rem;font-size:1.25rem}
  .work .tags{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.35rem}
  .work .tag{display:inline-flex;align-items:center;font-size:.85rem;padding:.2rem .65rem;border-radius:99px;background:var(--soft);color:var(--muted);white-space:normal;overflow-wrap:anywhere;max-width:100%}
  .soldbadge{display:inline-block;font-size:.75rem;padding:.15rem .5rem;border-radius:99px;background:#c0392b;color:#fff;margin-left:.5rem;vertical-align:middle}
  /* Jury-window honesty (issue #109): only ever present in the
     owner's own payload — a work the public cannot see right now
     says why, and the badge links to the entry's call page. */
  .work .incall{display:inline-flex;align-items:center;font-size:.85rem;padding:.3rem .65rem;border-radius:99px;background:#1f5fa8;color:#fff;text-decoration:none;white-space:normal;line-height:1.3;margin-top:.35rem}
  /* Art forms (issue #135): quiet chips under the gallery header, and
     the work link (issue #136) as a small pill in the same family as
     the medium tags — never louder than the art. */
  .formchips{display:flex;gap:.4rem;flex-wrap:wrap;margin:.5rem 0 0}
  .formchip{display:inline-flex;align-items:center;font-size:.85rem;padding:.2rem .65rem;border-radius:99px;background:var(--soft);color:var(--muted);white-space:nowrap}
  .work .work-ext{display:inline-flex;align-items:center;font-size:.85rem;padding:.3rem .65rem;border-radius:99px;background:var(--soft);color:var(--ink);text-decoration:none;margin-top:.35rem}
  .work .work-ext:hover{text-decoration:underline}
  /* ---- Embedded chat panel (issue #65) ----
     Desktop: slides in from the right over the gallery. Mobile:
     a bottom-sheet dialog. Colours come from the theme tokens, so
     the panel matches whichever view (Normal or Spark) hosts it. */
  #chatScrim{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:110}
  #chatScrim[hidden]{display:none}
  #chatPanel{position:fixed;top:0;right:0;width:min(400px,100vw);height:var(--gs-vh,100dvh);z-index:120;
    background:var(--bg);color:var(--ink);border-left:1px solid var(--line);
    box-shadow:-12px 0 40px rgba(0,0,0,.25);display:flex;flex-direction:column;
    animation:cp-in-right .28s ease}
  #chatPanel[hidden]{display:none}
  @keyframes cp-in-right{from{transform:translateX(60px);opacity:0}to{transform:none;opacity:1}}
  @media(max-width:720px){
    /* Full-screen on phones (issue #254): the panel takes the
       whole visible screen — no sheet, no rounded top — and its
       composer rides the keyboard via --gs-vh. */
    #chatPanel{top:0;bottom:0;left:0;right:0;width:auto;height:var(--gs-vh,100dvh);border-left:0;
      border-top:1px solid var(--line);border-radius:0;
      box-shadow:0 -12px 40px rgba(0,0,0,.25);animation:cp-in-up .28s ease}
    @keyframes cp-in-up{from{transform:translateY(60px);opacity:0}to{transform:none;opacity:1}}
  }
  body.cp-open{overflow:hidden}
  .cp-head{display:flex;align-items:flex-start;gap:.6rem;padding:.8rem 1rem;border-bottom:1px solid var(--line)}
  .cp-headtext{flex:1;min-width:0}
  #cpTitle{font-weight:700;font-size:1.25rem}
  #cpTyping{font-size:.85rem;min-height:1.1em}
  #cpWorkLine{margin:0;padding:.5rem 1rem 0;font-weight:600}
  #cpMessages{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.6rem}
  .cp-compose{display:flex;gap:.5rem;padding:.7rem;border-top:1px solid var(--line);align-items:flex-end}
  /* The field itself is styled by the shared composer box
     (styles.css, issue #1286); only its sizing stands here. */
  #cpInput{flex:1;min-width:0}
  #cpStatus{margin:0;padding:0 1rem .5rem}
  #cpStatus:empty{padding:0}
  /* Chat bubbles and the thread's doors are styled once in
     styles.css under .gs-thread (issue #73) — the panel and the
     Messages page share the component, not a copy of its CSS. */

  /* ---- Standalone vs framed views ---- */
  html[data-view="standalone"] header{display:none}
  #siteHeader{transition:opacity .4s ease,transform .4s ease}
  #siteHeader.gs-hide{opacity:0;transform:translateY(-12px)}
  /* ---- Spark-mode heading (#sparkHead), Spark mode only ----
     One row: logo at the exact spot the burger occupies in Normal mode
     (absolute, left:1rem, centred on the row), then @handle,
     then the standard theme slider + Pilot at the right. The row is the
     same height as the Normal header's row, so switching modes does not
     shove the content around. */
  #sparkHead{display:none;position:sticky;top:0;z-index:30;background:var(--bg);
    border-bottom:2px solid var(--line);
    transition:transform .32s ease,opacity .32s ease}
  html[data-view="standalone"] #sparkHead{display:block}
  html.spark-leaving #sparkHead{display:block}
  #sparkHead.spark-off{transform:translateY(-110%);opacity:0}
  .spark-row{display:flex;align-items:center;gap:.6rem;
    max-width:calc(var(--maxw) + 2 * var(--gutter));margin:0 auto;
    padding:0 var(--gutter);min-height:56px}
  /* Centred on the row at every width (issue #916): the logo used
     to be pinned to the row's top padding below 1024px and centred
     only in the desktop band, so on phones and tablets it stood
     high against the centred handle and controls. */
  #sparkLogo{position:absolute;left:1rem;top:50%;transform:translateY(-50%);line-height:0;text-decoration:none}
  /* Tap floor (issue #878): the logo tile is 36px at every
     width (issue #1375) and the anchor hugs it. Padding would
     move the tile, since the anchor is placed from the row's
     left edge — an invisible overlay grows the hit area past
     the 44px floor instead and nothing visual moves. */
  #sparkLogo::after{content:"";position:absolute;inset:-5px}
  #sparkLogo .logo-tile{display:block}
  #sparkHandle{flex:1 1 auto;min-width:0;margin-left:calc(36px + .6rem);
    font-size:1.75rem;font-weight:600;color:var(--ink);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #sparkHead .head-right{flex:none}
  @media(max-width:640px){
    .spark-row{padding:0 1rem;min-height:56px}
    #sparkLogo::after{inset:-8px}
    #sparkHandle{margin-left:calc(36px + .5rem);font-size:1.6rem}
  }
  /* Spark-mode icon button lives on the name line (Normal mode only). */
  .name-line{display:flex;align-items:center;gap:.6rem}
  .name-line h1{margin:0;flex:1;min-width:0}
  #contactBtn{flex:none;white-space:nowrap}
  /* ---- Desktop alignment pass (#37) ----
     Spark: the @handle moves right onto the page content margin (the
     gutter the shared layout gives <main>), the logo centres on the
     Spark row, and the row matches the regular header's height.
     Normal: logo + tabs sit exactly where the regular heading puts
     them. (The Spark button's own placement moved to the right side
     of the header in #461 — see its rule below.) Desktop only —
     mobile is untouched. */
  @media(min-width:1024px){
    .spark-row{padding-left:var(--gutter);padding-right:var(--gutter);min-height:56px}
    #sparkHandle{margin-left:0}
    /* The Focus button's desktop place (issue #916): left of the
       logo, standing in the gutter room between the Menu button
       and the logo. It stands absolutely, the way the Menu button
       does, so the logo and everything else in the row keep their
       exact places; its right edge sits short of the logo by half
       the room's spare (capped), and it centres on the row. The
       room's own arithmetic follows the frame: since issue #1148
       the centred column counts the gutter on BOTH sides, so the
       logo's left edge stands at (100vw - maxw - 2 x gutter)/2 +
       gutter. Below
       1024 the room cannot hold it beside the Menu button — 52px
       at 1024, the button's own 44px at about 945 — so there it
       keeps the row's right end, rather than shift the logo. */
    #viewSparkHead{position:absolute;top:50%;transform:translateY(-50%);
      left:calc(max(0px,(100vw - var(--maxw) - 2 * var(--gutter))/2) + var(--gutter) - 44px - clamp(4px,(var(--gutter) - 104px)/2,24px))}
    /* With the menu open the page slides under it (the sheet's
       body.shifted rule) and the room left of the logo is the
       menu's own ground — the logo stands just clear of the
       menu's edge with no room for the button beside it. While
       the menu stands open, docked or not, the button keeps the
       row's right end, its in-flow order:6 place; it takes the
       left-hand place again when the menu closes. */
    body.docked #viewSparkHead, body.shifted #viewSparkHead{position:static;transform:none}
  }
  /* Contact button: left-aligned with the page content margin. */
  #kindline{margin:.35rem 0 0}
  .contact-line{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.5rem}
  /* Page actions menu (issue #291): the ... button sits in the
     contact line with a full tap target, and its menu rows get
     comfortable spacing — Block and Report live here now, away
     from where a thumb lands by accident. */
  .page-menuwrap{position:relative}
  .page-menuwrap[hidden]{display:none}
  .page-menubtn{font:inherit;font-size:1.05rem;line-height:1;padding:.5rem .85rem;min-height:40px;border:1px solid var(--line);border-radius:999px;background:none;color:var(--muted);cursor:pointer}
  .page-menu{position:fixed;z-index:80;min-width:13rem;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(0,0,0,.22);padding:.35rem;display:flex;flex-direction:column}
  .page-menu[hidden]{display:none}
  .page-menu button{background:none;border:none;padding:.65rem .8rem;min-height:40px;font:inherit;font-size:.95rem;color:inherit;text-align:left;cursor:pointer;border-radius:8px}
  .page-menu button:hover{background:var(--soft)}
  /* Report panel (issue #210 decision 11, slice #219). */
  #reportPanel{max-width:560px;margin-top:.8rem;padding:.8rem 1rem;border:1px solid var(--line);border-radius:12px;font-size:.92rem}
  #reportPanel[hidden]{display:none}
  #reportPanel label{display:block;margin:.5rem 0}
  #reportPanel select,#reportPanel textarea{display:block;width:100%;margin-top:.25rem;font:inherit;font-size:1rem;padding:.45rem .6rem;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit}
  #reportPanel .report-recommend{font-size:.88rem}
  #reportPanel .report-org{font-size:.88rem}
  #reportPanel .report-org[hidden]{display:none}
  #reportImages{margin:.5rem 0}
  #reportImageList .imWork{margin:.4rem 0}
  #reportImageList .imWork p{margin:.2rem 0}
  #reportImageList .imRow{display:flex;flex-wrap:wrap;gap:.5rem}
  #reportImageList label.imPick{display:block;width:84px;margin:0;cursor:pointer}
  #reportImageList .imPick img{width:84px;height:84px;object-fit:cover;border-radius:8px;border:1px solid var(--line);display:block}
  #reportImageList .imPick span{display:block;font-size:.72rem;line-height:1.25;margin-top:.15rem}
  #reportPanel .report-actions{display:flex;gap:.6rem;margin-top:.6rem}
  #reportPanel #reportCancel{font:inherit;padding:.45rem .9rem;border:1px solid var(--line);border-radius:8px;background:none;color:inherit;cursor:pointer}
  /* The blocked-page state (decision 3): a wall of grey tiles with
     grey art icons, the word Blocked stamped across them askew, in
     theme-neutral greys so it reads the same in every theme. */
  #blockedState{max-width:960px}
  .blocked-wall{position:relative;display:grid;grid-template-columns:repeat(3,1fr);
    gap:.75rem;margin:1.25rem 0}
  .blocked-tile{aspect-ratio:4/3;background:rgba(128,128,128,.16);border-radius:10px;
    display:flex;align-items:center;justify-content:center;color:rgba(128,128,128,.55)}
  .blocked-tile svg{width:46px;height:46px}
  .blocked-stamp{position:absolute;inset:0;display:flex;align-items:center;
    justify-content:center;pointer-events:none}
  .blocked-stamp span{display:inline-block;transform:rotate(-8deg);
    border:3px solid rgba(110,110,110,.75);border-radius:6px;padding:.2em .55em;
    font-size:clamp(1.6rem,6vw,3rem);font-weight:800;letter-spacing:.14em;
    text-transform:uppercase;color:rgba(110,110,110,.85);background:rgba(128,128,128,.08)}
  .blocked-note{margin:.5rem 0 1rem}
  @media(max-width:640px){ .blocked-wall{grid-template-columns:repeat(2,1fr)} }
  #viewSparkHead{flex:none;display:inline-flex;align-items:center;justify-content:center;order:6}
  #viewSparkHead svg{display:block}
  html[data-view="standalone"] #viewSparkHead{display:none}
  /* Focus button placement (issue #461): the button moved out of
     the header's left column to make room for the Back button. At
     full width (the order:6 above) it closes the header row on the
     right, centred against the Pilot badge beside it — until issue
     #916 stood it left of the logo at desktop widths and back
     at the second row's left on the web at phone widths; the
     order:6 and order:4 right-side arrangements now stand only
     where #916 left them (901–1023, the tablet band, and the app
     at phone widths). At wrapped
     widths it ends the second row, pushed right by the auto margin
     and inset .75rem from the row's edge — the Pilot badge is
     about as wide again as the button, so the inset puts the
     button's centre under the badge's centre. */
  @media(max-width:900px){
    #viewSparkHead{order:4;margin-left:auto;margin-right:.75rem}
  }
  /* Phone widths: this page's second row carries both header
     buttons (Back at the left, Focus at the right), so its
     destinations shrink a step — the de-squish pattern from
     #456 — to keep all four labels whole between them. At 400px
     and under they shrink one step more and the Focus button's
     centring inset halves, so the row still fits.
     The link rules name :not(.page-help) on purpose (issue
     #606): the shared sheet's phone steps use that selector at
     specificity (0,2,1) since #486, so this page's plainer
     .tabs a rules (0,1,1) silently lost to them and the steps
     below never applied — the row had been ~50px too wide
     since #485 put the help circle in it, and the Focus button
     wrapped to a third row. Stated with the same selector,
     this page's steps stand again. The destinations' gap takes
     the shared sheet's own <=400px step (.2rem) at every phone
     width: this row is the tightest in the header. */
  @media(max-width:640px){
    .tabs{gap:.2rem}
    .tabs button{font-size:.72rem;padding:.32rem .44rem}
    .tabs a:not(.page-help):not(.page-feedback){font-size:.72rem;padding:.32rem .44rem}
    /* The second row's left slot (issue #916): on the web the
       Focus button leads the row, under the Menu button — its
       place before issue #461 moved it to the right end — and
       the destinations begin at the logo's left edge beside it,
       the button being the same 44px as the Menu button above
       it. The shared sheet's tabs indent is zeroed here because
       the button gives the line its start. In the app nothing
       changes: the Back button leads the row and the Focus
       button keeps the right end. */
    html:not(.in-app) #viewSparkHead{order:3;margin-left:0;margin-right:0}
    html:not(.in-app) .tabs{margin-left:0}
  }
  @media(max-width:400px){
    #viewSparkHead{margin-right:.375rem}
    .tabs button{font-size:.64rem}
    /* Side padding .2rem, not .32rem (issue #649): the Feedback
       envelope's ruled gap after the ? (issue #651) put the
       framed row at 390px back over its room and the Focus
       button wrapped to a third row. The three text destinations
       at .2rem sides free about 11px — the room the row needed.
       Spacing only: no control shrinks, no label is cut. */
    .tabs a:not(.page-help):not(.page-feedback){font-size:.64rem;padding:.28rem .2rem}
  }
  /* The tightest band (issue #642): at 380px and under, the
     second row is still too wide with the steps above — 352px of
     row against 328px of room at 360 — and the Focus button wraps
     to a third row. The room comes from spacing and padding only:
     the header's side padding and row gap narrow a step, and the
     destinations' gap and side padding narrow a step. No control
     shrinks, no label is cut, and the Focus button keeps the
     centring inset the <=400px step set. Together the steps free
     about 38px, so the row fits at 360 with room to spare.
     Issue #649: the Help hub put the Feedback envelope (44px,
     plus its ruled gap after the ?) into this row and the Focus
     button wrapped again. One of the steps above never landed:
     the <=400px rule names :not(.page-help):not(.page-feedback),
     which outranks this band's plainer :not(.page-help), so the
     destinations kept their <=400px side padding here. The
     selector below matches that shape, so the .2rem step finally
     applies in this band — about 11px across the three text
     destinations, which is the room the row needed. */
  @media(max-width:380px){
    .navwrap{gap:.25rem;padding-left:.75rem;padding-right:.75rem}
    .tabs{gap:.1rem}
    .tabs button{padding:.28rem .2rem}
    .tabs a:not(.page-help):not(.page-feedback){padding:.28rem .2rem}
  }
  /* Footer: Normal mode only — Spark mode is the clean artist view. */
  html[data-view="standalone"] #siteFooter{display:none}
  /* Spark mode footer: one copyright line for the gallery (issue #41). */
  #sparkFooter{display:none}
  html[data-view="standalone"] #sparkFooter{display:block;text-align:center;
    padding:1.5rem 1rem 2rem;color:var(--muted);font-size:.9rem}
  /* ---- Chat focus (issue #271) ----
     The panel fills the screen and the site's header and footer
     step away, whichever view hosts the panel. The logo in the
     panel head shows only while focused — it is the exit. */
  #cpFocusLogo{display:none;flex:none;line-height:0;text-decoration:none}
  #cpFocusLogo img{display:block;width:34px;height:34px}
  #chatPanel.cp-focused{top:0;right:0;bottom:0;left:0;width:auto;
    border-left:0;box-shadow:none;animation:none}
  #chatPanel.cp-focused #cpFocusLogo{display:block}
  #chatPanel.cp-focused #cpFocus{display:none}
  body.chat-focused #siteHeader,body.chat-focused #siteFooter,
  body.chat-focused #sparkHead,body.chat-focused #sparkFooter{display:none}
  /* Phones (issue #273): the panel opens full-screen, so the
     Focus button and the focus logo are not in the panel at all —
     desktop answers to a problem a phone does not have. The X is
     the one exit, and the head names the person (paintPanelHead). */
  @media(max-width:720px){
    #chatPanel #cpFocus, #chatPanel #cpFocusLogo{display:none !important}
  }
  /* Spark mode: drive page chrome from the artist's theme tokens. */
  html[data-view="standalone"] .work img{background:var(--soft)}
  html[data-view="standalone"] .work .meta{color:var(--muted)}
  html[data-view="standalone"] .work .price{color:var(--ink)}
  html[data-view="standalone"] #cpInput{background:none;color:var(--ink)}
  /* Size: selects the row height in both Normal and Spark modes
     (issue #49). Heights match the old 4/3 tile heights at 1280px:
     small 129px, medium 193px, large 257px. */
  .works[data-density="tight"],
  .works[data-density="small"]{--rowh:130px;gap:.75rem}
  .works[data-density="spacious"],
  .works[data-density="large"]{--rowh:255px;gap:2rem}
  /* Mobile: the same system at stepped-down row heights. */
  @media(max-width:640px){
    .works[data-density="tight"],
    .works[data-density="small"]{--rowh:85px;gap:.5rem}
    .works[data-density="medium"],
    .works[data-density="normal"]{--rowh:128px;gap:.7rem}
    .works[data-density="spacious"],
    .works[data-density="large"]{--rowh:200px;gap:1rem}
  }
  /* Theme morph during view switches: interpolate token-driven colors.
     The header keeps its own fade/slide transition (excluded here). */
  html.gs-morph body,html.gs-morph body *:not(#siteHeader):not(#sparkHead){transition:background-color .45s ease,color .45s ease,border-color .45s ease !important}
  /* Work cards are buttons that open the detail modal. */
  .work{cursor:pointer}
  /* The covered tile (issue #225): a gated work's placeholder —
     the category names ride on it, the image never renders. */
  .work .cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.35rem;
    width:100%;height:100%;min-height:9rem;background:var(--soft);color:var(--muted);
    border-radius:8px;text-align:center;padding:1rem;box-sizing:border-box}
  .work .cover .cover-kind{font-weight:700;color:var(--ink)}
  .work:focus-visible{outline:2px solid var(--coral);outline-offset:3px;border-radius:8px}
  /* A call card's header image (issue #117): the org's own artwork,
     shown whole on a toned stage at the top of the card. */
  #orgCallCards .card img.callimg{display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:rgba(127,127,127,.08);border-radius:16px;margin-bottom:.6rem}
  /* Work detail modal: same page, so it inherits the current view's theme. */
  #workModal[hidden]{display:none}
  #workModal{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:1rem}
  .wm-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
  /* The shop checkout dialog (issues #536/#549): the work
     modal's shape — the buyer confirms the full total, tax
     lines standing, before anything charges. */
  #shopCheckout[hidden]{display:none}
  #shopCheckout{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:1rem}
  .sc-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.55)}
  .sc-card{position:relative;background:var(--card);color:var(--ink);border:1px solid var(--line);
    border-radius:12px;max-width:26rem;width:100%;max-height:90vh;overflow:auto;
    padding:1.25rem;box-shadow:0 12px 40px rgba(0,0,0,.3)}
  .sc-card .fact{margin:.3rem 0}
  .sc-card .total{font-weight:700;font-size:1.1rem;margin:.6rem 0}
  .sc-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1rem}
  .sc-actions .join{min-height:44px}
  .sc-card label{display:block;margin-top:.7rem}
  .sc-card input[type="text"],.sc-card input[type="email"]{width:100%;box-sizing:border-box;
    font:inherit;padding:.55rem .7rem;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink)}
  .sc-error{color:var(--coral-text);font-size:.9rem;margin:.25rem 0 0}
  .wm-card{position:relative;background:var(--card);color:var(--ink);border:1px solid var(--line);
    border-radius:12px;max-width:40rem;width:100%;max-height:90vh;overflow:auto;
    padding:1.25rem;box-shadow:0 12px 40px rgba(0,0,0,.3)}
  .wm-card img{width:100%;max-height:60vh;object-fit:contain;border-radius:8px;background:var(--soft)}
  /* Photo sets (issue #313): the dialog shows ONE photo at a
     time, browsed with arrows on the image, the photo on show
     labelled with its tag under the image. The wall card carries
     the same arrows so a visitor can look through a set without
     opening the dialog; the strip belongs to the feed only. */
  .wm-stage{position:relative}
  .wm-nav{position:absolute;top:50%;transform:translateY(-50%);width:2.4rem;height:2.4rem;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:1.4rem;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
  .wm-nav.prev{left:.5rem}
  .wm-nav.next{right:.5rem}
  .wm-nav[hidden]{display:none}
  .wm-tag{margin:.5rem 0 0;font-weight:600}
  .wm-tag[hidden]{display:none}
  .work-nav{position:absolute;top:50%;transform:translateY(-50%);width:2rem;height:2rem;border-radius:50%;border:1px solid var(--line);background:var(--card);color:var(--ink);font-size:1.2rem;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;z-index:2}
  .work-nav.prev{left:.4rem}
  .work-nav.next{right:.4rem}
  .work-photo-tag{position:absolute;left:.5rem;bottom:.5rem;background:rgba(0,0,0,.65);color:#fff;padding:.1rem .55rem;border-radius:999px;font-size:.8rem;z-index:2}
  .work-photo-tag[hidden]{display:none}
  .wm-card h3{margin:.75rem 0 .25rem}
  .wm-card .meta{margin:0;color:var(--muted);font-size:.9rem;overflow-wrap:anywhere}
  .wm-card .price{margin:.4rem 0 0;font-weight:700}
  #wmClose{position:absolute;top:.5rem;right:.5rem;z-index:2}
  body.wm-open{overflow:hidden}
  @media (prefers-reduced-motion: reduce){
    #siteHeader{transition:none}
    #sparkHead{transition:none}
    #chatPanel{animation:none}
    body{transition:none !important}
  }
