/* Crafty: warm studio-pearl light theme. No dark mode by design. */
:root {
  --base: #FAF8F5;
  --paper: #FFFDF9;
  --sand: #F1E7D8;
  --ink: #33291F;
  --ink-2: #6B5D50;
  --ink-3: #94877A;
  --coral: #E0674A;
  --coral-deep: #C24E33;
  --terracotta: #B9553A;
  --sage: #8FA886;
  --lavender: #B9A7E0;
  --gold: #D99A2B;
  --line: rgba(84, 62, 40, .14);
  --glass: rgba(255, 253, 249, .66);
  --shadow-1: 0 1px 1px rgba(84, 62, 40, .05), 0 2px 6px rgba(84, 62, 40, .05);
  --shadow-2: 0 1px 1px rgba(84, 62, 40, .04), 0 4px 10px rgba(84, 62, 40, .06), 0 18px 40px rgba(84, 62, 40, .09);
  --shadow-3: 0 2px 4px rgba(84, 62, 40, .06), 0 12px 24px rgba(84, 62, 40, .10), 0 36px 80px rgba(84, 62, 40, .16);
  --r: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--base); color: var(--ink);
  font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--coral); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- ambient studio light ---------- */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background: linear-gradient(160deg, #FDFBF7 0%, #FAF8F5 40%, #F4ECDF 100%); }
.orb { position: absolute; border-radius: 50%; opacity: .6; will-change: transform; }
.o1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -16vmax; background: radial-gradient(circle, #FBD3C2 0%, rgba(251, 211, 194, 0) 68%); animation: drift1 38s ease-in-out infinite alternate; }
.o2 { width: 40vmax; height: 40vmax; right: -12vmax; top: 6vmax; background: radial-gradient(circle, #DCD2F3 0%, rgba(220, 210, 243, 0) 68%); animation: drift2 46s ease-in-out infinite alternate; }
.o3 { width: 44vmax; height: 44vmax; left: 18vmax; bottom: -24vmax; background: radial-gradient(circle, #D5E4CC 0%, rgba(213, 228, 204, 0) 68%); animation: drift3 52s ease-in-out infinite alternate; }
.o4 { width: 26vmax; height: 26vmax; right: 14vmax; bottom: -6vmax; background: radial-gradient(circle, #FBE6B8 0%, rgba(251, 230, 184, 0) 68%); animation: drift1 60s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate3d(7vmax, 5vmax, 0) scale(1.12); } }
@keyframes drift2 { to { transform: translate3d(-8vmax, 7vmax, 0) scale(.92); } }
@keyframes drift3 { to { transform: translate3d(6vmax, -6vmax, 0) scale(1.08); } }
.grid { position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(84, 62, 40, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(84, 62, 40, .045) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 0%, transparent 78%); }
.grain { position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .33 0 0 0 0 .24 0 0 0 0 .16 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, .8);
  box-shadow: var(--shadow-2), inset 0 0 0 1px rgba(84, 62, 40, .05);
}

/* ---------- nav ---------- */
.nav { position: sticky; top: 10px; z-index: 40; margin: 10px auto 0; width: min(1240px, calc(100% - 24px));
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px 8px 14px; border-radius: 18px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-height: 44px; }
.emblem { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-1); overflow: visible; }
.wordmark { font: 600 1.4rem/1 var(--serif); letter-spacing: -.01em; }
.e-frame { transform-origin: 32px 33px; transform: rotate(-8deg); animation: frameIn .9s var(--ease) both; }
.e-nib { transform-origin: 24px 46px; animation: nibIn .8s .25s var(--ease) both; }
.e-spark { transform-origin: 49px 14px; animation: sparkIn .7s .6s var(--ease) both; }
@keyframes frameIn { from { transform: rotate(20deg) scale(.6); opacity: 0; } }
@keyframes nibIn { from { transform: rotate(-40deg) scale(.5); opacity: 0; } }
@keyframes sparkIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; background: none;
  border-radius: 12px; font-weight: 500; font-size: .94rem; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s; }
.nav-link:hover { background: rgba(224, 103, 74, .09); color: var(--ink); }
.nav-link.is-active { color: var(--ink); background: rgba(255, 255, 255, .8); box-shadow: var(--shadow-1); }
.short { display: none; }
.counter { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 5px 10px; border-radius: 99px;
  font-size: .78rem; color: var(--ink-2); background: rgba(255, 255, 255, .7); border: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.counter i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(143, 168, 134, .25); }
.counter b { color: var(--ink); font-weight: 600; }

.dd { position: relative; }
.dd-btn svg { transition: transform .25s var(--ease); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 10px); width: min(330px, calc(100vw - 24px)); padding: 8px; border-radius: 18px;
  background: #FFFDF9; border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(84, 62, 40, .06);
  display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .18s, transform .22s var(--ease), visibility .18s; }
.dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) {
  .dd:hover .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
}
.dd-menu a { display: grid; gap: 1px; padding: 9px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s; }
.dd-menu a:hover { background: rgba(224, 103, 74, .08); }
.dd-menu a strong { font-weight: 600; font-size: .95rem; }
.dd-menu a span { font-size: .82rem; color: var(--ink-2); line-height: 1.35; }
.dd-menu a.dd-feature { padding: 14px; margin-bottom: 4px; background: linear-gradient(135deg, #FDEBDD, #F3E9FA 110%); border: 1px solid rgba(224, 103, 74, .18); }
.dd-menu a.dd-feature strong { font: 600 1.15rem/1.2 var(--serif); }
.dd-kicker { font-size: .68rem !important; letter-spacing: .12em; text-transform: uppercase; color: var(--terracotta) !important; font-weight: 700; }

/* ---------- hero ---------- */
main { width: min(1240px, calc(100% - 24px)); margin: 0 auto; }
.hero { padding: 44px 6px 26px; max-width: 760px; }
.kicker { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--terracotta); }
h1 { font: 600 clamp(2.3rem, 6vw, 4rem)/1.02 var(--serif); letter-spacing: -.025em; margin-top: 10px; text-wrap: balance; }
.lede { margin-top: 14px; font-size: 1.06rem; color: var(--ink-2); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.or { color: var(--ink-3); font-size: .9rem; }
.rise { animation: rise .8s var(--ease) both; }
.r2 { animation-delay: .06s; } .r3 { animation-delay: .12s; } .r4 { animation-delay: .18s; } .r5 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: .95rem; color: var(--ink); text-decoration: none;
  box-shadow: var(--shadow-1); transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: var(--shadow-1); }
.btn.primary { background: linear-gradient(180deg, #E8755A, var(--coral-deep)); border-color: var(--coral-deep); color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 16px rgba(194, 78, 51, .28); }
.btn.ghost { background: rgba(255, 255, 255, .55); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .85rem; border-radius: 11px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.link-btn { border: 0; background: none; padding: 10px 0 0; color: var(--ink-3); font-size: .86rem; text-decoration: underline; text-underline-offset: 3px; min-height: 40px; }
.link-btn:hover { color: var(--coral-deep); }
.club-tag { font: 700 .62rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 4px 6px; border-radius: 6px;
  background: linear-gradient(135deg, #F6C453, #E9A93A); color: #4A3206; vertical-align: middle; }
body.unlocked .club-tag { background: #DCE8D5; color: #37512F; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px; gap: 18px; align-items: start; padding-bottom: 40px; scroll-margin-top: 84px; }
.panel { border-radius: var(--r); padding: 18px; }
.panel h2 { font: 600 1.25rem/1.2 var(--serif); }
.panel h3 { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.field { display: grid; gap: 5px; margin-top: 12px; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
input[type=text], input[type=url], input[type=password], textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .85);
  font-size: 16px; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.4; }
input:focus, textarea:focus { outline: 0; border-color: var(--coral); box-shadow: 0 0 0 3px rgba(224, 103, 74, .18); }
::placeholder { color: #A99C8F; opacity: 1; }
.hint { font-size: .8rem; color: var(--ink-3); margin-top: 8px; }
.hint.center { text-align: center; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.seg.small { margin-top: 8px; }
.seg.wrap { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg button { min-height: 44px; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .6);
  font-size: .84rem; font-weight: 600; color: var(--ink-2); display: grid; justify-items: center; align-content: center; gap: 2px;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s; }
.seg button:hover { transform: translateY(-1px); background: #fff; }
.seg button[aria-checked=true] { background: #fff; border-color: var(--coral); color: var(--ink); box-shadow: 0 0 0 2px rgba(224, 103, 74, .2), var(--shadow-1); }
.seg button small { font-weight: 500; color: var(--ink-3); font-size: .72rem; }
.seg button.locked { color: var(--ink-3); }
.seg button.locked::after { content: "Club"; font: 700 .58rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #8A5A12; }
.ico { display: block; border: 2px solid currentColor; border-radius: 4px; opacity: .7; margin-bottom: 3px; }
.i-story { width: 14px; height: 24px; } .i-square { width: 22px; height: 22px; margin-top: 1px; } .i-booth { width: 9px; height: 24px; }
.fonts { grid-auto-flow: row; }
.fonts button { justify-items: start; padding-left: 14px; font-size: 1rem; }
.f-serif { font-family: var(--serif); } .f-sans { font-family: var(--sans); } .f-hand { font-family: var(--hand); font-size: 1.25rem !important; }

.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.swatch { position: relative; display: grid; gap: 5px; justify-items: center; padding: 6px 2px; border: 0; background: none; border-radius: 12px; font-size: .68rem; font-weight: 600; color: var(--ink-2); line-height: 1.15; text-align: center; }
.swatch i { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .2s; }
.swatch:hover i { transform: translateY(-2px) rotate(-3deg); box-shadow: var(--shadow-2); }
.swatch[aria-checked=true] i { box-shadow: 0 0 0 2px var(--base), 0 0 0 4px var(--coral); }
.swatch.locked::after { content: ""; position: absolute; top: 2px; right: calc(50% - 28px); width: 16px; height: 16px; border-radius: 50%;
  background: #F6C453 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='4.500' y='7.500' width='7' height='5' rx='1.200' fill='%234A3206'/%3E%3Cpath d='M6 7.500V6a2 2 0 014 0v1.500' fill='none' stroke='%234A3206' stroke-width='1.300'/%3E%3C/svg%3E") center/12px no-repeat; box-shadow: var(--shadow-1); }

.stage { display: grid; justify-items: center; gap: 14px; position: sticky; top: 84px; }
.easel { padding: 16px; border-radius: 26px; box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(84, 62, 40, .05); max-width: 100%; }
#preview { display: block; height: auto; width: auto; max-width: 100%; max-height: min(68vh, 760px); border-radius: 8px;
  box-shadow: 0 1px 2px rgba(84, 62, 40, .15), 0 10px 28px rgba(84, 62, 40, .16); background: var(--paper); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.frames-head { display: flex; align-items: baseline; justify-content: space-between; }
.drop { position: relative; display: grid; gap: 2px; justify-items: center; text-align: center; margin-top: 12px; padding: 20px 12px; border-radius: 16px;
  border: 1.5px dashed rgba(185, 85, 58, .45); background: rgba(255, 255, 255, .5); cursor: pointer; transition: background .2s, transform .2s var(--ease), border-color .2s; }
.drop:hover, .drop.over { background: #fff; transform: translateY(-2px); border-color: var(--coral); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop:focus-within { outline: 2.5px solid var(--coral); outline-offset: 2px; }
.drop span { font-size: .84rem; color: var(--ink-3); }
.frame-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 12px; }
.frame { border-radius: 16px; background: rgba(255, 255, 255, .78); border: 1px solid var(--line); padding: 12px; box-shadow: var(--shadow-1); }
.frame-top { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--sand); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3); font-size: .7rem; text-align: center; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.thumb b { position: absolute; left: 4px; top: 4px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--coral); color: #fff; font-size: .72rem; display: grid; place-items: center; }
.frame-tools { display: flex; gap: 4px; justify-content: flex-end; margin-top: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .8); display: grid; place-items: center; color: var(--ink-2); transition: transform .15s var(--ease), background .15s; }
.icon-btn:hover:not([disabled]) { transform: translateY(-1px); background: #fff; color: var(--coral-deep); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.frame textarea { margin-top: 6px; min-height: 60px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px 0 10px; min-height: 30px; border-radius: 99px; background: #FBE7DE; color: #7A3320; font-size: .82rem; font-weight: 600; }
.pill button { width: 28px; height: 28px; border: 0; background: none; border-radius: 50%; color: inherit; font-size: 1rem; line-height: 1; }
.pill button:hover { background: rgba(122, 51, 32, .12); }
.pills input { flex: 1 1 110px; min-height: 34px; padding: 4px 10px; border-radius: 99px; font-size: 16px; }
.sliders { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; margin-top: 8px; font-size: .76rem; color: var(--ink-3); font-weight: 600; }
input[type=range] { width: 100%; height: 28px; accent-color: var(--coral); margin: 0; }

/* ---------- footer ---------- */
.foot { text-align: center; padding: 10px 16px 110px; color: var(--ink-3); font-size: .86rem; display: grid; gap: 6px; }
.foot a { color: var(--ink-2); }
.admin-btn { display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; min-height: 36px; padding: 0 8px; border: 0; background: none; color: var(--ink-3); font-size: .78rem; border-radius: 8px; opacity: .8; }
.admin-btn:hover { opacity: 1; color: var(--ink-2); }
.admin-btn.in-modal { margin: 10px 0 0 -8px; }

/* ---------- modals ---------- */
.modal { width: min(620px, calc(100% - 20px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 26px 24px 20px; border: 1px solid rgba(255, 255, 255, .9); border-radius: 24px;
  background: rgba(255, 253, 249, .94); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--ink); box-shadow: var(--shadow-3); }
.modal::backdrop { background: rgba(120, 96, 72, .28); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal h2 { font: 600 1.8rem/1.1 var(--serif); letter-spacing: -.015em; margin-top: 4px; padding-right: 40px; }
.modal h3 { font: 600 1.05rem/1.2 var(--serif); margin: 20px 0 6px; }
.x { position: absolute; right: 12px; top: 12px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(84, 62, 40, .07); font-size: 1.3rem; line-height: 1; color: var(--ink-2); }
.x:hover { background: rgba(224, 103, 74, .16); }
.price { font-weight: 600; color: var(--terracotta); margin-top: 4px; }
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tier { border-radius: 16px; padding: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); }
.tier h3 { margin: 0 0 8px; }
.tier.club { background: linear-gradient(150deg, #FFF3DC, #FBE6EC 60%, #EFE8FB); border-color: rgba(217, 154, 43, .45); box-shadow: var(--shadow-2); }
.tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: .9rem; color: var(--ink-2); }
.tier li { padding-left: 20px; position: relative; }
.tier li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.tier.club li::before { background: var(--gold); border-radius: 2px; transform: rotate(45deg); }
.prompt-card { margin-top: 14px; padding: 14px; border-radius: 16px; border: 1px dashed rgba(185, 85, 58, .4); background: rgba(255, 255, 255, .6); display: grid; gap: 8px; justify-items: start; }
.prompt-card p { font: 500 1.1rem/1.35 var(--serif); }
.prompt-card.locked p { filter: blur(5px); user-select: none; }
.prompt-card.locked .btn { display: none; }
.cta { margin-top: 16px; display: grid; gap: 6px; }
.cta .soon { padding: 12px 14px; border-radius: 14px; background: rgba(143, 168, 134, .18); color: #3F5637; font-weight: 600; font-size: .92rem; }
.code-row { margin-top: 16px; display: grid; gap: 6px; }
.code-row label { font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.code-row > div { display: flex; gap: 8px; }
.code-row input { text-transform: uppercase; }
.msg { font-size: .86rem; min-height: 1.3em; margin-top: 6px; color: var(--ink-2); }
.msg.ok { color: #3F6B35; } .msg.err { color: #B23A24; }
.notice { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFF3DC; border: 1px solid rgba(217, 154, 43, .4); font-size: .84rem; color: #5C4310; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#loginForm { display: grid; }
#loginForm .btn { margin-top: 8px; }
.switch { display: flex; align-items: center; gap: 12px; margin-top: 16px; cursor: pointer; font-weight: 600; min-height: 44px; }
.switch input { position: absolute; opacity: 0; }
.switch i { width: 52px; height: 30px; border-radius: 99px; background: #D9CFC3; position: relative; transition: background .2s; flex: none; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--sage); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { outline: 2.5px solid var(--coral); outline-offset: 2px; }
.codes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.codes li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 12px; background: rgba(255, 255, 255, .8); border: 1px solid var(--line); font: 600 .95rem/1 ui-monospace, Menlo, monospace; letter-spacing: .04em; }

/* ---------- install banner + toast ---------- */
.install { position: fixed; z-index: 60; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(430px, calc(100% - 20px));
  display: grid; grid-template-columns: 40px 1fr auto 40px; gap: 10px; align-items: center; padding: 10px; border-radius: 18px; background: rgba(255, 253, 249, .9); animation: bannerIn .6s var(--ease) both; }
.install img { border-radius: 10px; }
.install div { display: grid; font-size: .8rem; color: var(--ink-2); line-height: 1.3; }
.install strong { color: var(--ink); font-size: .9rem; }
.install .x { position: static; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, 20px); } }
.toast { position: fixed; z-index: 70; left: 50%; top: 78px; transform: translate(-50%, -12px); padding: 10px 16px; border-radius: 99px; background: #fff; border: 1px solid var(--line);
  box-shadow: var(--shadow-2); font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); max-width: calc(100% - 24px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { text-align: center; padding: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .studio { grid-template-columns: minmax(0, 1fr) 340px; }
  .setup { grid-column: 1 / -1; order: 3; }
  .swatches { grid-template-columns: repeat(7, 1fr); }
  .fonts { grid-auto-flow: column; }
}
@media (max-width: 760px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .stage { position: static; order: 1; }
  .frames { order: 2; }
  .setup { order: 3; }
  .swatches { grid-template-columns: repeat(4, 1fr); }
  .fonts { grid-auto-flow: row; }
  .hero { padding-top: 28px; }
  #preview { max-height: 62vh; }
  .tiers, .two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .full { display: none; } .short { display: inline; }
  .nav { padding: 6px 8px 6px 10px; }
  .nav-link { padding: 0 8px; font-size: .88rem; }
  .wordmark { font-size: 1.2rem; }
  .emblem { width: 30px; height: 30px; }
  .counter { padding: 5px 8px; margin-left: 2px; }
  .actions .btn { flex: 1 1 46%; }
}
@media (max-width: 480px) {
  .nav-link.is-active { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
