:root {
  --paper: #FCFBF8; --ink: #24202A; --muted: #746675; --rose: #D5474F; --gold: #E2A43A;
  --line: #E7E1DC; --card: #fff; --ok: #2E9E6B;
  font-family: -apple-system, system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--paper); color: var(--ink); font-size: 15px; line-height: 1.5; padding-bottom: 60px; }
header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; background: rgba(252,251,248,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand b { font-size: 18px; } .brand span { color: var(--muted); font-size: 13px; }
.status { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.status.on { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.status.off { color: var(--rose); background: color-mix(in srgb, var(--rose) 12%, transparent); }
nav { display: flex; gap: 4px; padding: 10px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--line); position: sticky; top: 55px; background: var(--paper); z-index: 4; }
nav button { font: inherit; border: 0; background: none; color: var(--muted); font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
nav button.on { background: var(--ink); color: var(--paper); }
main { max-width: 760px; margin: 0 auto; padding: 24px 18px 80px; }
h2 { font-size: 22px; margin-bottom: 4px; } .sub { color: var(--muted); margin-bottom: 18px; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.card h3 { font-size: 16px; margin-bottom: 10px; }
label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 12px 0 5px; }
input[type=text], input[type=date], input[type=datetime-local], textarea, select { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 90px; resize: vertical; line-height: 1.55; }
button.btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; background: var(--ink); color: var(--paper); }
button.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
button.btn.rose { background: var(--rose); }
button.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
button.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #F0ECE8; color: var(--muted); }
.pill.live { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.on { background: color-mix(in srgb, var(--rose) 15%, transparent); color: var(--rose); }
.muted { color: var(--muted); font-size: 13px; }
.list > div { padding: 12px 0; border-top: 1px solid var(--line); }
.list > div:first-child { border-top: 0; }
.setup { background: color-mix(in srgb, var(--rose) 7%, transparent); border-color: color-mix(in srgb, var(--rose) 30%, transparent); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120%); background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 600; transition: transform .35s cubic-bezier(.34,1.56,.64,1); z-index: 20; }
.toast.show { transform: translate(-50%, 0); }
.toast.err { background: var(--rose); }
.thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #eee; }
code { background: #F0ECE8; padding: 1px 6px; border-radius: 5px; font-size: 13px; }
a { color: var(--rose); }

/* sub-editors (wishes, photos, clips, wrapped) */
.subcard { margin-top: 14px; padding: 14px; border-radius: 12px; background: #FAF7F4; box-shadow: inset 0 0 0 1px var(--line); }
.subcard > label:first-child { font-size: 13px; color: var(--ink); }
.subrow { padding: 12px; margin-top: 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.subrow .thumb { width: 44px; height: 44px; }

/* phone preview */
.phone { display: flex; justify-content: center; padding: 10px 0 30px; }
.phone-frame { width: 390px; height: 760px; max-width: 100%; border: 10px solid #1b1720; border-radius: 40px; background: #000; box-shadow: 0 20px 50px -20px rgba(36,32,42,.5); }
