
:root {
  --bg: #161616; --fg: #ffffff; --white: #ffffff; --black: #161616; --graphite: #9a9a9a; --silver: #b9b9b9; --hair: #2e2e2e;
  --f-display: "Hahmlet", "Nanum Myeongjo", "AppleMyungjo", serif;
  --f-body: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --f-hand: "Nanum Pen Script", "Apple SD Gothic Neo", cursive;
  --f-deco: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --pink: #ffb3cf; --p-butter: #f7e8a6; --p-blush: #f6c9d3; --p-mint: #c8ead6; --p-sky: #c6ddf3; --p-lilac: #ddd0f2; --p-peach: #f9d5bd;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--fg); font-family: var(--f-body); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.postit { font-family: var(--f-hand); line-height: 1.15; padding: 14px 12px 12px; border-radius: 1px; position: relative; }
.t-butter { background: var(--p-butter); color: #2a2620; } .t-blush { background: var(--p-blush); color: #2a2024; } .t-mint { background: var(--p-mint); color: #1f2a24; }
.t-sky { background: var(--p-sky); color: #1f2530; } .t-lilac { background: var(--p-lilac); color: #26222f; } .t-peach { background: var(--p-peach); color: #2c231d; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); font-size: 13px; padding: 8px 16px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 10; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; }

/* sign-in and first-run */
.auth { min-height: calc(100svh - 56px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px; }
.auth-card h1 { font-size: 28px; line-height: 1.3; }
.auth-card .lead { color: var(--quiet); }
.auth-card .ad-btn { min-height: 48px; width: 100%; }
.auth-card .f input { min-height: 48px; }
.auth-err { color: var(--pink); font-size: 13px; }
.auth-err:empty { display: none; }
.slug-row { display: flex; align-items: stretch; border: 1px solid var(--line-2); background: var(--bg); }
.slug-row span { display: flex; align-items: center; padding: 0 0 0 12px; color: var(--quiet); font-size: 14px; white-space: nowrap; }
.slug-row input { border: 0 !important; padding-left: 2px !important; min-width: 0; }
.slug-row:focus-within { border-color: var(--fg); }

/* photo uploads */
.up-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.up { position: relative; aspect-ratio: 3 / 4; background: var(--surface-2); overflow: hidden; }
.up img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1); }
.up .ctl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; background: rgba(22,22,22,.78); }
.up .ctl button { flex: 1; height: 34px; border: 0; background: none; color: var(--fg); font-size: 13px; }
.up .ctl button:disabled { color: #555; }
.up-add { aspect-ratio: 3 / 4; border: 1px dashed var(--line-2); background: none; color: var(--quiet); display: grid; place-items: center; text-align: center; font-size: 13px; padding: 8px; }
.up-add:hover { border-color: var(--fg); color: var(--fg); }
.up-hero { grid-column: 1 / -1; display: flex; gap: 16px; align-items: flex-end; }
.up-hero .up, .up-hero .up-add { width: 150px; flex: none; }
.up-hero .side { display: flex; flex-direction: column; gap: 8px; }
.up.busy::after { content: "올리는 중"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(22,22,22,.7); font-size: 12px; }
.ad-top .who { font-size: 12px; color: var(--quiet); }
/* Couple tools (/app#/admin, /app#/edit). Same palette and type as the invitation, but no decorative motion: information first.
   Layout: sticky top bar; dashboard = stat row + two cards; editor = form column + sticky phone preview (tabs on phones). */

.ad { --surface: #1d1d1d; --surface-2: #242424; --line: #2e2e2e; --line-2: #444; --quiet: #9a9a9a; min-height: 100svh; }
.ad section { padding-block: 0; border-top: 0; }
.ad section.ad-card { padding: 22px 20px 20px; }
.ad .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ad h1, .ad h2, .ad h3 { font-family: var(--f-display); font-weight: 400; margin: 0; }

/* top bar */
.ad-top { position: sticky; top: 0; z-index: 5; background: rgba(22,22,22,.88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ad-top-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 20px; }
.ad-brand { color: var(--fg); text-decoration: none; font-family: var(--f-deco); font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.ad-brand b { color: var(--pink); font-weight: 700; }
.ad-nav { display: flex; gap: 4px; height: 100%; }
.ad-nav a { display: flex; align-items: center; padding: 0 12px; color: var(--quiet); text-decoration: none; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ad-nav a:hover { color: var(--fg); }
.ad-nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }
.ad-save { margin-left: auto; font-size: 12px; color: var(--quiet); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ad-save.err { color: var(--pink); }

/* buttons */
.ad-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg); font-size: 14px; text-decoration: none; white-space: nowrap; border-radius: 0; transition: background .15s, color .15s, border-color .15s; }
.ad-btn:hover { background: #cfcfcf; border-color: #cfcfcf; }
.ad-btn.ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.ad-btn.ghost:hover { border-color: var(--fg); }
.ad-btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.ad-btn:disabled { opacity: .4; cursor: not-allowed; }
.ad-btn.danger { background: var(--pink); border-color: var(--pink); color: #2a1a20; }
.ad-btn.danger:hover { background: #ffc9dc; border-color: #ffc9dc; }
.ad-link { background: none; border: 0; padding: 0; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12px; background: var(--surface-2); color: var(--fg); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); }
.pill.live::before { background: #8fe0a9; }
.pill.draft::before { background: var(--p-butter); }
.pill.line { background: transparent; border: 1px solid var(--line-2); }
.pill.line::before { display: none; }

.ad-wrap { max-width: 1120px; margin: 0 auto; padding: 32px 20px 80px; }
.ad-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ad-kicker { color: var(--quiet); font-size: 13px; }
.ad-h1 { font-size: 30px; line-height: 1.25; margin-top: 2px !important; }
.ad-head-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.banner { margin-top: 20px; padding: 12px 16px; border: 1px dashed var(--line-2); color: var(--quiet); font-size: 13px; }

/* stats */
.ad-stats { margin-top: 28px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.6fr; gap: 12px; }
.stat { background: var(--surface); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-k { font-size: 13px; color: var(--quiet); }
.stat-v { font-family: var(--f-display); font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-v small { font-family: var(--f-body); font-size: 14px; margin-left: 3px; color: var(--quiet); }
.stat.hero .stat-v { font-size: 52px; color: var(--pink); }
.stat-s { font-size: 12px; color: var(--quiet); margin-top: auto; }
.bar { display: flex; height: 10px; margin: 14px 0 10px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.bar .g { background: var(--p-sky); }
.bar .b { background: var(--p-blush); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; }

/* cards */
.ad-card { margin-top: 16px; background: var(--surface); padding: 22px 20px 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.card-head h2 { font-size: 20px; }
.cnt { font-family: var(--f-body); font-size: 13px; color: var(--quiet); margin-left: 4px; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--quiet); }
.tools { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.search { flex: 1 1 200px; max-width: 280px; }
.search input { width: 100%; height: 40px; padding: 0 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--fg); border-radius: 0; font-size: 14px; }
.search input:focus { outline: none; border-color: var(--fg); }
.chips { display: inline-flex; border: 1px solid var(--line-2); }
.chips button { height: 38px; padding: 0 14px; border: 0; background: none; color: var(--quiet); font-size: 13px; }
.chips button + button { border-left: 1px solid var(--line-2); }
.chips button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.chips button:hover:not([aria-pressed="true"]) { color: var(--fg); }

.table-wrap { margin-top: 14px; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; font-weight: 400; font-size: 12px; color: var(--quiet); padding: 10px 8px; border-bottom: 1px solid var(--line-2); }
.list td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
.list .num { text-align: right; font-variant-numeric: tabular-nums; }
.list td.nm { font-weight: 500; }
.list td.mm { display: none; }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.tag.yes { background: #22382a; color: #b9ecc9; }
.tag.no { background: #3a2329; color: #f6c9d3; }
.tag.unsure { background: #38331f; color: #f7e8a6; }
.empty { margin-top: 18px; padding: 28px 16px; text-align: center; color: var(--quiet); border: 1px dashed var(--line-2); font-size: 13px; }

/* notes moderation */
.notes-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.mod { display: flex; flex-direction: column; gap: 8px; }
.mod .postit { min-height: 120px; font-size: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: none; transition: opacity .2s; }
.mod .postit .from { font-size: 17px; text-align: right; opacity: .7; margin-top: auto; }
.mod.is-hidden .postit { opacity: .35; }
.mod .meta { font-size: 12px; color: var(--quiet); display: flex; justify-content: space-between; gap: 6px; }
.mod .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mod .acts .ad-btn { flex: 1; }
.mod .ask { font-size: 12px; color: var(--pink); width: 100%; }

/* gate */
.gate { min-height: calc(100svh - 56px); display: grid; place-items: center; text-align: center; padding: 24px; }
.gate h1 { font-size: 24px; }
.gate p { margin-top: 8px; color: var(--quiet); }
.gate .ad-btn { margin-top: 20px; }

/* editor */
.ed { max-width: 1120px; margin: 0 auto; padding: 24px 20px 80px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.ed-mtabs { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.steps button { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border: 1px solid var(--line-2); background: none; color: var(--quiet); font-size: 13px; white-space: nowrap; }
.steps .n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--surface-2); color: var(--fg); font-variant-numeric: tabular-nums; }
.steps .ok .n { background: var(--fg); color: var(--bg); }
.steps button[aria-current="step"] { color: var(--fg); border-color: var(--fg); }
.steps button[aria-current="step"] .n { background: var(--pink); color: #2a1a20; }

.panel { margin-top: 28px; }
.panel h1 { font-size: 28px; line-height: 1.25; }
.panel .lead { margin-top: 6px; color: var(--quiet); }
.group { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.group > h2 { grid-column: 1 / -1; font-family: var(--f-body); font-size: 13px; font-weight: 500; color: var(--fg); letter-spacing: .02em; }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f.full { grid-column: 1 / -1; }
.f-l { font-size: 13px; color: var(--quiet); display: flex; gap: 6px; align-items: baseline; }
.f-l em { font-style: normal; font-size: 11px; color: var(--pink); }
.f input, .f textarea, .f select { width: 100%; min-height: 44px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line-2); color: var(--fg); border-radius: 0; font-size: 15px; }
.f textarea { resize: vertical; line-height: 1.7; font-family: var(--f-body); }
.f input:focus, .f textarea:focus, .f select:focus { outline: none; border-color: var(--fg); }
.f input::placeholder, .f textarea::placeholder { color: #666; }
.f input[type=date], .f input[type=time] { color-scheme: dark; }
.f-h { font-size: 12px; color: var(--quiet); }
.f-h .ad-link { font-size: 12px; }
.f-row { display: flex; gap: 8px; }
.f-row input { flex: 1; min-width: 0; }

.presets { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preset { position: relative; }
.preset input { position: absolute; opacity: 0; }
.preset label { display: block; height: 100%; padding: 14px 14px 12px; border: 1px solid var(--line-2); cursor: pointer; font-family: var(--f-display); font-size: 13px; line-height: 1.75; color: var(--silver); white-space: pre-line; }
.preset label b { display: block; font-family: var(--f-body); font-weight: 500; font-size: 12px; color: var(--fg); margin-bottom: 6px; }
.preset input:checked + label { border-color: var(--fg); color: var(--fg); }
.preset input:focus-visible + label { outline: 2px solid var(--fg); outline-offset: 2px; }

.accts { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; }
.acct-row { display: grid; grid-template-columns: 100px 1fr 96px 1.4fr 44px; gap: 8px; align-items: end; }
.acct-row .f-l { font-size: 12px; }
.acct-row .rm { height: 44px; border: 1px solid var(--line-2); background: none; color: var(--quiet); font-size: 18px; }
.acct-row .rm:hover { color: var(--fg); border-color: var(--fg); }
.add-row { justify-self: start; }

.heroes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.heroes input { position: absolute; opacity: 0; }
.heroes label { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; cursor: pointer; outline: 1px solid var(--line-2); }
.heroes img { width: 100%; height: 100%; object-fit: cover; display: block; }
.heroes input:checked + label { outline: 2px solid var(--pink); outline-offset: 2px; }
.heroes input:checked + label::after { content: "대표"; position: absolute; left: 6px; top: 6px; font-size: 11px; padding: 1px 6px; background: var(--pink); color: #2a1a20; }
.heroes input:focus-visible + label { outline: 2px solid var(--fg); outline-offset: 2px; }

.check { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; }
.check li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.check .mk { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; flex: none; border: 1px solid var(--line-2); color: var(--quiet); }
.check .done .mk { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.check .lab { flex: 1; }
.check .miss .lab { color: var(--fg); }
.check .val { color: var(--quiet); font-size: 13px; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.pub p { color: var(--quiet); font-size: 13px; }

.ed-nav { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }

.ed-preview { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.phone { width: 375px; height: min(760px, calc(100svh - 140px)); border: 10px solid #2a2a2a; border-radius: 34px; overflow: hidden; background: var(--bg); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; background: var(--bg); }
.pv-note { font-size: 12px; color: var(--quiet); text-align: center; max-width: 340px; }

@media (max-width: 1000px) {
  .ad-stats { grid-template-columns: 1fr 1fr; }
  .stat.hero, .stat.side { grid-column: span 2; }
  .ed { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
  .ed-mtabs { display: flex; border: 1px solid var(--line-2); margin-bottom: 16px; }
  .ed-mtabs button { flex: 1; height: 40px; border: 0; background: none; color: var(--quiet); }
  .ed-mtabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
  .ed .ed-preview { display: none; position: static; }
  .ed.show-preview .ed-preview { display: flex; }
  .ed.show-preview .ed-form > :not(.ed-mtabs) { display: none; }
  .phone { width: min(375px, 100%); height: 70svh; }
}
@media (max-width: 640px) {
  .ad-top-in { gap: 10px; padding: 0 16px; }
  .ad-top-in:has(.ad-nav) .ad-brand { display: none; }
  .ad-nav a { padding: 0 8px; }
  .ad-top .ad-btn { min-height: 34px; padding: 0 8px; font-size: 12px; }
  .ad-top #open-inv { display: none; }
  .ad-top-in { gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .ad-nav { margin-right: auto; }
  .ad-nav a { font-size: 13px; }
  .ad-save { display: none; }
  .ad-wrap, .ed { padding-left: 16px; padding-right: 16px; }
  .ad-h1 { font-size: 26px; }
  .stat.hero .stat-v { font-size: 44px; }
  .group { grid-template-columns: 1fr; }
  .presets { grid-template-columns: 1fr; }
  .acct-row { grid-template-columns: 1fr 1fr; padding: 12px; border: 1px solid var(--line); }
  .acct-row .num-f { grid-column: 1 / -1; }
  .acct-row .rm { grid-column: 1 / -1; height: 36px; font-size: 13px; }
  .search { max-width: none; flex-basis: 100%; }
  .list thead { display: none; }
  .list tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .list td { padding: 0; border: 0; }
  .list td.sd, .list td.ct, .list td.ml { display: none; }
  .list td.at { grid-column: 2; grid-row: 1; justify-self: end; }
  .list td.mm { display: block !important; grid-column: 1; font-size: 13px; color: var(--quiet); }
  .list td.tm { grid-column: 2; grid-row: 2; text-align: right; font-size: 12px; color: var(--quiet); }
}
@media (prefers-reduced-motion: reduce) { .bar span, .mod .postit { transition: none; } }
.ad [tabindex="-1"]:focus { outline: none; }
.accts .add-row { align-self: flex-start; }
.up-hero .side { align-items: flex-start; }
.up-add { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }

/* theme picker */
.themes { grid-column: 1 / -1; display: flex; gap: 10px; }
.themes > div { position: relative; }
.themes input { position: absolute; opacity: 0; }
.themes label { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 10px; border: 1px solid var(--line-2); cursor: pointer; font-size: 14px; }
.themes label span { width: 32px; height: 32px; display: block; }
.themes .sw-dark { background: #161616; box-shadow: inset 0 0 0 1px #555; }
.themes .sw-light { background: #f6f5f1; }
.themes input:checked + label { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); }
.themes input:focus-visible + label { outline: 2px solid var(--fg); outline-offset: 2px; }

/* crop dialog */
.crop { position: fixed; inset: 0; z-index: 40; background: rgba(10,10,10,.92); display: grid; place-items: center; padding: 16px; }
.crop-in { width: min(420px, 100%); display: flex; flex-direction: column; gap: 14px; }
.crop-t { font-family: var(--f-display); font-size: 20px; }
.crop-frame { position: relative; width: 100%; aspect-ratio: 3 / 4; margin: 0 auto; flex: none; overflow: hidden; background: #000; touch-action: none; cursor: grab; outline: 1px solid rgba(255,255,255,.5); }
.crop-frame:active { cursor: grabbing; }
.crop-frame:focus-visible { outline: 2px solid var(--pink); }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.crop-frame::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.25) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.25) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
              linear-gradient(180deg, transparent calc(33.33% - .5px), rgba(255,255,255,.25) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.25) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.crop-zoom { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--quiet, #9a9a9a); }
.crop-zoom input { flex: 1; accent-color: var(--pink); }
.crop-act { display: flex; justify-content: space-between; gap: 10px; }
.crop-act .ad-btn { flex: 1; min-height: 48px; }

/* delete */
.danger-zone h2 { color: var(--pink) !important; }

/* account page */
.acct-sec { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; margin-top: 4px; border-top: 1px solid var(--line); }
.acct-sec h2 { font-family: var(--f-body); font-size: 14px; font-weight: 500; }
.auth-card > .ad-link { align-self: flex-start; }

/* sticker picker */
.stk-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.stk { position: relative; aspect-ratio: 1; border: 1px solid var(--line-2); background: var(--surface-2); padding: 8px; display: grid; place-items: center; }
.stk img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.stk:hover { border-color: var(--fg); }
.stk[aria-pressed="true"] { border-color: var(--pink); box-shadow: inset 0 0 0 1px var(--pink); }
.stk b { position: absolute; top: 4px; left: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--pink); color: #2a1a20; font-size: 11px; display: grid; place-items: center; font-weight: 500; }
.group > .ad-link { justify-self: start; grid-column: 1 / -1; }
.stk { overflow: hidden; min-width: 0; }
.stk img { width: 100%; height: 100%; }
.group > .f-h { grid-column: 1 / -1; }

/* phones: keep every row inside the screen, and use 16px inputs so iOS does not zoom in on focus */
.ed-form, .panel, .group, .f, .accts, .acct-row > * { min-width: 0; }
.ed-mtabs { position: sticky; top: 56px; z-index: 4; background: var(--bg); }
@media (max-width: 640px) {
  .f input, .f textarea, .f select, .search input, .slug-row input { font-size: 16px; }
  .group { gap: 14px; margin-top: 22px; padding-top: 18px; }
  .panel h1 { font-size: 24px; }
  .steps { margin: 0 -16px; padding: 0 16px; }
  .ed-nav { position: sticky; bottom: 0; background: var(--bg); margin: 28px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 3; }
  .ed-nav .ad-btn { flex: 1; min-height: 46px; }
  .up-hero { flex-direction: column; align-items: flex-start; }
  .themes label { height: 48px; }
  .stk-grid { grid-template-columns: repeat(5, 1fr); }
  .phone { border-width: 6px; border-radius: 24px; height: calc(100svh - 190px); }
}
@media (max-width: 640px) {
  .up-grid { grid-template-columns: repeat(3, 1fr); }
  .acct-row { align-items: start; }
}
.up .ctl button { font-size: 15px; }

/* keep the page locked to the viewport width on phones */
html, body { max-width: 100%; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
/* screen-reader text lived outside the step strip's scroll box and widened the page */
.steps button, .stk, .check li { position: relative; }
.ad .sr { left: 0; top: 0; }
.f-row { flex-wrap: wrap; }
.f-row > .ad-btn { flex: 1 1 auto; }
.themes { flex-wrap: wrap; }
.themes .sw-mono { background: linear-gradient(135deg, #e8e8e8, #3a3a3a); }
.themes .sw-color { background: linear-gradient(135deg, #f6c9d3, #c6ddf3 50%, #c8ead6); }
#deco-warn:not(:empty) { color: var(--pink); }
.en-parts { border: 0; padding: 0; margin: 0; }
.en-parts legend { padding: 0; margin-bottom: 6px; }
