/* ==========================================================================
   MyBarber — design system
   Warm, modern barbershop identity. Token-driven (light + dark), animated.
   All class names match the Blade views and booking.js / studio.js hooks.
   ========================================================================== */

:root {
    /* Core palette (light) */
    --ink: #1f1813;
    --ink-soft: #6a5c4f;
    --paper: #f4efe7;
    --paper-2: #faf6ee;
    --card: #fffdf8;
    --line: #e7dccb;
    --line-strong: #d8c8b1;
    --brass: #a9793f;
    --brass-deep: #7a5222;
    --rust: #9c3f30;
    --ok: #2f6b45;
    --ok-soft: #e4f1e8;
    --bad-soft: #f8e7e3;

    /* Dark "feature" surfaces used in light mode as contrast blocks
       (hero / stats / footer / inked panel / home header). */
    --surface-dark: #1f1813;
    --surface-dark-2: #2a211a;
    --surface-dark-text: #f6efe4;
    --surface-dark-muted: #d9c6ac;
    --surface-dark-accent: #e0b884;
    --surface-dark-line: rgba(246, 239, 228, 0.16);
    --hero-glow: rgba(156, 63, 48, 0.5);
    --hero-glow-2: rgba(169, 121, 63, 0.35);

    --field-bg: #ffffff;

    /* Elevation */
    --shadow-sm: 0 1px 2px rgba(31, 24, 19, 0.06), 0 2px 6px rgba(31, 24, 19, 0.05);
    --shadow: 0 10px 30px rgba(31, 24, 19, 0.09), 0 2px 8px rgba(31, 24, 19, 0.05);
    --shadow-lg: 0 24px 60px rgba(31, 24, 19, 0.16), 0 6px 16px rgba(31, 24, 19, 0.08);
    --ring: 0 0 0 4px rgba(169, 121, 63, 0.18);

    /* Radii */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 26px;

    /* Motion */
    --ease: cubic-bezier(0.22, 0.7, 0.24, 1);
    --t-fast: 0.16s;
    --t: 0.26s;

    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Outfit", "Avenir Next", system-ui, -apple-system, sans-serif;

    --maxw: 1140px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #f1e8db;
        --ink-soft: #ab9b89;
        --paper: #15100c;
        --paper-2: #1a140f;
        --card: #211a14;
        --line: rgba(246, 239, 228, 0.1);
        --line-strong: rgba(246, 239, 228, 0.18);
        --brass: #d6a265;
        --brass-deep: #e0b884;
        --rust: #d0705f;
        --ok: #6cc08a;
        --ok-soft: rgba(108, 192, 138, 0.14);
        --bad-soft: rgba(208, 112, 95, 0.16);

        --surface-dark: #241c15;
        --surface-dark-2: #2f251c;
        --surface-dark-text: #f3ead d;
        --surface-dark-text: #f3eadd;
        --surface-dark-muted: #c9b89e;
        --surface-dark-accent: #e4bd8a;
        --surface-dark-line: rgba(246, 239, 228, 0.12);
        --hero-glow: rgba(156, 63, 48, 0.38);
        --hero-glow-2: rgba(169, 121, 63, 0.26);

        --field-bg: #171009;

        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 28px 64px rgba(0, 0, 0, 0.6);
        --ring: 0 0 0 4px rgba(214, 162, 101, 0.22);
    }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(1100px 440px at 12% -8%, var(--hero-glow-2), transparent 60%),
        linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 340px);
    background-attachment: fixed;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--brass-deep); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--rust); }

h1, h2, .brand {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.05;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 4.3rem); margin: 0.2rem 0 0.8rem; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.75rem); margin: 0 0 0.8rem; }
h3 { font-family: var(--serif); font-weight: 600; }
p { margin: 0 0 0.6rem; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: none;
    box-shadow: var(--ring);
    border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem clamp(1rem, 4vw, 2rem);
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--paper) 78%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; transition: transform var(--t) var(--ease); }
.brand:hover { transform: translateY(-1px); }
.logo { height: 52px; width: auto; display: block; }

.pole {
    width: 0.7rem;
    height: 1.6rem;
    border-radius: 99px;
    background: repeating-linear-gradient(135deg, var(--card) 0 5px, var(--rust) 5px 10px);
    background-size: 100% 200%;
    box-shadow: inset 0 0 0 1px rgba(31, 24, 19, 0.2);
    animation: pole-spin 1.1s linear infinite;
}
.pole-lg { width: 0.95rem; height: 4.2rem; margin-bottom: 0.4rem; }
@keyframes pole-spin { to { background-position: 0 -200%; } }

.top-nav, .langs { display: flex; gap: 0.85rem; align-items: center; flex-wrap: wrap; }
.top-nav { font-size: 0.95rem; }
.top-nav a, .linkish {
    color: var(--ink);
    background: none;
    border: 0;
    padding: 0.3rem 0;
    cursor: pointer;
    position: relative;
    transition: color var(--t-fast) var(--ease);
}
.top-nav a::after, .linkish::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t) var(--ease);
}
.top-nav a:hover, .linkish:hover { color: var(--rust); }
.top-nav a:hover::after, .linkish:hover::after { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.pill, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    cursor: pointer;
    background: var(--ink);
    color: var(--paper-2);
    border-radius: 999px;
    padding: 0.7rem 1.2rem;
    font-weight: 500;
    line-height: 1.1;
    box-shadow: var(--shadow-sm);
    transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease),
        background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.pill:hover, .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pill:active, .btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-ghost, .langs a {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}
.btn-ghost:hover { background: color-mix(in srgb, var(--brass) 12%, transparent); border-color: var(--brass); color: var(--ink); }

.langs a {
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.langs a.is-on { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }

.btn-light { background: var(--surface-dark-text); color: var(--surface-dark); border-color: var(--surface-dark-text); }
.btn-line { background: transparent; color: var(--surface-dark-text); border: 1px solid var(--surface-dark-line); box-shadow: none; }
.btn-line:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--surface-dark-text); }
.btn-google { width: 100%; background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
.btn-google:hover { border-color: var(--brass); }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
main { display: block; }
.hero, .shop-head { padding: clamp(1.8rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem) 1rem; max-width: var(--maxw); margin: 0 auto; }
.shop-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 1.2rem clamp(1rem, 4vw, 2rem) 3rem; }

.kicker {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brass-deep);
}
.lead { max-width: 42rem; font-size: 1.12rem; color: var(--ink-soft); }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.3rem; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    padding: clamp(1.1rem, 2.5vw, 1.6rem);
    box-shadow: var(--shadow);
}
.narrow { max-width: 480px; margin: clamp(1.5rem, 5vw, 3rem) auto; }

.stack { display: grid; gap: 0.85rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.9rem); margin: 0.4rem 0 1.2rem; }
.note, .empty, .aside { color: var(--ink-soft); }
.empty {
    padding: 1.4rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--r-lg);
    text-align: center;
    background: color-mix(in srgb, var(--card) 60%, transparent);
}
small, .meta, .card-city { color: var(--ink-soft); }
.meta { font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
label { display: grid; gap: 0.35rem; font-size: 0.92rem; font-weight: 500; }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    border-radius: var(--r-md);
    padding: 0.7rem 0.85rem;
    transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
input:hover, select:hover, textarea:hover { border-color: var(--brass); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brass); box-shadow: var(--ring); }
textarea { resize: vertical; min-height: 4.5rem; }
input[type="file"] { padding: 0.5rem; cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brass); }

.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; }
.check input { width: auto; }

.search { display: flex; gap: 0.6rem; margin-bottom: 1.4rem; }
.search input { flex: 1; }

fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
legend { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brass-deep); font-weight: 600; padding: 0; }

.roles { display: grid; gap: 0.6rem; }
.role {
    display: flex; gap: 0.7rem; align-items: flex-start;
    border: 1px solid var(--line-strong); border-radius: var(--r-md);
    padding: 0.85rem; cursor: pointer;
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.role:hover { border-color: var(--brass); transform: translateY(-1px); }
.role:has(input:checked) { border-color: var(--ink); background: color-mix(in srgb, var(--brass) 10%, transparent); box-shadow: var(--shadow-sm); }
.role input { width: auto; margin-top: 0.2rem; }
.role small { display: block; color: var(--ink-soft); }

.or { text-align: center; color: var(--ink-soft); margin: 0.9rem 0; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; position: relative; }
.or::before, .or::after { content: ""; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--line-strong); }
.or::before { left: 0; } .or::after { right: 0; }
.fine { margin-top: 1rem; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Grids & cards
   -------------------------------------------------------------------------- */
.cards, .shop-grid, .studio { display: grid; gap: 1.1rem; }
.cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.shop-grid { grid-template-columns: 300px 1fr; align-items: start; }
.studio { grid-template-columns: minmax(300px, 380px) 1fr; align-items: start; }

.card {
    display: block;
    padding: 1.25rem;
    border-radius: var(--r-lg);
    background: var(--card);
    border: 1px solid var(--line);
    color: inherit;
    min-height: 160px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: linear-gradient(var(--brass), var(--rust));
    transform: scaleY(0); transform-origin: top;
    transition: transform var(--t) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card:hover::before { transform: scaleY(1); }
.card h2 { font-size: 1.55rem; margin: 0.15rem 0 0.35rem; }

.location { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; align-items: center; }
.location a { color: var(--ink); }
.map-link { color: var(--brass-deep) !important; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Flash & status
   -------------------------------------------------------------------------- */
.flash {
    margin: 0.8rem auto 0;
    max-width: var(--maxw);
    width: calc(100% - 2rem);
    background: var(--ok-soft);
    color: var(--ok);
    border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
    border-radius: var(--r-md);
    padding: 0.75rem 1rem;
    font-weight: 500;
    animation: slide-down 0.4s var(--ease) both;
}
.flash-bad, .book-status.is-bad {
    background: var(--bad-soft);
    color: var(--rust);
    border-color: color-mix(in srgb, var(--rust) 30%, transparent);
}
.book-status:empty { display: none; }
.book-status { margin: 0; padding: 0.65rem 0.85rem; border-radius: var(--r-md); background: var(--ok-soft); color: var(--ok); font-weight: 500; animation: slide-down 0.3s var(--ease) both; }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Lists: hours / agenda / manage
   -------------------------------------------------------------------------- */
.hours, .agenda, .manage { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.hours li, .agenda li, .manage li {
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    align-items: center;
    padding: 0.6rem 0.2rem;
    border-bottom: 1px solid var(--line);
    transition: background var(--t-fast) var(--ease);
}
.hours li:last-child, .agenda li:last-child, .manage li:last-child { border-bottom: 0; }
.hours li:hover, .agenda li:hover, .manage li:hover { background: color-mix(in srgb, var(--brass) 7%, transparent); }
.agenda li div, .manage li span:first-child { display: grid; gap: 0.1rem; }
.agenda li strong { font-size: 1.02rem; }
.manage em { color: var(--rust); font-style: normal; font-size: 0.82rem; }

/* --------------------------------------------------------------------------
   Choices / days / slots (booking)
   -------------------------------------------------------------------------- */
.choices, .days, .slots { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { width: auto; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span, .day, .slot {
    display: grid;
    gap: 0.1rem;
    border: 1px solid var(--line-strong);
    background: var(--field-bg);
    border-radius: var(--r-md);
    padding: 0.55rem 0.8rem;
    cursor: pointer;
    text-align: left;
    transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
        background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.choice span small { color: var(--ink-soft); font-size: 0.82rem; }
.choice span:hover, .day:hover:not(:disabled), .slot:hover:not(.is-taken) {
    border-color: var(--brass); transform: translateY(-2px); box-shadow: var(--shadow-sm);
}
.choice input:checked + span, .day.is-on, .slot.is-on {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper-2);
    box-shadow: var(--shadow-sm);
}
.choice input:checked + span small { color: var(--surface-dark-muted); }
.choice input:focus-visible + span { box-shadow: var(--ring); }
.day { min-width: 4.8rem; justify-items: start; }
.day small, .slot { font-variant-numeric: tabular-nums; }
.day:disabled, .slot.is-taken { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; transform: none; }
.slot-note { color: var(--ink-soft); font-size: 0.9rem; margin: 0.2rem 0 0; }

/* --------------------------------------------------------------------------
   Studio forms / rows
   -------------------------------------------------------------------------- */
.studio-forms { display: grid; gap: 1.1rem; }
.hour-row, .inline-add, .service-edit, .row-actions { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.hour-block { display: grid; gap: 0.3rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.hour-block:last-of-type { border-bottom: 0; }
.hour-block .hour-row span { min-width: 4.5rem; color: var(--ink-soft); font-size: 0.85rem; }
.hour-row input[type="time"], .service-edit input, .service-edit select, .inline-add input { width: auto; flex: 1 1 auto; min-width: 5rem; }
.service-edit { padding: 0.2rem 0; }
.row-actions .btn { padding: 0.45rem 0.8rem; font-size: 0.88rem; }

/* --------------------------------------------------------------------------
   Live indicator
   -------------------------------------------------------------------------- */
.live {
    display: inline-flex; align-items: center; gap: 0.45rem;
    font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
    font-weight: 600; color: var(--ok);
}
.live i {
    width: 0.55rem; height: 0.55rem; border-radius: 50%;
    background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent);
    animation: pulse 1.8s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(47, 107, 69, 0); } }
.has-js .fallback { display: none; }

/* --------------------------------------------------------------------------
   Stats board
   -------------------------------------------------------------------------- */
.stats-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
.stat {
    background: linear-gradient(155deg, var(--surface-dark-2), var(--surface-dark));
    color: var(--surface-dark-text);
    border-radius: var(--r-lg);
    padding: 1.1rem 1.1rem 0.95rem;
    border: 1px solid var(--surface-dark-line);
    box-shadow: var(--shadow);
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat span { display: block; color: var(--surface-dark-muted); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.7rem; font-weight: 600; }
.stat strong { display: block; margin: 0.3rem 0; font-family: var(--serif); font-size: 2.1rem; letter-spacing: -0.03em; line-height: 1; }
.stat small { color: var(--surface-dark-muted); }
.stat-soft { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.stat-soft span { color: var(--brass-deep); }
.stat-soft small { color: var(--ink-soft); }
.meter { height: 7px; margin-top: 0.6rem; border-radius: 99px; background: rgba(255, 255, 255, 0.16); overflow: hidden; }
.stat-soft .meter { background: var(--line); }
.meter i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--surface-dark-accent), var(--rust)); animation: meter-fill 1s var(--ease) both; transform-origin: left; }
.stat-soft .meter i { background: linear-gradient(90deg, var(--brass), var(--rust)); }
@keyframes meter-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* --------------------------------------------------------------------------
   Home billboard
   -------------------------------------------------------------------------- */
.is-home .top { background: color-mix(in srgb, var(--surface-dark) 82%, transparent); border-bottom-color: var(--surface-dark-line); color: var(--surface-dark-text); }
.is-home .top a, .is-home .linkish { color: var(--surface-dark-text); }
.is-home .top a:hover, .is-home .linkish:hover { color: var(--surface-dark-accent); }
.is-home .pill { background: var(--surface-dark-text); color: var(--surface-dark); }
.is-home .langs a { color: var(--surface-dark-text); border-color: var(--surface-dark-line); }
.is-home .langs a.is-on { background: var(--surface-dark-text); color: var(--surface-dark); }

.billboard {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr;
    gap: 2rem;
    align-items: end;
    background:
        radial-gradient(620px 300px at 88% 0%, var(--hero-glow), transparent 70%),
        radial-gradient(500px 360px at 0% 120%, var(--hero-glow-2), transparent 70%),
        linear-gradient(160deg, var(--surface-dark-2), var(--surface-dark));
    color: var(--surface-dark-text);
    padding: clamp(2.4rem, 6vw, 4rem) clamp(1rem, 4vw, 2rem) clamp(2.8rem, 7vw, 4.4rem);
    min-height: 68vh;
    position: relative;
    overflow: hidden;
}
.billboard-copy > * { animation: rise 0.7s var(--ease) both; }
.billboard-copy .kicker { animation-delay: 0.05s; color: var(--surface-dark-accent); }
.billboard-copy h1 { animation-delay: 0.12s; color: var(--surface-dark-text); max-width: 13ch; font-size: clamp(3rem, 8vw, 6rem); }
.billboard-copy .lead { animation-delay: 0.2s; color: var(--surface-dark-muted); font-size: 1.2rem; max-width: 38rem; }
.billboard-copy .hero-actions { animation-delay: 0.28s; }
.billboard-copy .fine { animation-delay: 0.36s; }
.billboard .fine a { color: var(--surface-dark-accent); }
.billboard-logo {
    width: min(380px, 100%); height: auto; justify-self: end;
    filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.45));
    animation: float-in 0.9s var(--ease) both;
}
@keyframes float-in { from { opacity: 0; transform: translateY(24px) scale(0.96); } to { opacity: 1; transform: none; } }

.billboard-card p { margin: 0; font-family: var(--serif); font-size: 1.7rem; }
.billboard-card .is-taken { text-decoration: line-through; opacity: 0.4; }

/* --------------------------------------------------------------------------
   Home: features & split
   -------------------------------------------------------------------------- */
.feature-grid, .split-grid { display: grid; gap: 1.2rem; }
.feature-grid { grid-template-columns: repeat(4, 1fr); }
.feature {
    padding: 1.1rem 0.2rem 0.6rem;
    border-top: 2px solid var(--line-strong);
    transition: border-color var(--t) var(--ease);
}
.feature:hover { border-top-color: var(--brass); }
.feature span { color: var(--brass); font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.feature h3 { margin: 0.4rem 0; font-size: 1.4rem; }
.feature p { color: var(--ink-soft); margin: 0; }

.split-grid { grid-template-columns: 1fr 1fr; }
.split ol { margin: 0 0 1.2rem; padding-left: 1.2rem; display: grid; gap: 0.75rem; color: var(--ink-soft); }
.split ol li { padding-left: 0.3rem; }
.split ol li::marker { color: var(--brass); font-family: var(--serif); font-weight: 600; }
.panel-ink {
    background: linear-gradient(160deg, var(--surface-dark-2), var(--surface-dark));
    color: var(--surface-dark-text);
    border-color: var(--surface-dark-line);
}
.panel-ink .kicker { color: var(--surface-dark-accent); }
.panel-ink ol { color: var(--surface-dark-muted); }

/* --------------------------------------------------------------------------
   Shop page templates (public profile blocks)
   -------------------------------------------------------------------------- */
.templates { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.template { display: block; position: relative; cursor: pointer; }
.template input { position: absolute; opacity: 0; }
.template span {
    display: grid; gap: 0.15rem; border: 1px solid var(--line-strong); border-radius: var(--r-md);
    padding: 0.8rem; background: var(--field-bg);
    transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.template span:hover { border-color: var(--brass); transform: translateY(-2px); }
.template input:checked + span { background: var(--ink); color: var(--paper-2); border-color: var(--ink); }
.template small { color: var(--ink-soft); }
.template input:checked + span small { color: var(--surface-dark-muted); }

.blocks { display: grid; gap: 1rem; max-width: var(--maxw); margin: 0 auto; padding: 1.2rem clamp(1rem, 4vw, 2rem) 0; }
.block { margin: 0; }
.block img, .block video, .block iframe { width: 100%; border: 0; border-radius: var(--r-lg); display: block; background: #0f0b08; box-shadow: var(--shadow); }
.block iframe { aspect-ratio: 16 / 9; }
.block img, .block video { transition: transform var(--t) var(--ease); }
.block:hover img, .block:hover video { transform: scale(1.01); }
.block figcaption { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.92rem; }
.block-text { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.block-text h3 { margin: 0 0 0.4rem; }

.tpl-classic .blocks { grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.6rem; }
.tpl-classic .block { scroll-snap-align: start; }
.tpl-spotlight .block:first-child img, .tpl-spotlight .block:first-child video { height: min(68vh, 520px); object-fit: cover; }
.tpl-gallery .blocks { grid-template-columns: repeat(3, 1fr); }
.tpl-gallery .block img, .tpl-gallery .block video { height: 220px; object-fit: cover; }
.tpl-film .blocks { max-width: 860px; }

/* --------------------------------------------------------------------------
   Legal
   -------------------------------------------------------------------------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.legal h2 { margin-top: 1.8rem; font-size: 1.4rem; }
.legal p { color: var(--ink-soft); }
.company { list-style: none; padding: 1rem 1.2rem; margin: 1rem 0; display: grid; gap: 0.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.company li:first-child { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-foot {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1.4rem;
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2rem);
    margin-top: 2rem;
    background: linear-gradient(180deg, var(--surface-dark), var(--surface-dark-2));
    color: var(--surface-dark-muted);
}
.site-foot strong { color: var(--surface-dark-text); font-family: var(--serif); font-size: 1.05rem; }
.site-foot a { color: var(--surface-dark-text); }
.site-foot a:hover { color: var(--surface-dark-accent); }
.site-foot p { margin: 0.4rem 0 0; }
.site-foot address { font-style: normal; line-height: 1.7; }

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.pager { margin-top: 1.4rem; }
.pagination { display: flex; gap: 0.4rem; list-style: none; padding: 0; flex-wrap: wrap; }
.pagination .page-link { padding: 0.4rem 0.7rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); transition: all var(--t-fast) var(--ease); }
.pagination .page-link:hover { border-color: var(--brass); background: color-mix(in srgb, var(--brass) 10%, transparent); }
.pagination .active .page-link, .pagination .active span { background: var(--ink); color: var(--paper-2); border-radius: var(--r-sm); padding: 0.4rem 0.7rem; }

/* --------------------------------------------------------------------------
   Entrance animations (respect reduced motion)
   -------------------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
    main > section, main > article, main > div { animation: rise 0.55s var(--ease) both; }
    main > *:nth-child(1) { animation-delay: 0.02s; }
    main > *:nth-child(2) { animation-delay: 0.1s; }
    main > *:nth-child(3) { animation-delay: 0.18s; }
    main > *:nth-child(4) { animation-delay: 0.26s; }
    main > *:nth-child(5) { animation-delay: 0.34s; }

    .cards .card, .feature-grid .feature, .stats-board .stat { animation: rise 0.5s var(--ease) both; }
    .cards .card:nth-child(2), .feature-grid .feature:nth-child(2), .stats-board .stat:nth-child(2) { animation-delay: 0.06s; }
    .cards .card:nth-child(3), .feature-grid .feature:nth-child(3), .stats-board .stat:nth-child(3) { animation-delay: 0.12s; }
    .cards .card:nth-child(4), .feature-grid .feature:nth-child(4), .stats-board .stat:nth-child(4) { animation-delay: 0.18s; }
    .cards .card:nth-child(n+5) { animation-delay: 0.24s; }
    .stats-board .stat:nth-child(n+5) { animation-delay: 0.24s; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
    .shop-grid, .studio, .billboard, .feature-grid, .split-grid, .site-foot, .stats-board { grid-template-columns: 1fr; }
    .stats-board { grid-template-columns: repeat(2, 1fr); }
    .shop-head { flex-direction: column; align-items: flex-start; }
    .billboard { min-height: 0; align-items: start; }
    .billboard-logo { justify-self: start; width: min(240px, 60%); }
    .templates, .tpl-gallery .blocks { grid-template-columns: 1fr; }
    .top { flex-wrap: wrap; }
}
@media (max-width: 520px) {
    .stats-board { grid-template-columns: 1fr; }
    .search { flex-direction: column; }
    .top-nav { gap: 0.6rem; font-size: 0.9rem; }
}

/* --------------------------------------------------------------------------
   Owner edit bar (shown on the public page to the shop owner / admin)
   -------------------------------------------------------------------------- */
.owner-bar {
    max-width: var(--maxw);
    width: calc(100% - 2rem);
    margin: 0.9rem auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(120deg, var(--surface-dark-2), var(--surface-dark));
    color: var(--surface-dark-text);
    border: 1px solid var(--surface-dark-line);
    border-radius: var(--r-lg);
    padding: 0.7rem 0.8rem 0.7rem 1.1rem;
    box-shadow: var(--shadow);
    animation: slide-down 0.4s var(--ease) both;
}
.owner-bar-note { font-weight: 500; display: inline-flex; align-items: center; gap: 0.5rem; }
.owner-bar-note::before { content: "✦"; color: var(--surface-dark-accent); }
.owner-bar .btn { background: var(--surface-dark-text); color: var(--surface-dark); }

/* --------------------------------------------------------------------------
   Public hero with background (cover) video
   -------------------------------------------------------------------------- */
.shop-head { position: relative; }
.shop-head-inner {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
}
.shop-head.has-cover {
    overflow: hidden;
    border-radius: var(--r-xl);
    margin-top: 1rem;
    min-height: 56vh;
    display: flex;
    align-items: flex-end;
    padding: clamp(2.2rem, 6vw, 4.2rem) clamp(1.4rem, 4vw, 2.6rem) clamp(1.8rem, 5vw, 3rem);
    color: var(--surface-dark-text);
    box-shadow: var(--shadow-lg);
}
.cover-media { position: absolute; inset: 0; z-index: 0; animation: cover-in 0.9s var(--ease) both; }
.cover-media-el { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(18, 13, 9, 0.2) 0%, rgba(18, 13, 9, 0.5) 52%, rgba(18, 13, 9, 0.84) 100%);
}
@keyframes cover-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.shop-head.has-cover .kicker { color: var(--surface-dark-accent); }
.shop-head.has-cover h1 { color: #fff; }
.shop-head.has-cover .lead { color: rgba(255, 255, 255, 0.9); }
.shop-head.has-cover .location, .shop-head.has-cover .location a, .shop-head.has-cover .location span { color: #fff; }
.shop-head.has-cover .map-link { color: var(--surface-dark-accent) !important; }
.shop-head.has-cover .live { color: #fff; }

/* --------------------------------------------------------------------------
   Studio: cover (background video) editor
   -------------------------------------------------------------------------- */
.cover-edit { display: grid; gap: 0.7rem; padding-top: 0.6rem; margin-top: 0.2rem; border-top: 1px solid var(--line); }
.cover-title { margin: 0; font-size: 1.05rem; }
.cover-preview { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.cover-preview video, .cover-preview img { width: 100%; height: 200px; object-fit: cover; display: block; background: #0f0b08; }
.cover-badge {
    position: absolute; left: 0.6rem; bottom: 0.6rem;
    background: rgba(18, 13, 9, 0.72); color: #fff;
    font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
    padding: 0.25rem 0.6rem; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.cover-badge::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--ok); }

@media (max-width: 860px) {
    .shop-head-inner { flex-direction: column; align-items: flex-start; }
    .shop-head.has-cover { min-height: 42vh; }
}

/* ==========================================================================
   Studio dashboard — black & white theme + tabbed layout
   Scoped to the studio page via <body class="studio-mono">.
   ========================================================================== */
body.studio-mono {
    --ink: #0b0b0b;
    --ink-soft: #6b6b6b;
    --paper: #ececec;
    --paper-2: #f6f6f6;
    --card: #ffffff;
    --line: #e6e6e6;
    --line-strong: #cfcfcf;
    --brass: #111111;
    --brass-deep: #000000;
    --rust: #333333;
    --ok: #141414;
    --ok-soft: #e9e9e9;
    --bad-soft: #e2e2e2;
    --surface-dark: #0a0a0a;
    --surface-dark-2: #1f1f1f;
    --surface-dark-text: #fafafa;
    --surface-dark-muted: #b4b4b4;
    --surface-dark-accent: #ffffff;
    --surface-dark-line: rgba(255, 255, 255, 0.14);
    --hero-glow: transparent;
    --hero-glow-2: transparent;
    --field-bg: #ffffff;
    --ring: 0 0 0 3px rgba(0, 0, 0, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow: 0 8px 26px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.14);
}
/* Keep the black & white look even for dark-mode visitors. */
body.studio-mono { background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 340px); }
body.studio-mono .stat strong,
body.studio-mono .section-title,
body.studio-mono h1,
body.studio-mono h2 { font-family: var(--serif); }

/* Tabs */
.studio-wrap { display: block; }
.tabs {
    display: none;
    gap: 0.3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 1.4rem 0 1.5rem;
    border-bottom: 1px solid var(--line-strong);
    scrollbar-width: thin;
}
body.tabs-js .tabs { display: flex; }
.tab {
    flex: 0 0 auto;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.65rem 0.95rem;
    cursor: pointer;
    color: var(--ink-soft);
    font-weight: 600;
    white-space: nowrap;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.tab:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.tab.is-on { color: var(--ink); border-bottom-color: var(--ink); }

.tab-panel { display: grid; gap: 1.1rem; }
body.tabs-js .tab-panel { display: none; }
body.tabs-js .tab-panel.is-on { display: grid; animation: rise 0.4s var(--ease) both; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Live page editor (WordPress-style: controls + live preview)
   -------------------------------------------------------------------------- */
.editor-cta { align-self: start; width: fit-content; margin-bottom: 0.4rem; }
body.is-editor .site-foot { display: none; }

.editor { max-width: min(1520px, 95vw); margin: 0 auto; padding: 1.2rem clamp(1rem, 3vw, 1.8rem) 2.4rem; }
.editor-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.editor-title { margin: 0.1rem 0 0.2rem; font-size: clamp(1.6rem, 3vw, 2.4rem); }

.editor-split { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 1.2rem; align-items: start; }
.editor-controls {
    display: grid;
    gap: 1.1rem;
    align-content: start;
    max-height: calc(100vh - 150px);
    overflow: auto;
    padding-right: 0.4rem;
    position: sticky;
    top: 78px;
}
.editor-preview { position: sticky; top: 78px; display: grid; gap: 0.6rem; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.device-toggle { display: inline-flex; gap: 0.25rem; background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.2rem; }
.device { border: 0; background: none; cursor: pointer; padding: 0.35rem 0.75rem; border-radius: 999px; color: var(--ink-soft); font-size: 1rem; line-height: 1; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.device:hover { color: var(--ink); }
.device.is-on { background: var(--ink); color: var(--paper-2); }
.preview-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.preview-actions .btn { padding: 0.45rem 0.85rem; font-size: 0.88rem; }

.preview-stage {
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--card);
    height: clamp(520px, calc(100vh - 150px), 1040px);
    display: flex;
    justify-content: center;
    transition: background var(--t) var(--ease), padding var(--t) var(--ease);
}
.preview-stage.is-framed { padding: 1rem; background: #d7d7d7; }
.preview-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
    transition: max-width 0.3s var(--ease);
}
.preview-stage.is-framed .preview-frame { height: 100%; border-radius: var(--r-md); box-shadow: var(--shadow-lg); border: 1px solid var(--line-strong); }

@media (max-width: 960px) {
    .editor-split { grid-template-columns: 1fr; }
    .editor-controls, .editor-preview { position: static; max-height: none; overflow: visible; }
    .preview-stage { height: 72vh; }
}
