/* ==========================================================================
   Hey Lucky Label Co — StickerShop
   Design tokens ported from heyluckylabel.com (wp theme "heylucky")
   ========================================================================== */

:root {
    --cream: #F6F1E2;
    --cream-2: #EFE8D4;
    --paper: #FBF7EC;
    --ink: #22304C;
    --navy: #1F2B47;
    --navy-2: #24304A;
    --orange: #E2711D;
    --orange-dark: #C95F12;
    --olive: #5C6E3C;
    --olive-dark: #47572C;
    --olive-deep: #3F4D2A;
    --green-tint: #E9EDD9;
    --line: #E0D7C0;
    --line-soft: #E9E1CC;
    --muted: #5B6478;

    --font-serif: "UM Moldena", "Fraunces", Georgia, serif;
    --font-sans: "Nailhead", "Inter", -apple-system, "Helvetica Neue", sans-serif;
    --font-body: "Inter", -apple-system, "Helvetica Neue", sans-serif;
    --font-hand: "Caveat", cursive;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;

    --radius: 10px;
    --radius-sm: 7px;
    --shadow-card: 0 1px 2px rgba(34, 48, 76, 0.06), 0 8px 24px rgba(34, 48, 76, 0.05);
    --shadow-sticker: 0 2px 6px rgba(34, 48, 76, 0.18);
}

@font-face {
    font-family: "Nailhead";
    src: url("fonts/Nailhead.otf") format("opentype");
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "UM Moldena";
    src: url("fonts/UM-Moldena-Black.otf") format("opentype");
    font-weight: 900;
    font-display: swap;
}

@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/Fraunces-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/Caveat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

/* --------------------------------------------------------------------------
   Base — tuned so the web app reads as an app, not a page
   -------------------------------------------------------------------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }

button, input, select {
    font: inherit;
    color: inherit;
    touch-action: manipulation;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.12; }

/* --------------------------------------------------------------------------
   App frame — full-bleed on phones, a floating device column on desktop
   -------------------------------------------------------------------------- */

/* Seamless on every screen: the app column floats on the same cream, no
   device silhouette. Identical on phones, a touch roomier on desktop. */
.app-frame {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
    min-height: 100dvh;
    background: var(--cream);
    display: flex;
    flex-direction: column;
}

/* Top app bar */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 16px calc(10px);
    padding-top: calc(10px + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--cream) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line-soft);
}

.topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    padding: 6px 8px 6px 0;
}

.topbar-back:active { opacity: .6; }

.step-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: .04em;
    color: var(--muted);
}

.cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--cream);
    background: var(--navy);
    border: 0;
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
}

.cart-pill:active { transform: scale(.96); }

/* Screens + transitions */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 0;
    animation: screen-in .28s cubic-bezier(.22, .9, .3, 1);
}

@keyframes screen-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

.screen-back { animation-name: screen-in-back; }

@keyframes screen-in-back {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .screen, .screen-back { animation: none; }
}

.screen h1.screen-title {
    font-size: 30px;
    margin-bottom: 6px;
}

.screen .screen-sub { color: var(--muted); font-size: 15px; margin-bottom: 18px; }

/* Docked bottom CTA */
.cta-dock {
    position: sticky;
    bottom: 0;
    z-index: 30;
    margin-top: auto;
    padding: 14px 0 calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(to bottom, transparent, var(--cream) 32%);
}

.cta-dock .hint {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Buttons — ported from the WP theme, sized for thumbs
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 16px 26px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
    user-select: none;
    -webkit-user-select: none;
}

.btn:active { transform: scale(.98); }
.btn-block { display: flex; width: 100%; }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { background: var(--ink); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }
.btn-olive { background: var(--olive); color: var(--cream); }
.btn-olive:hover { background: var(--olive-dark); }
.btn-sm { padding: 12px 18px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.link-quiet {
    background: none;
    border: 0;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--orange-dark);
    cursor: pointer;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   Landing
   -------------------------------------------------------------------------- */

.landing-header {
    display: flex;
    justify-content: center;
    padding: calc(18px + env(safe-area-inset-top)) 20px 6px;
}

.landing-header img { width: 132px; height: auto; }

.hero { padding: 18px 24px 8px; text-align: center; }

.hero h1 {
    font-size: clamp(38px, 11vw, 46px);
    letter-spacing: -.01em;
}

.hero .hero-sub {
    margin: 12px auto 0;
    max-width: 30ch;
    color: var(--muted);
    font-size: 16.5px;
}

.hero-facts {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.fact-chip {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--olive-deep);
    background: var(--green-tint);
    border: 1px solid color-mix(in srgb, var(--olive) 30%, transparent);
    border-radius: 999px;
    padding: 6px 14px;
}

.example-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 26px 24px 10px;
}

.example-sticker {
    aspect-ratio: 1;
    border-radius: 22%;
    border: 5px solid #fff;
    box-shadow: var(--shadow-sticker);
    transform: rotate(-3deg);
}

.example-sticker:nth-child(2) { transform: rotate(2deg) translateY(-6px); }
.example-sticker:nth-child(3) { transform: rotate(-1deg); }

.stripe-a { background: repeating-linear-gradient(45deg, var(--orange) 0 10px, #E9924C 10px 20px); }
.stripe-b { background: repeating-linear-gradient(45deg, var(--olive) 0 10px, #74884E 10px 20px); }
.stripe-c { background: repeating-linear-gradient(45deg, var(--navy) 0 10px, #33415F 10px 20px); }

.landing-hand {
    font-family: var(--font-hand);
    font-size: 26px;
    color: var(--olive-dark);
    text-align: center;
    transform: rotate(-2deg);
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Upload
   -------------------------------------------------------------------------- */

.choice-stack { display: flex; flex-direction: column; gap: 12px; }

.photo-preview-card {
    margin-top: 18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.photo-preview-card img {
    width: 100%;
    max-height: 46dvh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--cream-2);
}

.res-read {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
}

.res-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--olive); flex: none; }
.res-dot.warn { background: var(--orange); }

/* --------------------------------------------------------------------------
   Size selection
   -------------------------------------------------------------------------- */

.size-list { display: flex; flex-direction: column; gap: 10px; }

.size-row {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    background: var(--paper);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 16px;
    cursor: pointer;
    transition: border-color .12s ease, background-color .12s ease;
}

.size-row.selected {
    border-color: var(--olive);
    background: var(--green-tint);
}

.size-row:active { transform: scale(.99); }

.size-dot {
    flex: none;
    border-radius: 22%;
    background: var(--cream-2);
    border: 1px solid var(--line);
    /* width/height set inline, drawn to relative scale */
}

.size-row.selected .size-dot { background: #fff; border-color: var(--olive); }

.size-name { font-family: var(--font-sans); font-weight: 600; font-size: 17px; }

.size-note { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.custom-size-row { margin-top: 4px; }

.custom-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.custom-input input {
    width: 90px;
    padding: 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 16px;
    text-align: center;
}

.custom-input input:focus { outline: 2px solid var(--olive); border-color: var(--olive); }

/* --------------------------------------------------------------------------
   Effects gallery
   -------------------------------------------------------------------------- */

.fx-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.fx-tile {
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.fx-tile .fx-thumb {
    display: block;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2.5px solid transparent;
    box-shadow: var(--shadow-card);
    background: var(--cream-2);
}

.fx-tile.selected .fx-thumb { border-color: var(--orange); box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 30%, transparent); }

.fx-tile .fx-thumb img { width: 100%; height: 100%; object-fit: cover; }

.fx-name {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    margin-top: 7px;
}

.fx-tile.selected .fx-name { color: var(--orange-dark); font-weight: 600; }

/* Full-width applied canvas */
.canvas-stage {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream-2);
    box-shadow: var(--shadow-card);
}

.canvas-stage img { width: 100%; max-height: 52dvh; object-fit: contain; }

.variant-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.variant-pill {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
}

.variant-pill.selected { background: var(--green-tint); border-color: var(--olive); font-weight: 700; }

.applied-in {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
}

/* Effect filters — the original instant client-side previews. They are the
   whole effect when the admin picks the "CSS filters" engine (or no Ideogram
   key is saved); with Ideogram selected they are placeholders until each
   generative render lands. */
.fx-original-a, .fx-original-b, .fx-original-c { filter: none; }
.fx-popart-a { filter: saturate(2.1) contrast(1.32); }
.fx-popart-b { filter: saturate(2.5) contrast(1.38) hue-rotate(14deg); }
.fx-popart-c { filter: saturate(2.2) contrast(1.45) hue-rotate(-14deg); }
.fx-retro-a { filter: sepia(.5) saturate(1.4) contrast(1.06); }
.fx-retro-b { filter: sepia(.62) saturate(1.25) hue-rotate(-12deg) contrast(1.1); }
.fx-retro-c { filter: sepia(.38) saturate(1.6) hue-rotate(8deg) brightness(1.05); }
.fx-watercolor-a { filter: saturate(1.4) brightness(1.09) contrast(.88); }
.fx-watercolor-b { filter: saturate(1.6) brightness(1.12) contrast(.82) hue-rotate(6deg); }
.fx-watercolor-c { filter: saturate(1.25) brightness(1.06) contrast(.92) hue-rotate(-8deg); }
.fx-halftone-a { filter: grayscale(1) contrast(1.75) brightness(1.05); }
.fx-halftone-b { filter: grayscale(1) contrast(2.1) brightness(1.12); }
.fx-halftone-c { filter: grayscale(.85) contrast(1.6) sepia(.25); }
.fx-lineart-a { filter: grayscale(1) contrast(2.6) brightness(1.16); }
.fx-lineart-b { filter: grayscale(1) contrast(3.2) brightness(1.25); }
.fx-lineart-c { filter: grayscale(1) contrast(2.2) brightness(1.1) invert(.08); }

/* --------------------------------------------------------------------------
   Cut-file builder
   -------------------------------------------------------------------------- */

.seg-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--cream-2);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 16px;
}

.seg-toggle button {
    border: 0;
    border-radius: 999px;
    padding: 11px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.seg-toggle button.selected { background: var(--navy); color: var(--cream); }

.cut-stage {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream-2);
    box-shadow: var(--shadow-card);
}

.cut-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cut-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.shape-row { display: flex; gap: 10px; margin-top: 14px; }

.shape-pill {
    flex: 1;
    padding: 10px 6px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 12.5px;
    cursor: pointer;
}

.shape-pill.selected { background: var(--green-tint); border-color: var(--olive); font-weight: 600; }

.slider-row { margin-top: 18px; }

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--navy);
    height: 32px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 15.5px;
    font-weight: 500;
}

.switch {
    position: relative;
    width: 52px;
    height: 31px;
    border-radius: 999px;
    border: 0;
    background: var(--line);
    cursor: pointer;
    transition: background-color .15s ease;
    flex: none;
}

.switch.on { background: var(--olive); }

.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .18s cubic-bezier(.22, .9, .3, 1.4);
}

.switch.on::after { transform: translateX(21px); }

/* --------------------------------------------------------------------------
   Review, cart, checkout
   -------------------------------------------------------------------------- */

.summary-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.summary-art {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--cream-2);
    margin-bottom: 6px;
}

.summary-art img { width: 100%; max-height: 34dvh; object-fit: contain; }

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 2px;
    border-bottom: 1px solid var(--line-soft);
}

.spec-row:last-child { border-bottom: 0; }
.spec-key { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.spec-val { font-family: var(--font-mono); font-size: 14px; color: var(--ink); }

.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.qty-stepper button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--line);
    background: var(--paper);
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
}

.qty-stepper button:active { background: var(--cream-2); }
.qty-stepper .qty { min-width: 34px; text-align: center; font-family: var(--font-mono); font-size: 16px; }

.cart-list { display: flex; flex-direction: column; gap: 12px; }

.cart-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px 12px;
}

.cart-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--cream-2);
    flex: none;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sticker);
}

.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }

.cart-row-name { font-family: var(--font-sans); font-weight: 600; font-size: 15.5px; }
.cart-row-price { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.cart-row .qty-stepper { margin-left: auto; }

/* Pack meter */
.pack-meter {
    background: var(--green-tint);
    border: 1px solid color-mix(in srgb, var(--olive) 30%, transparent);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-top: 14px;
}

.pack-meter-head {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--olive-deep);
}

.pack-meter-head .count { font-family: var(--font-mono); font-weight: 400; }

.meter-track { display: flex; gap: 5px; margin: 9px 0 7px; }

.meter-seg {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: #fff;
}

.meter-seg.filled { background: var(--olive); }

.pack-meter-sub { font-family: var(--font-mono); font-size: 12.5px; color: var(--olive-deep); }

/* One-away nudge */
.nudge-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--olive);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 13px 14px;
    margin-top: 12px;
    animation: nudge-in .3s cubic-bezier(.22, .9, .3, 1.2);
}

@keyframes nudge-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.nudge-copy .nudge-title { font-family: var(--font-sans); font-weight: 700; font-size: 15px; }
.nudge-copy .nudge-sub { font-family: var(--font-mono); font-size: 12.5px; opacity: .9; margin-top: 2px; }

.nudge-btn {
    margin-left: auto;
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    border: 0;
    background: var(--cream);
    color: var(--olive-deep);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.nudge-btn:active { transform: scale(.95); }

.totals-block { margin-top: 16px; }

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 2px;
    font-size: 15px;
}

.total-row .k { color: var(--muted); }
.total-row.grand { font-family: var(--font-sans); font-weight: 700; font-size: 19px; padding-top: 10px; }
.total-row .save { color: var(--olive-dark); font-family: var(--font-mono); font-size: 13.5px; }

/* Checkout */
.field { margin-bottom: 12px; }

.field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 5px;
}

.field input {
    width: 100%;
    padding: 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-size: 16px; /* prevents iOS zoom-on-focus */
}

.field input:focus { outline: 2px solid var(--olive); border-color: var(--olive); }

.field-grid { display: grid; grid-template-columns: 1fr 88px 110px; gap: 10px; }

.pay-placeholder {
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    padding: 18px 14px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--muted);
    margin: 6px 0 4px;
}

/* The mounted Stripe Payment Element (iframe draws its own inputs). */
.pay-element {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 14px;
    margin: 6px 0 4px;
    min-height: 90px;
}

.checkbox-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 12px 0;
    font-size: 14.5px;
    color: var(--muted);
}

.checkbox-row input { width: 20px; height: 20px; accent-color: var(--olive); margin-top: 1px; }

/* Status timeline (confirmation + tracking) */
.status-timeline { margin-top: 8px; }

.status-step {
    display: flex;
    gap: 14px;
    padding: 10px 0;
}

.status-bullet {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--paper);
    margin-top: 4px;
    flex: none;
}

.status-step.done .status-bullet { background: var(--olive); border-color: var(--olive); }
.status-step .status-name { font-family: var(--font-sans); font-weight: 600; font-size: 16px; }
.status-step.pending .status-name { color: var(--muted); font-weight: 400; }
.status-step .status-time { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.tracking-box {
    background: #D8E4E6;
    border-radius: var(--radius);
    padding: 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink);
    margin-top: 14px;
}

.confirm-hero { text-align: center; padding: 26px 0 8px; }
.confirm-hero .confirm-hand { font-family: var(--font-hand); font-size: 34px; color: var(--olive-dark); transform: rotate(-2deg); }
.confirm-hero .order-no { font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-top: 6px; }

/* Section labels, deck-style */
.kicker {
    font-family: var(--font-mono);
    font-size: 12.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--orange-dark);
    margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Blazor plumbing, restyled to stay in-world
   -------------------------------------------------------------------------- */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--navy);
    color: var(--cream);
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    font-size: 14px;
}

#blazor-error-ui .reload { color: var(--cream); }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* --------------------------------------------------------------------------
   Auth, account, status
   -------------------------------------------------------------------------- */

.landing-header { position: relative; }

.landing-auth {
    position: absolute;
    top: calc(16px + env(safe-area-inset-top));
    right: 16px;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 13px;
    text-decoration: none;
    cursor: pointer;
}

.auth-pill:active { transform: scale(.96); }
.auth-pill-button { font: inherit; font-family: var(--font-mono); font-size: 12.5px; }

.form-error {
    background: #F7E5DC;
    border: 1px solid color-mix(in srgb, var(--orange-dark) 40%, transparent);
    color: var(--orange-dark);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-size: 14px;
    margin: 10px 0;
}

.signed-in-note {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--olive-dark);
    margin: 10px 0;
}

.promo-row { margin: 12px 0 4px; }

.section-title {
    font-size: 21px;
    margin: 26px 0 12px;
}

.design-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.design-card {
    text-decoration: none;
    color: var(--ink);
}

.design-thumb {
    display: block;
    aspect-ratio: 1;
    border-radius: 18%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: var(--shadow-sticker);
    background: var(--cream-2);
    transform: rotate(-2deg);
    transition: transform .15s ease;
}

.design-card:nth-child(even) .design-thumb { transform: rotate(2deg); }
.design-card:hover .design-thumb { transform: rotate(0) scale(1.03); }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; }

.design-name {
    display: block;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
}

.design-reorder { font-family: var(--font-mono); font-size: 12px; color: var(--orange-dark); }

.order-link { text-decoration: none; color: var(--ink); }

.status-chip {
    font-family: var(--font-mono);
    font-size: 12px;
    border-radius: 999px;
    padding: 4px 11px;
    white-space: nowrap;
    margin-left: auto;
}

.status-received { background: var(--cream-2); color: var(--muted); }
.status-pendingpayment { background: #F6E3E0; color: #8A3B2B; }
.status-inproduction { background: #F3E0C8; color: var(--orange-dark); }
.status-shipped { background: #D8E4E6; color: var(--ink); }
.status-delivered { background: var(--green-tint); color: var(--olive-deep); }

/* --------------------------------------------------------------------------
   Admin — a desktop tool, wider frame, same brand
   -------------------------------------------------------------------------- */

.admin-frame {
    max-width: 1100px;
    margin: 0 auto;
    min-height: 100dvh;
    padding: 0 22px 40px;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 26px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-size: 14px;
}

.admin-brand img { width: 54px; }

.admin-nav { display: flex; gap: 18px; margin-right: auto; }

.admin-nav a {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: .04em;
}

.admin-nav a:hover { color: var(--ink); }

.admin-page h1 { font-size: 30px; }
.admin-page h2 { font-size: 18px; margin: 20px 0 10px; }

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-search {
    width: 300px;
    padding: 11px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    font-family: var(--font-mono);
    font-size: 14px;
}

.admin-search:focus { outline: 2px solid var(--olive); border-color: var(--olive); }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.filter-chip {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--paper);
    color: var(--muted);
    cursor: pointer;
}

.filter-chip.selected { background: var(--navy); border-color: var(--navy); color: var(--cream); }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.admin-table th {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    text-align: left;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    background: var(--cream-2);
}

.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14.5px;
    vertical-align: middle;
}

.admin-table tbody tr { cursor: pointer; }
.admin-table tbody tr:hover { background: var(--cream-2); }
.admin-table tbody tr:last-child td { border-bottom: 0; }

.ladder-table tbody tr { cursor: default; }
.ladder-table tbody tr:hover { background: transparent; }
.ladder-table input { width: 90px; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

.admin-empty {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--muted);
    padding: 30px 0;
}

.admin-columns {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 22px;
    align-items: start;
}

@media (max-width: 860px) {
    .admin-columns { grid-template-columns: 1fr; }
}

.admin-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px 20px;
    box-shadow: var(--shadow-card);
}

.admin-card .cart-row { background: var(--cream); }

.promo-add { display: flex; gap: 8px; margin-top: 12px; }

.promo-add input {
    flex: 1;
    padding: 10px 12px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: var(--font-mono);
    font-size: 14px;
    text-transform: uppercase;
}

.mono { font-family: var(--font-mono); font-size: .95em; }
.muted { color: var(--muted); }

/* --------------------------------------------------------------------------
   Generative render states + /admin/ai
   -------------------------------------------------------------------------- */

/* A tile or canvas whose real render is still cooking: keep the CSS-filter
   preview visible, sweep a soft shimmer over it so the wait reads as
   "working", never "stuck". */
.fx-thumb.generating,
.canvas-stage.generating { position: relative; }

.fx-thumb.generating::after,
.canvas-stage.generating::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        transparent 38%,
        color-mix(in srgb, var(--cream) 55%, transparent) 50%,
        transparent 62%);
    background-size: 220% 100%;
    animation: render-shimmer 1.4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes render-shimmer {
    from { background-position: 130% 0; }
    to { background-position: -30% 0; }
}

.ai-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.ai-stat-card { padding: 14px 16px; }
.ai-stat-label { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ai-stat-main { font-size: 26px; font-weight: 700; margin: 2px 0 4px; }
.ai-stat-main .muted { font-size: 14px; font-weight: 400; }
.ai-fail-note { color: var(--orange-dark); }

.ai-filter-row { display: flex; gap: 10px; margin-bottom: 12px; }
.ai-filter-row select { font-family: var(--font-mono); font-size: 13px; padding: 6px 8px; }

.ai-table-wrap { overflow-x: auto; }
.ai-table td { vertical-align: middle; }
.ai-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: var(--cream-2);
}

.ai-chip {
    font-family: var(--font-mono);
    font-size: 11.5px;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.ai-chip.ok { background: var(--green-tint, #e6ecdb); color: var(--olive-deep); }
.ai-chip.fail { background: color-mix(in srgb, var(--orange) 18%, transparent); color: var(--orange-dark); }
.ai-chip.pending { background: var(--cream-2); color: var(--muted); }

.ai-error {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: var(--muted);
}
