:root {
  --bg: #fff4f6;
  --canvas: #f5f5f5;
  --paper: #ffffff;
  --ink: rgba(0, 0, 0, 0.82);
  --ink2: rgba(0, 0, 0, 0.55);
  --ink3: rgba(0, 0, 0, 0.38);
  --line: rgba(48, 48, 52, 0.08);
  --line2: rgba(48, 48, 52, 0.05);
  --brand: #ff2442;
  --brand-hot: #ff2e4d;
  --brand-deep: #e6203a;
  --brand-soft: #ffe4ea;
  --ok: #02b940;
  --warn: #ff7d03;
  --glass: rgba(255, 255, 255, 0.38);
  --glass-strong: rgba(255, 255, 255, 0.66);
  --shadow: 0 10px 28px rgba(255, 36, 66, 0.08);
  --radius: 16px;
  --radius-lg: 22px;
  --pill: 999px;
  --safe: env(safe-area-inset-bottom, 0px);
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "SF Pro Text", system-ui, sans-serif;
}

* { margin: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}
body.has-dock { padding-bottom: calc(72px + var(--safe)); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
.wrap { width: min(980px, 100%); margin: 0 auto; padding: 0 16px; }

.ambient { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.85;
}
.blob.a { width: 420px; height: 420px; top: -100px; left: -80px; background: #ffc2d4; }
.blob.b { width: 360px; height: 360px; top: 8%; right: -100px; background: #ffd9a8; }
.blob.c { width: 280px; height: 280px; bottom: 16%; left: 12%; background: rgba(255, 36, 66, 0.18); }

.chrome, .dock {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.55);
  -webkit-backdrop-filter: blur(22px) saturate(1.55);
  border-color: rgba(255, 255, 255, 0.7);
}
.chrome {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
}
.chrome.on {
  background: var(--glass-strong);
  box-shadow: 0 8px 24px rgba(255, 36, 66, 0.06);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(160deg, #ff5d7a, var(--brand));
  box-shadow: 0 8px 16px rgba(255, 36, 66, 0.28);
}
.brand > div { display: flex; flex-direction: column; justify-content: center; }
.eyebrow { font-size: 11px; color: var(--brand); line-height: 1.1; }
.brand strong { display: block; font-size: 17px; letter-spacing: -0.03em; font-weight: 650; line-height: 1.15; }

.who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--pill);
  height: 36px;
  padding: 0 12px 0 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  flex: none;
}
.who:not(:has(.av)) { padding: 0 14px; }

.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + var(--safe));
  z-index: 30;
  display: flex;
  justify-content: space-around;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(42, 20, 24, 0.1);
}
.dock[hidden] { display: none; }
.dock a {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--ink3);
  padding: 6px 0 4px;
  border-radius: 16px;
}
.dock a i {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto 5px;
  border-radius: 50%;
  background: rgba(48, 48, 52, 0.18);
}
.dock a.on { color: var(--brand); font-weight: 600; }
.dock a.on i { background: var(--brand); box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.16); }

#app { position: relative; z-index: 1; padding-bottom: 28px; }

.page { padding: 18px 0 20px; }
.h2 { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; }
.lede { color: var(--ink2); font-size: 14px; margin: 6px 0 16px; }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.meta { color: var(--ink3); font-size: 12px; }
.note { color: var(--ink3); font-size: 12.5px; line-height: 1.6; margin-top: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--pill);
  background: #2a2224;
  color: #fff;
  cursor: pointer;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.accent {
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(255, 36, 66, 0.28);
}
.btn.accent:hover { background: var(--brand-hot); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.85);
}
.btn.warn { background: var(--brand-soft); color: var(--brand); }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }

.sheet, .hero-glass, .keybox {
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
}
.sheet { padding: 18px; }
.hero-glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.7);
  -webkit-backdrop-filter: blur(28px) saturate(1.7);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.hero { padding: 22px 0 4px; }
.hero h1 {
  font-size: clamp(26px, 6.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 10px 0 0;
}
.hero-cta { padding: 8px 0 20px; }
.hero-cta .stats { justify-content: flex-start; }
.kicker { font-size: 12px; color: var(--brand); font-weight: 600; }
.stats { display: flex; gap: 22px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; letter-spacing: -0.03em; }
.stat span { font-size: 12px; color: var(--ink3); }

.waterfall {
  columns: 2;
  column-gap: 10px;
}
@media (min-width: 820px) { .waterfall { columns: 3; } }
.note-card {
  display: block;
  break-inside: avoid;
  margin-bottom: 10px;
  background: var(--paper);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
  transition: transform 0.18s var(--ease, cubic-bezier(0.2, 0, 0, 1));
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); }
.cover {
  min-height: 118px;
  padding: 12px 12px 14px;
  color: #3a2a2e;
  position: relative;
}
.cover .tag {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cover-title { font-size: 16px; font-weight: 650; letter-spacing: -0.02em; margin-top: 18px; line-height: 1.35; }
.mini { margin-top: 10px; }
.mini .rowbar { height: 4px; background: rgba(255, 255, 255, 0.45); border-radius: 4px; overflow: hidden; margin-top: 5px; }
.mini .rowbar i { display: block; height: 100%; background: var(--brand); }
.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
}
.note-foot .who-line { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--ink2); }
.note-foot .who-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heart { font-size: 12px; color: var(--ink3); }
.heart b { color: var(--brand); font-weight: 650; }

.cover.k-facility { background: linear-gradient(160deg, #ffd6de, #ffc4b8 58%, #ffe8d6); }
.cover.k-convention { background: linear-gradient(160deg, #ffe8d0, #ffd4c8); }
.cover.k-vote { background: linear-gradient(160deg, #ffd0dc, #ffc8e8); }
.cover.k-meeting { background: linear-gradient(160deg, #f0e4dc, #ffd8d0); }
.cover.k-hangout { background: linear-gradient(165deg, #3a2438 0%, #8a4458 42%, #ff9aa8 100%); color: #fff; }
.cover.k-hangout .tag { color: #3a2a2e; }
.cover.k-other { background: linear-gradient(160deg, #f0e8e8, #ffdce2); }

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--pill);
  background: var(--brand-soft);
  color: var(--brand);
  margin-right: 4px;
  font-weight: 600;
}
.tag.mute { background: rgba(48, 48, 52, 0.06); color: var(--ink3); }
.tag.warn { background: #ffe8d6; color: #c45a00; }
.tag.ok { background: #e4f8ea; color: #148a38; }

.flt { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.flt::-webkit-scrollbar { display: none; }
.flt a {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink2);
  font-size: 13px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.flt a.on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 6px 14px rgba(255, 36, 66, 0.22);
}

.av {
  --h: 350;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: hsl(var(--h) 72% 90%);
  color: hsl(var(--h) 42% 36%);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}
.av.sm { width: 26px; height: 26px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }
.av.lead { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.faces { display: flex; }
.faces .av { margin-left: -6px; border: 2px solid #fff; }
.faces .av:first-child { margin-left: 0; }

.dormbar {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px 18px 18px;
  margin-bottom: 16px;
  color: #3a2a2e;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #ffd0dc, #ffc2b0 50%, #ffe6c8);
  box-shadow: var(--shadow);
}
.dormbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(255, 255, 255, 0.35));
  pointer-events: none;
}
.dormbar > * { position: relative; z-index: 1; }
.dormbar h2 { font-size: 24px; letter-spacing: -0.03em; }
.members { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

.f { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f .full, .f.full { grid-column: 1 / 3; }
.f label { display: block; color: var(--ink3); font-size: 12px; margin-bottom: 6px; }
.f input, .f select, .f textarea {
  width: 100%;
  background: rgba(255, 247, 249, 0.9);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
}
.f textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 45%, white);
  box-shadow: 0 0 0 3px rgba(255, 36, 66, 0.12);
}
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); margin-top: 10px; }
.check input { width: auto; accent-color: var(--brand); }

.opt {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 8px;
  cursor: pointer;
}
.opt:hover { border-color: rgba(255, 36, 66, 0.28); }
.opt.mine { border-color: var(--brand); background: #fff5f7; }
.opt .n { float: right; color: var(--ink3); font-size: 13px; }
.pollbar { height: 6px; background: rgba(48, 48, 52, 0.06); border-radius: 6px; overflow: hidden; margin: 10px 0 2px; }
.pollbar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6b82, var(--brand)); border-radius: 6px; }
.named { color: var(--ink2); font-size: 13px; margin-top: 12px; }

.comment {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line2);
  font-size: 14px;
}
.comment .who { color: var(--ink3); font-size: 12px; margin-bottom: 2px; }

.tpl {
  border: 0;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
  width: 100%;
  text-align: left;
  box-shadow: var(--shadow);
}
.tpl .cover { min-height: 88px; }
.tpl span { display: block; padding: 10px 12px 12px; color: var(--ink3); font-size: 12.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.keybox {
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.75)),
    linear-gradient(135deg, #fff3d6, #ffe4ea);
}
.keybox .lb { font-size: 11px; letter-spacing: 0.12em; color: #b06070; font-weight: 650; }
.keybox .v {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 22px;
  letter-spacing: 0.06em;
  margin: 8px 0 6px;
  user-select: all;
  word-break: break-all;
}
.keybox .w { color: var(--ink2); font-size: 13px; }

.msg { padding: 12px 14px; border-radius: 14px; margin-top: 12px; font-size: 14px; }
.msg.ok { background: #e4f8ea; color: #148a38; }
.msg.err { background: var(--brand-soft); color: var(--brand-deep); }

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--ink2);
}
.empty-art {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 30% 30%, #fff, transparent 40%),
    linear-gradient(160deg, #ffd0dc, #ffc4b0);
  box-shadow: var(--shadow);
}
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(86px + var(--safe));
  z-index: 28;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 28px;
  font-weight: 400;
  box-shadow: 0 12px 24px rgba(255, 36, 66, 0.32);
}
body:not(.has-dock) .fab { bottom: 24px; }

.detail-cover {
  border-radius: var(--radius-lg);
  padding: 22px 18px 20px;
  margin-bottom: 12px;
  min-height: 160px;
}
.rsvp-stats { display: flex; gap: 10px; margin-top: 16px; }
.rsvp-stats .stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 10px 8px;
  text-align: center;
}

@media (max-width: 640px) {
  .f, .grid2 { grid-template-columns: 1fr; }
  .f .full, .f.full { grid-column: 1; }
  .hero { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .note-card, .btn, .fab, .demo .pollbar i { transition: none; }
}

.demo { padding: 8px 0 10px; }
.demo-head { max-width: 520px; margin-bottom: 16px; }
.demo-head .lede { margin-bottom: 0; }
.demo-stage {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  grid-template-areas: "phone side";
  gap: 28px 36px;
  align-items: center;
}
.phone { grid-area: phone; }
.demo-side { grid-area: side; }
.phone {
  width: 280px;
  justify-self: center;
  filter: drop-shadow(0 18px 36px rgba(42, 20, 24, 0.16));
}
.phone-bezel {
  position: relative;
  height: 560px;
  border-radius: 36px;
  padding: 10px;
  background: #2a2224;
  overflow: hidden;
}
.demo-screen {
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg);
  opacity: 0;
  transform: translateX(16px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.demo-screen.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  z-index: 1;
}
.phone-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 650;
}
.phone-bar.hang { background: rgba(42, 20, 24, 0.28); color: #fff; }
.phone-bar i {
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: linear-gradient(160deg, #ff5d7a, var(--brand));
}
.phone-bar em {
  margin-left: auto;
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: var(--pill);
  padding: 2px 7px;
}
.phone-bar.hang em { background: rgba(255, 255, 255, 0.18); color: #fff; }
.phone-scroll {
  height: calc(100% - 38px);
  overflow: hidden;
  padding: 0 0 8px;
}
.phone-scroll.has-dock { padding-bottom: 64px; }
.demo-cover { min-height: 0; padding: 14px 12px 16px; border-radius: 0; }
.demo-cover .cover-title { font-size: 20px; margin-top: 10px; }
.demo-pad { padding: 4px 12px 12px; }
.demo .pollbar i {
  width: 0;
  transition: width 0.8s ease;
}
.demo-screen.on .pollbar i { width: var(--w, 0); }
.demo-dorm { margin: 10px 10px 0; padding: 14px 12px 12px; }
.demo-dorm h2 { font-size: 18px; }
.demo .flt { padding: 10px 10px 8px; }
.demo .flt a,
.demo-dock a { pointer-events: none; }
.demo .note-card { margin: 0 10px 8px; pointer-events: none; }
.demo-dock {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 4px;
}
.demo-fab {
  position: absolute;
  right: 18px;
  bottom: 68px;
  width: 44px;
  height: 44px;
  font-size: 24px;
}
.demo-side { min-width: 0; }
.demo-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.demo-tabs button {
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--pill);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.demo-tabs button.on {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.demo-cap {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 14px;
  min-height: 48px;
}
.demo-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.demo-steps li {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  color: var(--ink2);
  font-size: 13.5px;
}
.demo-steps b {
  display: inline-block;
  min-width: 2.5em;
  margin-right: 8px;
  color: var(--ink);
}

@media (max-width: 720px) {
  .demo-stage {
    grid-template-columns: 1fr;
    grid-template-areas: "side" "phone";
    gap: 14px;
  }
  .phone { width: min(260px, 100%); }
  .phone-bezel { height: 420px; }
  .demo-cap { min-height: 0; margin-bottom: 0; }
  .demo-steps { display: none; }
  .hero { padding-top: 12px; }
  .hero h1 { font-size: 24px; }
}
