/* My Christmas Tree — H5 design system
   Evergreen / Warm Ivory / Champagne Gold / Cranberry / Frost Blue / Walnut */
:root {
  --forest-950: #061a15;
  --forest-900: #0a241d;
  --forest-800: #0e2e24;
  --forest-700: #164031;
  --forest-600: #1f523e;
  --forest-500: #2c6b51;
  --ivory: #f7f1e6;
  --ivory-soft: #ece2d0;
  --ivory-dim: rgba(247, 241, 230, .66);
  --ivory-faint: rgba(247, 241, 230, .40);
  --gold: #dbb979;
  --gold-bright: #f0d69b;
  --gold-deep: #a8843f;
  --cranberry: #a8323e;
  --cranberry-soft: #c65a60;
  --frost: #b9d7e4;
  --walnut: #7d5a3b;
  --ink: #1b2b24;
  --line: rgba(219, 185, 121, .22);
  --line-soft: rgba(247, 241, 230, .12);
  --glass: rgba(255, 252, 244, .055);
  --glass-strong: rgba(9, 34, 27, .90);
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
  /* Self-hosted variable fonts: no CDN request, works offline, GDPR-friendly for EU visitors. */
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --sans: "Manrope", "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--forest-950);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: .004em;
  font-variant-ligatures: common-ligatures;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--gold); text-decoration: none; }
img { max-width: 100%; display: block; }
canvas { display: block; }
::selection { background: var(--gold); color: var(--forest-950); }

/* ---------- ambient background ---------- */
.bg-ambient {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 82% -8%, rgba(219,185,121,.13), transparent 65%),
    radial-gradient(760px 620px at 6% 6%, rgba(44,107,81,.34), transparent 70%),
    radial-gradient(1000px 760px at 50% 116%, rgba(168,50,62,.12), transparent 70%),
    linear-gradient(168deg, #0a241d 0%, #061a15 55%, #081e18 100%);
}
.bg-ambient::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(247,241,230,.10) .6px, transparent .7px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 70%);
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: -.022em; }
h1 { font-size: clamp(2.9rem, 6.8vw, 5.1rem); line-height: 1.02; }
h2 { font-size: clamp(2.05rem, 4vw, 3.05rem); line-height: 1.1; }
h3 { font-size: 1.46rem; font-weight: 600; }
/* Cormorant has no CJK glyphs — use the UI face for CJK headings so they never look mismatched. */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(ja) h1, :lang(ja) h2, :lang(ja) h3,
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.02em; }
p { margin: 0; }
.eyebrow {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); font-weight: 700;
}
.lede { color: var(--ivory-dim); font-size: 1.04rem; line-height: 1.75; }
/* Long-compound languages (DE/NL/PT/ES/FR/IT) need room to breathe. */
:lang(de) .btn, :lang(fr) .btn, :lang(es) .btn, :lang(pt) .btn, :lang(it) .btn { white-space: normal; line-height: 1.25; }
:lang(de) .panel-title, :lang(de) .field .label, :lang(fr) .panel-title { hyphens: auto; overflow-wrap: break-word; }
.muted { color: var(--ivory-dim); }
.faint { color: var(--ivory-faint); }
.tiny { font-size: .74rem; }
.small { font-size: .84rem; }
.center { text-align: center; }
.serif { font-family: var(--serif); }
.gold { color: var(--gold); }
.nowrap { white-space: nowrap; }

.ornament-rule {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--gold); font-size: .8rem; margin: 22px 0;
}
.ornament-rule::before, .ornament-rule::after {
  content: ""; height: 1px; width: min(90px, 18vw);
  background: linear-gradient(90deg, transparent, var(--line));
}
.ornament-rule::after { background: linear-gradient(90deg, var(--line), transparent); }

/* ---------- layout ---------- */
.page { min-height: 100dvh; position: relative; }
.shell { width: min(1180px, 100%); margin: 0 auto; padding: 0 24px; }
.shell-narrow { width: min(660px, 100%); margin: 0 auto; padding: 0 22px; }
.stack { display: flex; flex-direction: column; }
.gap-6 { gap: 6px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; }
.gap-20 { gap: 20px; } .gap-28 { gap: 28px; } .gap-40 { gap: 40px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.spacer { height: 20px; }

/* ---------- header ---------- */
.topbar {
  position: relative; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ivory); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  border: 1px solid var(--line); color: var(--gold);
  background: radial-gradient(circle at 35% 30%, rgba(219,185,121,.22), rgba(219,185,121,.03));
}
.brand-text { font-family: var(--serif); font-size: 1.06rem; letter-spacing: .01em; white-space: nowrap; }
.brand-text small { display: block; font-family: var(--sans); font-size: .58rem; letter-spacing: .22em; color: var(--ivory-faint); text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-size: .9rem; font-weight: 600; letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary {
  color: #20180a;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 10px 30px rgba(219,185,121,.20), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-primary:hover { box-shadow: 0 14px 38px rgba(219,185,121,.32); }
.btn-ghost { border: 1px solid var(--line); color: var(--ivory); background: var(--glass); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(219,185,121,.09); }
.btn-soft { background: rgba(247,241,230,.09); color: var(--ivory); }
.btn-soft:hover { background: rgba(247,241,230,.16); }
.btn-cranberry { background: linear-gradient(135deg, #c25059, var(--cranberry)); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .78rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 32px; height: 32px; }
.btn.active { background: rgba(219,185,121,.18); border-color: var(--gold); color: var(--gold-bright); }
.icon { font-size: 1.05em; line-height: 1; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ivory-dim); font-weight: 600; }
.input, .textarea, .select {
  width: 100%; padding: 13px 16px; border-radius: var(--r-sm);
  background: rgba(6, 26, 21, .55); border: 1px solid var(--line-soft);
  outline: none; transition: border-color .18s ease, box-shadow .18s ease;
  font-size: .95rem;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(219,185,121,.12); }
.input::placeholder, .textarea::placeholder { color: var(--ivory-faint); }
.textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 19px) 20px, calc(100% - 14px) 20px; background-size: 5px 5px; background-repeat: no-repeat; }
.hint { font-size: .76rem; color: var(--ivory-faint); line-height: 1.5; }
.error-text { color: #f0a8a8; font-size: .8rem; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(160deg, rgba(255,252,244,.075), rgba(255,252,244,.025));
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.card-pad { padding: 26px; }
.card-quiet { background: rgba(6,26,21,.36); border-radius: var(--r-md); border: 1px solid var(--line-soft); padding: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; border: 1px solid var(--line); font-size: .72rem;
  color: var(--gold); background: rgba(219,185,121,.07); white-space: nowrap;
}
.chip-plain { color: var(--ivory-dim); border-color: var(--line-soft); background: rgba(247,241,230,.05); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; font-size: .68rem; background: var(--gold); color: var(--forest-950); font-weight: 700; }

/* ---------- landing ---------- */
.hero { padding-bottom: 70px; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 46px; align-items: center; padding-top: 26px; }
.hero h1 { margin: 18px 0 20px; }
.hero h1 em { font-style: italic; color: var(--gold-bright); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 22px; }
.hero-visual {
  position: relative; border-radius: 30px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  aspect-ratio: 4 / 5; max-height: 620px;
  background: radial-gradient(circle at 50% 38%, #174634, #082019 70%);
}
.hero-visual canvas { width: 100%; height: 100%; }
.hero-visual .frame-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 24px 20px;
  background: linear-gradient(transparent, rgba(4,18,14,.78));
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
}
.hero-visual .frame-caption strong { font-family: var(--serif); font-weight: 500; font-size: 1.16rem; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 6px; }
.stat b { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; color: var(--gold-bright); }
.stat span { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ivory-faint); }

.section { padding: 62px 0; }
.section-head { max-width: 620px; margin-bottom: 34px; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.how-step { padding: 24px 20px; position: relative; }
.how-step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--serif); font-size: 1.7rem; color: var(--gold); opacity: .7;
  display: block; margin-bottom: 12px;
}
.how-step h4 { font-size: 1.05rem; margin-bottom: 6px; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.showcase-card { overflow: hidden; position: relative; border-radius: var(--r-lg); border: 1px solid var(--line-soft); background: #0a241d; }
.showcase-card canvas { width: 100%; aspect-ratio: 4 / 5; }
.showcase-card .meta { padding: 15px 18px 18px; }
.showcase-card .meta strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; }
.footer { border-top: 1px solid var(--line-soft); padding: 30px 0 46px; color: var(--ivory-faint); font-size: .78rem; }

/* ---------- style picker ---------- */
.style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.style-card { overflow: hidden; cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.style-card:hover { transform: translateY(-4px); border-color: var(--line); }
.style-card.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(219,185,121,.35), var(--shadow); }
.style-card .preview { width: 100%; aspect-ratio: 1 / 1.04; background: #0b2a20; }
.style-card .preview canvas { width: 100%; height: 100%; }
.style-card .info { padding: 17px 18px 19px; }
.style-card .info h3 { font-size: 1.22rem; margin-bottom: 5px; }
.style-card .info p { font-size: .8rem; color: var(--ivory-dim); line-height: 1.55; min-height: 38px; }
.style-swatches { display: flex; gap: 5px; margin-top: 12px; }
.style-swatches i { width: 13px; height: 13px; border-radius: 50%; display: block; border: 1px solid rgba(255,255,255,.18); }
.select-mark { position: absolute; top: 12px; right: 12px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--forest-950); font-weight: 700; font-size: .8rem; }

.page-head { padding: 16px 0 28px; }
.page-head h2 { margin: 10px 0 8px; }
.page-head p { color: var(--ivory-dim); }
.sticky-foot {
  position: sticky; bottom: 0; z-index: 15; padding: 14px 0 calc(14px + var(--safe-b));
  background: linear-gradient(transparent, rgba(6,26,21,.94) 30%);
}
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--ivory-dim); font-size: .84rem; padding: 4px 0; }
.back-link:hover { color: var(--gold); }

/* ---------- room lobby ---------- */
.lobby-grid { display: grid; grid-template-columns: 1fr .82fr; gap: 22px; align-items: start; }
.lobby-preview { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 4.4; background: #0a241d; }
.lobby-preview canvas { width: 100%; height: 100%; }
.invite-box { display: flex; gap: 8px; align-items: center; background: rgba(6,26,21,.6); border: 1px dashed var(--line); border-radius: var(--r-md); padding: 10px 10px 10px 15px; }
.invite-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; color: var(--gold-bright); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: .92rem; flex: none; border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(219,185,121,.25), rgba(219,185,121,.06));
}
.avatar.lg { width: 44px; height: 44px; font-size: 1.15rem; }
.avatar.sm { width: 28px; height: 28px; font-size: .78rem; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -9px; box-shadow: 0 0 0 2px var(--forest-900); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.member-row:last-child { border-bottom: 0; }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: #67c58d; display: inline-block; box-shadow: 0 0 8px #67c58d; }
.presence-dot.off { background: var(--ivory-faint); box-shadow: none; }
.list-empty { padding: 26px 10px; text-align: center; color: var(--ivory-faint); font-size: .86rem; }

/* ---------- editor ---------- */
.editor { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.editor-top {
  flex: none; height: 58px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 26, 21, .82); backdrop-filter: blur(12px); z-index: 12;
}
.editor-top .room-name { font-family: var(--serif); font-size: 1.12rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.editor-top .sub { font-size: .7rem; color: var(--ivory-faint); letter-spacing: .06em; }
.editor-top-actions { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.sync-pill { display: inline-flex; align-items: center; gap: 7px; font-size: .7rem; color: var(--ivory-dim); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-soft); white-space: nowrap; }
.sync-pill .presence-dot { width: 6px; height: 6px; }

.panel {
  min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  background: rgba(8, 30, 24, .58); border-right: 1px solid var(--line-soft);
  scrollbar-width: thin; scrollbar-color: rgba(219,185,121,.3) transparent;
}
.panel-right { border-right: 0; border-left: 1px solid var(--line-soft); }
.panel-inner { padding: 16px 15px 40px; }
.panel-title { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 4px 0 12px; }
.panel-section { margin-bottom: 22px; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cat-tab { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-soft); font-size: .73rem; color: var(--ivory-dim); }
.cat-tab.active { background: var(--gold); color: var(--forest-950); border-color: var(--gold); font-weight: 700; }
.asset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.asset-tile {
  aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-soft);
  background: radial-gradient(circle at 50% 32%, rgba(219,185,121,.09), rgba(6,26,21,.5));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 4px; position: relative; transition: border-color .16s, transform .16s, background .16s;
}
.asset-tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.asset-tile canvas { width: 46px; height: 46px; pointer-events: none; }
.asset-tile span { font-size: .6rem; color: var(--ivory-faint); text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-tile .add-mark { position: absolute; top: 5px; right: 6px; font-size: .7rem; color: var(--gold); opacity: 0; }
.asset-tile:hover .add-mark { opacity: 1; }

.stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #071d17; }
.stage canvas { width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage canvas.dragging { cursor: grabbing; }
.stage-hint {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px;
  font-size: .72rem; color: var(--ivory-faint); background: rgba(6,26,21,.62);
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-soft);
  pointer-events: none; white-space: nowrap;
}
.stage-badge {
  position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 999px;
  font-size: .7rem; border: 1px solid var(--line); background: rgba(6,26,21,.6); color: var(--gold);
  pointer-events: none;
}
.stage-tools {
  position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 8px;
}
.stage-tools .btn { background: rgba(6,26,21,.82); border: 1px solid var(--line-soft); }
.selection-toolbar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 58px; z-index: 9;
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 999px; background: rgba(6,26,21,.93); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(10px); max-width: calc(100% - 20px);
}
.selection-toolbar .btn-icon { width: 36px; height: 36px; }
.selection-toolbar .sep { width: 1px; height: 22px; background: var(--line-soft); margin: 0 3px; }
.lock-note { position: absolute; left: 50%; transform: translateX(-50%); top: 62px; z-index: 9; font-size: .74rem; background: rgba(168,50,62,.9); padding: 6px 14px; border-radius: 999px; }

.prop-row { margin-bottom: 15px; }
.prop-row .label { margin-bottom: 7px; display: block; }
.color-row { display: flex; gap: 7px; flex-wrap: wrap; }
.color-dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.color-dot.active { border-color: var(--ivory); transform: scale(1.12); }
.range { width: 100%; accent-color: var(--gold); }
.range-val { float: right; color: var(--gold); font-size: .76rem; }
.mini-stat { display: flex; justify-content: space-between; font-size: .78rem; color: var(--ivory-dim); padding: 6px 0; border-bottom: 1px solid var(--line-soft); }

.mobile-tabs { display: none; }
.mobile-drawer { display: none; }

/* ---------- wishes / members / share panels (inside editor) ---------- */
.editor-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.editor-body { display: grid; grid-template-columns: 268px minmax(0, 1fr) 282px; min-height: 0; flex: 1; }
.side-view { padding: 18px 16px 40px; overflow-y: auto; min-height: 0; }
.wish-card {
  padding: 15px 16px 13px; border-radius: 12px; margin-bottom: 11px;
  background: #f3ead6; color: #3b3226; position: relative;
  box-shadow: 0 6px 18px rgba(0,0,0,.2); transform: rotate(-.5deg);
}
.wish-card:nth-child(even) { transform: rotate(.6deg); background: #efe2c8; }
.wish-card.frost { background: #e4eef1; }
.wish-card.berry { background: #f2e0df; }
.wish-card .txt { font-family: var(--serif); font-size: .98rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.wish-card .by { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: .68rem; color: #7a6a54; }
.wish-card .del { color: #a8323e; font-size: .7rem; }
.emoji-row { display: flex; gap: 5px; flex-wrap: wrap; }
.emoji-btn { width: 32px; height: 32px; border-radius: 9px; font-size: 1.05rem; border: 1px solid var(--line-soft); }
.emoji-btn.active { border-color: var(--gold); background: rgba(219,185,121,.16); }
.paper-row { display: flex; gap: 8px; }
.paper-btn { flex: 1; height: 38px; border-radius: 9px; border: 1px solid var(--line-soft); font-size: .7rem; }
.paper-btn.active { border-color: var(--gold); color: var(--gold); }

.qr-box { background: #f7f1e6; border-radius: 14px; padding: 12px; display: grid; place-items: center; }
.qr-box canvas { width: 100%; max-width: 186px; height: auto; image-rendering: pixelated; }
.share-preview { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-soft); }
.share-preview canvas { width: 100%; }
.link-row { display: flex; gap: 8px; align-items: center; }

/* ---------- showcase ---------- */
.show-shell { width: min(1080px, 100%); margin: 0 auto; padding: 0 22px 90px; }
.show-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 40px; align-items: start; }
.show-visual { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.show-visual canvas { width: 100%; aspect-ratio: 4 / 5; }
.show-title { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.12; margin: 12px 0 14px; }
.like-btn.active { background: var(--cranberry); color: #fff; border-color: var(--cranberry); }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: .86rem; }
.comment b { color: var(--gold); font-weight: 600; }

/* ---------- overlays ---------- */
.toast-root { position: fixed; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast {
  background: rgba(12, 42, 33, .96); border: 1px solid var(--line); color: var(--ivory);
  padding: 11px 18px; border-radius: 999px; font-size: .84rem; box-shadow: var(--shadow);
  animation: toast-in .25s ease both; text-align: center;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px;
  background: rgba(3, 14, 11, .78); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px);
  animation: fade-in .2s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(460px, 100%); max-height: 88dvh; overflow-y: auto; padding: 28px; border-radius: var(--r-lg); background: linear-gradient(160deg, #14382c, #0a241d); border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal h3 { font-size: 1.5rem; margin-bottom: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  background: linear-gradient(180deg, #12362a, #082019); border-top: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 10px 18px calc(20px + var(--safe-b));
  box-shadow: 0 -18px 60px rgba(0,0,0,.5); animation: sheet-up .25s cubic-bezier(.2,.8,.2,1) both;
  max-height: 78dvh; overflow-y: auto;
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 16px; }
.sheet-title { font-family: var(--serif); font-size: 1.28rem; margin-bottom: 4px; }
.share-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 8px; }
.share-option { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .7rem; color: var(--ivory-dim); }
.share-option .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.3rem; border: 1px solid var(--line-soft); background: rgba(247,241,230,.06); }
.share-option:hover .ic { border-color: var(--gold); }

/* ---------- celebration ---------- */
.celebration { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: #04120e; overflow: hidden; }
.celebration canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.celebration .cele-content { position: relative; z-index: 2; text-align: center; padding: 22px; width: min(560px, 100%); }
.count-num { font-family: var(--serif); font-size: clamp(5rem, 18vw, 9rem); color: var(--gold-bright); line-height: 1; text-shadow: 0 0 60px rgba(219,185,121,.5); }
.cele-title { font-family: var(--serif); font-size: clamp(2rem, 7vw, 3.2rem); color: var(--ivory); margin: 10px 0; }
.cele-faces { display: flex; justify-content: center; margin: 22px 0; }
.cele-wish { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--gold-bright); max-width: 420px; margin: 0 auto 6px; }
.cele-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.cele-skip { position: absolute; right: 20px; top: calc(20px + env(safe-area-inset-top, 0px)); z-index: 3; }
.progress-dots { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.progress-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.progress-dots i.on { background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* ---------- misc ---------- */
.noscript { padding: 40px; text-align: center; }
.divider { height: 1px; background: var(--line-soft); margin: 20px 0; }
.tag-list { display: flex; gap: 7px; flex-wrap: wrap; }
.hidden { display: none !important; }
.fade-up { animation: fade-up .45s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.pop { animation: pop .35s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes pop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
.skeleton { background: linear-gradient(90deg, rgba(247,241,230,.05), rgba(247,241,230,.12), rgba(247,241,230,.05)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .editor, .editor-body { grid-template-columns: 226px minmax(0, 1fr) 240px; }
  .hero-grid { gap: 26px; }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .editor { display: flex; flex-direction: column; height: 100dvh; padding-bottom: calc(var(--tabbar-h) + var(--safe-b)); }
  .editor-top { flex: none; height: 56px; padding: 0 12px; }
  .editor-top .room-name { max-width: 40vw; font-size: 1rem; }
  .editor-top .hide-sm, .sync-pill .txt { display: none; }
  .editor-body { display: block; flex: 1; min-height: 0; }
  .panel { display: none; }
  .stage { height: 100%; }
  .stage-hint { bottom: 12px; font-size: .66rem; }
  .selection-toolbar { bottom: 14px; }
  .mobile-tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(6, 26, 21, .97); border-top: 1px solid var(--line-soft);
    backdrop-filter: blur(14px);
  }
  .mobile-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .62rem; color: var(--ivory-faint); }
  .mobile-tabs button .ti { font-size: 1.16rem; line-height: 1; }
  .mobile-tabs button.active { color: var(--gold); }
  .mobile-drawer { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 5 / 4; max-height: 400px; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .lobby-grid, .show-grid { grid-template-columns: 1fr; }
  .lobby-preview { aspect-ratio: 5 / 4; }
  .show-visual { max-width: 460px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .shell { padding: 0 18px; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .hero-actions .btn { flex: 1; min-width: 140px; }
  .section { padding: 42px 0; }
  .how-grid, .style-grid, .showcase-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .style-card .info { padding: 13px 12px 15px; }
  .style-card .info h3 { font-size: 1.02rem; }
  .style-card .info p { font-size: .72rem; min-height: 0; }
  .card-pad { padding: 20px; }
  .share-options { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .share-option .ic { width: 46px; height: 46px; }
  .stat-row { gap: 18px; }
  .topbar { padding: 14px 0; }
  .brand-text { font-size: .95rem; }
  .editor-top-actions .btn-ghost span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
