:root {
  --bg: #f4efe5;
  --bg-deep: #ebe3d4;
  --card: #fffdf8;
  --card-2: #faf6ed;
  --ink: #20242a;
  --ink-2: #343a42;
  --muted: #82796a;
  --muted-2: #a49a8a;
  --line: rgba(32, 36, 42, 0.1);
  --line-strong: rgba(32, 36, 42, 0.16);
  --coral: #e9604b;
  --coral-deep: #c84936;
  --coral-soft: #fbe2da;
  --teal: #258776;
  --teal-deep: #1c6b5e;
  --teal-soft: #dcefe8;
  --yellow: #eeb44a;
  --yellow-soft: #faeccd;
  --mint: #dcece1;
  --dark: #20242a;
  --dark-2: #2c323a;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 44px rgba(63, 52, 36, 0.09);
  --shadow-soft: 0 8px 24px rgba(63, 52, 36, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Noto Serif SC", "Songti SC", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
em { font-style: normal; }
::selection { background: var(--coral-soft); }

.ambient {
  position: fixed;
  z-index: -2;
  width: 52vw;
  height: 52vw;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  opacity: 0.8;
}
.ambient-a {
  top: -26vw;
  left: -22vw;
  background: radial-gradient(circle at 60% 60%, rgba(249, 214, 197, 0.9), rgba(249, 214, 197, 0) 68%);
}
.ambient-b {
  top: 18vh;
  right: -30vw;
  background: radial-gradient(circle at 40% 40%, rgba(206, 232, 220, 0.9), rgba(206, 232, 220, 0) 68%);
}

/* ── shell / topbar ─────────────────────────────────────── */
.shell {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 18px calc(112px + var(--safe-b));
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 74px;
  margin: 0 -4px;
  padding: 6px 4px;
  background: linear-gradient(to bottom, rgba(244, 239, 229, 0.96) 62%, rgba(244, 239, 229, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 4px;
  border-radius: 14px;
  text-align: left;
}
.brand:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.brand-mark {
  position: relative;
  width: 35px;
  height: 35px;
  display: inline-block;
  flex: none;
}
.brand-mark i {
  position: absolute;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.8px solid var(--ink);
}
.brand-mark i:first-child { left: 0; background: rgba(233, 96, 75, 0.16); }
.brand-mark i:last-child { right: 0; background: rgba(37, 135, 118, 0.14); }
.brand-mark::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 16px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 19px; letter-spacing: 0.14em; font-weight: 800; }
.brand-text small { margin-top: 4px; color: var(--muted); font-size: 9px; letter-spacing: 0.22em; }
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.sync-pill:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-2);
  box-shadow: 0 0 0 3px rgba(130, 121, 106, 0.1);
}
.sync-pill[data-state="online"] .sync-dot { background: var(--teal); box-shadow: 0 0 0 3px rgba(37, 135, 118, 0.13); }
.sync-pill[data-state="syncing"] .sync-dot { background: var(--yellow); animation: blink 1s infinite; }
.sync-pill[data-state="offline"] .sync-dot { background: var(--coral); box-shadow: 0 0 0 3px rgba(233, 96, 75, 0.13); }
@keyframes blink { 50% { opacity: 0.25; } }

.view { outline: none; animation: page-in 0.32s var(--ease) both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ── shared bits ────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 2px 15px;
}
.page-title {
  margin-top: 3px;
  font-size: clamp(27px, 7vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.page-title em { color: var(--muted); font-weight: 500; font-size: 0.58em; letter-spacing: 0.02em; margin-left: 6px; }
.week-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.6);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.week-chip b { color: var(--ink); font-weight: 800; }
.section { margin-top: 30px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
  padding: 0 2px;
}
.section-head h2 {
  margin-top: 3px;
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.section-head .count {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.section-note {
  margin: -3px 2px 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.text-btn {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(130, 121, 106, 0.35);
  text-underline-offset: 4px;
}
.text-btn:hover { color: var(--ink); }
.text-btn:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 19px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.btn[disabled] { transform: none; }
.btn-ink { background: var(--ink); color: #fffdf8; box-shadow: 0 8px 18px rgba(32, 36, 42, 0.16); }
.btn-ink:hover { background: #000; }
.btn-coral { background: var(--coral); color: #fff; box-shadow: 0 10px 22px rgba(233, 96, 75, 0.28); }
.btn-coral:hover { background: var(--coral-deep); }
.btn-line { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.btn-line:hover { background: rgba(32, 36, 42, 0.04); }
.btn-soft { background: var(--card-2); color: var(--ink); border-color: var(--line); }
.btn-full { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 12px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  flex: none;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.icon { width: 20px; height: 20px; display: inline-block; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--line);
  font-size: 18px;
  line-height: 1;
  flex: none;
  user-select: none;
}
.avatar.a { background: var(--coral-soft); border-color: rgba(233, 96, 75, 0.22); }
.avatar.b { background: var(--teal-soft); border-color: rgba(37, 135, 118, 0.2); }
.avatar.lg { width: 46px; height: 46px; font-size: 23px; }
.avatar.xl { width: 60px; height: 60px; font-size: 30px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.pill.live { background: var(--teal-soft); color: var(--teal-deep); }
.pill.now { background: var(--coral-soft); color: var(--coral-deep); }
.pill.pending { background: var(--yellow-soft); color: #916112; }
.pill.ok { background: var(--teal-soft); color: var(--teal-deep); }
.pill.gray { background: rgba(32, 36, 42, 0.06); color: var(--muted); }
.pill.glass { background: rgba(255, 255, 255, 0.1); color: rgba(255, 253, 248, 0.72); }
.dot-sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.4; display: inline-block; vertical-align: middle; margin: 0 6px; }

/* ── hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 21px 20px 17px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(37, 135, 118, 0.34), transparent 52%),
    radial-gradient(90% 80% at 0% 100%, rgba(233, 96, 75, 0.25), transparent 58%),
    var(--dark);
  color: #fffdf8;
  box-shadow: 0 24px 50px rgba(32, 36, 42, 0.18);
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.4;
  background-image: radial-gradient(rgba(255, 253, 248, 0.16) 0.7px, transparent 0.7px);
  background-size: 9px 9px;
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
}
.hero-orbit {
  position: absolute;
  right: -34px;
  top: -54px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 1px solid rgba(255, 253, 248, 0.14);
  z-index: -1;
}
.hero-orbit::before, .hero-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 253, 248, 0.1);
}
.hero-orbit::before { inset: 25px; }
.hero-orbit::after { inset: 58px; background: rgba(255, 253, 248, 0.05); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 253, 248, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.hero-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 12px rgba(238, 180, 74, 0.8); }
.hero-spark { color: var(--yellow); font-size: 18px; line-height: 1; }
.hero-title {
  margin: 15px 0 8px;
  max-width: 360px;
  font-size: clamp(29px, 8.4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.045em;
  font-weight: 800;
}
.hero-title em { color: var(--yellow); }
.hero-sub {
  max-width: 320px;
  color: rgba(255, 253, 248, 0.62);
  font-size: 13px;
  line-height: 1.7;
}
.hero-sub b { color: #fffdf8; font-weight: 700; }
.hero-window {
  display: flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 13px;
  border: 1px solid rgba(255, 253, 248, 0.14);
  background: rgba(255, 253, 248, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}
.hero-window .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal-soft); box-shadow: 0 0 0 4px rgba(220, 239, 232, 0.1); }
.hero-window strong { font-weight: 800; letter-spacing: 0.02em; }
.hero-window i { color: rgba(255, 253, 248, 0.4); font-style: normal; }
.hero-window .now-tag { margin-left: 2px; border-radius: 999px; background: var(--yellow); color: #3d2a08; padding: 2px 7px; font-size: 9px; font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hero .btn-coral { color: #2a130f; background: var(--yellow); box-shadow: 0 10px 24px rgba(238, 180, 74, 0.24); }
.hero .btn-coral:hover { background: #f6c464; }
.hero .btn-ghost { border-color: rgba(255, 253, 248, 0.2); background: transparent; color: rgba(255, 253, 248, 0.82); }
.hero .btn-ghost:hover { background: rgba(255, 253, 248, 0.08); }
.hero-people {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 253, 248, 0.1);
}
.avatar-stack { display: flex; padding-left: 2px; }
.avatar-stack .avatar { width: 29px; height: 29px; font-size: 14px; border: 2px solid var(--dark); margin-left: -8px; background: var(--card); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.hero-people p { color: rgba(255, 253, 248, 0.6); font-size: 11px; line-height: 1.5; }
.hero-people p b { color: rgba(255, 253, 248, 0.9); font-weight: 600; }
.hero.is-live { background: radial-gradient(120% 90% at 100% 0%, rgba(37, 135, 118, 0.5), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(233, 96, 75, 0.3), transparent 58%), var(--dark); }
.live-ring {
  position: absolute;
  right: 22px;
  bottom: 24px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid rgba(220, 239, 232, 0.35);
  display: grid;
  place-items: center;
  color: var(--teal-soft);
  font-size: 22px;
}
.live-ring::before, .live-ring::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(220, 239, 232, 0.18);
  animation: ring 2.4s ease-out infinite;
}
.live-ring::after { animation-delay: 1.2s; }
@keyframes ring { 0% { transform: scale(0.8); opacity: 0.8; } 100% { transform: scale(1.45); opacity: 0; } }

/* ── plan banner ────────────────────────────────────────── */
.plan-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(238, 180, 74, 0.28);
  background: linear-gradient(100deg, #fff8e8, #fffdf8);
  border-radius: var(--radius-lg);
  padding: 13px 14px;
  box-shadow: var(--shadow-soft);
}
.plan-banner .pb-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--yellow-soft);
  color: #8a5a0d;
  font-size: 17px;
  flex: none;
}
.plan-banner .pb-main { min-width: 0; flex: 1; }
.plan-banner strong { display: block; font-size: 12px; font-weight: 800; line-height: 1.4; }
.plan-banner small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.plan-banner .mini-btn {
  flex: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 11px;
  font-weight: 700;
}

/* ── person status ──────────────────────────────────────── */
.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 0;
}
.person-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.82);
  padding: 15px 14px 13px;
  box-shadow: var(--shadow-soft);
}
.person-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent, var(--line));
  opacity: 0.7;
}
.person-card.a { --accent: var(--coral); }
.person-card.b { --accent: var(--teal); }
.person-card.is-live { background: linear-gradient(150deg, #fffdf8, var(--card-2)); }
.person-card.is-live::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
}
.pc-top { display: flex; align-items: center; gap: 9px; }
.pc-name { min-width: 0; font-size: 13px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  margin-left: auto;
  box-shadow: 0 0 0 4px rgba(37, 135, 118, 0.1);
  animation: blink 1.6s infinite;
}
.pc-state { margin-top: 11px; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.pc-detail { min-height: 17px; margin-top: 3px; color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}
.pc-foot b { color: var(--ink); font-weight: 700; }
.pc-foot .dot-sep { margin: 0 1px; }
.timer-text { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; color: var(--teal-deep); font-weight: 700; }

/* ── slots ──────────────────────────────────────────────── */
.slot-list { display: grid; gap: 8px; }
.slot-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 12px 13px;
  box-shadow: 0 4px 14px rgba(63, 52, 36, 0.035);
  transition: border-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
}
.slot-card:hover { border-color: rgba(233, 96, 75, 0.28); transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.slot-card.is-now { background: linear-gradient(105deg, #fffdf8 40%, #fff6e2); border-color: rgba(238, 180, 74, 0.3); }
.slot-card.is-past { opacity: 0.55; }
.slot-time { min-width: 84px; font-variant-numeric: tabular-nums; }
.slot-time strong { display: block; font-size: 17px; letter-spacing: -0.02em; font-weight: 800; }
.slot-time span { display: block; color: var(--muted); font-size: 10px; }
.slot-mid { flex: 1; min-width: 0; border-left: 1px solid var(--line); padding-left: 13px; }
.slot-label { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: var(--teal-deep); }
.slot-label::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); }
.slot-mid small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.slot-btn {
  flex: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 700;
  transition: background 0.16s, color 0.16s, border-color 0.16s;
}
.slot-btn:hover { background: var(--ink); border-color: var(--ink); color: #fffdf8; }
.slot-card.is-now .slot-btn { background: var(--ink); border-color: var(--ink); color: #fffdf8; }
.slot-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 253, 248, 0.45);
}
.slot-empty span { font-size: 20px; }

/* ── logs ───────────────────────────────────────────────── */
.log-list { display: grid; gap: 8px; }
.log-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 12px 13px;
}
.log-item.is-live { border-color: rgba(37, 135, 118, 0.28); background: linear-gradient(110deg, #fffdf8, #f1faf6); }
.log-avatar { width: 32px; height: 32px; font-size: 15px; }
.log-main { flex: 1; min-width: 0; }
.log-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.log-title strong { font-size: 12.5px; font-weight: 800; }
.log-time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.log-meta { margin-top: 2px; color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-note { margin-top: 6px; color: var(--ink-2); font-size: 11.5px; line-height: 1.55; }
.log-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.log-min { color: var(--ink); font-family: var(--font-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.log-min small { color: var(--muted); font-family: var(--font); font-size: 9px; font-weight: 500; margin-left: 1px; }
.log-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 11px;
  flex: none;
}
.log-check.a { background: var(--coral-soft); color: var(--coral-deep); }
.log-actions { display: flex; gap: 6px; margin-top: 8px; }
.log-actions .mini-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 10px; font-size: 10px; font-weight: 700; }
.log-actions .mini-btn.solid { background: var(--teal); border-color: var(--teal); color: #fff; }

.empty {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.48);
  padding: 28px 20px;
}
.empty-emoji { font-size: 27px; margin-bottom: 8px; filter: saturate(0.8); }
.empty strong { font-size: 13px; font-weight: 800; }
.empty p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.empty .btn { margin-top: 13px; }

.quote {
  margin: 32px 2px 4px;
  text-align: center;
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.03em;
}
.quote::before { content: "“"; margin-right: 2px; color: var(--coral); }
.quote::after { content: "”"; margin-left: 2px; color: var(--coral); }

/* ── week ───────────────────────────────────────────────── */
.week-switcher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 9px 10px;
  box-shadow: var(--shadow-soft);
}
.week-switcher .ws-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--card-2);
  color: var(--ink);
}
.week-switcher .ws-btn:hover { background: var(--bg-deep); }
.week-switcher .ws-mid { text-align: center; line-height: 1.3; }
.week-switcher .ws-mid strong { display: block; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.week-switcher .ws-mid span { color: var(--muted); font-size: 10px; }
.week-switcher .ws-today { border: 0; background: none; color: var(--coral-deep); font-size: 10px; font-weight: 700; padding: 6px; }
.goal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.goal-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 13px;
  box-shadow: var(--shadow-soft);
}
.goal-ring {
  --p: 0;
  --c: var(--coral);
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(32, 36, 42, 0.07) 0);
}
.goal-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card); }
.goal-ring span { position: relative; font-size: 10px; font-weight: 800; font-variant-numeric: tabular-nums; }
.goal-info { min-width: 0; }
.goal-info .gi-name { color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-info strong { display: block; margin-top: 1px; font-family: var(--font-display); font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.goal-info strong small { color: var(--muted); font-family: var(--font); font-size: 9px; font-weight: 400; }
.goal-info .gi-sub { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; white-space: nowrap; }

.chart-card {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 16px 14px 10px;
  box-shadow: var(--shadow-soft);
}
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.chart-head strong { font-size: 12px; font-weight: 800; }
.chart-legend { display: flex; gap: 11px; color: var(--muted); font-size: 9px; }
.chart-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 2px; margin-right: 4px; vertical-align: 1px; }
.chart-legend i.a { background: var(--coral); }
.chart-legend i.b { background: var(--teal); }
.chart {
  display: flex;
  gap: 9px;
  height: 132px;
}
.chart-y {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  padding-bottom: 20px;
  color: var(--muted-2);
  font-size: 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-bars { display: flex; flex: 1; align-items: stretch; gap: 2px; min-width: 0; }
.chart-day { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.chart-pair { display: flex; flex: 1; align-items: flex-end; justify-content: center; gap: 3px; padding: 0 2px; }
.chart-bar { width: 8px; max-width: 30%; min-height: 3px; border-radius: 4px 4px 2px 2px; transition: height 0.4s var(--ease); }
.chart-bar.a { background: var(--coral); opacity: 0.9; }
.chart-bar.b { background: var(--teal); opacity: 0.9; }
.chart-day.is-today .chart-bar { box-shadow: 0 0 0 2px rgba(238, 180, 74, 0.28); }
.chart-day span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; text-align: center; }
.chart-day.is-today span { color: var(--ink); font-weight: 800; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid rgba(238, 180, 74, 0.24);
  background: #fff9ec;
  border-radius: var(--radius-md);
  padding: 11px 12px;
  color: #72531c;
  font-size: 10.5px;
  line-height: 1.6;
}
.notice .n-icon { font-size: 14px; line-height: 1.3; flex: none; }

.week-days { display: grid; gap: 6px; }
.day-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 10px 11px;
}
.day-row.is-today { border-color: rgba(233, 96, 75, 0.22); background: linear-gradient(100deg, #fffdf8, #fff7f4); }
.day-row.is-past { opacity: 0.62; }
.day-label { width: 42px; flex: none; padding-top: 2px; }
.day-label strong { display: block; font-size: 11px; font-weight: 800; }
.day-label span { display: block; color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; }
.day-slots { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }
.time-chip {
  border: 1px solid rgba(37, 135, 118, 0.18);
  background: #f1faf6;
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background 0.15s, color 0.15s;
}
.time-chip:hover { background: var(--teal); color: #fff; }
.day-sum { color: var(--muted-2); font-size: 9.5px; padding: 5px 0; }

.schedule-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}
.schedule-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 800;
}
.schedule-card summary::-webkit-details-marker { display: none; }
.schedule-card summary .sum-right { color: var(--muted); font-size: 9px; font-weight: 500; }
.schedule-card[open] summary { border-bottom: 1px solid var(--line); }
.schedule-body { padding: 12px 14px 15px; }
.schedule-person { margin-bottom: 14px; }
.schedule-person:last-child { margin-bottom: 0; }
.sp-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; font-size: 11px; font-weight: 800; }
.course-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 10.5px; }
.course-row:last-child { border-bottom: 0; }
.course-row .cr-day { width: 25px; flex: none; color: var(--muted); font-size: 9px; }
.course-row .cr-name { flex: 1; min-width: 0; font-weight: 600; }
.course-row .cr-time { color: var(--muted); font-size: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── together ───────────────────────────────────────────── */
.together-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(80% 120% at 90% 0%, rgba(37, 135, 118, 0.18), transparent 55%),
    radial-gradient(80% 100% at 0% 100%, rgba(233, 96, 75, 0.14), transparent 50%),
    var(--card);
  padding: 22px 20px 19px;
  box-shadow: var(--shadow);
}
.together-hero h1 { margin-top: 4px; font-size: 29px; letter-spacing: -0.04em; font-weight: 800; }
.together-hero .th-sub { margin-top: 5px; color: var(--muted); font-size: 11px; }
.together-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.together-stats div { border-left: 1px solid var(--line); padding-left: 10px; }
.together-stats div:first-child { border-left: 0; padding-left: 0; }
.together-stats strong { display: block; font-family: var(--font-display); font-size: 23px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.together-stats strong small { font-family: var(--font); font-size: 9px; font-weight: 500; color: var(--muted); }
.together-stats span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.avatar-pair { position: absolute; right: 18px; top: 20px; display: flex; }
.avatar-pair .avatar { width: 40px; height: 40px; font-size: 20px; border: 2px solid var(--card); margin-left: -10px; }
.avatar-pair .avatar:first-child { margin-left: 0; }
.heat-strip { display: flex; gap: 4px; margin-top: 16px; }
.heat-cell { flex: 1; height: 22px; border-radius: 5px; background: rgba(32, 36, 42, 0.055); position: relative; overflow: hidden; }
.heat-cell i { position: absolute; inset: 0; background: var(--teal); opacity: var(--o, 0); border-radius: 5px; }
.heat-cell.is-today { outline: 1.5px solid var(--coral); outline-offset: 1px; }
.heat-labels { display: flex; justify-content: space-between; margin-top: 5px; color: var(--muted-2); font-size: 8px; }
.invite-stack { display: grid; gap: 9px; }
.invite-card {
  border: 1px solid rgba(238, 180, 74, 0.3);
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, #fffaf0, var(--card));
  padding: 13px;
  box-shadow: var(--shadow-soft);
}
.invite-top { display: flex; align-items: center; gap: 9px; }
.invite-top .it-main { flex: 1; min-width: 0; }
.invite-top strong { display: block; font-size: 12px; font-weight: 800; }
.invite-top small { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; }
.invite-time { margin-top: 11px; font-family: var(--font-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.invite-place { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.invite-actions { display: flex; gap: 8px; margin-top: 12px; }
.invite-actions .btn { flex: 1; min-height: 38px; padding: 7px 12px; font-size: 12px; }
.plan-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 13px;
}
.plan-card + .plan-card { margin-top: 8px; }
.plan-card .pc-head { display: flex; align-items: center; gap: 8px; }
.plan-card .pc-head strong { flex: 1; min-width: 0; font-size: 12px; font-weight: 800; }
.plan-card .pc-when { margin-top: 9px; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.plan-card .pc-where { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.plan-card .pc-actions { display: flex; gap: 7px; margin-top: 10px; }
.plan-card .pc-actions .btn { min-height: 34px; padding: 6px 12px; font-size: 11px; }
.plan-card.is-pending { border-color: rgba(238, 180, 74, 0.3); background: #fffaf0; }
.plan-card.is-past { opacity: 0.62; }

.find-list { display: grid; gap: 6px; }
.find-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 9px 10px;
}
.find-row .fr-day { width: 48px; flex: none; }
.find-row .fr-day strong { display: block; font-size: 10.5px; font-weight: 800; }
.find-row .fr-day span { display: block; color: var(--muted); font-size: 9px; }
.find-row .fr-slots { display: flex; flex-wrap: wrap; gap: 5px; flex: 1; min-width: 0; }

/* ── me / settings ──────────────────────────────────────── */
.profile-card {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
.profile-card .pf-main { flex: 1; min-width: 0; }
.profile-card h2 { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.profile-card p { margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.profile-card .pf-edit { border: 1px solid var(--line); background: var(--card-2); border-radius: 999px; padding: 7px 11px; font-size: 10.5px; font-weight: 700; }
.settings-group { margin-top: 24px; }
.settings-group > h2 { margin-bottom: 9px; padding-left: 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.settings-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  text-decoration: none;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row:hover { background: rgba(32, 36, 42, 0.022); }
.setting-row .sr-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--card-2);
  color: var(--ink-2);
  flex: none;
}
.setting-row .sr-main { flex: 1; min-width: 0; }
.setting-row .sr-main strong { display: block; font-size: 12.5px; font-weight: 700; }
.setting-row .sr-main small { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setting-row .sr-right { color: var(--muted); font-size: 10px; flex: none; display: flex; align-items: center; gap: 5px; }
.setting-row.is-danger .sr-main strong { color: var(--coral-deep); }
.room-box { padding: 14px; border-bottom: 1px solid var(--line); }
.room-box:last-child { border-bottom: 0; }
.room-code {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--card-2);
  padding: 10px 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.room-code span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-copy { border: 0; background: var(--ink); color: #fffdf8; border-radius: 8px; padding: 6px 9px; font-size: 10px; font-weight: 700; }
.room-hint { margin-top: 8px; color: var(--muted); font-size: 9.5px; line-height: 1.6; }

.sched-tabs { display: flex; gap: 5px; padding: 10px 10px 0; }
.sched-tab {
  flex: 1;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.sched-tab.is-active { background: var(--card-2); border-color: var(--line); color: var(--ink); }
.sched-panel { padding: 12px 14px 15px; }
.sched-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sched-toolbar strong { font-size: 11px; font-weight: 800; }
.sched-toolbar .st-actions { display: flex; gap: 5px; }
.sched-toolbar .mini-btn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 9px; font-size: 9.5px; font-weight: 700; }
.course-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.course-edit-row:last-child { border-bottom: 0; }
.course-edit-row .ce-day { width: 30px; flex: none; color: var(--muted); font-size: 9px; }
.course-edit-row .ce-main { flex: 1; min-width: 0; }
.course-edit-row .ce-main strong { display: block; font-size: 10.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.course-edit-row .ce-main small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; }
.course-edit-row .ce-del { border: 0; background: none; color: var(--muted-2); padding: 5px; }
.course-edit-row .ce-del:hover { color: var(--coral-deep); }
.course-edit-row .ce-edit { border: 0; background: none; color: var(--muted-2); padding: 5px; }
.course-edit-row .ce-edit:hover { color: var(--teal-deep); }
.period-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.period-item { display: flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 9px; padding: 6px 7px; background: var(--card-2); }
.period-item span { width: 18px; color: var(--muted); font-size: 9px; flex: none; }
.period-item input { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 9.5px; font-variant-numeric: tabular-nums; padding: 0; }
.period-item input:focus { outline: none; }
.mini-note { margin-top: 8px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.about-box { padding: 14px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.about-box b { color: var(--ink); }
.version { padding: 18px 0 4px; text-align: center; color: var(--muted-2); font-size: 9px; letter-spacing: 0.08em; }

/* ── bottom nav ─────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  width: calc(100% - 28px);
  max-width: 500px;
  transform: translateX(-50%);
  border: 1px solid rgba(32, 36, 42, 0.1);
  border-radius: 23px;
  background: rgba(255, 253, 248, 0.9);
  padding: 6px;
  box-shadow: 0 14px 38px rgba(50, 40, 26, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 53px;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  transition: background 0.2s var(--ease), color 0.2s;
}
.nav-item .nav-icon { display: grid; place-items: center; width: 22px; height: 22px; }
.nav-item .nav-icon .icon { width: 20px; height: 20px; }
.nav-item.is-active { background: var(--ink); color: #fffdf8; box-shadow: 0 8px 18px rgba(32, 36, 42, 0.18); }
.nav-item:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.nav-badge {
  position: absolute;
  top: 7px;
  right: calc(50% - 16px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--card);
}
.nav-item.is-active .nav-badge { box-shadow: 0 0 0 2px var(--ink); }

/* ── modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(24, 21, 17, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in 0.2s ease both;
  padding: 0;
}
@keyframes fade-in { from { opacity: 0; } }
.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 780px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: var(--card);
  box-shadow: 0 -20px 60px rgba(24, 21, 17, 0.28);
  animation: sheet-up 0.32s var(--ease) both;
  overflow: hidden;
}
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0.4; } }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 19px 19px 12px;
  flex: none;
}
.modal-head h2 { margin-top: 2px; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
.modal-head p { margin-top: 3px; color: var(--muted); font-size: 10.5px; }
.modal-body { overflow-y: auto; padding: 2px 19px 18px; -webkit-overflow-scrolling: touch; }
.modal-foot {
  display: flex;
  gap: 8px;
  padding: 12px 19px calc(16px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--card);
  flex: none;
}
.modal-foot .btn { flex: 1; }
.modal-x { margin-top: 1px; }
.tabs {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-2);
  padding: 4px;
  margin-bottom: 15px;
}
.tab {
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 8px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.tab.is-active { background: var(--card); color: var(--ink); box-shadow: 0 3px 9px rgba(32, 36, 42, 0.08); }
.field { display: block; margin-top: 13px; }
.field > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.field > span small { color: var(--muted-2); font-weight: 500; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card-2);
  padding: 10px 12px;
  color: var(--ink);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--coral);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(233, 96, 75, 0.12);
}
.field textarea { min-height: 78px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field-row .field { margin-top: 13px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fffdf8; }
.chip.coral.is-active { background: var(--coral); border-color: var(--coral); }
.chip.teal.is-active { background: var(--teal); border-color: var(--teal); }
.duration-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.duration-btn {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 10px;
  padding: 8px 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.duration-btn.is-active { background: var(--coral-soft); border-color: rgba(233, 96, 75, 0.32); color: var(--coral-deep); }
.checkin-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  border: 1px solid rgba(37, 135, 118, 0.18);
  background: #f2faf7;
  border-radius: 13px;
  padding: 11px 12px;
}
.checkin-preview .cp-label { color: var(--teal-deep); font-size: 10px; font-weight: 700; }
.checkin-preview .cp-time { margin-top: 1px; font-family: var(--font-display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.checkin-preview .cp-side { text-align: right; color: var(--muted); font-size: 9.5px; }
.checkin-preview .cp-side b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 17px; font-variant-numeric: tabular-nums; }
.warn-line {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  border-radius: 9px;
  background: var(--yellow-soft);
  color: #76541c;
  padding: 8px 10px;
  font-size: 9.5px;
  line-height: 1.55;
}
.finish-big {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
}
.finish-big strong { font-family: var(--font-display); font-size: 50px; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.finish-big span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.mood-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mood-btn {
  border: 1px solid var(--line);
  background: var(--card-2);
  border-radius: 11px;
  padding: 9px 4px;
  font-size: 10px;
  color: var(--muted);
}
.mood-btn b { display: block; font-size: 18px; margin-bottom: 2px; }
.mood-btn.is-active { border-color: rgba(233, 96, 75, 0.3); background: var(--coral-soft); color: var(--coral-deep); }
.plan-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card-2);
  padding: 11px 12px;
  margin-bottom: 3px;
}
.plan-summary .ps-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--yellow-soft); color: #8a5a0d; flex: none; }
.plan-summary strong { display: block; font-size: 12px; }
.plan-summary small { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; }
.people-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.people-pick button { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card-2); border-radius: 12px; padding: 9px; text-align: left; }
.people-pick button.is-active { border-color: var(--coral); background: #fff5f1; }
.people-pick strong { display: block; font-size: 11px; }
.people-pick small { display: block; color: var(--muted); font-size: 9px; }

/* ── onboarding ─────────────────────────────────────────── */
.onboarding {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px calc(28px + var(--safe-b));
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}
.onboarding::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 72%);
}
.ob-wrap { width: 100%; max-width: 430px; animation: page-in 0.5s var(--ease) both; }
.ob-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.ob-card {
  border: 1px solid rgba(32, 36, 42, 0.08);
  border-radius: 30px;
  background: rgba(255, 253, 248, 0.92);
  padding: 25px 22px 20px;
  box-shadow: 0 30px 70px rgba(63, 52, 36, 0.14);
  backdrop-filter: blur(10px);
}
.ob-card h1 { margin-top: 7px; font-size: clamp(29px, 8vw, 38px); line-height: 1.16; letter-spacing: -0.045em; font-weight: 800; }
.ob-card h1 em { color: var(--coral); }
.ob-sub { margin-top: 10px; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.seat-list { display: grid; gap: 9px; margin-top: 20px; }
.seat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 12px 13px;
  text-align: left;
  transition: border-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
}
.seat-card:hover { border-color: rgba(233, 96, 75, 0.32); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.seat-card:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.seat-info { flex: 1; min-width: 0; }
.seat-info strong { display: block; font-size: 14px; font-weight: 800; }
.seat-info small { display: block; margin-top: 2px; color: var(--muted); font-size: 9.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-arrow { color: var(--muted-2); font-size: 18px; }
.seat-tag { border-radius: 999px; background: var(--card-2); padding: 3px 7px; color: var(--muted); font-size: 8.5px; }
.ob-room {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 9.5px;
}
.ob-room span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-room button { border: 1px solid var(--line); background: var(--card-2); border-radius: 999px; padding: 5px 9px; font-size: 9px; font-weight: 700; flex: none; }
.ob-foot { margin-top: 18px; color: var(--muted-2); font-size: 9.5px; text-align: center; line-height: 1.7; }
.ob-note {
  display: flex;
  gap: 7px;
  margin-top: 15px;
  border-radius: 10px;
  background: var(--card-2);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.55;
}

/* ── toast / confetti ───────────────────────────────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + var(--safe-b));
  z-index: 200;
  max-width: min(90vw, 360px);
  transform: translate(-50%, 12px);
  border-radius: 999px;
  background: rgba(32, 36, 42, 0.96);
  color: #fffdf8;
  padding: 10px 16px;
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s var(--ease);
  box-shadow: 0 12px 30px rgba(20, 18, 15, 0.22);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; inset: 0; z-index: 300; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute;
  top: 44%;
  left: 50%;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  background: var(--coral);
  animation: confetti-fall 0.9s ease-out forwards;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

/* ── responsive ─────────────────────────────────────────── */
@media (min-width: 700px) {
  .shell { padding-left: 28px; padding-right: 28px; }
  .topbar { height: 82px; }
  .hero { padding: 30px 28px 24px; }
  .hero-title { max-width: 430px; }
  .hero-orbit { right: -10px; top: -70px; width: 250px; height: 250px; }
  .status-grid { gap: 14px; }
  .person-card { padding: 18px 17px 15px; }
  .page-head { padding-top: 12px; }
  .slot-card { padding: 14px 16px; }
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-bottom: 1px solid rgba(255, 255, 255, 0.3); border-radius: 26px; max-height: 86vh; }
  .modal-foot { padding-bottom: 16px; }
  .bottom-nav { bottom: 18px; }
}
@media (max-width: 380px) {
  .shell { padding-left: 13px; padding-right: 13px; }
  .hero { padding: 21px 17px 17px; }
  .status-grid { gap: 8px; }
  .person-card { padding: 13px 11px 11px; }
  .pc-name { font-size: 12px; }
  .goal-card { padding: 10px; gap: 8px; }
  .goal-ring { width: 48px; height: 48px; }
  .goal-info strong { font-size: 15px; }
  .together-stats strong { font-size: 20px; }
  .avatar-pair { display: none; }
  .duration-row { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
