/* Gather — dark glossy shell */
:root {
  --bg: #000; --s1: #121214; --s2: #1B1B1E; --s3: #26262A; --line: rgba(255, 255, 255, .09);
  --tx: #fff; --mut: rgba(255, 255, 255, .58); --mut2: rgba(255, 255, 255, .38);
  --display: 'Avenir Next Condensed', 'Futura Condensed ExtraBold', Impact, 'Arial Narrow', sans-serif;
  --ui: -apple-system, 'SF Pro Text', system-ui, 'Segoe UI', sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.4 var(--ui); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .35; cursor: default; }
input { font: inherit; color: inherit; }
svg { stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }
.page svg, .art-cell svg { fill: initial; stroke: initial; stroke-width: initial; stroke-linecap: initial; stroke-linejoin: initial; }
.page .ph svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.measure { position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
.muted { color: var(--mut); }
.pad { padding: 8px 20px; }
a { color: inherit; text-decoration: none; }

/* ---------- buttons & chips ---------- */
.btn-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #ECECEC 70%, #DADADA 100%); color: #0B0B0B; font-weight: 650; font-size: 16.5px; letter-spacing: -.01em;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .14), inset 0 2px 1px #fff, 0 6px 22px rgba(255, 255, 255, .13), 0 2px 6px rgba(0, 0, 0, .5); transition: transform .15s; white-space: nowrap; }
.btn-pill:active { transform: scale(.96); }
.btn-pill svg { width: 20px; height: 20px; stroke-width: 2.4; }
.btn-pill.sm { height: 36px; padding: 0 18px; font-size: 14.5px; }
.btn-pill.busy { opacity: .75; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; color: var(--tx); font-weight: 600; font-size: 15.5px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); }
.btn-ghost svg { width: 19px; height: 19px; }
.btn-ghost.sm { height: 34px; font-size: 13.5px; padding: 0 14px; }
.btn-ghost.full { width: 100%; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 14.5px; color: rgba(255, 255, 255, .86); white-space: nowrap; }
.chip.blue { background: linear-gradient(180deg, #4C63E8, #2E40B8); border-color: rgba(140, 160, 255, .5); color: #fff; font-weight: 600; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.avatars { display: inline-flex; }
.avatars i { width: 22px; height: 22px; border-radius: 50%; margin-left: -6px; background: var(--c); border: 2px solid #1a1a1a; font: 700 10px/18px var(--ui); text-align: center; font-style: normal; color: #fff; }
.chip-btn { height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .09); color: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 550; white-space: nowrap; border: 1px solid transparent; }
.chip-btn.on { background: #fff; color: #000; }
.round-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .09); font-size: 11px; letter-spacing: 1px; color: var(--mut); }
.round-btn.lg { width: 46px; height: 46px; font-size: 16px; color: #fff; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.on { background: #fff; color: #000; }

/* ---------- shell ---------- */
#app { min-height: 100dvh; }
.view { padding-bottom: calc(110px + var(--safe-b)); max-width: 560px; margin: 0 auto; }
body.editing #app { display: none; }
.tabbar { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 50; width: min(94vw, 420px); height: 66px;
  display: flex; align-items: center; justify-content: space-around; padding: 0 6px; border-radius: 999px;
  background: rgba(30, 30, 33, .82); -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 62px; height: 54px; justify-content: center; border-radius: 999px; color: rgba(255, 255, 255, .78); font-size: 11px; font-weight: 600; }
.tabbar button svg { width: 23px; height: 23px; }
.tabbar button.on { background: rgba(255, 255, 255, .1); color: #fff; }
.tabbar .plus { min-width: 52px; width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(180deg, #fff, #DCDCDC); color: #000; box-shadow: inset 0 -3px 5px rgba(0, 0, 0, .15), 0 4px 16px rgba(255, 255, 255, .18); }
.tabbar .plus svg { width: 26px; height: 26px; stroke-width: 2.4; }

/* ---------- hero ---------- */
.hero { position: relative; height: min(78dvh, 640px); min-height: 520px; overflow: hidden; display: flex; align-items: flex-end; }
.hero-bg { position: absolute; inset: 0; display: flex; justify-content: center; }
.hero-bg .mini { flex: none; filter: saturate(1.1); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .55) 62%, #000 98%); }
.hero-content { position: relative; width: 100%; text-align: center; padding: 0 20px 18px; }
.brand { position: absolute; left: 0; right: 0; top: calc(50px + var(--safe-t)); z-index: 2; text-align: center; margin: 0; font: 800 26px/1 var(--ui); letter-spacing: -.03em; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.display { font: 900 clamp(68px, 21vw, 104px)/.84 var(--display); font-stretch: condensed; text-transform: uppercase; letter-spacing: -.02em; margin: 0 0 22px; text-shadow: 0 6px 30px rgba(0, 0, 0, .45); }
.hero-actions { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 20px; }

.seg { display: flex; gap: 4px; padding: 18px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.seg button { height: 38px; padding: 0 16px; border-radius: 999px; color: var(--mut); font-size: 16px; font-weight: 550; white-space: nowrap; }
.seg button.on { color: #fff; background: var(--s3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }

/* ---------- 3D boxes (from the reference's "Friend's box") ---------- */
.box3d { --box: #3D6BFF; position: relative; padding: 7px 7px 13px; border-radius: 22px; display: inline-block; flex: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--box) 70%, #fff) 0%, var(--box) 18%, var(--box) 78%, color-mix(in srgb, var(--box) 70%, #000) 100%);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .45), inset 0 -6px 0 rgba(0, 0, 0, .22), 0 10px 24px color-mix(in srgb, var(--box) 30%, transparent), 0 2px 4px rgba(0, 0, 0, .5); }
.box3d .mini { border-radius: 15px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), 0 1px 0 rgba(255, 255, 255, .25); }
.box3d.big { padding: 10px 10px 18px; border-radius: 30px; }
.box3d.big .mini { border-radius: 21px; }
.box-badge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #111; border: 2.5px solid var(--box); font: 700 12px/1 var(--ui); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); }
.box3d.big .box-badge { width: 44px; height: 44px; bottom: -18px; font-size: 18px; border-width: 3px; background: #FF3D9A; }
.mini { position: relative; overflow: hidden; flex: none; }
.mini .page { position: absolute; left: 0; top: 0; }

.panel-card { margin: 14px 16px 0; padding: 16px 14px 10px; border-radius: 26px; background: var(--s1); border: 1px solid var(--line); }
.box-row { display: flex; justify-content: space-between; gap: 8px; }
.box-btn { transition: transform .15s; }
.box-btn:active { transform: scale(.94); }
.panel-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; color: rgba(255, 255, 255, .8); font-size: 16px; }
.panel-foot > div { display: flex; gap: 6px; }

/* ---------- feature cards with motion meter ---------- */
.feat-card { --accent: #C2541B; display: flex; gap: 14px; width: calc(100% - 32px); margin: 14px 16px 0; padding: 14px; border-radius: 26px; text-align: left;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 85%, #fff 0%) 0%, color-mix(in srgb, var(--accent) 55%, #000) 45%, #160d0a 100%);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.feat-card .mini { border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.feat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kicker { margin: 2px 0 0; font-size: 14px; color: rgba(255, 255, 255, .7); }
.feat-info h3 { margin: 2px 0 10px; font-size: 25px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.feat-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: rgba(255, 255, 255, .72); font-size: 14px; }
.meter { margin: 4px 0 10px; }
.meter-bar { position: relative; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: space-around;
  background: linear-gradient(90deg, #4B2BD6 0%, #3E6BFF 30%, #22B8C9 60%, #4CD964 85%, #8CE63C 100%); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35); }
.meter-bar i { width: 7px; height: 7px; border-radius: 50%; background: rgba(0, 0, 0, .35); font-style: normal; }
.meter-bar i.cur { width: 40px; height: 40px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff, #D6EEF6 55%, #9FC9DA);
  color: #1F3BD1; font: 800 21px/1 var(--ui); box-shadow: 0 4px 12px rgba(0, 0, 0, .4), inset 0 -2px 3px rgba(0, 0, 0, .15); }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 28px 20px 12px; }
.sec-head h3 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; }
.sec-head .muted { font-size: 13.5px; }

.tpl-grid-home { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 12px; padding: 0 16px; justify-items: center; }
.tpl-tile { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; transition: transform .15s; }
.tpl-tile:active { transform: scale(.96); }
.tpl-meta { text-align: center; line-height: 1.3; }
.tpl-meta strong { display: block; font-size: 15px; font-weight: 650; }
.tpl-meta span { font-size: 12.5px; color: var(--mut); }
@media (min-width: 520px) { .tpl-grid-home .box3d .mini { width: 170px !important; height: 238px !important; } .tpl-grid-home .box3d .mini .page { transform: scale(.425) !important; } }

.h-scroll { display: flex; gap: 16px; overflow-x: auto; padding: 4px 20px 20px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.comm-card { scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 14px; flex: none; }
.foot-note { text-align: center; color: var(--mut2); font-size: 13px; padding: 28px 20px 0; }

/* ---------- explore / activity / box ---------- */
.page-head { padding: calc(56px + var(--safe-t)) 20px 6px; }
.page-head h2 { margin: 0; font: 800 34px/1 var(--ui); letter-spacing: -.03em; }
.page-head p { margin: 6px 0 0; }
.search { display: flex; align-items: center; gap: 10px; margin: 14px 16px 10px; height: 46px; padding: 0 16px; border-radius: 16px; background: var(--s2); }
.search svg { width: 19px; height: 19px; color: var(--mut); }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 16px; }
.filters { padding: 0 16px 18px; }
.fx-row { display: flex; gap: 8px; flex-wrap: wrap; }
.blank-card { display: flex; gap: 14px; align-items: center; text-align: left; width: calc(100% - 32px); margin: 28px 16px 0; padding: 16px; border-radius: 22px; border: 1.5px dashed rgba(255, 255, 255, .2); }
.blank-card > span { width: 52px; height: 52px; border-radius: 16px; background: var(--s3); display: grid; place-items: center; font-size: 26px; }
.blank-card p { margin: 2px 0 0; color: var(--mut); font-size: 13.5px; }
.empty { text-align: center; padding: 80px 30px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty-ico { font-size: 54px; margin-bottom: 10px; }
.empty h3 { margin: 0; font-size: 22px; }
.empty .btn-pill { margin-top: 22px; }
.act-list { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.act-row { --accent: #888; display: flex; gap: 14px; align-items: center; text-align: left; padding: 12px; border-radius: 22px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 45%, #111) 0%, var(--s1) 70%); border: 1px solid var(--line); }
.act-row .mini { border-radius: 10px; }
.ph-mini { width: 54px; height: 76px; display: grid; place-items: center; background: var(--s3); font-size: 22px; }
.act-info { flex: 1; min-width: 0; }
.act-info strong { display: block; font-size: 18px; }
.act-info span { font-size: 13.5px; color: var(--mut); }
.profile { display: flex; flex-direction: column; align-items: center; padding: calc(64px + var(--safe-t)) 20px 4px; text-align: center;
  background: radial-gradient(90% 60% at 50% 20%, rgba(139, 212, 58, .28), transparent 70%); }
.profile-name { margin: 34px 0 2px; font: 400 46px/1 'Didot', 'Bodoni 72', Georgia, serif; letter-spacing: -.01em; }
.profile .muted { margin: 0 0 14px; font-size: 16px; }
.drafts { gap: 14px; }
.draft { position: relative; flex: none; scroll-snap-align: start; width: 116px; }
.draft-open .mini { border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.draft p { margin: 8px 0 0; font-size: 13px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.draft-del { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); font-size: 11px; }

/* ---------- Messages compact mode ---------- */
.compact .hero { height: 300px; min-height: 0; }
.compact .display { font-size: 56px; margin-bottom: 8px; }
.compact .chips, .compact .brand, .compact .tabbar { display: none; }
.compact .view { padding-bottom: 20px; }

/* ================================================================ EDITOR */
#editor-root[hidden] { display: none; }
.ed { position: fixed; inset: 0; display: flex; flex-direction: column; background: #0A0A0B; z-index: 60; }
.ed-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + var(--safe-t)) 12px 8px; }
.ed-title { flex: 1; min-width: 40px; background: none; border: 0; outline: none; font-size: 16px; text-overflow: ellipsis; font-weight: 650; padding: 6px 8px; border-radius: 10px; }
.ed-title:focus { background: var(--s2); }
.ed-top-r { display: flex; gap: 6px; align-items: center; }
.ed-body { flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; position: relative; }
.ed-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ed-stage-wrap { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; position: relative;
  background: radial-gradient(70% 60% at 50% 45%, #1C1A1A, #0A0A0B 75%); }
.ed-stage-wrap.drop { outline: 2px dashed #8BD43A; outline-offset: -10px; }
.ed-sizer { position: relative; border-radius: 4px; box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .05); }
.ed-stage { position: absolute; left: 0; top: 0; width: 400px; height: 560px; transform-origin: 0 0; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.ed-stage-wrap { touch-action: none; } /* a 2nd finger just off the page must not pan/zoom (it would pointercancel the pinch) */
.ed-stage .page { position: absolute; left: 0; top: 0; }
.ed-stage .el { cursor: move; }
.ed-stage .el-c[contenteditable] { cursor: text; outline: none; caret-color: #3D6BFF; }
.ed-stage .el-c[contenteditable="true"], .ed-stage .el-c[contenteditable="plaintext-only"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.sel-layer { position: absolute; inset: 0; pointer-events: none; z-index: 9999; }
.sel { position: absolute; transform-origin: center; outline: calc(1.6px * var(--inv)) solid #8B5CFF; outline-offset: calc(2px * var(--inv)); }
.sel.editing { outline-style: dashed; }
.hd { position: absolute; width: calc(16px * var(--inv)); height: calc(16px * var(--inv)); background: #fff; border: calc(1.5px * var(--inv)) solid #8B5CFF; border-radius: 50%;
  pointer-events: auto; transform: translate(-50%, -50%); touch-action: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.hd::after { content: ''; position: absolute; inset: calc(-10px * var(--inv)); }
.hd-nw { left: 0; top: 0; cursor: nwse-resize; } .hd-ne { left: 100%; top: 0; cursor: nesw-resize; }
.hd-se { left: 100%; top: 100%; cursor: nwse-resize; } .hd-sw { left: 0; top: 100%; cursor: nesw-resize; }
.hd-e, .hd-w { top: 50%; width: calc(8px * var(--inv)); height: calc(22px * var(--inv)); border-radius: 99px; cursor: ew-resize; }
.hd-e { left: 100%; } .hd-w { left: 0; }
.hd-n, .hd-s { left: 50%; width: calc(22px * var(--inv)); height: calc(8px * var(--inv)); border-radius: 99px; cursor: ns-resize; }
.hd-n { top: 0; } .hd-s { top: 100%; }
.hd-rot { left: 50%; top: calc(-30px * var(--inv)); width: calc(26px * var(--inv)); height: calc(26px * var(--inv)); cursor: grab; display: grid; place-items: center; color: #8B5CFF; }
.hd-rot svg { width: 70%; height: 70%; stroke-width: 2.6; }
.sel.editing .hd { display: none; }
.guide { position: absolute; background: #FF3D9A; opacity: 0; transition: opacity .1s; }
.guide.on { opacity: 1; }
.guide-v { left: 200px; top: 0; bottom: 0; width: calc(1px * var(--inv)); }
.guide-h { top: 280px; left: 0; right: 0; height: calc(1px * var(--inv)); }

.ed-toolbar { padding: 8px 0 4px; }
.tb-row { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; }
.tb-row::-webkit-scrollbar { display: none; }
.tb { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px; border-radius: 14px; background: var(--s2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.tb svg { width: 18px; height: 18px; }
.tb.sq { width: 40px; padding: 0; justify-content: center; }
.tb.on, .tb.hl { background: #fff; color: #000; }
.tb.danger { color: #FF6B6B; }
.tb.bold span { font-weight: 800; font-size: 16px; } .tb.ital span { font-style: italic; font-family: Georgia, serif; font-size: 17px; }
.tb.font span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.tb .dot { width: 20px; height: 20px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.tb-size { flex: none; display: flex; align-items: center; height: 40px; border-radius: 14px; background: var(--s2); }
.tb-size button { width: 34px; height: 40px; font-size: 18px; }
.tb-size span { min-width: 26px; text-align: center; font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ed-strip { display: flex; gap: 8px; padding: 6px 12px 8px; overflow-x: auto; scrollbar-width: none; }
.thumb { flex: none; position: relative; width: 48px; height: 66px; border-radius: 8px; padding: 2px; background: var(--s2); }
.thumb.on { background: #8B5CFF; }
.thumb-in { width: 44px; height: 61.6px; overflow: hidden; border-radius: 6px; position: relative; }
.thumb-in .page { position: absolute; left: 0; top: 0; }
.thumb > span { position: absolute; right: 3px; bottom: 3px; font-size: 9.5px; font-weight: 700; background: rgba(0, 0, 0, .65); border-radius: 5px; padding: 0 4px; }
.thumb.add { display: grid; place-items: center; color: var(--mut); border: 1.5px dashed rgba(255, 255, 255, .2); background: none; }
.thumb.add svg { width: 20px; height: 20px; }

.ed-tabs { display: flex; justify-content: space-around; padding: 6px 6px calc(6px + var(--safe-b)); background: #0F0F11; border-top: 1px solid var(--line); z-index: 3; }
.ed-tabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; padding: 6px 4px; border-radius: 14px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.ed-tabs svg { width: 23px; height: 23px; }
.ed-tabs button.on { color: #fff; background: rgba(255, 255, 255, .1); }

.ed-sheet { position: relative; flex: none; max-height: 0; overflow: hidden; background: #151517; border-radius: 24px 24px 0 0; border: 1px solid var(--line); border-bottom: 0;
  transition: max-height .28s cubic-bezier(.3, .8, .3, 1); z-index: 2; box-shadow: 0 -20px 40px rgba(0, 0, 0, .5); }
.ed-sheet.open { max-height: 46vh; }
.ed.sheet-open .ed-main { padding-bottom: 0; }
.sheet-grip { width: 100%; height: 22px; display: grid; place-items: center; cursor: pointer; }
.sheet-grip::before { content: ''; width: 40px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .22); }
.sheet-body { max-height: calc(46vh - 22px); overflow-y: auto; padding: 0 16px 24px; overscroll-behavior: contain; }
.sh-head h3 { margin: 0; font-size: 19px; font-weight: 700; }
.sh-head p { margin: 3px 0 0; font-size: 13px; color: var(--mut); }
.sh-head { margin-bottom: 14px; }
.sh-label { margin: 18px 0 8px; font-size: 12px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; }
.tpl-mini { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.tpl-mini-in { width: 96px; height: 134.4px; position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.tpl-mini-in .page { position: absolute; left: 0; top: 0; }
.tpl-mini span { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.25; }
.tpl-mini i { display: block; font-style: normal; font-size: 7px; letter-spacing: 2px; color: #8BD43A; margin-top: 2px; }
.txt-presets { display: flex; flex-direction: column; gap: 8px; }
.txt-pre { text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--s2); }
.txt-pre.p0 { font: 400 30px/1.1 'Snell Roundhand', 'Segoe Script', cursive; }
.txt-pre.p1 { font: italic 21px/1.1 'Didot', Georgia, serif; }
.txt-pre.p2 { font: 15px/1.2 'Avenir Next', sans-serif; color: var(--mut); }
.combo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.combo { min-height: 74px; padding: 10px; border-radius: 16px; background: #F7EFE4; font-size: 19px; line-height: 1.1; }
.art-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 8px; }
.art-cell { aspect-ratio: 1; padding: 10px; border-radius: 16px; background: #F7EFE4; }
.art-cell svg { width: 100%; height: 100%; }
.shape-row { display: flex; gap: 8px; }
.shape-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0; border-radius: 16px; background: var(--s2); font-size: 12px; }
.shape-btn i { width: 30px; height: 30px; background: #E07A2E; }
.s-round i { border-radius: 9px; } .s-circle i { border-radius: 50%; } .s-line i { height: 3px; margin: 13px 0; }
.upload-btn { width: 100%; height: 64px; border-radius: 18px; border: 1.5px dashed rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; }
.upload-btn svg { width: 20px; height: 20px; }
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 12px; }
.up-cell { aspect-ratio: 1; border-radius: 14px; background-size: cover; background-position: center; }

.sig-pad { position: relative; height: 150px; border-radius: 18px; background: #FBF6EE; overflow: hidden; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.sig-pad.dark { background: #2A2440; }
.sig-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-pad::after { content: ''; position: absolute; left: 24px; right: 24px; bottom: 40px; border-bottom: 1.5px solid rgba(120, 80, 50, .25); pointer-events: none; }
.sig-hint { position: absolute; left: 26px; bottom: 16px; color: rgba(120, 80, 50, .5); font-size: 12px; font-weight: 600; pointer-events: none; }
.sig-pad.inked .sig-hint { opacity: 0; }
.sig-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.inks { display: flex; gap: 8px; }
.ink { width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .2); }
.ink.on { box-shadow: 0 0 0 2px #151517, 0 0 0 4px #fff; }
.thick { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--mut); }
.thick input { width: 90px; accent-color: #fff; }
.sig-actions { display: flex; gap: 8px; margin-top: 14px; }
.sig-actions .btn-pill { margin-left: auto; height: 46px; }
.saved-sigs { display: flex; gap: 8px; }
.saved-sig { width: 96px; height: 52px; border-radius: 12px; background: #FBF6EE center/contain no-repeat; background-origin: content-box; padding: 6px; }

.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 8px; }
.sw { aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .15); position: relative; }
.sw.on { box-shadow: 0 0 0 2px #151517, 0 0 0 4px #fff; }
.sw.g { border-radius: 12px; aspect-ratio: .72; }
.grads { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
.sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); overflow: hidden; cursor: pointer; }
.sw.custom input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.font-list { display: flex; flex-direction: column; gap: 4px; }
.font-item { text-align: left; padding: 12px 14px; font-size: 21px; border-radius: 12px; }
.font-item.on { background: #fff; color: #000; }
.slider { display: grid; grid-template-columns: 110px 1fr 46px; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.slider input { width: 100%; accent-color: #8B5CFF; }
.slider output { text-align: right; color: var(--mut); font-variant-numeric: tabular-nums; }
.layer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

@media (max-width: 899px) { .ed.sheet-open .ed-strip, .ed.sheet-open .ed-toolbar { display: none; } }
@media (min-width: 900px) {
  .ed-body { flex-direction: row; }
  .ed-tabs { flex-direction: column; justify-content: flex-start; gap: 4px; padding: 10px 6px; border-top: 0; border-right: 1px solid var(--line); }
  .ed-tabs button { min-width: 68px; padding: 10px 4px; }
  .ed-sheet { position: relative; bottom: auto; width: 0; max-height: none; border-radius: 0; border: 0; transition: width .25s; box-shadow: none; }
  .ed-sheet.open { width: 340px; max-height: none; border-right: 1px solid var(--line); }
  .sheet-grip { display: none; }
  .sheet-body { max-height: none; height: 100%; width: 340px; padding: 18px; }
  .ed-toolbar { padding: 10px 0 6px; } .tb-row { justify-content: center; }
  .ed-strip { justify-content: center; }
}

/* ================================================================ MODALS */
.modal { position: fixed; inset: 0; z-index: 100; }
.send-modal { background: rgba(0, 0, 0, 0); display: flex; align-items: flex-end; justify-content: center; transition: background .25s; }
.send-modal.in { background: rgba(0, 0, 0, .6); }
.send-sheet { width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: #151517; border-radius: 28px 28px 0 0; padding: 0 20px calc(24px + var(--safe-b));
  transform: translateY(100%); transition: transform .3s cubic-bezier(.3, .8, .3, 1); border: 1px solid var(--line); }
.send-modal.in .send-sheet { transform: none; }
.send-preview { width: 110px; height: 154px; margin: 4px auto 14px; overflow: hidden; border-radius: 10px; position: relative; transform: rotate(-3deg); box-shadow: 0 12px 30px rgba(0, 0, 0, .6); }
.send-preview .page { position: absolute; left: 0; top: 0; }
.send-sheet h2 { text-align: center; margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.warn { margin: 6px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(243, 154, 30, .12); color: #F5B556; font-size: 13px; text-align: center; }
.field { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 16px; margin-top: 10px; border-radius: 16px; background: var(--s2); }
.field span { width: 44px; color: var(--mut); font-size: 14px; }
.field input { flex: 1; background: none; border: 0; outline: none; font-size: 16px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; margin: 16px 2px 4px; font-size: 14.5px; cursor: pointer; }
.toggle input { display: none; }
.toggle small { display: block; color: var(--mut); font-size: 12.5px; margin-top: 2px; }
.tg { flex: none; width: 46px; height: 28px; border-radius: 99px; background: var(--s3); position: relative; transition: background .2s; }
.tg::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .tg { background: #34C759; }
.toggle input:checked + .tg::after { transform: translateX(18px); }
.send-actions { display: flex; gap: 10px; margin-top: 18px; }
.send-actions .btn-pill { flex: 1; }
.msg-ico { fill: #34C759; stroke: none; width: 22px !important; height: 22px !important; }
.send-result { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.link-row { display: flex; gap: 8px; align-items: center; height: 46px; padding: 0 6px 0 14px; border-radius: 14px; background: var(--s2); }
.link-row input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 14px; color: var(--mut); }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; z-index: 300; padding: 12px 18px; border-radius: 16px;
  background: rgba(40, 40, 44, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 14px; font-weight: 550; transition: .25s; max-width: 90vw; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.toast.in { opacity: 1; transform: translate(-50%, 0); }

/* ================================================================ VIEWER */
.viewer-modal { background: #000; }
.viewer { position: fixed; inset: 0; background: radial-gradient(80% 60% at 50% 30%, #2A1A12, #000 75%); overflow: hidden; }
.v-close { position: absolute; top: calc(14px + var(--safe-t)); right: 14px; z-index: 20; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font-size: 15px; }
.v-intro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; transition: opacity .6s, transform .6s; }
.v-kicker { margin: 0; color: var(--mut); font-size: 16px; opacity: 0; transform: translateY(10px); transition: .6s .1s; }
.v-for { margin: 0 0 34px; font: 900 clamp(46px, 13vw, 72px)/.9 var(--display); text-transform: uppercase; text-align: center; opacity: 0; transform: translateY(10px); transition: .6s .25s; }
.v-tap { margin: 30px 0 0; color: var(--mut); font-size: 14px; opacity: 0; transition: .6s .8s; animation: tap-pulse 2s 1.6s infinite; }
.v-intro.ready .v-kicker, .v-intro.ready .v-for, .v-intro.ready .v-tap { opacity: 1; transform: none; }
@keyframes tap-pulse { 50% { opacity: .45; } }
.env { position: relative; width: 280px; height: 190px; perspective: 900px; opacity: 0; transform: translateY(30px) scale(.9); transition: .8s .4s cubic-bezier(.3, 1.3, .5, 1); }
.v-intro.ready .env { opacity: 1; transform: none; }
.env:active { transform: scale(.97); }
.env-back { position: absolute; inset: 0; border-radius: 10px; background: #B97A46; box-shadow: 0 30px 60px rgba(0, 0, 0, .6); }
.env-card { position: absolute; left: 25px; top: 14px; width: 230px; height: 168px; border-radius: 6px; overflow: hidden; transition: transform 1s .45s cubic-bezier(.3, .9, .3, 1), height .7s .45s; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.env-card .pg-sizer { position: relative; }
.env-front { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(160deg, #E2A86F, #CD8C55);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); z-index: 2; }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 58%; background: linear-gradient(180deg, #D89A60, #C9874F); clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; transition: transform .6s cubic-bezier(.5, 0, .3, 1), z-index 0s .3s; z-index: 3; }
.env-seal { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: radial-gradient(circle at 35% 30%, #E25B45, #9E2A1E); box-shadow: 0 4px 10px rgba(0, 0, 0, .4), inset 0 -3px 5px rgba(0, 0, 0, .3); transition: opacity .25s; }
.env.opening .env-seal { opacity: 0; }
.env.opening .env-flap { transform: rotateX(180deg); z-index: 1; }
.env.opening .env-card { transform: translateY(-230px); height: 322px; z-index: 1; }
.viewer.opened .v-intro { opacity: 0; transform: scale(1.06); pointer-events: none; }
.v-scroll { position: absolute; inset: 0; overflow-y: auto; overflow-anchor: none; scroll-snap-type: y mandatory; opacity: 0; pointer-events: none; transition: opacity .7s .1s; overscroll-behavior: contain; }
.viewer.opened .v-scroll { opacity: 1; pointer-events: auto; }
.viewer.no-intro .v-intro { display: none; }
.v-page { height: 100dvh; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.v-card { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
.v-card .page { position: absolute; left: 0; top: 0; }
.v-hint { position: absolute; bottom: calc(18px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--mut); font-size: 12px; animation: hint 2s infinite; }
.v-hint i { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
@keyframes hint { 50% { transform: translateY(6px); } }
.v-count { position: absolute; top: calc(22px + var(--safe-t)); left: 20px; font-size: 12px; font-weight: 700; color: var(--mut2); letter-spacing: .1em; }
.v-end { min-height: 100dvh; scroll-snap-align: start; padding: calc(70px + var(--safe-t)) 0 calc(40px + var(--safe-b)); }
.v-end-head { text-align: center; padding: 0 20px; }
.v-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.v-comm { margin-top: 30px; }
.comm-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 12px; padding: 0 16px; max-width: 520px; margin: 0 auto; }
.comm-tile { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.comm-tile .pg-sizer { position: relative; overflow: hidden; border-radius: 14px; }
.comm-tile .page { position: absolute; left: 0; top: 0; }
.comm-info { text-align: center; line-height: 1.3; }
.comm-info strong { display: block; font-size: 14.5px; }
.comm-info span { font-size: 12.5px; color: var(--mut); }
.web-view { overflow: hidden; }

/* ---------- video + gift (editor) ---------- */
.vid-row { display: flex; gap: 8px; margin-top: 8px; }
.upload-btn.half { flex: 1; height: 56px; font-size: 14px; }
.upload-btn.rec svg { color: #FF453A; }
.sh-hint { margin: 8px 2px 0; font-size: 12px; color: var(--mut); }
.gift-preview { --gc: #232F3E; position: relative; height: 150px; border-radius: 18px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gc) 80%, #fff 20%), var(--gc) 55%, color-mix(in srgb, var(--gc) 70%, #000)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 24px rgba(0,0,0,.4); overflow: hidden; }
.gift-preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%); }
.gp-brand { font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.gp-amt { font: 800 40px/1 var(--ui); align-self: flex-end; }
.gp-chip { position: absolute; left: 18px; bottom: 20px; width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #F3D78A, #B8913A); }
.amt-custom { display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 10px; border-radius: 999px; background: rgba(255,255,255,.09); font-size: 14px; }
.amt-custom input { width: 54px; background: none; border: 0; outline: none; font-size: 14px; }
.demo-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(61,107,255,.14); color: #9DB2FF; font-size: 12.5px; }
.gift-line { --gc: #232F3E; display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--s2); font-size: 14px; }
.gift-line i { width: 30px; height: 20px; border-radius: 5px; background: var(--gc); box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.gift-line span { flex: 1; } .gift-line em { font-style: normal; font-size: 11.5px; color: #9DB2FF; }
.link-send { display: block; width: 100%; margin-top: 12px; padding: 12px; border-radius: 16px; text-align: center; border: 1px solid var(--line); }
.link-send b { display: block; font-size: 15px; } .link-send span { font-size: 12.5px; color: var(--mut); }
.link-send.busy { opacity: .6; }

/* ---------- gift (viewer): see "merci. gift reveal" section at the end ---------- */

/* ---------- gift kinds ---------- */
.kind-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.kind { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--s2); font-size: 11.5px; font-weight: 600; border: 1.5px solid transparent; }
.kind span { font-size: 22px; }
.kind.on { border-color: #fff; background: var(--s3); }
.sh-hint.top { margin: 0 0 6px; }
.gift-line span { flex: 1; }
.gift-card { gap: 10px; }
.v-gift.open .gift-card { height: auto; min-height: 190px; }
.gc-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 14px; }
.gc-rows small, .gc-code small { display: block; font-size: 10.5px; opacity: .7; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1px; }
.gc-rows b { font: 700 13px/1.3 ui-monospace, Menlo, monospace; word-break: break-all; -webkit-user-select: text; user-select: text; }
.gc-big { margin: 0; font-size: 22px; font-weight: 700; }
.gc-actions { display: flex; gap: 8px; }
.gc-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border-radius: 99px; background: #fff; color: #000; font-weight: 700; font-size: 14px; align-self: flex-start; border: 0; cursor: pointer; }
.gk-credits .gc-code b { font-size: 15px; word-break: break-all; }

/* ---------- get the app ---------- */
.get-app { display: flex; align-items: center; gap: 12px; max-width: 440px; margin: 26px auto 0; padding: 12px 14px; border-radius: 22px; background: var(--s1); border: 1px solid var(--line); text-align: left; }
.get-app img { width: 52px; height: 52px; border-radius: 12px; }
.get-app span { flex: 1; } .get-app b { display: block; font-size: 15.5px; } .get-app small { color: var(--mut); font-size: 12.5px; }
.get-app i { font-style: normal; height: 32px; padding: 0 16px; border-radius: 99px; background: #0A84FF; color: #fff; font-weight: 700; display: grid; place-items: center; }
.web-view .v-end { padding-bottom: calc(110px + var(--safe-b)); }
.app-bar { position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 30; width: min(94vw, 440px); }
.app-bar .get-app { margin: 0; background: rgba(28, 28, 30, .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }

/* ---------- wordmark ---------- */
.brand { font: inherit; }
.logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.logo svg { width: 22px; height: 22px; opacity: .92; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .3)); }
.logo span { font: italic 400 31px/1 'Didot', 'Bodoni 72', 'Bodoni MT', Georgia, serif; letter-spacing: .01em; }
.logo::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: 34px; height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); }
.brand .logo { position: relative; }

/* ---------- categories ---------- */
.sub-row { display: flex; gap: 8px; padding: 4px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.sub { flex: none; height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .85); display: inline-flex; align-items: center; gap: 6px; }
.sub.on { background: #fff; color: #000; border-color: #fff; }
.sub.soon { color: var(--mut); }
.sub i { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 6px; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.cat-head { display: flex; align-items: center; gap: 14px; padding: 22px 20px 16px; }
.cat-head h3 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.cat-head p { margin: 2px 0 0; font-size: 14px; }
.cat-emoji { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; background: var(--s2); }
.ghost-tile { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.ghost-box { --box: #3D6BFF; width: 164px; height: 222px; border-radius: 22px; display: grid; place-items: center; font-size: 34px; opacity: .5;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--box) 30%, #111) 0 14px, color-mix(in srgb, var(--box) 22%, #111) 14px 28px);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--box) 60%, transparent); }
.ghost-line { width: 90px; height: 10px; border-radius: 99px; background: var(--s2); }
.soon-cta { margin: 26px 16px 0; padding: 18px; border-radius: 22px; background: var(--s1); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.soon-cta p { margin: 0; line-height: 1.45; }

/* Font sheet: search + category groups (font-* rules) */
.font-search { width: 100%; margin: 2px 0 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; font-size: 15px; }
.font-search:focus { outline: none; border-color: rgba(255, 255, 255, .35); }
.font-cat { position: sticky; top: 0; z-index: 1; padding: 10px 4px 6px; background: #151517; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.font-item[hidden], .font-cat[hidden] { display: none; }

/* ================================================================ merci. gift reveal (viewer) */
.v-gift { --p: 0; gap: 0; overflow: hidden; padding: calc(18px + var(--safe-t)) 18px calc(26px + var(--safe-b)); justify-content: center;
  background: radial-gradient(70% 55% at 50% 48%, #4A2618 0%, #23130C 55%, #0A0604 100%); isolation: isolate; }
.gx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.gx-rays { position: absolute; left: 50%; top: 47%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; will-change: transform, opacity;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 160, .2) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 14%, transparent 38%); mask: radial-gradient(circle, #000 0, rgba(0,0,0,.6) 14%, transparent 38%);
  opacity: calc(.18 + var(--p) * .4); transform: scale(calc(.75 + var(--p) * .15)); animation: gx-spin 60s linear infinite; transition: opacity .8s, scale .8s; }
.gx-glow { position: absolute; left: 50%; top: 47%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%; will-change: transform, opacity;
  background: radial-gradient(circle, rgba(255, 196, 120, .9) 0, rgba(255, 110, 130, .45) 30%, transparent 66%);
  opacity: calc(.12 + var(--p) * .88); transform: scale(calc(.55 + var(--p) * .6)); }
@keyframes gx-spin { to { rotate: 360deg; } }
.v-gift.open .gx-rays { opacity: .95; scale: 1.25; }
.v-gift.open .gx-glow { opacity: .55; transform: scale(1.25); transition: opacity 1s, transform 1s; }
.v-gift.bursting .gx-glow { animation: gx-flash 1.1s ease-out; }
@keyframes gx-flash { 0% { opacity: 1; transform: scale(1.2); } 18% { opacity: 1; transform: scale(2.6); } 100% { opacity: .55; transform: scale(1.25); } }
.gx-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.gx-brand { height: 46px; display: grid; place-items: center; margin-bottom: 4px; }
.mx-wordmark { height: 42px; width: auto; filter: brightness(0) invert(95%) sepia(12%) saturate(300%) hue-rotate(345deg) drop-shadow(0 3px 0 #F26B3A) drop-shadow(0 8px 22px rgba(242, 107, 58, .45)); }
.mx-word { position: relative; font: 900 40px/1 ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', 'Nunito', 'Varela Round', system-ui, sans-serif; letter-spacing: -.035em;
  color: #F6EEDC; text-shadow: 0 3px 0 #F26B3A, 0 10px 28px rgba(242, 107, 58, .45); }
.mx-word i { font-style: normal; color: #F26B3A; text-shadow: 0 3px 0 #F6EEDC; }
.mx-word s { position: absolute; text-decoration: none; color: #FFD25A; font-size: 16px; text-shadow: 0 0 10px rgba(255, 210, 90, .9); animation: mx-twinkle 2.2s ease-in-out infinite; }
.mx-word .sp1 { right: -20px; top: -8px; } .mx-word .sp2 { left: -18px; bottom: 0; font-size: 11px; animation-delay: .7s; } .mx-word .sp3 { right: -30px; bottom: 4px; font-size: 12px; color: #FF8FC7; animation-delay: 1.3s; }
@keyframes mx-twinkle { 0%, 100% { opacity: .3; transform: scale(.7) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
.gx-kicker { margin: 4px 0 0; font-size: 16px; color: rgba(255, 240, 230, .75); text-align: center; }
.gx-kicker b { color: #fff; font-weight: 700; }

.gx-center { position: relative; display: grid; place-items: center; width: 100%; min-height: 300px; margin: 14px 0 4px; }
.gx-center > * { grid-area: 1 / 1; }
.gift-box { position: relative; width: 190px; height: 190px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; will-change: transform;
  transition: opacity .35s .12s; animation: gx-idle 2.6s 1s ease-in-out infinite; }
.v-gift.charging .gift-box { animation: none; }
@keyframes gx-idle { 0%, 72%, 100% { transform: none; } 78% { transform: rotate(-5deg) scale(1.02); } 84% { transform: rotate(5deg) scale(1.02); } 90% { transform: rotate(-2deg); } }
.gb-shadow { position: absolute; left: 14%; right: 14%; bottom: -14px; height: 22px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); }
.gb-body { position: absolute; left: 16px; right: 16px; bottom: 0; height: 118px; border-radius: 16px; overflow: hidden; border: 3.5px solid #1D1712;
  background: linear-gradient(160deg, #FF8A5C 0%, #F26B3A 45%, #D24E22 100%); box-shadow: inset 0 -12px 0 rgba(120, 30, 0, .22), inset 0 3px 0 rgba(255,255,255,.3), 0 24px 50px rgba(0,0,0,.5); }
.gb-rib { position: absolute; left: 50%; top: 0; bottom: 0; width: 30px; transform: translateX(-50%); background: linear-gradient(90deg, #FBF5E6, #F1E4C6); border-left: 3px solid #1D1712; border-right: 3px solid #1D1712; }
.gb-shine { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.28) 42%, transparent 54%); animation: gb-shine 3.4s 1.4s ease-in-out infinite; }
@keyframes gb-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.gb-lid { position: absolute; left: 4px; right: 4px; top: 46px; height: 42px; border-radius: 14px; z-index: 2; will-change: transform; border: 3.5px solid #1D1712;
  background: linear-gradient(180deg, #FF946A, #EE6233); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -6px 0 rgba(120, 30, 0, .2), 0 8px 14px rgba(40, 10, 0, .35);
  transition: transform .75s cubic-bezier(.2, .8, .2, 1), opacity .6s .35s; }
.gb-lid .gb-rib { border-radius: 2px; }
.gb-bow { position: absolute; left: 50%; top: -37px; width: 0; height: 0; }
.gb-bow i { position: absolute; top: 0; width: 48px; height: 36px; border: 10px solid #FBF5E6; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 0 0 3px #1D1712, inset 0 0 0 3px #1D1712; }
.gb-bow i:first-child { right: 2px; transform: rotate(-22deg); transform-origin: right bottom; }
.gb-bow i:nth-child(2) { left: 2px; transform: rotate(22deg); transform-origin: left bottom; }
.gb-bow b { position: absolute; left: -13px; top: 19px; width: 26px; height: 22px; border-radius: 9px; background: #FBF5E6; border: 3px solid #1D1712; }
.gb-mascot { position: absolute; left: calc(50% + 46px); top: 150px; width: 118px; height: auto; z-index: 3; grid-area: auto; pointer-events: none; will-change: transform;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); animation: gb-peek 2.6s 1s ease-in-out infinite; transform-origin: 50% 90%;
  transition: transform .9s .35s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes gb-peek { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(4deg) translateY(-5px); } }
.gx-meter { width: 132px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; opacity: 0; transition: opacity .25s; margin-top: 6px; }
.gx-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #F6EEDC, #FFB38A, #F26B3A); transform-origin: left; transform: scaleX(var(--p)); }
.v-gift.charging .gx-meter { opacity: 1; }
.gx-hint { margin: 14px 0 0; color: rgba(255, 240, 230, .7); font-size: 14px; font-weight: 600; letter-spacing: .01em; animation: tap-pulse 2s 1.2s infinite; }

/* burst */
.v-gift.open .gift-box { opacity: 0; pointer-events: none; animation: none; }
.v-gift.open .gb-lid { transform: translate3d(70px, -260px, 0) rotate(38deg); opacity: 0; }
.v-gift.open .gb-body { transition: transform .5s cubic-bezier(.4, 0, .6, 1); transform: translateY(30px) scale(.8); }
.v-gift.open .gb-mascot { animation: none; z-index: 1; transform: translate(-200px, -146px) rotate(-10deg) scale(1.05); }
.v-gift.open .gx-hint, .v-gift.open .gx-meter { display: none; }

/* the gift card */
.gift-card { --gc: #232F3E; position: relative; z-index: 2; width: min(320px, 84vw); min-height: 0; height: auto; padding: 0; overflow: visible; display: block; background: none; box-shadow: none;
  opacity: 0; transform: translate3d(0, 90px, 0) scale(.45) rotate(-8deg); pointer-events: none; perspective: 900px;
  transition: transform .95s .28s cubic-bezier(.18, 1.35, .4, 1), opacity .35s .28s; }
.v-gift.open .gift-card { opacity: 1; transform: none; pointer-events: auto; padding: 0; margin: 0; height: auto; min-height: 0; }
.gc-tilt { --tx: 0; --ty: 0; position: relative; min-height: 200px; border-radius: 22px; overflow: hidden; transform-style: preserve-3d; will-change: transform;
  transform: rotateY(calc(var(--tx) * 14deg)) rotateX(calc(var(--ty) * -12deg));
  background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--gc) 55%, #fff 45%) 0, transparent 55%),
    linear-gradient(135deg, color-mix(in srgb, var(--gc) 85%, #fff 15%), var(--gc) 50%, color-mix(in srgb, var(--gc) 65%, #000));
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 0 0 1px rgba(255,255,255,.12) inset, 0 30px 70px rgba(0,0,0,.55), 0 0 60px color-mix(in srgb, var(--gc) 50%, transparent); }
.gc-face { position: relative; z-index: 1; min-height: 200px; padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; color: #fff; }
.gc-holo, .gc-glare { position: absolute; inset: -60%; pointer-events: none; z-index: 2; will-change: transform; }
.gc-holo { mix-blend-mode: color-dodge; opacity: .55;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 60, 170, .55) 38%, rgba(60, 220, 255, .55) 45%, rgba(255, 245, 90, .5) 52%, rgba(90, 255, 170, .5) 58%, rgba(170, 120, 255, .5) 64%, transparent 74%);
  transform: translate3d(calc(var(--tx) * 22%), calc(var(--ty) * 18%), 0); animation: gc-sweep 5s 1.6s ease-in-out infinite; }
.gc-glare { mix-blend-mode: soft-light; background: radial-gradient(28% 28% at 50% 50%, rgba(255,255,255,.75), transparent 70%);
  transform: translate3d(calc(var(--tx) * 34%), calc(var(--ty) * 30%), 0); }
.v-gift.tilting .gc-holo { animation: none; }
@keyframes gc-sweep { 0%, 100% { translate: -14% 0; } 50% { translate: 14% 0; } }
.gc-badge { position: absolute; right: -14px; bottom: -26px; z-index: 4; transform: rotate(12deg) scale(0); transition: transform .6s 1s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none; }
.v-gift.open .gc-badge { transform: rotate(12deg) scale(1); }
.mx-badge { display: block; width: 78px; height: 78px; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 3px #F6EEDC, 0 0 0 5.5px #1D1712, 0 10px 20px rgba(0,0,0,.45); }
.mx-badge-fb { width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: 1;
  background: #F6EEDC; color: #1D1712; box-shadow: 0 0 0 3px #1D1712, 0 8px 18px rgba(0,0,0,.4); }
.mx-badge-fb b { font: 900 17px/1 ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', 'Nunito', system-ui; letter-spacing: -.03em; }
.mx-badge-fb b i { font-style: normal; color: #F26B3A; }
.mx-badge-fb small { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; opacity: .75; }
.gc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.gc-code small { display: block; font-size: 10.5px; opacity: .75; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 2px; }
.gc-code b { font: 700 18px/1.3 ui-monospace, Menlo, monospace; letter-spacing: .06em; -webkit-user-select: text; user-select: text; }
.gc-demo { align-self: flex-start; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; padding: 4px 8px; border-radius: 6px; }
.gc-amt { font: 900 40px/1 ui-rounded, 'SF Pro Rounded', 'Arial Rounded MT Bold', system-ui; letter-spacing: -.03em; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.gc-code { padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.gc-demo { background: rgba(255,255,255,.92); color: #111; }
.gc-btn { box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.gk-present .gc-rows b { font-size: 12px; letter-spacing: 0; }
.gc-btn:active { transform: scale(.96); }
.gift-note { position: relative; margin: 22px 0 0; max-width: 320px; text-align: center; color: rgba(255, 244, 232, .92); font: italic 19px/1.4 Georgia, 'Iowan Old Style', serif;
  opacity: 0; transform: translateY(10px); transition: opacity .6s 1.25s, transform .6s 1.25s; }
.v-gift.open .gift-note { opacity: 1; transform: none; }
.gx-tiltbtn { margin-top: 14px; height: 34px; padding: 0 14px; border-radius: 99px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.85); font-size: 13px; font-weight: 650;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: gx-fade-in .5s 1.6s both; }
.gx-tiltbtn[hidden] { display: none; }
@keyframes gx-fade-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-height: 700px) { .gx-center { min-height: 250px; margin-top: 6px; } .gift-box { width: 160px; height: 170px; } .gx-brand { height: 38px; } .mx-word { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) {
  .gx-rays, .gift-box, .gb-shine, .gb-mascot, .gc-holo, .mx-word s, .gx-hint { animation: none !important; }
  .gift-card { transform: none; transition: opacity .4s; }
  .gb-lid, .gb-body, .gc-badge, .gift-note { transition-duration: .01s !important; transition-delay: 0s !important; }
  .v-gift.bursting .gx-glow { animation: none; }
}

/* ================================================================ card sound (viewer pill) */
.v-sound { position: absolute; top: calc(14px + var(--safe-t)); left: 50%; z-index: 21; transform: translate(-50%, -8px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; height: 34px; max-width: 60vw; padding: 0 14px 0 12px; border-radius: 99px; font-size: 13px; font-weight: 650;
  background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: opacity .4s .6s, transform .4s .6s; }
.viewer.opened .v-sound { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.vs-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 12px; }
.vs-eq i { flex: 1; height: 100%; border-radius: 1px; background: currentColor; transform-origin: bottom; transform: scaleY(.3); }
.v-sound.on:not(.muted) .vs-eq i { animation: vs-eq .9s ease-in-out infinite; }
.v-sound.on:not(.muted) .vs-eq i:nth-child(2) { animation-delay: -.3s; } .v-sound.on:not(.muted) .vs-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes vs-eq { 50% { transform: scaleY(1); } }
.v-sound.muted { color: var(--mut); }
.v-sound.muted .vs-eq { position: relative; }
.v-sound.muted .vs-eq::after { content: ''; position: absolute; left: -2px; right: -2px; top: 50%; height: 2px; background: currentColor; transform: rotate(-40deg); }
@media (prefers-reduced-motion: reduce) { .v-sound .vs-eq i { animation: none !important; } }

/* ================================================================ account / profile / settings (profile.js) */
.pf-av .pf-face { width: 120px; height: 140px; border-radius: 21px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 30% 10%, rgba(255, 255, 255, .28), transparent 60%), color-mix(in srgb, var(--box) 55%, #0B0B0C);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .3); }
.pf-av .pf-face img { width: 100%; height: 100%; object-fit: cover; }
.pf-initials { font: 400 54px/1 'Didot', 'Bodoni 72', Georgia, serif; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.profile .pf-av + .profile-name { margin-top: 26px; }
.pf-handle { margin: 4px 0 14px; padding: 4px 12px; border-radius: 99px; color: var(--mut); font-size: 16px; font-weight: 550; }
.pf-handle:active { background: rgba(255, 255, 255, .08); }
.pf-handle.empty { color: #8FA6FF; }
.pf-gear svg { width: 21px; height: 21px; stroke-width: 1.7; }

/* signed-out card */
.pf-auth { margin-top: 22px; padding: 20px 16px 16px; text-align: center;
  background: radial-gradient(120% 80% at 50% 0%, rgba(76, 99, 232, .2), transparent 70%), var(--s1); }
.pf-auth h3 { margin: 0 auto 16px; max-width: 280px; font: 400 25px/1.12 'Didot', 'Bodoni 72', Georgia, serif; letter-spacing: -.01em; }
.pf-sso { display: grid; gap: 10px; max-width: 375px; margin: 0 auto; }
/* Apple HIG: black button, white logo + title, logo sized to the text, equal prominence with other options. */
.pf-apple, .pf-google { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; width: 100%; border-radius: 999px;
  font: 600 17px/1 -apple-system, 'SF Pro Text', system-ui, sans-serif; letter-spacing: -.01em; transition: transform .15s, opacity .15s; }
.pf-apple { background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, .42); }
.pf-apple svg { width: 19px; height: 19px; fill: #fff; stroke: none; margin-top: -3px; }
/* Google identity guidelines (light theme): #FFF fill, #747775 stroke, #1F1F1F text, Roboto Medium, standard-color "G". */
.pf-google { background: #fff; color: #1F1F1F; border: 1px solid #747775; font-family: Roboto, 'Roboto Medium', -apple-system, system-ui, sans-serif; font-weight: 500; font-size: 16px; letter-spacing: .1px; }
.pf-google svg { width: 20px; height: 20px; stroke: none; }
.pf-apple:active, .pf-google:active { transform: scale(.97); }
.pf-apple.busy, .pf-google.busy { opacity: .7; pointer-events: none; }
.pf-fine { margin: 12px 0 0; color: var(--mut2); font-size: 12.5px; }
.pf-soon { display: inline-flex; align-items: center; gap: 8px; margin: 10px 0 0; padding: 7px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); color: var(--mut); font-size: 12.5px; text-align: left; }
.pf-soon i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #F5B556; box-shadow: 0 0 8px #F39A1E; }

/* sheets */
.pf-sheet h2 { margin: 4px 0 2px; }
.pf-sub { margin: 0 0 6px; text-align: center; color: var(--mut); font-size: 13.5px; }
.pf-label { margin: 22px 4px 2px; color: var(--mut2); font-size: 12px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.pf-hint { margin: 8px 6px 0; color: var(--mut); font-size: 12.5px; min-height: 18px; }
.pf-hint.ok { color: #5BD67A; }
.pf-hint.bad, .pf-hint.taken { color: #FF7A84; }
.pf-hint.checking { color: var(--mut2); }
.pf-sugg { margin: 0 2px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 12.5px; font-weight: 600; }
.pf-handle-field span { width: auto; font-size: 17px; color: var(--mut); }
.pf-toggle { align-items: center; margin: 12px 2px 2px; padding: 4px 0; }
.pf-toggle > span:last-child { flex: 1; }
.pf-privacy { margin-top: 10px; padding: 14px 16px; border-radius: 16px; background: var(--s2); font-size: 14px; }
.pf-privacy p { margin: 0; }
.pf-privacy p + p { margin-top: 6px; font-size: 13px; }
.pf-acct { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 16px; border-radius: 16px; background: var(--s2); }
.pf-acct > span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; flex: none; }
.pf-acct > span:empty { display: none; }
.pf-acct > span svg { width: 16px; height: 16px; stroke: none; fill: #000; }
.pf-acct > div { min-width: 0; }
.pf-acct b { display: block; font-size: 14.5px; font-weight: 600; }
.pf-acct small { display: block; color: var(--mut); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-danger { display: block; width: 100%; height: 46px; margin-top: 8px; border-radius: 999px; color: #FF6B76; font-weight: 600; font-size: 15.5px; }
.pf-danger:active { background: rgba(255, 69, 82, .1); }
.pf-danger.solid { margin: 0; background: linear-gradient(180deg, #FF5A66, #E0303E); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 4px 14px rgba(224, 48, 62, .35); }
.pf-done { width: 100%; margin-top: 22px; }

/* confirm dialog */
.pf-confirm-wrap { z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0); transition: background .2s; }
.pf-confirm-wrap.in { background: rgba(0, 0, 0, .65); }
.pf-confirm { width: 100%; max-width: 340px; padding: 22px 18px 16px; border-radius: 26px; background: #1C1C1F; border: 1px solid var(--line); text-align: center;
  transform: scale(.94); opacity: 0; transition: transform .2s, opacity .2s; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.pf-confirm-wrap.in .pf-confirm { transform: none; opacity: 1; }
.pf-confirm h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.01em; }
.pf-confirm p { margin: 0 0 18px; color: var(--mut); font-size: 14px; }
.pf-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pf-confirm-actions > * { height: 46px; padding: 0 10px; }

/* ================================================================ card sound (editor sheet) */
.au-now, .au-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--s2); margin-top: 8px; }
.au-now { margin-bottom: 6px; }
.au-meta { flex: 1; min-width: 0; line-height: 1.25; }
.au-meta b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-meta small { color: var(--mut); font-size: 12px; }
.au-play { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; }
.au-play.sm { width: 34px; height: 34px; }
.au-play svg { width: 16px; height: 16px; }
.au-rec { margin-top: 8px; padding: 14px; border-radius: 18px; background: var(--s2); font-size: 14px; }
.au-rec p { margin: 0; line-height: 1.45; }
.au-rec .btn-ghost svg { width: 14px; height: 14px; }
.au-rec.live { box-shadow: inset 0 0 0 1.5px rgba(255, 69, 58, .6); }
.au-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: #FF453A; animation: tap-pulse 1s infinite; }
.au-time { font-variant-numeric: tabular-nums; }
.au-cats { margin-top: 10px; }
.au-pubhead { margin-top: 8px; }
.au-list { padding-bottom: 6px; }
/* Sound tab makes 8 editor tabs: let them share the phone width */
@media (max-width: 899px) {
  .ed-tabs { padding-left: 2px; padding-right: 2px; }
  .ed-tabs button { flex: 1 1 0; min-width: 0; padding: 6px 0; font-size: 10px; letter-spacing: -.02em; }
  .ed-tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ---------- merci. wordmark (home) ---------- */
.logo { gap: 8px; }
.logo::after { display: none; }
.logo-bear { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.35)); }
.logo-word { height: 30px; width: auto; filter: brightness(0) invert(.95) sepia(.2) drop-shadow(0 2px 10px rgba(0,0,0,.35)); }

/* design drop banner */
.drop-banner { display: flex; align-items: center; gap: 14px; margin: 14px 16px 0; padding: 14px 16px; border-radius: 22px;
  background: linear-gradient(120deg, rgba(212, 43, 43, .28), rgba(22, 88, 58, .32)); border: 1px solid rgba(255, 255, 255, .14); }
.drop-fan { position: relative; width: 92px; height: 92px; flex: none; }
.drop-fan .mini { position: absolute; top: 0; border-radius: 8px; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); }
.drop-fan .mini:nth-child(1) { left: 0; transform: rotate(-9deg); }
.drop-fan .mini:nth-child(2) { left: 14px; transform: rotate(1deg); z-index: 1; }
.drop-fan .mini:nth-child(3) { left: 28px; transform: rotate(10deg); z-index: 2; }
.drop-info { flex: 1; min-width: 0; }
.drop-info h3 { margin: 2px 0 2px; font-size: 18px; font-weight: 700; }
.drop-info p { margin: 0; font-size: 13px; }
.drop-kicker { font-size: 11px !important; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #FFB4A8; }
.sub i.new { background: #D42B2B; color: #fff; }
.sub.on i.new { color: #fff; }
.style-row { padding-bottom: 12px; }

/* ---------- pricing pop-up (paywall.js) ---------- */
.pw-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0); transition: background .25s; }
.pw-modal.in { background: rgba(0,0,0,.65); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pw-sheet { position: relative; width: 100%; max-width: 560px; max-height: 94dvh; overflow-y: auto; padding: 26px 18px calc(22px + var(--safe-b)); border-radius: 30px 30px 0 0;
  background: radial-gradient(120% 60% at 50% 0%, #2a1a10 0%, #121214 55%); border: 1px solid var(--line); transform: translateY(100%); transition: transform .32s cubic-bezier(.3,.8,.3,1); text-align: center; }
.pw-modal.in .pw-sheet { transform: none; }
.pw-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 14px; }
.pw-bear { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.pw-sheet h2 { margin: 6px 0 4px; font-size: 25px; letter-spacing: -.02em; }
.pw-sub { margin: 0 auto 18px; max-width: 340px; color: var(--mut); font-size: 14.5px; }
.pw-plans { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.pw-card { position: relative; padding: 16px; border-radius: 22px; background: var(--s1); border: 1px solid var(--line); }
.pw-card.hl { background: linear-gradient(160deg, rgba(247,115,30,.22), rgba(18,18,20,1) 60%); border: 1.5px solid rgba(247,140,60,.75); box-shadow: 0 10px 30px rgba(247,115,30,.18); }
.pw-card.current { outline: 2px solid rgba(255,255,255,.5); outline-offset: 2px; }
.pw-badge { position: absolute; top: -11px; right: 16px; padding: 4px 10px; border-radius: 99px; background: linear-gradient(180deg,#FFC15A,#F7731E); color: #1a0d05; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; }
.pw-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pw-card h3 { margin: 0; font-size: 19px; }
.pw-price { font: 800 24px/1 var(--ui); letter-spacing: -.02em; }
.pw-billed { flex-basis: 100%; text-align: right; font-size: 12.5px; color: #F5B556; font-weight: 600; margin-top: 2px; }
.pw-card:not(.hl) .pw-billed { color: var(--mut); font-weight: 500; }
.pw-tag { margin: 8px 0 8px; font-size: 13.5px; color: rgba(255,255,255,.78); line-height: 1.45; }
.pw-card ul { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; }
.pw-card li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 1.4; }
.pw-card li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #8BD43A; font-weight: 800; }
.pw-left { display: block; margin: -4px 0 10px; font-size: 12.5px; color: var(--mut); }
.pw-card .full { width: 100%; }
.pw-foot { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.pw-link { color: var(--mut); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; }
.pw-redeem { display: flex; gap: 8px; width: 100%; }
.pw-redeem input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); outline: none; font: 600 15px/1 ui-monospace, Menlo, monospace; letter-spacing: .04em; text-transform: uppercase; }
.pw-legal { margin: 14px auto 0; max-width: 380px; font-size: 11px; color: var(--mut2); line-height: 1.4; }
.pf-plan { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--s2); }
.pf-plan b { display: block; } .pf-plan small { color: var(--mut); font-size: 12.5px; }

/* ---------- Create (create.js) ---------- */
.cr-sheet h2 { margin: 4px 0 2px; font-size: 24px; letter-spacing: -.02em; }
.cr-kinds { display: grid; gap: 10px; margin-top: 14px; }
.cr-kind { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px; border-radius: 20px; background: var(--s2); border: 1px solid var(--line); }
.cr-kind b { display: block; font-size: 16px; } .cr-kind small { display: block; color: var(--mut); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.cr-kind i { margin-left: auto; font-style: normal; color: var(--mut); font-size: 22px; }
.cr-emoji { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: rgba(255,255,255,.07); }
.cr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 14px 10px; margin-top: 12px; }
.cr-tpl { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cr-tpl small { font-size: 12px; font-weight: 600; text-align: center; }
.cr-tpl.blank { justify-content: center; height: 134px; border-radius: 12px; border: 1.5px dashed rgba(255,255,255,.25); }
.cr-tpl.blank span { font-size: 28px; }
.cr-mini { position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.cr-mini .page { position: absolute; left: 0; top: 0; }
.field.tall { height: auto; align-items: flex-start; padding: 12px 16px; }
.field textarea { flex: 1; background: none; border: 0; outline: none; color: inherit; font: inherit; font-size: 15px; resize: vertical; }
.cr-opts { display: grid; gap: 8px; }
.cr-opt { display: flex; gap: 8px; } .cr-opt input { flex: 1; height: 44px; padding: 0 14px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); outline: none; }
.cr-opt button { width: 44px; border-radius: 14px; background: var(--s2); color: var(--mut); }
.cr-people-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; }
.cr-people-head .sh-label { margin: 0; }
.cr-add { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-people, .cr-queue-list { display: grid; gap: 6px; margin-top: 10px; max-height: 40vh; overflow-y: auto; }
.cr-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--s2); }
.cr-person > span:nth-child(2) { flex: 1; min-width: 0; } .cr-person b { display: block; font-size: 15px; } .cr-person small { display: block; color: var(--mut); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-person button[data-rm] { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--mut); font-size: 12px; }
.cr-person em { font-style: normal; color: #8BD43A; font-weight: 700; font-size: 13px; }
.cr-person.sent { opacity: .7; }
.cr-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, #F7731E, #C7340F); }
.cr-av.st-going { background: #34C759; } .cr-av.st-maybe { background: #F5B556; color: #000; } .cr-av.st-declined { background: #555; }
.cr-addform { display: flex; gap: 6px; margin-top: 8px; } .cr-addform input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); outline: none; }
.cr-paste { width: 100%; margin-top: 8px; padding: 12px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); color: inherit; font: inherit; outline: none; }
.cr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.cr-stats div { padding: 12px; border-radius: 16px; background: var(--s2); text-align: center; } .cr-stats b { display: block; font-size: 24px; } .cr-stats small { color: var(--mut); }
.cr-when { color: rgba(255,255,255,.8); font-size: 14px; }
.cr-q { font-weight: 700; font-size: 17px; }
.cr-bar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 14px; margin-bottom: 6px; border-radius: 14px; background: var(--s2); overflow: hidden; }
.cr-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(247,115,30,.55), rgba(247,115,30,.25)); }
.cr-bar b, .cr-bar em { position: relative; } .cr-bar em { font-style: normal; font-weight: 700; }
.cr-row .cr-emoji { width: 54px; height: 54px; }

/* ---------- guest side: RSVP / poll / sign-up (campaign-view.js) ---------- */
.v-camp { display: flex; align-items: center; justify-content: center; padding: 70px 18px 40px; }
.cv-card { width: min(420px, 100%); padding: 24px 20px; border-radius: 28px; background: rgba(20,16,14,.92); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.cv-kicker { margin: 0; color: #F5B556; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.cv-card h2 { margin: 6px 0 12px; font-size: 26px; letter-spacing: -.02em; line-height: 1.15; }
.cv-row { margin: 6px 0; font-size: 15px; } .cv-row span { color: var(--mut); font-size: 13.5px; }
.cv-note { color: rgba(255,255,255,.8); font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; }
.cv-sub { color: var(--mut); font-size: 13.5px; }
.cv-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.cv-counts { display: flex; gap: 16px; margin: 6px 0 14px; color: var(--mut); font-size: 14px; } .cv-counts b { color: #fff; font-size: 18px; }
.cv-form { display: grid; gap: 10px; }
.cv-form input:not([type=checkbox]) { height: 48px; padding: 0 16px; border-radius: 16px; background: var(--s2); border: 1px solid var(--line); outline: none; color: inherit; font-size: 15.5px; }
.cv-rsvp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cv-opt { height: 52px; border-radius: 16px; background: var(--s2); border: 1.5px solid transparent; font-weight: 700; font-size: 14px; }
.cv-opt.on { border-color: #F7731E; background: rgba(247,115,30,.18); }
.cv-plus { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 14px; }
.cv-plus button { width: 34px; height: 34px; border-radius: 50%; background: var(--s2); font-size: 18px; } .cv-plus b { color: #fff; min-width: 16px; text-align: center; }
.cv-done { color: #8BD43A; font-size: 14px; margin: 4px 0 0; }
.cv-closed { color: var(--mut); }
.cv-label { margin: 18px 0 8px; font-size: 12px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .08em; }
.cv-guests { display: flex; flex-wrap: wrap; gap: 6px; } .cv-guest { padding: 6px 12px; border-radius: 99px; background: var(--s2); font-size: 13px; } .cv-guest.maybe { opacity: .65; }
.cv-poll { display: grid; gap: 8px; margin: 10px 0; }
.cv-popt { position: relative; display: flex; justify-content: space-between; align-items: center; height: 52px; padding: 0 16px; border-radius: 16px; background: var(--s2); border: 1.5px solid transparent; overflow: hidden; text-align: left; }
.cv-popt.on { border-color: #F7731E; } .cv-popt b, .cv-popt em { position: relative; } .cv-popt em { font-style: normal; font-weight: 700; color: var(--mut); }
.cv-fill { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(247,115,30,.28); transition: width .5s; }
.cv-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: rgba(255,255,255,.8); } .cv-consent input { margin-top: 2px; accent-color: #F7731E; }
.gift-quote { margin: 12px 2px 0; color: rgba(255,255,255,.8); font-size: 14px; } .gift-quote b { color: #fff; }
.gift-paid { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(139,212,58,.12); color: #8BD43A; font-size: 14px; font-weight: 600; text-align: center; }
.gift-pay:not(:empty) { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border-radius: 16px; background: #fff; color: #111; }
.kind-row.locked .kind:not(.on) { opacity: .4; }
