/* ==========================================================================
   WBWC - Phase 2 stylesheet
   Bootstrap supplies the reset and a few utilities; everything with a visual
   opinion lives here so the pages do not read as a stock template.
   ========================================================================== */

:root {
    /* Palette: one deep ink, one warm accent, warm-grey neutrals. */
    --ink-900: #14161c;
    --ink-700: #2b3040;
    --ink-500: #5b6275;
    --ink-300: #9aa1b4;
    --ink-150: #dfe2ea;
    --ink-100: #eceef4;
    --ink-050: #f6f7fb;
    --paper: #ffffff;

    --accent: #3d5afe;
    --accent-dark: #2b40c9;
    --accent-soft: #eaeeff;
    --warn: #b45309;
    --warn-soft: #fef3c7;
    --danger: #c2321f;
    --danger-soft: #fdecea;
    --ok: #0f8a5f;

    --r-sm: 8px;
    --r: 12px;
    --r-lg: 18px;

    --shadow-sm: 0 1px 2px rgba(20, 22, 28, .06), 0 2px 8px rgba(20, 22, 28, .04);
    --shadow: 0 2px 6px rgba(20, 22, 28, .07), 0 14px 34px rgba(20, 22, 28, .07);
    --shadow-lg: 0 24px 60px rgba(20, 22, 28, .18);

    --gap: 14px;
    --container: 1240px;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

/* -------------------------------------------------------------- foundations */

html {
    -webkit-text-size-adjust: 100%;

    /* Always reserve room for the scrollbar. Without this a short page has no
       scrollbar and a long one does, so every centred layout shifts about 8px
       sideways as you move between them - which reads as the sidebar jumping. */
    scrollbar-gutter: stable;
}

body.wbwc-body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink-700);
    background: var(--ink-050);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.wbwc-main { flex: 1 0 auto; }

.wbwc-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    color: var(--ink-900);
    letter-spacing: -.02em;
    line-height: 1.2;
    margin: 0 0 .4em;
    font-weight: 650;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

img { max-width: 100%; }

code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: .9em;
    background: var(--ink-100);
    padding: .1em .4em;
    border-radius: 5px;
    color: var(--ink-900);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.wbwc-footer {
    flex: 0 0 auto;
    margin-top: 64px;
    padding: 22px 0;
    border-top: 1px solid var(--ink-150);
    background: var(--paper);
    font-size: 13px;
    color: var(--ink-500);
}

.wbwc-footer .wbwc-container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

/* ------------------------------------------------------------------ buttons */

.wbwc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.wbwc-btn:hover { text-decoration: none; transform: translateY(-1px); }
.wbwc-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.wbwc-btn--primary { background: var(--accent); color: #fff; }
.wbwc-btn--primary:hover { background: var(--accent-dark); color: #fff; }

.wbwc-btn--ghost {
    background: var(--paper);
    border-color: var(--ink-150);
    color: var(--ink-700);
}
.wbwc-btn--ghost:hover { background: var(--ink-050); color: var(--ink-900); }

.wbwc-btn--sm { padding: 7px 14px; font-size: 13px; }

.wbwc-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

/* ----------------------------------------------------- panels, empty states */

.wbwc-panel {
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin: 48px auto;
}

.wbwc-panel--narrow { max-width: 460px; }
.wbwc-panel__lede { color: var(--ink-500); font-size: 14px; }

.wbwc-empty {
    text-align: center;
    padding: 56px 24px;
    background: var(--paper);
    border: 1px dashed var(--ink-150);
    border-radius: var(--r-lg);
    color: var(--ink-500);
    margin: 32px 0;
}

.wbwc-empty--tall { padding: 90px 24px; }
.wbwc-empty h1, .wbwc-empty h2 { margin-bottom: 8px; }
.wbwc-empty__hint { font-size: 13px; margin-top: 26px; }

.wbwc-alert {
    padding: 12px 16px;
    border-radius: var(--r);
    font-size: 14px;
    margin: 0 0 18px;
}

.wbwc-alert--warn { background: var(--warn-soft); color: var(--warn); }
.wbwc-alert--error { background: var(--danger-soft); color: var(--danger); }

.wbwc-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.wbwc-chiplist {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0;
    margin: 0 0 28px;
}

.wbwc-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ink-100);
    color: var(--ink-700);
    font-size: 13px;
    font-weight: 500;
}
.wbwc-chip:hover { background: var(--accent-soft); color: var(--accent-dark); text-decoration: none; }

/* ------------------------------------------------------------------- forms */

.wbwc-form { display: grid; gap: 16px; margin-top: 22px; }

.wbwc-field { display: grid; gap: 5px; }
.wbwc-field > span { font-size: 13px; font-weight: 600; color: var(--ink-500); }

.wbwc-field input,
.wbwc-field select {
    font: inherit;
    padding: 9px 12px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink-900);
}

.wbwc-field input:focus,
.wbwc-field select:focus { border-color: var(--accent); outline: none; }

/* =================================================== shop directory (home) */

.wbwc-hero {
    padding: 72px 0 40px;
    background:
        radial-gradient(900px 340px at 12% -10%, var(--accent-soft), transparent 70%),
        var(--ink-050);
}

.wbwc-hero__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
}

.wbwc-hero__title { font-size: clamp(30px, 5vw, 46px); }

.wbwc-hero__lede {
    margin: 0;
    max-width: 48ch;
    color: var(--ink-500);
    font-size: 17px;
}

.wbwc-storegrid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
}

.wbwc-storecard {
    display: grid;
    gap: 6px;
    height: 100%;
    padding: 22px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    color: var(--ink-900);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.wbwc-storecard:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
    text-decoration: none;
}

.wbwc-storecard__media {
    display: grid;
    place-items: center;
    height: 92px;
    margin-bottom: 8px;
    border-radius: var(--r);
    background: var(--ink-050);
    overflow: hidden;
}

/* A logo may be any shape, so it is contained rather than cropped. */
.wbwc-storecard__media img {
    max-height: 72px;
    max-width: 80%;
    width: auto;
    object-fit: contain;
}

.wbwc-storecard__initial {
    font-size: 34px;
    font-weight: 700;
    color: var(--accent);
}

.wbwc-storecard__name { font-weight: 650; font-size: 17px; }

.wbwc-storecard__go { font-size: 13px; color: var(--ink-300); }
.wbwc-storecard:hover .wbwc-storecard__go { color: var(--accent); }

/* ========================================================= storefront chrome */

.wbwc-storebar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ink-150);
}

.wbwc-storebar__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 62px;
}

.wbwc-storebar__brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink-900);
    display: flex;
    align-items: center;
}

.wbwc-storebar__brand img { object-fit: contain; }

.wbwc-storebar__burger {
    margin-left: auto;
    display: none;
    width: 42px;
    height: 36px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
    background: var(--paper);
    cursor: pointer;
    position: relative;
}

.wbwc-storebar__burger span,
.wbwc-storebar__burger span::before,
.wbwc-storebar__burger span::after {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 2px;
    background: var(--ink-700);
    border-radius: 2px;
}

.wbwc-storebar__burger span { top: 17px; }
.wbwc-storebar__burger span::before { content: ""; top: -6px; left: 0; }
.wbwc-storebar__burger span::after { content: ""; top: 6px; left: 0; }

/* ----------------------------------------------------------- nested nav */

.wbwc-nav { margin-left: auto; }

.wbwc-nav__list,
.wbwc-nav__children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wbwc-nav__list { display: flex; gap: 4px; align-items: center; }

.wbwc-nav__item { position: relative; }

.wbwc-nav__group { display: flex; align-items: center; }

.wbwc-nav__link {
    display: block;
    padding: 9px 13px;
    border-radius: var(--r-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-700);
    white-space: nowrap;
}

.wbwc-nav__link:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }
.wbwc-nav__link.is-active { color: var(--accent-dark); background: var(--accent-soft); }

.wbwc-nav__toggle {
    border: 0;
    background: none;
    padding: 4px 6px;
    color: var(--ink-300);
    cursor: pointer;
    font-size: 11px;
    border-radius: 4px;
}

.wbwc-nav__toggle:hover { color: var(--ink-700); background: var(--ink-100); }

/* Dropdowns open on hover on pointer devices and on click elsewhere; the
   [aria-expanded] state is what the script toggles, so keyboard and touch use
   the same path. */
.wbwc-nav__children {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    padding: 6px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
    z-index: 50;
}

.wbwc-nav__item--parent:hover > .wbwc-nav__children,
.wbwc-nav__item--parent:focus-within > .wbwc-nav__children,
.wbwc-nav__item--parent.is-open > .wbwc-nav__children {
    opacity: 1;
    visibility: visible;
    transform: none;
}

/* Third level and deeper open sideways rather than off the bottom of the page. */
.wbwc-nav__children .wbwc-nav__children { top: -6px; left: 100%; }

/* ============================================================ page + blocks */

.wbwc-page { padding: 40px 0 0; }
.wbwc-page__title { font-size: clamp(26px, 4vw, 38px); margin-bottom: 24px; }

/* Space between blocks as a margin rather than a gap, so a pair of blocks
   that are meant to meet can close it. A gap belongs to the container and
   cannot be cancelled for two of its children. */
.wbwc-blocks { display: grid; gap: 0; }
.wbwc-blocks > * + * { margin-top: 28px; }

/* On the shop, the list runs the full width of the page and each ordinary
   block is centred inside it at the usual reading width. Doing it this way
   round, rather than boxing the list, is what lets a single block step
   outside: a parent cannot be two widths at once.

   No vw units anywhere here. 100vw counts the scrollbar, and this site keeps
   the scrollbar gutter reserved at all times, so anything sized that way is
   permanently a scrollbar wider than the page. */
.wbwc-blocks:not(.wbwc-blocks--editing) { padding-inline: 20px; }

.wbwc-blocks:not(.wbwc-blocks--editing) > .wbwc-block {
    width: 100%;
    max-width: calc(var(--container) - 40px);
    margin-inline: auto;
}

.wbwc-block {
    background: var(--wbwc-block-bg, transparent);
    border-radius: var(--r-lg);
    /* The overlay is placed against this box. */
    position: relative;
}

/* ------------------------------------------------------------- overlay

   Words over the photo, kept as text so they rewrap instead of shrinking.
   Position, column width and heading size are all rules rather than numbers,
   which is what makes the same settings work on a laptop and a phone. */

.wbwc-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    border-radius: var(--r-lg);
    overflow: hidden;
    /* Clicks fall through to the slide show arrows underneath. The text box
       below turns this back on for itself, so its own button still works. */
    pointer-events: none;
}

.wbwc-overlay__scrim { position: absolute; inset: 0; }

.wbwc-overlay__text {
    position: relative;
    padding: clamp(18px, 3.4vw, 46px);
    color: #fff;
    pointer-events: auto;
    /* min() rather than a media query: the column is capped at the chosen
       width and at the block, so a phone gets the full width with no second
       set of rules to keep in step. */
    max-width: min(var(--wbwc-overlay-w, 560px), 100%);
}

/* Where the words sit. Nine anchors, no coordinates: an anchor means the same
   thing at every width, and a coordinate only fits the screen it was set on. */
.wbwc-overlay--top-left      { align-items: start;  justify-items: start; }
.wbwc-overlay--top-centre    { align-items: start;  justify-items: center; }
.wbwc-overlay--top-right     { align-items: start;  justify-items: end; }
.wbwc-overlay--middle-left   { align-items: center; justify-items: start; }
.wbwc-overlay--centre        { align-items: center; justify-items: center; }
.wbwc-overlay--middle-right  { align-items: center; justify-items: end; }
.wbwc-overlay--bottom-left   { align-items: end;    justify-items: start; }
.wbwc-overlay--bottom-centre { align-items: end;    justify-items: center; }
.wbwc-overlay--bottom-right  { align-items: end;    justify-items: end; }

/* A line stops being comfortable to read past roughly sixty-five characters,
   so the column is capped even where there is room for more. */
.wbwc-overlay--w-narrow { --wbwc-overlay-w: 420px; }
.wbwc-overlay--w-medium { --wbwc-overlay-w: 560px; }
.wbwc-overlay--w-wide   { --wbwc-overlay-w: 760px; }

/* Each size is a range. The middle term follows the viewport, the outer two
   stop it from being unreadable on a phone or absurd on a wide screen. A fixed
   number typed by the shop owner would be right on one screen and wrong on
   every other. */
.wbwc-overlay--s-small  .wbwc-overlay__heading { font-size: clamp(20px, 2.6vw, 30px); }
.wbwc-overlay--s-medium .wbwc-overlay__heading { font-size: clamp(26px, 4vw, 44px); }
.wbwc-overlay--s-large  .wbwc-overlay__heading { font-size: clamp(32px, 5.6vw, 64px); }

/* The fade follows the words: in from their side, so the photo stays visible
   on the other. Centred text has nowhere to fade from, so the whole picture is
   dimmed a little instead. Without this, white text vanishes over any pale
   part of a photo. */
.wbwc-overlay--side-left .wbwc-overlay__scrim {
    background: linear-gradient(90deg,
        rgba(8, 10, 14, .86) 0%, rgba(8, 10, 14, .6) 46%,
        rgba(8, 10, 14, .1) 78%, transparent 100%);
}
.wbwc-overlay--side-right .wbwc-overlay__scrim {
    background: linear-gradient(270deg,
        rgba(8, 10, 14, .86) 0%, rgba(8, 10, 14, .6) 46%,
        rgba(8, 10, 14, .1) 78%, transparent 100%);
}
.wbwc-overlay--side-centre .wbwc-overlay__scrim {
    background: linear-gradient(180deg, rgba(8, 10, 14, .2) 0%, rgba(8, 10, 14, .62) 100%);
}

.wbwc-overlay--side-right .wbwc-overlay__text  { text-align: right; }
.wbwc-overlay--side-centre .wbwc-overlay__text { text-align: center; }

.wbwc-overlay__kicker {
    margin: 0 0 10px;
    font-size: clamp(10px, 1.1vw, 12px);
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #ffd9a8;
}

.wbwc-overlay__heading {
    margin: 0 0 clamp(8px, 1.2vw, 16px);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: #fff;
}

.wbwc-overlay__body {
    margin: 0 0 clamp(14px, 2vw, 24px);
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.65;
    color: #e8ebf3;
}

.wbwc-overlay__cta {
    display: inline-block;
    padding: 10px 21px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink-900);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.wbwc-overlay__cta:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }

/* A caption would sit under the words and compete with them. */
.wbwc-block:has(.wbwc-overlay) .wbwc-slide__caption { display: none; }

/* The nine anchors, drawn as a small map of the block. Radio inputs rather
   than buttons, so one is always chosen and the keyboard moves between them
   with the arrow keys for free. */
/* The size to aim for, stated in the upload box. A pill rather than another
   line of grey text, so it reads as a target and not as a second caveat.
   justify-self keeps it to its own width: a grid item stretches by default,
   which turned the pill into a full width bar. */
.wbwc-drop__target {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 12.5px;
    font-weight: 700;
}

.wbwc-drop__target::before {
    content: "";
    width: 26px;
    height: 15px;
    border: 1.6px dashed currentColor;
    border-radius: 3px;
}

.wbwc-posgrid {
    display: grid;
    grid-template-columns: repeat(3, 32px);
    grid-template-rows: repeat(3, 26px);
    gap: 4px;
}

.wbwc-posgrid__cell { position: relative; display: block; cursor: pointer; }

.wbwc-posgrid__cell input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.wbwc-posgrid__cell span {
    display: block;
    width: 100%;
    height: 100%;
    border: 1px solid var(--ink-150);
    border-radius: 5px;
    background: var(--paper);
}

/* The inner bar stands for the words, so the grid reads as a map rather than
   as nine identical boxes. */
.wbwc-posgrid__cell span::after {
    content: "";
    position: absolute;
    inset: 7px 6px;
    border-radius: 2px;
    background: var(--ink-150);
}

.wbwc-posgrid__cell:hover span { background: var(--ink-050); }

.wbwc-posgrid__cell input:checked + span { border-color: var(--accent); }
.wbwc-posgrid__cell input:checked + span::after { background: var(--accent); }
.wbwc-posgrid__cell input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.wbwc-block__empty {
    padding: 30px;
    text-align: center;
    color: var(--ink-300);
    border: 1px dashed var(--ink-150);
    border-radius: var(--r-lg);
    margin: 0;
}

.wbwc-block__text { font-size: 17px; max-width: 70ch; }

/* ------------------------------------------------------------------- stage
   One photo at a time, shown whole. The photo is contained inside a fixed
   frame and a blurred copy of itself fills whatever it does not cover, so a
   portrait phone photo and a wide banner can share one layout without either
   being cropped or sitting in dead black bars.
   ------------------------------------------------------------------------- */

.wbwc-stage {
    position: relative;
    height: var(--wbwc-block-height, 420px);
    min-height: 200px;
    max-height: 78vh;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--ink-900);
    isolation: isolate;
}

.wbwc-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s;
}

.wbwc-slide.is-active { opacity: 1; visibility: visible; }

.wbwc-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--wbwc-photo);
    background-size: cover;
    background-position: center;
    filter: blur(32px) saturate(1.5) brightness(.5);
    transform: scale(1.2);
    z-index: 0;
}

.wbwc-slide__img,
.wbwc-stage__media {
    /* Absolutely positioned against the slide, which is itself inset: 0 inside
       the frame and therefore has a size that is already decided.

       max-height: 100% was here before and did nothing. The slide is a grid
       whose row is sized by its content, so the row needed the photo's height
       and the photo's limit needed the row's: CSS breaks that circle by
       treating the percentage as no limit at all. The photo was then held only
       by its width, stood taller than the frame, and had the overhang cut off
       by the frame's overflow. A wide panorama escaped it, which is why only
       panoramas ever looked right.

       With a definite containing block there is no circle, and object-fit
       keeps the whole photo inside whatever shape the frame is. */
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 2px;
}

/* There was a rule here making a landscape photo fill the frame edge to edge.
   It cropped them. is-landscape only means wider than tall, and the frame has
   its own ratio that CSS cannot see, so a 1600x900 photo stretched to full
   width stood taller than a 420px frame and lost its bottom half. Only a very
   wide panorama happened to fit.

   Letterboxing every photo is the whole point of the stage: the photo is shown
   whole and a blurred copy of itself fills whatever is left. max-width and
   max-height above already do that for any shape. */

/* Set by wbwc-gallery.js when the tallest photo in the block is taller than it
   is wide. The frame takes the photo's own shape, min-height keeps whatever
   height the shop owner set if that is still taller, and max-height on the rule
   above stops a 1:3 photo from becoming three screens of page. */
.wbwc-stage.is-tall {
    /* Definite, not auto. With an auto width, max-height below clamps the
       height and CSS then feeds that back through the ratio to shrink the
       WIDTH, which turned a full width block into a narrow column with a
       panorama stranded in the middle of it. A definite width has nothing to
       transfer back into, so only the height is clamped, which is the whole
       intent: a full width frame, as tall as the photo wants, up to a limit. */
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--wbwc-fit-aspect);

    /* No min-height here, and that is the whole point. A box with a ratio
       turns a minimum height into a minimum width, and in CSS a minimum beats
       both width and max-width, so width: 100% above could not hold it: on a
       440px phone the frame demanded 800px and the page scrolled sideways.
       The base rule's 200px floor still applies and is small enough to
       transfer harmlessly. The height a shop owner set is given up for a tall
       photo, which is the case where the photo's own shape is the better
       answer anyway. */
}

.wbwc-stage--video .wbwc-stage__media { width: 100%; box-shadow: none; }

.wbwc-slide__caption {
    position: absolute;
    z-index: 2;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 22px 16px;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .72));
}

.wbwc-stage__arrow {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .86);
    color: var(--ink-900);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease, background .2s ease;
}

.wbwc-stage:hover .wbwc-stage__arrow,
.wbwc-stage__arrow:focus-visible { opacity: 1; }
.wbwc-stage__arrow:hover { background: #fff; }
.wbwc-stage__arrow--prev { left: 14px; }
.wbwc-stage__arrow--next { right: 14px; }

.wbwc-stage__dots {
    position: absolute;
    z-index: 3;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(6px);
}

.wbwc-stage__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .45);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.wbwc-stage__dot.is-active { width: 20px; background: #fff; }

/* ----------------------------------------------------------------- gallery
   Several photos in one block become justified rows: every row is the same
   height and each photo's width follows its own aspect ratio, so mixed
   orientations line up without being stretched.

   --wbwc-grow is the aspect ratio, written by wbwc-gallery.js once the photo
   reports its real size. max-width caps a tile at its natural width at this
   row height, which is what stops a short final row from stretching.
   ------------------------------------------------------------------------- */

.wbwc-gallery {
    --wbwc-row: clamp(150px, 21vw, 250px);
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
}

.wbwc-tile {
    position: relative;
    margin: 0;
    height: var(--wbwc-row);
    flex: var(--wbwc-grow, 1.35) 1 auto;
    min-width: min(170px, 100%);
    max-width: min(100%, calc(var(--wbwc-grow, 1.35) * var(--wbwc-row)));
    overflow: hidden;
    border-radius: var(--r);
    background: var(--ink-100);
}

.wbwc-tile__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .4s ease;
}

.wbwc-tile:hover .wbwc-tile__img { transform: scale(1.04); }

/* Tall photos get a narrower floor, panoramas a wider one, so neither ends up
   as an unreadable sliver or a single photo hogging a whole row. */
.wbwc-tile.is-portrait { min-width: min(132px, 100%); }
.wbwc-tile.is-panorama { min-width: min(300px, 100%); }

/* One photo in a gallery is shown whole rather than cropped to a row height. */
.wbwc-gallery[data-count="1"] .wbwc-tile {
    height: auto;
    max-width: 100%;
}

.wbwc-gallery[data-count="1"] .wbwc-tile__img {
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

/* A photo that fails to load keeps its slot instead of collapsing the row. */
.wbwc-tile.is-broken { display: grid; place-items: center; }
.wbwc-tile.is-broken .wbwc-tile__img { display: none; }
.wbwc-tile.is-broken::after {
    content: "Photo unavailable";
    font-size: 12px;
    color: var(--ink-300);
}

.wbwc-tile__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px 12px 9px;
    font-size: 12px;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .7));
}

/* ================================================================== editor */

.wbwc-body--editor { background: var(--ink-050); }

.wbwc-editor {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    max-width: 1680px;
    margin: 0 auto;
    /* Grows with the window instead of pinning a fixed gutter, so a wide screen
       is used for content rather than for margins. */
    padding: 24px clamp(16px, 2.2vw, 40px);
    align-items: start;
}

.wbwc-editor.is-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.wbwc-editor.is-collapsed .wbwc-sidebar { display: none; }

/* ------------------------------------------------------------- sidebar */

.wbwc-sidebar {
    position: sticky;
    top: 24px;
    /* Sticky alone is not enough once the sidebar itself is taller than the
       window: the foot of it could only be reached by scrolling the whole page
       down, which on a long page meant scrolling past every photo first. It
       now scrolls inside its own box and the page scrolls separately. */
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    /* Room for the scrollbar is kept whether or not one is showing, so the
       contents do not shift sideways as pages are added. */
    scrollbar-gutter: stable;
    display: grid;
    gap: 22px;
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.wbwc-sidebar__head { display: flex; align-items: center; gap: 12px; }

.wbwc-sidebar__logo {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    object-fit: contain;
    background: var(--ink-050);
    flex: 0 0 auto;
}

.wbwc-sidebar__logo--placeholder {
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-soft);
}

.wbwc-sidebar__identity { display: grid; min-width: 0; }
.wbwc-sidebar__identity strong { color: var(--ink-900); overflow-wrap: anywhere; }
.wbwc-sidebar__id { font-size: 12px; color: var(--ink-300); }

.wbwc-sidebar__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink-300);
    margin-bottom: 10px;
}

.wbwc-sidebar__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.wbwc-sidebar__link {
    display: block;
    padding: 7px 10px;
    padding-left: calc(10px + var(--wbwc-depth, 0) * 14px);
    border-radius: var(--r-sm);
    font-size: 14px;
    color: var(--ink-700);
    overflow-wrap: anywhere;
}

.wbwc-sidebar__link:hover { background: var(--ink-050); text-decoration: none; }
.wbwc-sidebar__link.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }

.wbwc-sidebar__hint { font-size: 12px; color: var(--ink-500); margin: 8px 0 0; }
.wbwc-sidebar__foot { display: grid; gap: 8px; }

.wbwc-sidebar__handle { display: none; }

.wbwc-meter { height: 7px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }

.wbwc-meter__fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 999px;
    transition: width .35s ease, background .2s ease;
}

.wbwc-meter__fill.is-full { background: var(--danger); }

/* ------------------------------------------------------------ work area */

.wbwc-workarea { display: grid; gap: 22px; min-width: 0; }

/* Wraps. A flex row that cannot wrap makes its own minimum width the minimum
   width of everything beside it, so once the title, the view switch and the
   Pages button stopped fitting on a narrow screen, the whole work area was
   pushed wider than the window and the upload box went with it. The overflow
   showed up on the drop zone, which was not the thing at fault. */
.wbwc-workarea__head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

/* Lets the title block give way first, instead of the buttons. */
.wbwc-workarea__head > div:first-child { flex: 1 1 220px; min-width: 0; }

.wbwc-workarea__title { font-size: 26px; margin: 0; overflow-wrap: anywhere; }
.wbwc-workarea__sub { margin: 2px 0 0; font-size: 13px; color: var(--ink-500); }

/* ----------------------------------------------------------- drop zone */

.wbwc-drop {
    position: relative;
    padding: 30px 22px;
    background: var(--paper);
    border: 2px dashed var(--ink-150);
    border-radius: var(--r-lg);
    text-align: center;
    transition: border-color .18s ease, background .18s ease;
}

.wbwc-drop.is-dragging {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.wbwc-drop.is-busy { opacity: .75; pointer-events: none; }

/* Items stay stretched. justify-items: center sizes each one to its own
   max-content instead, which stops the long line of accepted file types from
   wrapping and makes the box demand the width of that whole sentence. The
   pill centres itself with justify-self instead. */
.wbwc-drop__prompt { display: grid; gap: 4px; }
.wbwc-drop__prompt strong { font-size: 17px; color: var(--ink-900); }
.wbwc-drop__prompt span { font-size: 13px; color: var(--ink-500); }

/* Visually hidden but still reachable and still submitted without script. */
.wbwc-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.wbwc-drop__error {
    margin: 14px 0 0;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
    text-align: left;
}

/* ------------------------------------------------------- upload queue */

.wbwc-queue { margin-top: 20px; text-align: left; }

.wbwc-queue__list {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
}

.wbwc-qitem {
    position: relative;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px;
    background: var(--ink-050);
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
}

.wbwc-qitem.is-rejected { border-color: var(--danger); background: var(--danger-soft); }
.wbwc-qitem.is-done { border-color: var(--ok); }

/* Local preview from the chosen file: square thumb, photo cropped to fill, so a
   queue of mixed orientations stays a tidy grid. */
.wbwc-qitem__thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--r-sm);
    object-fit: cover;
    background: var(--ink-100);
}

.wbwc-qitem__body { min-width: 0; display: grid; gap: 3px; }

.wbwc-qitem__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbwc-qitem__meta { font-size: 11px; color: var(--ink-500); }

.wbwc-qitem__bar { height: 4px; border-radius: 999px; background: var(--ink-150); overflow: hidden; }
.wbwc-qitem__fill { height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }

.wbwc-qitem__drop {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 22, 28, .6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.wbwc-queue__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wbwc-queue__summary { font-size: 13px; color: var(--ink-500); }

/* ---------------------------------------------------------- edit blocks */

.wbwc-blocks--editing > * + * { margin-top: 20px; }

.wbwc-editblock {
    padding: 16px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 14px;
}

.wbwc-editblock.is-removing { opacity: .4; transition: opacity .25s ease; }

/* ---------------------------------------------------------------- archived

   Hidden from the shop, still on disk, still using the quota. Dimmed and
   desaturated so it reads as set aside rather than broken, and labelled in
   words as well, because dimming on its own is read as "loading". */

.wbwc-editblock.is-archived { background: var(--ink-050); }
.wbwc-editblock.is-archived .wbwc-block,
.wbwc-editblock.is-archived .wbwc-thumbs { opacity: .45; filter: grayscale(.7); }

.wbwc-tag--muted { background: var(--ink-100); color: var(--ink-500); }

/* Both eyes live in the markup; the state decides which one shows. */
.wbwc-eye { width: 14px; height: 14px; }
.wbwc-eye--shut { display: none; }
.wbwc-editblock.is-archived [data-archive-block] .wbwc-eye--open { display: none; }
.wbwc-editblock.is-archived [data-archive-block] .wbwc-eye--shut { display: block; }

.wbwc-thumb__archive {
    position: absolute;
    z-index: 3;
    left: 3px;
    bottom: 3px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: rgba(20, 22, 28, .62);
    color: #fff;
    cursor: pointer;
}
.wbwc-thumb__archive:hover { background: rgba(20, 22, 28, .85); }
.wbwc-thumb__archive .wbwc-eye { width: 12px; height: 12px; }

.wbwc-thumb.is-archived img { opacity: .4; filter: grayscale(.8); }
.wbwc-thumb.is-archived .wbwc-eye--open { display: none; }
.wbwc-thumb.is-archived .wbwc-eye--shut { display: block; }

/* ------------------------------------------------------------ compact view

   One row per block: the same tick box, tag, count and buttons, with the
   photos shrunk to a strip and the full size rendering put away. Nothing is
   removed, so a page of twenty blocks can be read without scrolling past
   twenty stages to reach the last one.

   Every rule is written as :not(.is-open), so opening one block needs no second
   set of rules putting back what the first set took away. */

.wbwc-editblock__expand { display: none; }
.is-compact .wbwc-editblock__expand { display: inline-grid; }
.is-compact .wbwc-editblock.is-open .wbwc-editblock__expand { transform: rotate(180deg); }

.is-compact .wbwc-editblock:not(.is-open) { gap: 0; padding: 10px 14px; }
.is-compact .wbwc-editblock:not(.is-open) .wbwc-editblock__bar { flex-wrap: wrap; }

.is-compact .wbwc-editblock:not(.is-open) .wbwc-block,
.is-compact .wbwc-editblock:not(.is-open) .wbwc-block__empty,
.is-compact .wbwc-editblock:not(.is-open) [data-append-to-block] { display: none; }

/* 56px rather than the 64 of the full view: a row of them still fits beside
   the buttons, and a tick box on one is big enough to hit.

   The tick box stays, the delete cross goes. Picking a batch is the reason to
   be in this mode at all, so taking selection away would take the mode's own
   purpose with it. Deleting one photo is the opposite: a precise act, and at
   this size the cross sits close enough to the tick box to be hit by mistake.
   It comes back when the block is opened. */
.is-compact .wbwc-editblock:not(.is-open) .wbwc-thumbs { margin-left: 4px; }
.is-compact .wbwc-editblock:not(.is-open) .wbwc-thumb { width: 56px; height: 56px; }
.is-compact .wbwc-editblock:not(.is-open) .wbwc-thumb__remove { display: none; }

.wbwc-workarea__mode { margin-left: auto; }

/* Wraps, for the same reason the work area heading does: a flex row that
   cannot wrap makes its own width the minimum width of the whole column, and
   this row grew another button when archiving was added. On a phone it then
   demanded more width than the screen had, and every block beside it was
   stretched to match. */
.wbwc-editblock__bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.wbwc-editblock__meta { font-size: 13px; color: var(--ink-500); }
.wbwc-editblock__order { margin-left: auto; font-size: 12px; color: var(--ink-300); }

.wbwc-thumbs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wbwc-thumb { position: relative; width: 64px; height: 64px; }

.wbwc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1px solid var(--ink-150);
}

.wbwc-thumb__remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: 2px solid var(--paper);
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

/* ============================================================== responsive */

@media (max-width: 900px) {
    .wbwc-editor { grid-template-columns: minmax(0, 1fr); }

    /* Stacked above the work area on a narrow screen, where it is short again
       and a box that scrolls inside a page that scrolls is only confusing. */
    .wbwc-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .wbwc-sidebar__handle {
        display: inline-flex;
        margin-left: auto;
        padding: 8px 14px;
        border: 1px solid var(--ink-150);
        border-radius: 999px;
        background: var(--paper);
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }

    .wbwc-editor.is-collapsed { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
    .wbwc-storebar__burger { display: block; }

    .wbwc-nav {
        display: none;
        order: 3;
        flex-basis: 100%;
        margin: 0 0 12px;
    }

    .wbwc-nav.is-open { display: block; }

    .wbwc-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }

    /* Nested levels become indented lists rather than floating panels, which is
       the only thing that works on a narrow screen. */
    .wbwc-nav__children {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 16px;
        display: none;
    }

    .wbwc-nav__item--parent.is-open > .wbwc-nav__children { display: block; }
    .wbwc-nav__children .wbwc-nav__children { left: auto; top: auto; }

    .wbwc-nav__group { justify-content: space-between; }

    .wbwc-stage { height: min(var(--wbwc-block-height, 420px), 60vh); }

    .wbwc-gallery { --wbwc-row: 150px; }

    .wbwc-hero { padding: 48px 0 30px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }

    .wbwc-tile:hover .wbwc-tile__img { transform: none; }
}

@media (prefers-color-scheme: dark) {
    /* Storefront photos are the subject, so the dark treatment stays restrained:
       surfaces darken, the accent and photo framing do not change. */
    :root {
        --ink-900: #f3f5fa;
        --ink-700: #d3d8e4;
        --ink-500: #9aa1b4;
        --ink-300: #6d7488;
        --ink-150: #2b3040;
        --ink-100: #23283a;
        --ink-050: #171a24;
        --paper: #1d212e;
        --accent: #7b8cff;
        --accent-dark: #9aa7ff;
        --accent-soft: #252a45;
        --warn-soft: #3a2f16;
        --danger-soft: #3a1f1c;
    }

    .wbwc-storebar { background: rgba(29, 33, 46, .9); }
}

/* ==========================================================================
   Phase 3 - structure editing: page rows, icon buttons, dialogs
   ========================================================================== */

/* ---------------------------------------------------------- icon buttons */

.wbwc-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: none;
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.wbwc-iconbtn:hover { background: var(--ink-100); color: var(--ink-900); }
.wbwc-iconbtn:disabled { opacity: .4; cursor: not-allowed; }

.wbwc-iconbtn--xs { width: 22px; height: 22px; font-size: 11px; }

.wbwc-iconbtn--danger:hover { background: var(--danger-soft); color: var(--danger); }

.wbwc-sidebar__titlerow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    /* The height of the icon button that sits in this row, kept whether or not
       the button is there. Without it the heading collapsed on pages that drew
       no button and everything below the list jumped a few pixels. */
    min-height: 26px;
}

/* The new-page control is a button in the editor and a link elsewhere. */
a.wbwc-iconbtn { text-decoration: none; }
a.wbwc-iconbtn:hover { text-decoration: none; }

.wbwc-sidebar__titlerow .wbwc-sidebar__title { margin-bottom: 0; }

.wbwc-sidebar__head .wbwc-iconbtn { margin-left: auto; flex: 0 0 auto; }

.wbwc-alert--tight { padding: 9px 12px; font-size: 13px; margin-bottom: 0; }

/* ------------------------------------------------------------- page rows */

.wbwc-pagerow {
    display: flex;
    align-items: center;
    gap: 2px;
    border-radius: var(--r-sm);
}

.wbwc-pagerow .wbwc-sidebar__link { flex: 1 1 auto; min-width: 0; }

.wbwc-pagerow.is-active { background: var(--accent-soft); }
.wbwc-pagerow.is-active .wbwc-sidebar__link { color: var(--accent-dark); font-weight: 600; }
.wbwc-pagerow.is-removing { opacity: .4; }

/* The row tools stay out of the way until the row is pointed at or focused.
   focus-within matters: without it the buttons would be unreachable by keyboard. */
.wbwc-pagerow__tools {
    display: flex;
    gap: 0;
    flex: 0 0 auto;
    opacity: 0;
    transition: opacity .15s ease;
}

.wbwc-pagerow:hover .wbwc-pagerow__tools,
.wbwc-pagerow:focus-within .wbwc-pagerow__tools { opacity: 1; }

/* On touch there is no hover, so the tools are always visible. */
@media (hover: none) {
    .wbwc-pagerow__tools { opacity: 1; }
}

/* flex: 0 0 auto keeps the buttons together when the bar wraps, instead of
   letting them be squeezed one by one. */
.wbwc-editblock__tools { margin-left: auto; display: flex; gap: 2px; flex: 0 0 auto; }
.wbwc-editblock__tools + .wbwc-editblock__order { display: none; }

/* ---------------------------------------------------------------- dialogs */

.wbwc-dialog {
    width: min(460px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    background: var(--paper);
    color: var(--ink-700);
    box-shadow: var(--shadow-lg);
}

.wbwc-dialog::backdrop {
    background: rgba(20, 22, 28, .45);
    backdrop-filter: blur(2px);
}

.wbwc-dialog__form { padding: 26px; display: grid; gap: 14px; }

.wbwc-dialog__title { margin: 0; font-size: 19px; }

.wbwc-dialog__lede,
.wbwc-dialog__hint {
    margin: 0;
    font-size: 13px;
    color: var(--ink-500);
}

.wbwc-dialog__hint { min-height: 1.2em; }

.wbwc-dialog__error,
.wbwc-dialog__ok {
    margin: 0;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    font-size: 13px;
}

.wbwc-dialog__error { background: var(--danger-soft); color: var(--danger); }
.wbwc-dialog__ok { background: var(--accent-soft); color: var(--accent-dark); }

.wbwc-dialog__rule { border: 0; border-top: 1px solid var(--ink-150); margin: 4px 0; }

.wbwc-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

.wbwc-dialog form { display: grid; gap: 12px; }

/* A prefix that makes the shop address concrete rather than abstract. */
.wbwc-prefixed {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--paper);
}

.wbwc-prefixed:focus-within { border-color: var(--accent); }

.wbwc-prefixed__prefix {
    display: grid;
    place-items: center;
    padding: 0 10px;
    background: var(--ink-050);
    border-right: 1px solid var(--ink-150);
    font-size: 13px;
    color: var(--ink-500);
    white-space: nowrap;
}

.wbwc-prefixed input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    border-radius: 0;
    background: none;
}

.wbwc-prefixed input:focus { outline: none; }

/* ==========================================================================
   Phase 4 - sign-in, password reset, workspace switcher
   ========================================================================== */

.wbwc-body--auth { background: var(--ink-050); }

.wbwc-authcard {
    max-width: 400px;
    margin: 72px auto;
    padding: 34px 32px 26px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
}

.wbwc-authcard__title { font-size: 25px; margin-bottom: 6px; }

.wbwc-authcard__lede {
    margin: 0 0 22px;
    font-size: 14px;
    color: var(--ink-500);
    overflow-wrap: anywhere;
}

.wbwc-authcard__foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--ink-150);
    font-size: 13px;
}

.wbwc-btn--block { width: 100%; }

.wbwc-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-500);
}

.wbwc-check input { width: auto; }

.wbwc-field__error { font-size: 12px; color: var(--danger); font-weight: 500; }
.wbwc-field__error:empty { display: none; }

/* The one-time code: wide tracking so six digits are easy to check against
   the email, and a tabular font so they do not shift as they are typed. */
.wbwc-code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 24px;
    letter-spacing: 10px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.wbwc-switcher { margin: 0; }
.wbwc-switcher select { width: 100%; }

.wbwc-inlineform { display: inline; }

.wbwc-footer__account {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.wbwc-sidebar__foot form { margin: 0; }

/* ==========================================================================
   Password fields: reveal button and the live checklist
   ========================================================================== */

.wbwc-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------------------------------- reveal button */

.wbwc-pw { position: relative; display: block; }

/* Room for the button, so a long password never runs underneath it. */
.wbwc-pw input { width: 100%; padding-right: 44px; }

.wbwc-pw__eye {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: none;
    color: var(--ink-300);
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.wbwc-pw__eye:hover { color: var(--ink-700); background: var(--ink-100); }
.wbwc-pw__eye.is-revealing { color: var(--accent); }

.wbwc-pw__icon { width: 19px; height: 19px; }

/* One icon at a time: the open eye while hidden, the struck-through eye while
   revealed, which is the direction most people expect. */
.wbwc-pw__icon--hide { display: none; }
.wbwc-pw__eye.is-revealing .wbwc-pw__icon--show { display: none; }
.wbwc-pw__eye.is-revealing .wbwc-pw__icon--hide { display: block; }

/* --------------------------------------------------------- checklist */

.wbwc-pwrules {
    margin: -4px 0 2px;
    padding: 12px 14px;
    background: var(--ink-050);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
}

.wbwc-pwrules.is-complete {
    border-color: var(--ok);
    background: color-mix(in srgb, var(--ok) 7%, transparent);
}

.wbwc-pwrules__head {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-500);
}

.wbwc-pwrules__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }

.wbwc-pwrule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-500);
    transition: color .15s ease;
}

.wbwc-pwrule__mark {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    border: 1.5px solid var(--ink-150);
    border-radius: 50%;
    position: relative;
    transition: background .15s ease, border-color .15s ease;
}

/* A drawn tick rather than a character, so it lines up at any font size. */
.wbwc-pwrule.is-met .wbwc-pwrule__mark {
    background: var(--ok);
    border-color: var(--ok);
}

.wbwc-pwrule.is-met .wbwc-pwrule__mark::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wbwc-pwrule.is-met { color: var(--ink-700); }
.wbwc-pwrule.is-met .wbwc-pwrule__text { text-decoration: line-through; text-decoration-color: var(--ink-300); }

@media (prefers-reduced-motion: reduce) {
    .wbwc-pwrule, .wbwc-pwrule__mark, .wbwc-pw__eye { transition: none; }
}

/* ==========================================================================
   Phase 5 - contact page, inbox
   ========================================================================== */

.wbwc-stack { display: grid; gap: 20px; padding-top: 26px; }
.wbwc-stack--narrow { max-width: 760px; }

.wbwc-pagehead { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.wbwc-pagehead h1 { font-size: 26px; margin: 0 0 4px; }
/* Pushes the trailing button to the far right, but only when there is one.
   On a page whose header is just a title, that title is itself the last
   child, and the rule was sending the heading to the right hand edge. */
.wbwc-pagehead > :last-child:not(:first-child) { margin-left: auto; }

.wbwc-muted { color: var(--ink-500); font-size: 14px; margin: 0; }

.wbwc-sectiontitle {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-300);
    margin: 0 0 14px;
}

.wbwc-panel--flat { margin: 0; padding: 22px; box-shadow: none; }

.wbwc-inlinefields { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.wbwc-field--wide { flex: 1 1 240px; }
.wbwc-field--wide input, .wbwc-field--wide select { width: 100%; }
.wbwc-field textarea {
    font: inherit;
    padding: 9px 12px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
    background: var(--paper);
    color: var(--ink-900);
    resize: vertical;
}
.wbwc-field textarea:focus { border-color: var(--accent); outline: none; }

/* -------------------------------------------------- workspace nav strip */

.wbwc-wsnav {
    background: var(--paper);
    border-bottom: 1px solid var(--ink-150);
}

.wbwc-wsnav__inner {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 54px;
    flex-wrap: wrap;
}

.wbwc-wsnav__brand { font-weight: 700; color: var(--ink-900); margin-right: 14px; }

.wbwc-wsnav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-700);
}

.wbwc-wsnav__link:hover { background: var(--ink-100); color: var(--ink-900); text-decoration: none; }
.wbwc-wsnav__link.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }

.wbwc-wsnav__link--button { border: 0; background: none; font: inherit; cursor: pointer; }
.wbwc-wsnav__spacer { flex: 1 1 auto; }

.wbwc-badge {
    display: inline-grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* --------------------------------------------------- contact: editing */

.wbwc-contactlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.wbwc-contactrow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--ink-050);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
}

.wbwc-contactrow__value { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.wbwc-contactrow__tools { display: flex; gap: 2px; flex: 0 0 auto; }

.wbwc-contactform { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.wbwc-contactform__actions { display: flex; gap: 8px; }

/* ---------------------------------------------------- contact: public */

.wbwc-contactgrid {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

@media (min-width: 860px) {
    .wbwc-contactgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}

.wbwc-contactcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.wbwc-contactcard {
    display: grid;
    gap: 2px;
    padding: 16px 18px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
}

.wbwc-contactcard__type {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-300);
}

.wbwc-contactcard__value { font-size: 16px; color: var(--ink-900); overflow-wrap: anywhere; }
a.wbwc-contactcard__value { color: var(--accent); }
.wbwc-contactcard__label { font-size: 13px; color: var(--ink-500); }

/* --------------------------------------------------------------- inbox */

.wbwc-msglist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }

.wbwc-msgrow__link {
    display: grid;
    grid-template-columns: 10px minmax(0, 1.1fr) minmax(0, 2fr) auto;
    gap: 14px;
    align-items: center;
    padding: 13px 16px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-sm);
    color: var(--ink-700);
}

.wbwc-msgrow__link:hover { border-color: var(--accent); text-decoration: none; }

/* An unread message gets a dot and a heavier subject: colour alone would be
   invisible to anyone who cannot distinguish it. */
.wbwc-msgrow__dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.wbwc-msgrow.is-unread .wbwc-msgrow__dot { background: var(--accent); }
.wbwc-msgrow.is-unread .wbwc-msgrow__subject { font-weight: 650; color: var(--ink-900); }

.wbwc-msgrow__who { display: grid; min-width: 0; font-size: 13px; }
.wbwc-msgrow__who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbwc-msgrow__subject { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wbwc-msgrow__when { font-size: 12px; color: var(--ink-300); white-space: nowrap; }

@media (max-width: 720px) {
    .wbwc-msgrow__link { grid-template-columns: 10px minmax(0, 1fr); }
    .wbwc-msgrow__when { grid-column: 2; }
}

.wbwc-message__head { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--ink-150); }
.wbwc-message__subject { font-size: 21px; margin: 0 0 6px; }

/* The customer's own line breaks are kept rather than guessed at. */
.wbwc-message__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.7; }

.wbwc-message__foot {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--ink-150);
}

.wbwc-message__foot form { margin: 0; }

/* ==========================================================================
   One tenant layout everywhere, and the contact page stacked
   ========================================================================== */

/* Contact details sit in a row above the form and wrap as needed, so two
   methods do not stretch to fill a desktop width. */
.wbwc-contactcards {
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
    margin-bottom: 30px;
}

.wbwc-contactform-panel {
    max-width: 660px;
    padding: 26px 28px;
    background: var(--paper);
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
}

/* Name and email share a row on a wide screen and stack on a narrow one. */
.wbwc-formrow { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 620px) {
    .wbwc-formrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.wbwc-contactform-panel .wbwc-field textarea,
.wbwc-contactform-panel .wbwc-field input { width: 100%; }

/* A sidebar entry that carries a badge needs the count pushed to the end. */
.wbwc-sidebar__link--row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* The work area on the contact and inbox pages has no drop zone to pad, so it
   gets the same top spacing the editor's header provides. */
.wbwc-workarea.wbwc-stack { padding-top: 0; }

/* ==========================================================================
   Consistency between the tenant pages
   ========================================================================== */

/* The editor's work area and the contact and inbox pages were using different
   gaps and top padding, which is what made the two layouts look subtly out of
   step with each other. One rule for all of them. */
.wbwc-workarea,
.wbwc-workarea.wbwc-stack {
    display: grid;
    gap: 22px;
    padding-top: 0;
    min-width: 0;
}

/* The footer sits under a 1680px shell on tenant pages and a narrower one on
   public pages, so it follows whichever it is under rather than ending at a
   different width from the content above it. */
.wbwc-body--editor .wbwc-footer .wbwc-container {
    max-width: 1680px;
    padding-inline: clamp(16px, 2.2vw, 40px);
}

/* On a wide screen the form no longer has to hug the left edge of a very wide
   work area; it stays readable but is no longer marooned. */
.wbwc-contactform-panel { max-width: 720px; }

@media (min-width: 1500px) {
    /* Past this width the storefront can breathe too, rather than leaving a
       third of the window empty on each side. */
    .wbwc-body--store .wbwc-container,
    .wbwc-body--directory .wbwc-container { max-width: 1360px; }
}

/* ==========================================================================
   Confirmation dialog, and the contact page as a centred column
   ========================================================================== */

.wbwc-btn--danger { background: var(--danger); color: #fff; }
.wbwc-btn--danger:hover { background: #a62a1a; color: #fff; }

.wbwc-confirm { width: min(430px, calc(100vw - 32px)); }
.wbwc-confirm .wbwc-dialog__lede { font-size: 14px; line-height: 1.6; }
.wbwc-confirm .wbwc-dialog__lede:empty { display: none; }
.wbwc-confirm .wbwc-dialog__actions { margin-top: 10px; }

/* The whole contact page is one centred column rather than a left-aligned
   block: the form has to stay narrow to be readable, so centring is what stops
   the rest of a wide window looking like a mistake. */
.wbwc-contactpage { max-width: 780px; }

.wbwc-contactpage .wbwc-contactform-panel { max-width: none; }

/* At this width two cards per row looks deliberate and one card does not
   stretch across the whole column. */
.wbwc-contactpage .wbwc-contactcards {
    grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
}

/* ==========================================================================
   Document library
   ========================================================================== */

/* The extension badge. Documents all look alike in a list, so the type is the
   one thing worth showing before the name: it tells the reader whether the
   file will open in the page or arrive as a download. */
.wbwc-doctype {
    flex: none;
    display: inline-grid;
    place-items: center;
    min-width: 46px;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    background: var(--ink-100);
    color: var(--ink-700);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

/* ------------------------------------------------------- tenant's list ---- */

.wbwc-doclist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.wbwc-docrow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
    background: var(--paper);
}

.wbwc-docrow:hover { border-color: var(--ink-300); }

.wbwc-docrow__name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

/* Long file names truncate rather than wrapping the row to two lines, so a
   list of twenty documents stays scannable. */
.wbwc-docrow__name > a {
    font-weight: 600;
    color: var(--ink-900);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbwc-docrow__name > a:hover { text-decoration: underline; }
.wbwc-docrow__name .wbwc-muted { font-size: 12px; }

.wbwc-docrow.is-going { opacity: .45; pointer-events: none; }

/* ------------------------------------------------------ public library ---- */

.wbwc-docgrid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
}

.wbwc-doccard {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.wbwc-doccard__head {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
}

.wbwc-doccard__head .wbwc-doctype { grid-row: 1 / span 2; }
.wbwc-doccard__name { margin: 0; font-size: 17px; line-height: 1.3; }
.wbwc-doccard__head .wbwc-muted { font-size: 12px; }

/* A fixed height rather than one that follows the document. An iframe cannot
   be measured from outside, so a preview that tried to fit its content would
   either collapse to nothing or grow until the page became unusable. */
.wbwc-docframe {
    width: 100%;
    height: clamp(320px, 52vh, 620px);
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
    background: var(--ink-050);
}

.wbwc-docnote {
    margin: 0;
    padding: 14px 16px;
    border: 1px dashed var(--ink-150);
    border-radius: var(--r);
    background: var(--ink-050);
    color: var(--ink-500);
    font-size: 13px;
    line-height: 1.6;
}

.wbwc-doccard__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

/* One document on its own looks stranded in half a row, so it takes the full
   width and the preview gets the extra space. */
.wbwc-docgrid:has(> .wbwc-doccard:only-child) { grid-template-columns: 1fr; }

/* ==========================================================================
   Change password
   ========================================================================== */

/* Narrow on purpose. The fields are short and the checklist beside them is
   short, so a form stretched across a wide work area reads as a mistake. */
.wbwc-pwpanel { max-width: 560px; }
.wbwc-pwpanel__title { margin: 0 0 6px; font-size: 22px; }

/* On a plain card the panel is already the card, so it drops its own frame
   rather than drawing a second border inside the first. */
.wbwc-authcard--wide { max-width: 560px; }

.wbwc-authcard--wide .wbwc-pwpanel {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

/* Separates proving who you are from choosing the new password. They are two
   different questions and the form reads as one long list without it. */
.wbwc-rule {
    height: 0;
    margin: 4px 0;
    border: 0;
    border-top: 1px solid var(--ink-150);
}

.wbwc-uploadhint { margin-top: 10px; }

/* ==========================================================================
   A block's colour paints the letterbox surround
   ========================================================================== */

.wbwc-field__hint {
    display: block;
    margin-top: 5px;
    color: var(--ink-500);
    font-size: 12px;
    line-height: 1.55;
}

/* Until now this colour sat on .wbwc-block, underneath a stage that covers the
   block completely, so for a single photo or a slider it was invisible: what
   showed around the photo was the blurred copy of the photo, drawn on top of
   it. The colour now paints that surround itself, and the blurred copy is
   switched off, which is the only place the two could both be shown. */
.wbwc-block--tinted .wbwc-stage { background: var(--wbwc-block-bg); }

/* ------------------------------------------------------- follows the photo

   The frame takes the photo's own shape, so the photo fills it exactly. There
   is no leftover space, which means no blurred surround: the thing that was
   covering half the height of a block on a phone was never decoration, it was
   filling a gap that should not have existed. */

.wbwc-stage.is-fitted {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: var(--wbwc-fit-aspect);
    border-radius: 0;

    /* Both of these matter, for the same reason and in opposite directions.
       A box with a ratio turns a minimum height into a minimum width, so the
       200px floor would demand 800px of width from a 4:1 panorama and push the
       page sideways. And a maximum height would clamp the frame away from the
       photo's shape, which brings the letterbox back. The whole promise here
       is that the frame is the photo. */
    min-height: 0;
    max-height: none;
}

/* Square corners, and out to both edges of the page: a rounded card with a
   reading width cannot meet the next one or the sides. The negative margin
   cancels the gutter above, so the block ends up exactly the page's width and
   not a pixel more. Only on the shop; in the editor each block is a card and
   should stay one. */
.wbwc-blocks:not(.wbwc-blocks--editing) > .wbwc-block--photo {
    border-radius: 0;
    max-width: none;
    margin-inline: -20px;

    /* auto, not the 100% the rule above gives every other block. A definite
       width does not grow when a margin is negative, it only slides: the block
       kept the track's width, moved twenty pixels left, and finished forty
       short of the right edge. With auto it stretches into both margins and
       ends up exactly the page's width. */
    width: auto;
}

/* Two of them in a row meet with nothing between. */
.wbwc-blocks > .wbwc-block--photo + .wbwc-block--photo { margin-top: 0; }

/* The surround has nothing to paint, so nothing paints it. */
.wbwc-block--photo .wbwc-slide::before { display: none; }

/* Except on a slide whose shape is not the frame's. The frame is the first
   photo's shape, so a slide show of mixed shapes leaves bare frame above and
   below every other photo, and on this dark page that is a black band across
   the one mode built to have no band. Those slides get their blurred copy
   back. See fitStage in wbwc-gallery.js, which adds the class. */
.wbwc-block--photo .wbwc-slide.is-mismatched::before { display: block; }

/* The words sit on a square cornered frame, so their own box is square too. */
.wbwc-block--photo .wbwc-overlay { border-radius: 0; }

.wbwc-block--tinted .wbwc-slide::before { display: none; }

/* The photo's shadow was built to read against a dark blurred backdrop. On a
   pale colour it turns into a grey smear, so a tinted block gets a lighter one
   that still lifts the photo off the surround. */
/* The video case is excluded on purpose. A video fills the frame edge to edge
   and had its shadow removed for that reason, and this rule sits later in the
   file at the same specificity, so without the :not it would hand the shadow
   back to exactly the element that should not have one. */
.wbwc-block--tinted .wbwc-slide__img,
.wbwc-block--tinted .wbwc-stage:not(.wbwc-stage--video) .wbwc-stage__media {
    box-shadow: 0 8px 24px rgba(20, 22, 28, .16);
}

/* A gallery already showed the colour, but only as slivers in the gaps between
   photos, which reads as a bug rather than a choice. The padding turns it into
   a mat the photos sit on. */
.wbwc-block--tinted .wbwc-gallery {
    padding: var(--gap);
    border-radius: var(--r-lg);
}

/* Text on an unknown colour cannot be left to chance, so a tinted text block
   keeps its own padding and inherits nothing it has not been given. */
.wbwc-block--tinted .wbwc-block__text { padding: 22px 24px; }

/* ==========================================================================
   The one page message
   ========================================================================== */

.wbwc-flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: var(--r);
    font-size: 14px;
    line-height: 1.55;
}

.wbwc-flash[hidden] { display: none; }

.wbwc-flash--ok { background: var(--accent-soft); color: var(--accent-dark); }
.wbwc-flash--error { background: var(--danger-soft); color: var(--danger); }

.wbwc-flash__text { margin: 0; flex: 1 1 auto; }

.wbwc-flash__close {
    flex: none;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    opacity: .6;
}

.wbwc-flash__close:hover { opacity: 1; background: rgba(20, 22, 28, .08); }

/* ==========================================================================
   Admin console
   ========================================================================== */

.wbwc-sidebar--admin .wbwc-sidebar__logo--placeholder { background: var(--ink-900); color: #fff; }

/* ------------------------------------------------------------- tiles ---- */

/* Counted, not auto-fit. auto-fit packs in as many columns as the width
   allows and knows nothing about how many items there are, so six tiles came
   out as five and a lonely sixth. Six divides by 6, 3, 2 and 1 and by nothing
   else, so those are the only column counts that leave no orphan, and each
   one gets the width it actually needs. */
.wbwc-tiles {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    margin-bottom: 22px;
}

@media (min-width: 640px) { .wbwc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1150px) { .wbwc-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1700px) { .wbwc-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.wbwc-tilecard {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 18px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
}

.wbwc-tilecard__value { font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--ink-900); }
.wbwc-tilecard__label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.wbwc-tilecard__note { font-size: 12px; color: var(--ink-500); }

/* A count that needs attention says so by colour as well as by number, but
   only when it is above zero: a permanently amber tile is ignored. */
.wbwc-tilecard.is-warn { border-color: var(--warn); background: var(--warn-soft); }
.wbwc-tilecard.is-warn .wbwc-tilecard__value,
.wbwc-tilecard.is-warn .wbwc-tilecard__label { color: var(--warn); }

/* ------------------------------------------------------------ charts ---- */

/* Two across, and never three. Four charts in three columns leaves one on a
   row by itself, which is what auto-fit was doing: it fits columns to the
   width without knowing four things are being laid out. A chart also needs
   room to be readable, so two is the most that belongs on a row anyway. */
.wbwc-chartrow {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
    .wbwc-chartrow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A canvas has no intrinsic height, and Chart.js measures its container. A
   fixed box is what stops the chart growing on every resize, which is the
   classic runaway where the canvas reports the height it just set. */
.wbwc-chartbox { position: relative; height: 280px; }

/* ------------------------------------------------------------ tables ---- */

.wbwc-searchbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.wbwc-searchbar input[type="search"] { flex: 1 1 280px; }

/* The table scrolls sideways inside its own box rather than widening the
   page, so the sidebar does not slide off on a narrow screen. */
.wbwc-tablewrap {
    overflow-x: auto;
    border: 1px solid var(--ink-150);
    border-radius: var(--r-lg);
    background: var(--paper);
}

/* Fixed, not auto. With auto the browser sizes every column from the widest
   cell in it, so the same table filtered down to one row laid itself out
   completely differently and the columns jumped. The widths come from the
   colgroup in each view.

   min-width keeps the columns readable on a narrow screen: below it the
   wrapper scrolls sideways rather than crushing everything. */
.wbwc-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 14px;
}

/* Fixed layout will not grow a cell to fit, so anything long has to be told
   what to do instead. Addresses and shop names break; the rest stays on one
   line because wrapping a date or a count reads as a mistake. */
.wbwc-table td { overflow-wrap: anywhere; }
.wbwc-table th { overflow-wrap: normal; }

/* Not buttons. overflow-wrap: anywhere breaks between any two characters, so
   a button in a column too narrow for its label came out as one letter per
   line, reading E d i t down the cell. A button is never the thing that should
   wrap: the column gets wider instead. */
.wbwc-table td .wbwc-btn,
.wbwc-table td .wbwc-iconbtn {
    overflow-wrap: normal;
    white-space: nowrap;
}

.wbwc-table th,
.wbwc-table td { padding: 11px 14px; text-align: left; vertical-align: middle; }

.wbwc-table thead th {
    position: sticky;
    top: 0;
    background: var(--ink-050);
    border-bottom: 1px solid var(--ink-150);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ink-500);
    white-space: nowrap;
}

.wbwc-table thead th a { color: inherit; text-decoration: none; }
.wbwc-table thead th a:hover { color: var(--ink-900); }

.wbwc-table tbody tr + tr td { border-top: 1px solid var(--ink-100); }
.wbwc-table tbody tr:hover { background: var(--ink-050); }

.wbwc-table__muted { color: var(--ink-500); font-size: 12px; }

/* Owner name over owner email, and used over allowance, read as one cell
   rather than two lines of equal weight. */
.wbwc-table td .wbwc-table__muted { display: block; }

.wbwc-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.wbwc-pill--live { background: #e6f5ee; color: var(--ok); }
.wbwc-pill--suspended { background: var(--danger-soft); color: var(--danger); }
.wbwc-pill--expired { background: var(--warn-soft); color: var(--warn); }
.wbwc-pill--active { background: #e6f5ee; color: var(--ok); }

/* ------------------------------------------------- fields and panels ---- */

.wbwc-checkfield {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-700);
}

.wbwc-checkfield input { margin-top: 3px; flex: none; }


/* Settings is two columns where there is room for two. The email form stays
   narrow because a long text field is harder to read, not easier, so the
   second column is what stops the rest of the work area sitting empty. */
.wbwc-settingsgrid {
    display: grid;
    gap: 18px;
    align-items: start;
    grid-template-columns: minmax(0, 1fr);
}

.wbwc-settingsgrid__side { display: grid; gap: 18px; align-items: start; }

@media (min-width: 1100px) {
    .wbwc-settingsgrid { grid-template-columns: minmax(360px, 560px) minmax(300px, 1fr); }
}

.wbwc-notelist {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--ink-500);
}

.wbwc-notelist strong { color: var(--ink-700); }

/* Sits under the shop sections, separated from them: it is not another place
   to go, it is an action. */
.wbwc-sidebar__request {
    padding: 0 4px;
    margin: -6px 0 2px;
}

/* A waiting shop is not a suspended one: it has never been switched on, and
   the colour says which kind of attention it needs. */
.wbwc-pill--waiting { background: var(--warn-soft); color: var(--warn); }

.wbwc-badge--warn { background: var(--warn); color: #fff; }

/* ==========================================================================
   Staff
   ========================================================================== */

.wbwc-stafflist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.wbwc-staffrow {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
    background: var(--paper);
}

/* Faded rather than hidden. Somebody who cannot sign in is still somebody the
   owner has, and a row that disappears reads as deleted. */
.wbwc-staffrow.is-off { background: var(--ink-050); }
.wbwc-staffrow.is-off .wbwc-staffrow__who strong { color: var(--ink-500); }

.wbwc-staffrow__who { display: flex; flex-direction: column; gap: 2px; min-width: 190px; }
.wbwc-staffrow__who .wbwc-muted { font-size: 12px; }

.wbwc-staffrow__shops { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 200px; }
.wbwc-staffrow__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.wbwc-checkgroup {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--ink-150);
    border-radius: var(--r);
    display: grid;
    gap: 8px;
}

.wbwc-checkgroup legend {
    padding: 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-500);
}

/* Set apart from the rest of the dialog by a rule and by colour, so it does
   not read as one more setting. */
.wbwc-danger {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--ink-150);
}

.wbwc-linkbtn--danger { color: var(--danger); }

.wbwc-danger__warning {
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: var(--r);
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
    line-height: 1.6;
}

.wbwc-danger .wbwc-field { margin-bottom: 10px; }

/* ==========================================================================
   Selecting several things in the editor
   ========================================================================== */

.wbwc-selectbox { display: inline-flex; align-items: center; margin-right: 2px; }
.wbwc-selectbox input { cursor: pointer; }

/* The whole thumbnail is the hit target, not a small box drawn on it. These
   are 64 pixels square and already carry a delete button in one corner, so a
   checkbox beside it would leave almost nothing to aim at. The checkbox is
   still a real checkbox, just an invisible one filling the square, so it
   keeps its keyboard behaviour and its checked state. */
.wbwc-thumb__select {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    cursor: pointer;
}

.wbwc-thumb__select input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

/* Without a visible checkbox the selected state has to be drawn. A ring and a
   tick, both outside the photo's own colours so they read on any photo. */
.wbwc-thumb:has(.wbwc-thumb__select input:checked) {
    outline: 3px solid var(--accent);
    outline-offset: 1px;
}

.wbwc-thumb:has(.wbwc-thumb__select input:checked)::after {
    content: "\2713";
    position: absolute;
    z-index: 2;
    left: 4px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* The delete button stays reachable above the selection layer. */
.wbwc-thumb__remove { z-index: 3; }

.wbwc-thumb__select input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Fixed to the bottom of the window, not to the page. The blocks it acts on
   can run well past one screen, and a bar that scrolls away is a bar you have
   to scroll back to. */
.wbwc-selectbar {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--ink-900);
    color: #fff;
    box-shadow: var(--shadow-lg);
}

.wbwc-selectbar[hidden] { display: none; }

.wbwc-selectbar__count { font-size: 14px; font-weight: 600; padding-left: 6px; }

.wbwc-selectbar .wbwc-btn--ghost {
    border-color: rgba(255, 255, 255, .3);
    background: transparent;
    color: #fff;
}

.wbwc-selectbar .wbwc-btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* A photo whose block is selected is going with it, so its own box is switched
   off. Dimmed rather than hidden: it is still there, it just is not a separate
   decision any more. */
.wbwc-thumb.is-locked { opacity: .45; }
.wbwc-thumb.is-locked .wbwc-thumb__select { cursor: not-allowed; }
.wbwc-thumb.is-locked .wbwc-thumb__select input { cursor: not-allowed; }

/* A hint that is telling you something is wrong, rather than explaining a
   field. */
.wbwc-field__hint--warn { color: var(--warn); font-weight: 600; }

/* Four figures read against each other, so they line up rather than running
   on as a sentence. */
.wbwc-figures {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
    margin: 14px 0;
}

.wbwc-figures > div {
    padding: 10px 12px;
    border-radius: var(--r);
    background: var(--ink-050);
}

.wbwc-figures dt { font-size: 12px; color: var(--ink-500); margin-bottom: 2px; }
.wbwc-figures dd { margin: 0; font-size: 19px; font-weight: 700; color: var(--ink-900); }
/* The second half of a figure that is a part of something, as in 45,940 MB free
   "of 466,498 MB". Quieter, so the number that matters still reads first. */
.wbwc-figures__sub { font-size: 13px; font-weight: 500; color: var(--ink-500); }

/* A number beside the unit it is typed in. The stored unit is still the
   megabyte; this is only so an allowance of five gigabytes can be typed as 5. */
.wbwc-amount { display: flex; gap: 6px; align-items: stretch; }
.wbwc-amount input { flex: 1 1 auto; min-width: 0; }
.wbwc-amount select { flex: 0 0 auto; }

.wbwc-figures > div.is-warn { background: var(--danger-soft); }
.wbwc-figures > div.is-warn dt,
.wbwc-figures > div.is-warn dd { color: var(--danger); }

.wbwc-filterbuttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* A section heading with one control sitting at the end of its line. */
.wbwc-sectionrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.wbwc-sectionrow .wbwc-sectiontitle { margin-bottom: 0; }

/* A percentage that has crossed the warning line. */
.wbwc-table__muted.is-warn { color: var(--warn); font-weight: 700; }

/* ------------------------------------------- admin accounts, grouped rows */
.wbwc-table__sub { padding-left: 26px; }

/* The action column is the one thing on a row that must always be reachable.
   With enough columns the wrapper scrolls sideways and it was the first thing
   to go over the edge, so it is pinned. The header cell is already sticky on
   top, and adding right makes it stick in the corner. */
.wbwc-table thead th:last-child { right: 0; }

.wbwc-table tbody td:last-child {
    position: sticky;
    right: 0;
    background: var(--paper);
}

.wbwc-table tbody tr:hover td:last-child { background: var(--ink-050); }

tr.is-folded { display: none; }

.wbwc-hidestaff {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--ink-500);
    cursor: pointer;
}
