/* ─── stitches by anastasia ─────────────────────────────── */

:root{
  /* palette — soft pastel cream */
  --cream: #FDF4ED;
  --cream-deep: #F7E8DC;
  --blush: #F4C8C8;
  --rose: #E8B4D4;
  --sage: #C9D8B6;
  --lilac: #D4C5E8;
  --buttercream: #F4E4B8;

  --ink: #3D2A2E;
  --ink-soft: #6B4F54;
  --ink-mute: #9A8388;
  --paper: #FFFCF8;
  --line: rgba(61,42,46,.10);
  --line-strong: rgba(61,42,46,.18);

  /* type — defaults; can be overridden by tweaks */
  --script: "Allura", "Pinyon Script", cursive;
  --sans: "DM Sans", "Inter", system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-soft: 0 10px 30px -16px rgba(61,42,46,.18), 0 2px 8px -4px rgba(61,42,46,.08);
  --shadow-lift: 0 22px 50px -22px rgba(61,42,46,.28), 0 6px 18px -8px rgba(61,42,46,.10);
}

[data-theme="dark"]{
  --cream: #221518;
  --cream-deep: #2D1B1F;
  --blush: #6A3A47;
  --rose: #7A4366;
  --sage: #4D6648;
  --lilac: #5A4B7A;
  --buttercream: #7A6840;

  --ink: #F6E6E0;
  --ink-soft: #D4BDB6;
  --ink-mute: #9D8780;
  --paper: #2A1A1E;
  --line: rgba(246,230,224,.10);
  --line-strong: rgba(246,230,224,.20);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
/* ─── page entry animation ─────────────────────────────── */
body{
  background:var(--cream);
  color:var(--ink);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  min-height:100vh;
  overflow-x:hidden;
  transition: background .5s ease, color .5s ease;
  animation: page-in .6s cubic-bezier(.22,1,.36,1);
}
@keyframes page-in{
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── yarn ball page-transition loader ─────────────────── */
#__yarn-loader{
  position: fixed; inset: 0; z-index: 2147483647;
  display: grid; place-items: center;
  background: radial-gradient(circle at center,
    color-mix(in oklab, var(--cream) 96%, transparent) 0%,
    color-mix(in oklab, var(--cream) 88%, transparent) 100%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
  opacity: 0; pointer-events: none;
  transition: opacity .32s ease;
}
#__yarn-loader.show{ opacity: 1; pointer-events: auto; }

#__yarn-loader .ylo-inner{
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  transform: translateY(10px) scale(.96);
  opacity: 0;
  transition: opacity .42s cubic-bezier(.22,1,.36,1), transform .42s cubic-bezier(.22,1,.36,1);
}
#__yarn-loader.show .ylo-inner{ opacity: 1; transform: translateY(0) scale(1); }

#__yarn-loader .ylo-wrap{
  animation: yarn-bob 2.6s ease-in-out infinite;
}
@keyframes yarn-bob{
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-6px) rotate(1deg); }
}

#__yarn-loader .ylo-svg{
  width: 280px; height: 130px;
  overflow: visible;
  display: block;
}

/* ball is STATIC — no rotation. wrapper does a tiny sway via .ylo-wrap. */
#__yarn-loader .ylo-ball{
  transform-origin: 110px 110px;
}

/* trail retracts: dash length shrinks from full → zero, then re-extends */
#__yarn-loader .ylo-trail,
#__yarn-loader .ylo-trail-shadow{
  stroke-dasharray: 360 1200;
  animation: thread-pull 2.8s cubic-bezier(.55,0,.45,1) infinite;
}
@keyframes thread-pull{
  0%   { stroke-dasharray: 360 1200; }  /* fully extended */
  42%  { stroke-dasharray: 0 1200; }    /* fully retracted into ball */
  62%  { stroke-dasharray: 0 1200; }    /* hold — sparkles fire here */
  100% { stroke-dasharray: 360 1200; }  /* cast out again */
}

/* sparkles — twinkle in sync with thread arriving at the ball */
#__yarn-loader .ylo-spark{
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: ylo-spark 2.8s cubic-bezier(.22,1,.36,1) infinite;
  filter: drop-shadow(0 0 6px rgba(246,215,122,.6));
}
#__yarn-loader .ylo-spark-1{ animation-delay: 1.18s; }
#__yarn-loader .ylo-spark-2{ animation-delay: 1.30s; }
#__yarn-loader .ylo-spark-3{ animation-delay: 1.40s; }
#__yarn-loader .ylo-spark-4{ animation-delay: 1.24s; }
@keyframes ylo-spark{
  0%   { opacity: 0; transform: scale(0) rotate(-30deg); }
  8%   { opacity: 1; transform: scale(1.2) rotate(0deg); }
  20%  { opacity: 1; transform: scale(.9) rotate(15deg); }
  35%  { opacity: 0; transform: scale(1.4) rotate(35deg); }
  100% { opacity: 0; transform: scale(0) rotate(35deg); }
}

#__yarn-loader .ylo-caption{
  font-family: var(--script);
  font-size: 36px; line-height: 1; color: var(--ink-soft);
  letter-spacing: .01em;
  position: relative;
  text-align: center;
  min-width: 200px;
}
#__yarn-loader .ylo-caption::after{
  content: '...'; display:inline-block;
  position: absolute;
  animation: yarn-dots 1.6s steps(4, end) infinite;
  overflow: hidden;
  width: 0; white-space: nowrap;
  margin-left: 2px;
}
@keyframes yarn-dots{
  to { width: 1.4em; }
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font:inherit;color:inherit;cursor:pointer}

/* ─── type ─────────────────────────────────────────────── */
.script{
  font-family:var(--script);
  font-weight:400;
  letter-spacing:.005em;
  line-height:.95;
}
.eyebrow{
  font-size:11px;
  letter-spacing:.22em;
  text-transform:uppercase;
  font-weight:500;
  color:var(--ink-soft);
}
h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:-.01em}

.h-display{
  font-family:var(--script);
  font-weight:400;
  font-size:clamp(60px, 9vw, 132px);
  line-height:.92;
  letter-spacing:0;
}
.h-section{
  font-family:var(--script);
  font-weight:400;
  font-size:clamp(44px, 5.5vw, 76px);
  line-height:1;
}
.h-card{
  font-family:var(--sans);
  font-weight:500;
  font-size:18px;
  letter-spacing:-.005em;
}

/* ─── layout ───────────────────────────────────────────── */
.wrap{max-width:1280px;margin:0 auto;padding:0 32px}
.wrap-tight{max-width:1080px;margin:0 auto;padding:0 32px}
.stack{display:flex;flex-direction:column}
.row{display:flex}
section{position:relative;padding:96px 0}
section.tight{padding:64px 0}

/* ─── nav ──────────────────────────────────────────────── */
.nav{
  position:sticky; top:0; z-index:50;
  background:color-mix(in oklab, var(--cream) 82%, transparent);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border-bottom:1px solid var(--line);
}
.nav-inner{
  display:flex;align-items:center;justify-content:space-between;
  padding:18px 32px;max-width:1440px;margin:0 auto;
}
.brand{
  font-family:var(--script);
  font-size:34px;
  line-height:1;
  display:flex;align-items:center;gap:10px;
}
.brand-mark{
  width:34px;height:34px;display:inline-block;
}
.nav-links{display:flex;gap:6px;align-items:center}
.nav-link{
  padding:10px 16px;border-radius:999px;
  font-size:14px;color:var(--ink-soft);font-weight:500;
  transition:background .25s ease, color .25s ease;
  position:relative;
}
.nav-link:hover{color:var(--ink); background:color-mix(in oklab, var(--rose) 30%, transparent)}
.nav-link.active{color:var(--ink); background:color-mix(in oklab, var(--rose) 38%, transparent)}
.nav-cart{
  display:inline-flex;align-items:center;gap:8px;
  padding:10px 16px;border-radius:999px;
  background:var(--ink);color:var(--cream);
  font-size:13px;font-weight:500;
  transition:transform .25s ease;
}
.nav-cart:hover{transform:translateY(-1px)}
.nav-cart .count{
  background:var(--rose);color:var(--ink);
  width:20px;height:20px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:11px;font-weight:600;
}

/* ─── footer ───────────────────────────────────────────── */
.foot{
  background:var(--cream-deep);
  border-top:1px solid var(--line);
  padding:80px 0 40px;
  margin-top:80px;
}
.foot-grid{
  display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;
  max-width:1280px;margin:0 auto;padding:0 32px;
}
.foot-grid h4{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--ink-soft);margin-bottom:16px;font-weight:600}
.foot-grid a{display:block;padding:6px 0;color:var(--ink);font-size:14px;opacity:.78}
.foot-grid a:hover{opacity:1}
.foot-base{
  max-width:1280px;margin:60px auto 0;padding:24px 32px 0;
  border-top:1px solid var(--line);
  display:flex;justify-content:space-between;align-items:center;
  font-size:12px;color:var(--ink-mute);
}

/* ─── buttons ──────────────────────────────────────────── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:14px 26px;border-radius:999px;border:0;
  font-size:14px;font-weight:500;letter-spacing:.01em;
  transition:transform .25s ease, box-shadow .25s ease, background .25s ease;
  cursor:pointer;
}
.btn-primary{background:var(--ink);color:var(--cream)}
.btn-primary:hover{transform:translateY(-2px); box-shadow:var(--shadow-lift)}
.btn-soft{background:var(--rose);color:var(--ink)}
.btn-soft:hover{transform:translateY(-2px); box-shadow:var(--shadow-soft)}
.btn-ghost{background:transparent;border:1px solid var(--line-strong);color:var(--ink)}
.btn-ghost:hover{background:var(--paper)}
.btn-lg{padding:18px 32px;font-size:15px}

/* ─── tags / chips ─────────────────────────────────────── */
.chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:8px 14px;border-radius:999px;
  background:var(--paper);border:1px solid var(--line);
  font-size:12.5px;color:var(--ink-soft);
  transition:all .2s ease;
  cursor:pointer;
}
.chip:hover{border-color:var(--line-strong);color:var(--ink)}
.chip.is-on{background:var(--ink);color:var(--cream);border-color:var(--ink)}

/* ─── card ─────────────────────────────────────────────── */
.card{
  background:var(--paper);
  border-radius:var(--radius);
  border:1px solid var(--line);
  overflow:hidden;
  transition:transform .35s ease, box-shadow .35s ease;
  position:relative;
}
.card:hover{transform:translateY(-4px); box-shadow:var(--shadow-lift)}

/* product card — distinct treatment with stitched corner accents */
.product-card{
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.6) inset,
    0 12px 28px -22px rgba(61,42,46,.30),
    0 2px 6px -3px rgba(61,42,46,.08);
  overflow: visible;
  position: relative;
}
.product-card .product-thumb{
  border-radius: 14px 14px 0 0;
  overflow: hidden;
  position: relative;
}
.product-card .product-body{
  padding: 18px 20px 22px;
  position: relative;
}
.product-card:hover{
  transform: translateY(-5px);
  box-shadow:
    0 1px 0 rgba(255,255,255,.7) inset,
    0 22px 40px -22px rgba(61,42,46,.40),
    0 4px 10px -4px rgba(61,42,46,.12);
}
/* stitch corners — small X marks that pop on hover */
.stitch-corner{
  display: block;
}
.product-card:hover .stitch-corner{
  opacity: 1 !important;
}

/* ─── stitched border (static, layered thread strokes) ── */
.stitch-border{
  position:absolute; inset:0; pointer-events:none; z-index:2;
  width:100%; height:100%;
  overflow:visible;
  filter: drop-shadow(0 1px 1px rgba(61,42,46,.15));
}
.stitch-border .sb-strand{
  x: 5px; y: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
}
.sb-shadow{ transform: translate(0, 1.4px) }
/* subtle hover: thread brightens slightly */
.card:hover .stitch-border{
  filter: drop-shadow(0 2px 3px rgba(61,42,46,.22));
}

/* X-stitch corner accent — animates in on hover */
.stitch-corner{
  position:absolute; pointer-events:none; opacity:0;
  transition:opacity .35s ease, transform .35s ease;
}
.card:hover .stitch-corner{
  opacity:.7; transform: scale(1);
}

/* a stitch row that draws along the bottom of the card on hover */
.card .stitch-trace{
  position:absolute; left:14px; right:14px; bottom:10px; height:8px;
  opacity:0; transition:opacity .25s ease;
  pointer-events:none;
}
.card:hover .stitch-trace{ opacity:.7 }

/* ─── floating petals (full-section field) ────────────── */
.petal-field{
  position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0;
}
.petal-drop{
  position:absolute; top:-40px; display:block;
  animation: petal-fall linear infinite;
  filter: drop-shadow(0 2px 4px rgba(61,42,46,.08));
  opacity:.85;
}
@keyframes petal-fall{
  0%{ transform: translate(0, -10vh) rotate(0deg); opacity:0; }
  10%{ opacity:.85; }
  100%{ transform: translate(var(--drift, 0), 110vh) rotate(540deg); opacity:.85; }
}

/* gentle drift — used for hero motif accents */
@keyframes drift{
  0%, 100% { transform: translate(0,0) rotate(0deg) }
  25%      { transform: translate(8px,-12px) rotate(8deg) }
  50%      { transform: translate(-4px,-18px) rotate(-4deg) }
  75%      { transform: translate(-10px,-6px) rotate(6deg) }
}
.motif.drift{ animation: drift 12s ease-in-out infinite }

/* spinning yarn ball */
@keyframes spin-slow{ to { transform: rotate(360deg) } }
.spin-slow{ animation: spin-slow 22s linear infinite }
.spin-rev{ animation: spin-slow 26s linear infinite reverse }

/* pulse */
@keyframes heart-pulse{
  0%,100%{ transform: scale(1) }
  50%{ transform: scale(1.12) }
}
.pulse{ animation: heart-pulse 2.6s ease-in-out infinite }

.product-card{
  display:flex;flex-direction:column;
}
.product-thumb{
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose) 100%);
  position:relative;overflow:hidden;
}
.product-thumb image-slot{width:100%;height:100%;}
.product-body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:6px}
.product-name{font-weight:500;font-size:15px}
.product-meta{font-size:12.5px;color:var(--ink-mute)}
.product-price{font-size:15px;color:var(--ink);font-weight:500;margin-top:4px}

/* plushie wiggle on hover */
@keyframes wiggle{
  0%{transform:rotate(0deg)}
  20%{transform:rotate(-3deg)}
  40%{transform:rotate(3deg)}
  60%{transform:rotate(-2deg)}
  80%{transform:rotate(2deg)}
  100%{transform:rotate(0deg)}
}
.wiggle-target{transition:transform .25s ease}
.card:hover .wiggle-target{animation:wiggle .8s ease-in-out}

/* ─── floating motifs ──────────────────────────────────── */
.motif{
  position:absolute;pointer-events:none;
  opacity:.5;
}
@keyframes float{
  0%,100%{transform:translateY(0) rotate(0deg)}
  50%{transform:translateY(-12px) rotate(6deg)}
}
.motif.f{animation:float 8s ease-in-out infinite}
.motif.f2{animation:float 11s ease-in-out infinite reverse}
.motif.f3{animation:float 14s ease-in-out infinite}

/* ─── stitched divider ────────────────────────────────── */
.stitch-line{
  width:100%;height:1px;
  background-image: linear-gradient(to right, var(--ink-mute) 50%, transparent 50%);
  background-size: 10px 1px;
  opacity:.5;
}

/* ─── reveal-on-load ───────────────────────────────────── */
/* default state IS the visible state. animation just adds entry motion. */
.reveal{
  animation: reveal-in .9s cubic-bezier(.22,1,.36,1);
}
@keyframes reveal-in{
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── inputs ───────────────────────────────────────────── */
.fld{
  display:flex;flex-direction:column;gap:6px;
}
.fld label{font-size:12px;color:var(--ink-soft);font-weight:500;letter-spacing:.01em}
.fld input, .fld textarea, .fld select{
  width:100%;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px 16px;
  font:inherit;color:var(--ink);
  transition:border-color .2s ease, box-shadow .2s ease;
}
.fld input:focus, .fld textarea:focus, .fld select:focus{
  outline:none;
  border-color:var(--rose);
  box-shadow:0 0 0 4px color-mix(in oklab, var(--rose) 30%, transparent);
}
.fld textarea{min-height:120px;resize:vertical}

/* image-slot styling — no dashed placeholder ring */
image-slot{
  --slot-bg: color-mix(in oklab, var(--blush) 35%, var(--cream));
  --slot-fg: var(--ink-soft);
  --slot-ring: none;
  background: var(--slot-bg);
  color:var(--slot-fg);
}

/* ─── scrapbook page background ───────────────────────── */
.scrapbook-page{
  background:
    radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--blush) 30%, transparent) 0%, transparent 30%),
    radial-gradient(circle at 80% 80%, color-mix(in oklab, var(--lilac) 25%, transparent) 0%, transparent 35%),
    repeating-linear-gradient(135deg,
      transparent 0px, transparent 32px,
      color-mix(in oklab, var(--ink-mute) 4%, transparent) 32px,
      color-mix(in oklab, var(--ink-mute) 4%, transparent) 33px),
    var(--cream);
  min-height: calc(100vh - 80px);
}
.washi-tape{
  filter: drop-shadow(0 2px 4px rgba(61,42,46,.12));
  z-index: 3;
}
.paper-card{
  isolation: isolate;
}

/* responsive */
@media (max-width: 860px){
  .wrap, .wrap-tight{padding:0 20px}
  .nav-inner{padding:14px 20px}
  .nav-links{display:none}
  .nav-links.mobile{display:flex;flex-direction:column}
  section{padding:60px 0}
  .foot-grid{grid-template-columns:1fr 1fr;gap:32px}
  /* sticky detail panes (studio commissions/orders detail) become static so
     they sit naturally under the list on small screens */
  .studio-sticky, .comm-grid > *:nth-child(2),
  .contact-info{ position: static !important; top:auto !important; }
}

/* ─── small-screen polish ─────────────────────────────── */
@media (max-width: 640px){
  .wrap, .wrap-tight{padding:0 16px}
  .nav-inner{padding:12px 16px}
  .brand{font-size:28px; gap:8px}
  .brand-mark{width:30px; height:30px}
  section{padding:44px 0}
  .foot{padding:60px 0 32px; margin-top:60px}
  .foot-grid{grid-template-columns:1fr; gap:24px; padding:0 16px}
  .foot-base{flex-direction:column; gap:8px; text-align:center; padding:20px 16px 0}
  .h-display{font-size: clamp(44px, 12vw, 96px)}
  .h-section{font-size: clamp(36px, 9vw, 60px)}
  /* iOS Safari zooms on inputs whose font-size < 16px — keep all inputs at 16 */
  .fld input, .fld textarea, .fld select, input, textarea{font-size:16px !important}
  /* shrink card / button padding without ruining the rhythm */
  .btn-lg{padding:14px 22px; font-size:14.5px}
  .card{border-radius:18px}
  /* stat grids in the studio collapse to 2-up on phones, 1-up on tiny screens */
  .stat-grid{grid-template-columns:1fr 1fr !important; gap:10px !important}
  .stat-grid .script, .stat-grid [style*="font-family:var(--script)"]{font-size:34px !important}
}

@media (max-width: 420px){
  .stat-grid{grid-template-columns:1fr !important}
  .nav-cart{padding:8px 12px; font-size:12px}
  .nav-cart .count{width:18px; height:18px; font-size:10px}
}

/* studio detail panes get tighter padding on phones so the inputs and chips
   inside don't push the card past the viewport */
@media (max-width: 640px){
  .studio-sticky{ padding: 22px 18px !important; border-radius: 18px !important; }
  .studio-sticky h2{ font-size: 32px !important; }
}

/* ──────────────────────────────────────────────────────
   TAB PILLS — used by account.jsx Tabs and studio.jsx Tabs.
   Desktop: pills sit on a single inline row with a paper-card backdrop.
   Mobile: the backdrop runs full-width, the row scrolls horizontally
   (no wrapping), and the active pill stays visually anchored.
   ────────────────────────────────────────────────────── */
.tab-pills{
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--paper);
  border-radius: 999px;
  border: 1px solid var(--line);
  align-self: flex-start;
  margin-bottom: 32px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.tab-pills::-webkit-scrollbar{ display: none; }
.tab-pill{
  padding: 10px 18px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: transparent;
  color: var(--ink-soft);
  font: 500 13.5px/1 var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.tab-pill:hover{ color: var(--ink); }
.tab-pill.is-on{ background: var(--ink); color: var(--cream); }
.tab-count{
  font: 600 11px/1 var(--sans);
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--cream-deep);
  color: var(--ink-soft);
}
.tab-pill.is-on .tab-count{ background: rgba(255,255,255,.15); color: var(--cream); }
@media (max-width: 640px){
  .tab-pills{
    margin-left: -16px;
    margin-right: -16px;
    padding: 5px 10px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    width: calc(100% + 32px);
    max-width: none;
  }
  .tab-pill{ padding: 10px 14px; }
}

/* ──────────────────────────────────────────────────────
   ACCOUNT GREETING HERO
   ────────────────────────────────────────────────────── */
.greet-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.greet-id{
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  flex: 1 1 280px;
}
.greet-side{
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.greet-stats{ display: flex; gap: 12px; }
.greet-stat{
  padding: 14px 20px;
  min-width: 130px;
  text-align: center;
}
.greet-actions{ display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.greet-action{ padding: 10px 18px; font-size: 13px; }
@media (max-width: 760px){
  .greet-side{ width: 100%; align-items: stretch; }
  .greet-stats{ width: 100%; }
  .greet-stat{ flex: 1 1 0; min-width: 0; padding: 12px 14px; }
  .greet-stat .script{ font-size: 30px !important; }
  .greet-actions{ justify-content: stretch; }
  .greet-action{ flex: 1; }
}
@media (max-width: 480px){
  .greet-id{ gap: 14px; flex-direction: column; align-items: flex-start; }
  .greet-id > div{ width: 100%; }
  .greet-name{ font-size: 44px !important; }
  .greet-motif{ display: none; }
  .greet-hero{ padding: 36px 0 24px !important; }
}

/* ──────────────────────────────────────────────────────
   STUDIO ORDERS — tracking row collapses cleanly
   ────────────────────────────────────────────────────── */
.tracking-row{
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.tracking-btns{ display: flex; gap: 8px; }
@media (max-width: 540px){
  .tracking-row{ flex-direction: column; }
  .tracking-btns{ width: 100%; }
  .tracking-save{ flex: 0 0 auto; padding: 12px 16px; }
  .tracking-ship{ flex: 1; }
}

/* ──────────────────────────────────────────────────────
   STUDIO SPOTLIGHT — stat + process editor rows
   ────────────────────────────────────────────────────── */
.spot-stat-row{
  display: grid;
  grid-template-columns: 1fr 1fr 32px;
  gap: 10px;
  align-items: center;
}
.spot-step-row{
  display: grid;
  grid-template-columns: 50px 1fr 2fr 32px;
  gap: 10px;
  align-items: center;
}
@media (max-width: 640px){
  .spot-stat-row{ grid-template-columns: 1fr 1fr 32px; gap: 8px; }
  .spot-step-row{
    grid-template-columns: 56px 1fr 32px;
    grid-template-areas:
      "n   t   x"
      "n   d   x";
    gap: 8px 10px;
  }
  .spot-step-row > :nth-child(1){ grid-area: n; align-self: center; }
  .spot-step-row > :nth-child(2){ grid-area: t; }
  .spot-step-row > :nth-child(3){ grid-area: d; }
  .spot-step-row > :nth-child(4){ grid-area: x; align-self: center; }
}

/* The studio's "Live preview" sticky pane (Product + Spotlight editors)
   should sit naturally above the form on mobile, not stick to the viewport. */
@media (max-width: 980px){
  .editor-grid > div:first-child{ position: static !important; top: auto !important; }
}

/* ──────────────────────────────────────────────────────
   STUDIO COMMISSION REPLY — the action row
   ────────────────────────────────────────────────────── */
.cr-actions{
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.cr-status{
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
@media (max-width: 640px){
  .cr-actions{ flex-direction: column; align-items: stretch; }
  .cr-status{ justify-content: flex-start; }
  .cr-actions > .btn-primary{ width: 100%; }
}

/* ──────────────────────────────────────────────────────
   STUDIO PRODUCT EDITOR
   ────────────────────────────────────────────────────── */
/* Bottom action row: Delete left, Cancel + Save right. On mobile,
   put the destructive Delete last in DOM order via flex column-reverse so
   the save action is what the thumb hits first. */
@media (max-width: 540px){
  .pe-actions{ flex-direction: column-reverse !important; align-items: stretch !important; }
  .pe-actions > div{ margin-left: 0 !important; display: flex; gap: 10px; }
  .pe-actions > div > .btn{ flex: 1; }
  .pe-actions > button{ width: 100%; }
}

/* ──────────────────────────────────────────────────────
   ACCOUNT ORDER CARD — tighter mobile layout
   ────────────────────────────────────────────────────── */
@media (max-width: 540px){
  .order-row{
    grid-template-columns: auto 1fr !important;
    gap: 14px !important;
    padding: 16px 18px !important;
  }
  /* The price/chevron move below the info, right-aligned, on a second row. */
  .order-row > :nth-child(3),
  .order-row > :nth-child(4){
    grid-column: 1 / -1;
    justify-self: end;
    text-align: right;
  }
  .order-row > :nth-child(3){ margin-top: 4px; }
  .order-row > :nth-child(4){ display: none; }
}

/* ──────────────────────────────────────────────────────
   STUDIO DASHBOARD — recent orders rows
   ────────────────────────────────────────────────────── */
.dash-order-row{
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-strong);
  min-width: 0;
}
@media (max-width: 640px){
  .dash-grid .card{ padding: 20px 18px !important; }
  .dash-order-row{
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  /* Status pill drops to its own line, right-aligned, so the name + id row
     has room to breathe. */
  .dash-order-row > :nth-child(4){
    grid-column: 2 / -1;
    justify-self: end;
  }
}

/* ──────────────────────────────────────────────────────
   GLOBAL — keep absolutely-positioned hero motifs from causing
   horizontal scroll on phones. Already overflow-x:hidden on body,
   but iOS sometimes paints them anyway.
   ────────────────────────────────────────────────────── */
@media (max-width: 480px){
  .motif{ max-width: 60px; max-height: 60px; }
}

/* ─── focus / accessibility ───────────────────────────── */
:focus-visible{
  outline: 2px solid var(--rose);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn:focus-visible, .chip:focus-visible{
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .petal-drop, .motif.drift, .spin-slow, .pulse{animation: none !important}
}
