:root {
  --paper: #f7f1e8;
  --paper-deep: #efe6d9;
  --card: #fffaf3;
  --card-strong: #fffdf8;
  --ink: #2b2522;
  --ink-soft: #6e625c;
  --muted: #998b82;
  --line: rgba(51, 42, 37, 0.1);
  --line-strong: rgba(51, 42, 37, 0.16);
  --coral: #ec6c5b;
  --coral-deep: #cf5849;
  --coral-soft: #fbe2db;
  --blue: #4e7fa7;
  --blue-deep: #396786;
  --blue-soft: #e1ecf2;
  --sage: #68765f;
  --sage-deep: #465340;
  --sage-soft: #e7eadc;
  --butter: #efd5a2;
  --butter-soft: #f7ead1;
  --me: var(--coral);
  --me-deep: var(--coral-deep);
  --me-soft: var(--coral-soft);
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --shadow-card: 0 16px 38px -30px rgba(49, 38, 30, 0.45);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-viewer="him"] {
  --me: var(--blue);
  --me-deep: var(--blue-deep);
  --me-soft: var(--blue-soft);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(900px 700px at 20% 15%, rgba(235, 203, 176, 0.5), transparent 65%),
    radial-gradient(700px 700px at 82% 85%, rgba(129, 153, 154, 0.28), transparent 65%),
    #e8dfd2;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: center;
  justify-content: center;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  color: var(--ink);
  background: var(--butter);
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
}

.ambient-one {
  width: 420px;
  height: 420px;
  top: -140px;
  left: -120px;
  background: radial-gradient(circle, rgba(240, 196, 163, 0.55), transparent 70%);
}

.ambient-two {
  width: 500px;
  height: 500px;
  right: -170px;
  bottom: -190px;
  background: radial-gradient(circle, rgba(103, 130, 124, 0.4), transparent 70%);
}

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.app-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
}

.desktop-note {
  display: none;
}

/* ─────────────────────────────── top bar */
.topbar {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border-radius: 10px;
}

.brand-mark {
  position: relative;
  display: block;
  width: 35px;
  height: 27px;
}

.brand-circle {
  position: absolute;
  top: 2px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
}

.brand-coral {
  left: 0;
  background: var(--coral);
}

.brand-blue {
  right: 0;
  background: var(--blue);
  opacity: 0.94;
}

.brand-mark svg {
  position: absolute;
  top: 8px;
  left: 13px;
  z-index: 2;
  width: 10px;
  height: 10px;
  fill: #fff7ec;
  stroke: #fff7ec;
  stroke-width: 1;
}

.brand-type {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-type b {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand-type small {
  font-family: var(--font-mono);
  font-size: 6.5px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.58);
  color: var(--ink-soft);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

.unread-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 2px var(--paper);
}

.avatar-pair {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 2px;
  border-radius: 999px;
}

.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  border: 2px solid var(--paper);
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: #fff9ef;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s var(--ease-out), opacity 0.3s, box-shadow 0.3s;
}

.avatar + .avatar {
  margin-left: -8px;
}

.avatar-her {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.35), transparent 38%),
    linear-gradient(145deg, #f18b77, #d45a4c);
}

.avatar-him {
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.3), transparent 38%),
    linear-gradient(145deg, #6f9cbd, #3d6f95);
}

body[data-viewer="her"] .avatar-her,
body[data-viewer="him"] .avatar-him {
  z-index: 2;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--me);
}

body[data-viewer="her"] .avatar-him,
body[data-viewer="him"] .avatar-her {
  opacity: 0.72;
  transform: scale(0.92);
}

/* ─────────────────────────────── layout */
.main {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 20px 22px;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
}

.main::-webkit-scrollbar {
  display: none;
}

.main.chat-mode {
  overflow: hidden;
  padding-bottom: 0;
}

.page {
  display: none;
  animation: page-in 0.4s var(--ease-out) both;
}

.page.is-active {
  display: block;
}

.page-chat.is-active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--coral);
}

.section {
  margin-top: 27px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-head .eyebrow {
  margin-bottom: 0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-strong);
}

.text-link svg {
  width: 12px;
  height: 12px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 2px 17px;
}

.page-heading h1 {
  margin: 5px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 8.6vw, 36px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.round-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.round-button svg {
  width: 18px;
  height: 18px;
}

.round-button.accent {
  border-color: transparent;
  background: var(--ink);
  color: #fbf5ea;
}

.round-button.accent svg {
  stroke-width: 1.9;
}

/* ─────────────────────────────── home greeting */
.greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px 20px;
}

.greeting h1 {
  margin: 7px 0 6px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 7.2vw, 30px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.greeting h1 em {
  font-style: normal;
  color: var(--me-deep);
}

.greeting-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

.mood-orb {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-top: 3px;
  border: 1px solid rgba(236, 108, 91, 0.2);
  border-radius: 50%;
  background: var(--me-soft);
  color: var(--me-deep);
  transition: transform 0.25s var(--ease-out);
}

.mood-orb:active {
  transform: scale(0.94);
}

.mood-orb svg {
  width: 19px;
  height: 19px;
  margin-bottom: 2px;
}

.mood-orb span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────── hero */
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 278px;
  overflow: hidden;
  padding: 19px 19px 15px;
  border-radius: 28px;
  background: #2b2522;
  color: #f8f1e6;
  box-shadow: 0 24px 46px -32px rgba(43, 37, 34, 0.85);
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -155px;
  right: -110px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle at 48% 52%, rgba(236, 108, 91, 0.62), rgba(236, 108, 91, 0) 68%);
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  right: 84px;
  bottom: -148px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(233, 202, 167, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 26px rgba(233, 202, 167, 0.03),
    0 0 0 54px rgba(233, 202, 167, 0.02);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(248, 241, 230, 0.66);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hero-kicker i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f0b277;
  box-shadow: 0 0 0 4px rgba(240, 178, 119, 0.1);
}

.hero-day {
  color: rgba(248, 241, 230, 0.46);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.hero-count {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-top: 13px;
  width: fit-content;
}

.hero-count .number {
  font-family: var(--font-serif);
  font-size: clamp(74px, 22vw, 96px);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.085em;
  font-variant-numeric: tabular-nums;
}

.hero-count .unit {
  margin-bottom: 5px;
  color: rgba(248, 241, 230, 0.66);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.hero-quote {
  position: relative;
  z-index: 2;
  width: 63%;
  margin: 12px 0 0;
  color: rgba(248, 241, 230, 0.64);
  font-size: 11.5px;
  line-height: 1.7;
}

.hero-photo {
  position: absolute;
  z-index: 2;
  top: 58px;
  right: 17px;
  width: 101px;
  height: 122px;
  overflow: hidden;
  border: 3px solid #f8f1e6;
  border-radius: 53px 53px 18px 18px;
  background: #755a56;
  transform: rotate(4deg);
  box-shadow: 0 14px 24px -14px rgba(0, 0, 0, 0.7);
}

.hero-photo::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -6px;
  left: 50%;
  width: 39px;
  height: 12px;
  background: rgba(236, 224, 203, 0.68);
  transform: translateX(-50%) rotate(-3deg);
  backdrop-filter: blur(2px);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-next {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 10px;
  margin-top: auto;
  padding: 9px 10px;
  border: 1px solid rgba(248, 241, 230, 0.13);
  border-radius: 16px;
  background: rgba(248, 241, 230, 0.065);
  color: inherit;
  text-align: left;
  backdrop-filter: blur(6px);
}

.hero-next-date {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 42px;
  border-radius: 10px;
  background: rgba(248, 241, 230, 0.09);
}

.hero-next-date b {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.hero-next-date span {
  margin-top: 2px;
  color: rgba(248, 241, 230, 0.48);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.12em;
}

.hero-next-copy {
  min-width: 0;
}

.hero-next-copy span {
  display: block;
  color: rgba(248, 241, 230, 0.45);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}

.hero-next-copy strong {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.days-left {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(236, 108, 91, 0.9);
  color: #fff9f1;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.hero-next > svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: rgba(248, 241, 230, 0.4);
}

.hero-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 4px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}

/* ─────────────────────────────── home mood */
.mood-card {
  padding: 5px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.mood-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.mood-person .avatar {
  width: 37px;
  height: 37px;
  border-width: 0;
  font-size: 13px;
}

.person-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.person-info strong {
  font-size: 12.5px;
  font-weight: 600;
}

.person-info span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.mood-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f6eee3;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.mood-pill svg {
  width: 12px;
  height: 12px;
  color: var(--coral);
}

.mood-person.him .mood-pill {
  background: #edf2ee;
}

.mood-person.him .mood-pill svg {
  color: var(--blue);
}

.mood-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 5px;
  color: #cfc3b6;
}

.mood-divider::before,
.mood-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.mood-divider svg {
  width: 12px;
  height: 12px;
  stroke-width: 1.4;
}

.poke-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 9px;
}

.poke-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 252, 247, 0.78);
  color: var(--ink-soft);
  font-size: 11px;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}

.poke-button:active {
  transform: scale(0.96);
  background: var(--me-soft);
}

.poke-symbol {
  color: var(--me-deep);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1;
}

/* ─────────────────────────────── court teaser */
.court-entry {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 112px;
  overflow: hidden;
  padding: 13px 14px;
  border: 1px solid #d9ddc9;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 250, 238, 0.95), transparent 38%),
    linear-gradient(135deg, #e8ecdd, #dce3d2);
  text-align: left;
}

.court-entry::after {
  content: "";
  position: absolute;
  right: 62px;
  bottom: -54px;
  width: 150px;
  height: 150px;
  border: 1px dashed rgba(71, 84, 64, 0.18);
  border-radius: 50%;
}

.court-entry-mascot {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 83px;
  height: 83px;
  overflow: hidden;
  border: 2px solid rgba(255, 250, 240, 0.8);
  border-radius: 50%;
  background: #f2eadc;
  box-shadow: 0 8px 20px -12px rgba(50, 61, 44, 0.55);
}

.court-entry-mascot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}

.court-entry-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding-right: 4px;
}

.court-entry-copy .eyebrow {
  color: #7c8870;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.court-entry-copy h3 {
  margin: 5px 0 4px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.court-entry-copy p {
  margin: 0;
  color: #6d7863;
  font-size: 10px;
  line-height: 1.55;
}

.court-entry-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(72, 86, 62, 0.09);
  color: #5e6b54;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.court-entry-badge i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7c9668;
}

.court-entry-arrow {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 252, 245, 0.58);
  color: #627056;
}

.court-entry-arrow svg {
  width: 11px;
  height: 11px;
}

/* ─────────────────────────────── plan */
.plan-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--card);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.date-tile {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 61px;
  border-radius: 15px;
  background: var(--me-soft);
  color: var(--me-deep);
}

.date-tile span {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.date-tile b {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 25px;
  line-height: 1;
}

.plan-copy {
  min-width: 0;
  flex: 1;
}

.plan-copy > span {
  color: var(--muted);
  font-size: 8.5px;
}

.plan-copy h3 {
  overflow: hidden;
  margin: 3px 0 3px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-card > svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: #c4b8ac;
}

.mini-task-list {
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.62);
}

.mini-task {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  text-align: left;
}

.mini-task + .mini-task {
  border-top: 1px solid var(--line);
}

.check-circle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border: 1.4px solid #c8bbb0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.check-circle svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.check-circle.is-done {
  border-color: var(--sage);
  background: var(--sage);
  color: #fff9ef;
}

.mini-task span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 10.5px;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-task.is-done > span {
  color: var(--muted);
  text-decoration: line-through;
}

.mini-task small {
  color: var(--muted);
  font-size: 8px;
}

/* ─────────────────────────────── home moments */
.moment-strip {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.moment-strip::-webkit-scrollbar {
  display: none;
}

.moment-tile {
  flex: 0 0 206px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  text-align: left;
  scroll-snap-align: start;
  box-shadow: var(--shadow-card);
}

.moment-tile-photo {
  position: relative;
  display: block;
  height: 136px;
  overflow: hidden;
}

.moment-tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}

.moment-tile:active .moment-tile-photo img {
  transform: scale(1.03);
}

.moment-tile-photo span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(30, 25, 23, 0.46);
  color: #fff9f0;
  font-size: 7.5px;
  backdrop-filter: blur(5px);
}

.moment-tile-body {
  display: block;
  padding: 10px 11px 11px;
}

.moment-tile-body h3 {
  overflow: hidden;
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-tile-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.moment-tile-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moment-tile-meta svg {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
}

/* ─────────────────────────────── prompt */
.home-prompt {
  position: relative;
  overflow: hidden;
  margin-top: 27px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 96% 4%, rgba(255, 249, 233, 0.9), transparent 32%),
    linear-gradient(135deg, #f2dfbe, #ecd1a8);
  border: 1px solid rgba(174, 137, 89, 0.14);
}

.home-prompt::before {
  content: "“";
  position: absolute;
  top: -19px;
  right: 14px;
  color: rgba(124, 94, 60, 0.14);
  font-family: Georgia, var(--font-serif);
  font-size: 120px;
  line-height: 1;
}

.daily-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8b6c47;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.12em;
}

.daily-label i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a87a47;
}

.home-prompt h3 {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin: 11px 0 14px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.02em;
}

.prompt-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(95, 70, 44, 0.32);
  color: #6c4f32;
  font-size: 10px;
}

.prompt-action svg {
  width: 12px;
  height: 12px;
}

.home-signoff {
  margin: 28px 0 12px;
  color: #a99b8e;
  font-family: var(--font-serif);
  font-size: 11px;
  line-height: 1.8;
  text-align: center;
  letter-spacing: 0.06em;
}

/* ─────────────────────────────── filters */
.filter-row {
  display: flex;
  gap: 6px;
  margin-bottom: 15px;
}

.filter-chip {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.6);
  color: var(--ink-soft);
  font-size: 10px;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

/* ─────────────────────────────── moments page */
.moments-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-bottom: 20px;
}

.moment-featured {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.moment-photo-large {
  position: relative;
  aspect-ratio: 1.16 / 1;
  overflow: hidden;
  background: var(--paper-deep);
}

.moment-featured.no-photo .moment-photo-large {
  aspect-ratio: 2.05 / 1;
}

.moment-photo-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-float {
  position: absolute;
  left: 13px;
  top: 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(35, 29, 26, 0.45);
  color: #fff9f0;
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.photo-float svg {
  width: 10px;
  height: 10px;
}

.moment-content {
  padding: 15px 16px 14px;
}

.moment-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.moment-author .avatar {
  width: 26px;
  height: 26px;
  border-width: 0;
  font-size: 9px;
}

.author-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.author-meta strong {
  font-size: 10.5px;
  font-weight: 600;
}

.author-meta span {
  color: var(--muted);
  font-size: 8px;
}

.moment-like {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: #f6eee3;
  color: var(--ink-soft);
  font-size: 9px;
}

.moment-like svg {
  width: 12px;
  height: 12px;
}

.moment-like.is-liked {
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.moment-like.is-liked svg {
  fill: currentColor;
}

.moment-text {
  margin: 11px 0 0;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.moment-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 8.5px;
}

.moment-location svg {
  width: 10px;
  height: 10px;
}

.moments-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.moment-small {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.moment-small-photo {
  display: block;
  aspect-ratio: 0.84 / 1;
  overflow: hidden;
}

.moment-small-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moment-small-body {
  display: block;
  padding: 10px;
}

.moment-small-body h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-family: var(--font-serif);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.moment-small-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 7.5px;
}

.moment-small-meta svg {
  width: 9px;
  height: 9px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-state svg {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  color: #c5b7aa;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink-soft);
}

.empty-state p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.7;
}

/* ─────────────────────────────── wishes */
.wish-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  margin-bottom: 17px;
  padding: 19px;
  border-radius: 25px;
  background:
    radial-gradient(circle at 88% 8%, rgba(238, 219, 178, 0.3), transparent 38%),
    linear-gradient(135deg, #65745b, #43523e);
  color: #f8f1e4;
  box-shadow: 0 22px 40px -30px rgba(54, 67, 47, 0.8);
}

.wish-summary::after {
  content: "";
  position: absolute;
  right: -58px;
  bottom: -104px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(244, 235, 218, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(244, 235, 218, 0.035);
}

.wish-summary-copy {
  position: relative;
  z-index: 1;
  flex: 1;
}

.wish-summary-copy .eyebrow {
  color: rgba(248, 241, 228, 0.5);
}

.wish-summary-copy h2 {
  margin: 7px 0 5px;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
}

.wish-summary-copy h2 b {
  font-size: 33px;
}

.wish-summary-copy p {
  max-width: 180px;
  margin: 0;
  color: rgba(248, 241, 228, 0.56);
  font-size: 9.5px;
  line-height: 1.6;
}

.progress-ring {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: conic-gradient(#f1cf92 calc(var(--progress, 0) * 1%), rgba(248, 241, 228, 0.13) 0);
}

.progress-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #536249;
}

.progress-ring span {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}

.progress-ring small {
  position: relative;
  z-index: 1;
  margin-left: 1px;
  color: rgba(248, 241, 228, 0.45);
  font-size: 7px;
}

.wish-counts {
  display: flex;
  gap: 15px;
  margin-top: 11px;
}

.wish-counts span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: rgba(248, 241, 228, 0.5);
  font-size: 7.5px;
}

.wish-counts b {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #f8f1e4;
  font-weight: 500;
}

.segmented {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eee5d8;
}

.segment {
  flex: 1;
  padding: 8px 4px;
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 10.5px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.segment.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 3px 10px -6px rgba(50, 38, 30, 0.4);
  font-weight: 600;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.task-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
}

.task-card .check-circle {
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.task-copy {
  min-width: 0;
  flex: 1;
}

.task-copy h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  transition: color 0.2s;
}

.task-card.is-done .task-copy h3 {
  color: var(--muted);
  text-decoration: line-through;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.owner-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.owner-dot::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.owner-dot.him::before {
  background: var(--blue);
}

.owner-dot.both::before {
  background: var(--sage);
}

.add-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 2px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  font-size: 10px;
}

.add-inline svg {
  width: 12px;
  height: 12px;
}

.wish-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wish-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 142px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--card);
  text-align: left;
  box-shadow: var(--shadow-card);
}

.wish-card::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 19px;
  height: 19px;
  border-right: 1px solid rgba(236, 108, 91, 0.2);
  border-bottom: 1px solid rgba(236, 108, 91, 0.2);
  border-radius: 0 0 7px 0;
}

.wish-category {
  align-self: flex-start;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.wish-card h3 {
  margin: 11px 0 6px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.wish-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wish-status {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--ink-soft);
  font-size: 8px;
}

.wish-status i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.wish-card.is-done .wish-status i {
  background: var(--sage);
}

.wish-card.is-done h3 {
  color: var(--muted);
}

/* ─────────────────────────────── chat */
.chat-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 12px;
  border-bottom: 1px solid var(--line);
}

.chat-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-title-wrap h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.chat-title-wrap p {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.chat-title-wrap p i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7f9b6e;
}

.mini-avatar-stack {
  display: flex;
  padding-left: 2px;
}

.mini-avatar-stack .avatar {
  width: 27px;
  height: 27px;
  border-width: 2px;
  font-size: 9px;
}

.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 7.5px;
  white-space: nowrap;
}

.privacy-chip svg {
  width: 9px;
  height: 9px;
}

.chat-window {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 2px 16px;
  scrollbar-width: none;
}

.chat-window::-webkit-scrollbar {
  display: none;
}

.chat-date {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.chat-date::before,
.chat-date::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 8px 0;
  animation: bubble-in 0.3s var(--ease-out) both;
}

@keyframes bubble-in {
  from {
    opacity: 0;
    transform: translateY(5px) scale(0.98);
  }
}

.message-row.mine {
  justify-content: flex-end;
}

.message-row.judge {
  justify-content: center;
  margin: 12px 0;
}

.message-avatar {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 0;
  font-size: 8px;
}

.bubble-stack {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.message-row.mine .bubble-stack {
  align-items: flex-end;
}

.bubble {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 17px 17px 17px 5px;
  background: var(--card);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.message-row.mine .bubble {
  border-color: transparent;
  border-radius: 17px 17px 5px 17px;
  background: var(--me);
  color: #fffaf2;
}

.bubble-time {
  margin: 3px 3px 0;
  color: var(--muted);
  font-size: 7px;
}

.judge-bubble {
  display: flex;
  gap: 8px;
  max-width: 92%;
  padding: 10px 12px;
  border: 1px solid #d6dcc9;
  border-radius: 15px;
  background: #eef0e4;
  color: #516049;
  font-size: 9px;
  line-height: 1.65;
}

.judge-bubble strong {
  display: block;
  margin-bottom: 2px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.judge-bubble img {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  border-radius: 50%;
}

.ai-bubble {
  border-color: rgba(185, 101, 81, 0.22);
  background: #f8eee1;
  color: #5d493e;
}

.ai-bubble img {
  border-radius: 10px;
  background: #172c2e;
}

.ai-bubble strong {
  color: var(--terracotta);
}

.ai-quick {
  border-color: rgba(185, 101, 81, 0.32);
  background: rgba(185, 101, 81, 0.07);
  color: var(--terracotta);
  font-weight: 600;
}

.quick-chips {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
  overflow-x: auto;
  padding: 3px 2px 7px;
  scrollbar-width: none;
}

.quick-chips::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.7);
  color: var(--ink-soft);
  font-size: 8.5px;
}

.chat-composer-wrap {
  position: relative;
  z-index: 5;
  flex: 0 0 auto;
  margin: 0 -20px;
  padding: 0 20px calc(4px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(247, 241, 232, 0), var(--paper) 16px);
}

.chat-composer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 30px -20px rgba(45, 35, 28, 0.5);
}

.composer-more,
.send-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.composer-mic {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.composer-mic svg {
  width: 17px;
  height: 17px;
}

.composer-mic.is-recording {
  color: var(--terracotta);
  background: rgba(185, 101, 81, 0.1);
}

.voice-overlay {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: calc(100% - 4px);
  display: none;
  z-index: 20;
  pointer-events: none;
}

.voice-overlay.is-open {
  display: block;
}

.voice-overlay-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 18px;
  background: rgba(43, 35, 30, 0.94);
  color: #fffaf1;
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, 0.6);
}

.voice-overlay-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.voice-overlay-copy strong {
  font-size: 11px;
  font-weight: 600;
}

.voice-overlay-copy span {
  font-size: 9px;
  color: #d7c8b9;
  font-variant-numeric: tabular-nums;
}

.voice-overlay-card p {
  margin: 0 0 0 auto;
  font-size: 8px;
  color: #d7c8b9;
  white-space: nowrap;
}

.voice-overlay-card.is-cancel {
  background: rgba(120, 58, 45, 0.96);
}

.voice-pulse {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e98a72;
  box-shadow: 0 0 0 0 rgba(233, 138, 114, 0.5);
  animation: voice-pulse 1.4s ease-out infinite;
}

@keyframes voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(233, 138, 114, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(233, 138, 114, 0); }
  100% { box-shadow: 0 0 0 0 rgba(233, 138, 114, 0); }
}

.voice-bubble {
  width: min(240px, 62vw);
}

.voice-bubble audio {
  display: block;
  width: 100%;
  height: 36px;
}

.voice-transcript {
  margin: 7px 1px 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.65;
}

.composer-more {
  background: #f4ece1;
  color: var(--ink-soft);
}

.composer-more svg {
  width: 16px;
  height: 16px;
}

.send-button {
  background: var(--ink);
  color: #fbf4e9;
}

.send-button svg {
  width: 16px;
  height: 16px;
  transform: translateX(-1px);
}

.chat-composer input {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.ai-quick-icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  object-fit: cover;
  vertical-align: -2px;
}

.chat-composer input::placeholder {
  color: #b3a69b;
}

body.keyboard-open .tabbar {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

body.keyboard-open .page-chat {
  padding-bottom: 0;
}

.typing-status {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 5px;
  color: var(--muted);
  font-size: 7.5px;
}

.typing-status i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  animation: bounce-dot 1s infinite ease-in-out;
}

.typing-status i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-status i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

/* ─────────────────────────────── map */
.map-heading {
  padding-bottom: 14px;
}

.demo-pill {
  margin-bottom: 4px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  white-space: nowrap;
}

.map-canvas {
  position: relative;
  height: 337px;
  overflow: hidden;
  border: 1px solid rgba(71, 83, 66, 0.12);
  border-radius: 27px;
  background: #dfe2d3;
  box-shadow: var(--shadow-card);
}

.map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-pin {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  transform: translate(-18px, -36px);
  transition: opacity 0.3s, filter 0.3s;
}

.map-pin .pin-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid #fdf7ed;
  border-radius: 50%;
  color: #fffaf1;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 5px 14px -6px rgba(33, 28, 24, 0.5);
}

.map-pin .pin-avatar::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.22;
  animation: pin-pulse 2.8s infinite ease-out;
}

@keyframes pin-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.35;
  }
  70%, 100% {
    transform: scale(1.3);
    opacity: 0;
  }
}

.pin-her .pin-avatar {
  background: linear-gradient(145deg, #f18b77, #d45a4c);
  color: #d45a4c;
}

.pin-him .pin-avatar {
  background: linear-gradient(145deg, #6f9cbd, #3d6f95);
  color: #3d6f95;
}

.pin-her .pin-avatar span,
.pin-him .pin-avatar span {
  color: #fffaf1;
}

.pin-label {
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(255, 251, 243, 0.92);
  color: #4c4940;
  font-size: 7.5px;
  white-space: nowrap;
  box-shadow: 0 3px 12px -8px rgba(40, 34, 27, 0.5);
  backdrop-filter: blur(5px);
}

.pin-her {
  left: 32%;
  top: 43%;
}

.pin-him {
  left: 67%;
  top: 67%;
}

.map-locating {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6d7b65;
  font-size: 9px;
  letter-spacing: 0.04em;
}

.map-locating i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage-deep);
  animation: voice-pulse 1.4s ease-out infinite;
}

.map-distance {
  position: absolute;
  z-index: 4;
  top: 13px;
  left: 50%;
  display: flex;
  align-items: baseline;
  gap: 3px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 252, 246, 0.6);
  border-radius: 999px;
  background: rgba(43, 37, 34, 0.82);
  color: #f9f2e7;
  font-size: 8px;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
}

.map-distance b {
  font-family: var(--font-serif);
  font-size: 14px;
}

.map-distance span {
  color: rgba(249, 242, 231, 0.55);
}

.map-note {
  position: absolute;
  z-index: 4;
  left: 13px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 251, 243, 0.72);
  color: #777263;
  font-size: 7px;
  backdrop-filter: blur(6px);
}

.map-note svg {
  width: 9px;
  height: 9px;
}

.map-paused {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: rgba(244, 238, 227, 0.72);
  text-align: center;
  backdrop-filter: blur(7px);
}

.map-paused svg {
  width: 27px;
  height: 27px;
  color: var(--sage);
}

.map-paused strong {
  font-family: var(--font-serif);
  font-size: 16px;
}

.map-paused p {
  max-width: 210px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
}

.map-canvas.is-paused .map-paused {
  display: flex;
}

.map-canvas.is-paused .map-pin {
  filter: blur(6px);
  opacity: 0.5;
}

.map-people {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.map-person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
}

.map-person .avatar {
  width: 32px;
  height: 32px;
  border-width: 0;
  font-size: 10px;
}

.map-person-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.map-person-copy strong {
  font-size: 10.5px;
  font-weight: 600;
}

.map-person-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-battery {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 7.5px;
}

.map-battery svg {
  width: 11px;
  height: 11px;
}

.sharing-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 250, 243, 0.7);
}

.sharing-copy {
  flex: 1;
}

.sharing-copy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
}

.sharing-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d8cec2;
  transition: background 0.25s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fffaf1;
  box-shadow: 0 2px 4px rgba(52, 42, 34, 0.16);
  transition: transform 0.25s var(--ease-out);
}

.switch.is-on {
  background: var(--sage);
}

.switch.is-on::after {
  transform: translateX(18px);
}

.map-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.map-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 10.5px;
}

.map-action.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #f9f3e9;
}

.map-action svg {
  width: 14px;
  height: 14px;
}

.safety-note {
  display: flex;
  gap: 7px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.safety-note svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

/* ─────────────────────────────── court page */
.page-court {
  padding-bottom: 4px;
}

.court-heading {
  padding-bottom: 15px;
}

.court-hero {
  position: relative;
  overflow: hidden;
  padding: 17px;
  border: 1px solid #d7dcc9;
  border-radius: 27px;
  background:
    radial-gradient(circle at 91% 7%, rgba(255, 250, 238, 0.95), transparent 33%),
    linear-gradient(140deg, #e8ecde, #dbe2d0 70%, #d1dac5);
  box-shadow: var(--shadow-card);
}

.court-hero::before {
  content: "";
  position: absolute;
  top: 100px;
  right: -45px;
  width: 160px;
  height: 160px;
  border: 1px dashed rgba(71, 84, 64, 0.18);
  border-radius: 50%;
}

.court-hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.court-hero-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.court-hero-label .eyebrow {
  color: #7c8870;
  font-size: 7.5px;
}

.court-hero-label strong {
  font-family: var(--font-serif);
  font-size: 16px;
  color: #4f5d47;
}

.court-hero-label span {
  color: #83907a;
  font-size: 8px;
  line-height: 1.5;
}

.court-mascot {
  position: relative;
  flex: 0 0 auto;
  width: 91px;
  height: 91px;
  overflow: hidden;
  border: 2px solid rgba(255, 251, 242, 0.82);
  border-radius: 50%;
  background: #f2eadc;
  box-shadow: 0 12px 24px -14px rgba(52, 64, 44, 0.55);
}

.court-mascot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.court-hero h2 {
  position: relative;
  z-index: 1;
  margin: 13px 0 7px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.23;
  letter-spacing: -0.04em;
  color: #313a2c;
  text-wrap: balance;
}

.court-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 255px;
  margin: 0;
  color: #697560;
  font-size: 10px;
  line-height: 1.7;
}

.court-hero-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
}

.court-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 39px;
  padding: 0 15px;
  border-radius: 999px;
  background: #33402d;
  color: #f8f2e6;
  font-size: 10.5px;
  font-weight: 500;
  box-shadow: 0 9px 18px -12px rgba(44, 57, 37, 0.7);
}

.court-start svg {
  width: 13px;
  height: 13px;
}

.court-api-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #77836c;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.03em;
}

.court-api-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #92a77c;
  box-shadow: 0 0 0 3px rgba(146, 167, 124, 0.12);
}

.court-api-status.is-demo i {
  background: #bc9a6a;
  box-shadow: 0 0 0 3px rgba(188, 154, 106, 0.12);
}

.court-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 13px;
}

.court-step {
  padding: 10px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 243, 0.62);
}

.court-step b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 7px;
}

.court-step strong {
  display: block;
  margin-top: 7px;
  font-size: 9px;
  font-weight: 600;
}

.court-step span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.45;
}

.court-section {
  margin-top: 23px;
}

.court-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 10px;
}

.court-section-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.court-section-head button {
  color: var(--muted);
  font-size: 9px;
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.case-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-align: left;
}

.case-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.case-icon svg {
  width: 16px;
  height: 16px;
}

.case-row-copy {
  min-width: 0;
  flex: 1;
}

.case-row-copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-row-copy span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 7.5px;
}

.case-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f4ece1;
  color: var(--ink-soft);
  font-size: 7px;
}

.case-status.is-resolved {
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.case-status.is-open {
  background: var(--butter-soft);
  color: #8a6437;
}

.court-safety {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px dashed rgba(172, 123, 97, 0.3);
  border-radius: 14px;
  background: rgba(250, 238, 226, 0.5);
  color: #967463;
  font-size: 8px;
  line-height: 1.65;
}

.court-safety svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.court-empty {
  padding: 21px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
  line-height: 1.65;
}

/* court flow */
.court-flow-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 3px 0 14px;
}

.court-back {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-soft);
}

.court-back svg {
  width: 15px;
  height: 15px;
}

.court-flow-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
}

.court-flow-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.court-stepper {
  display: flex;
  gap: 5px;
  flex: 1;
  max-width: 130px;
  margin-left: auto;
}

.court-stepper i {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #e4dace;
}

.court-stepper i.is-done {
  background: var(--sage);
}

.court-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.court-panel h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.court-panel > p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.court-field {
  margin-top: 17px;
}

.court-field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
}

.court-field label span {
  color: var(--muted);
  font-weight: 400;
}

.court-field input,
.court-field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  outline: 0;
  background: #fffdf8;
  font-size: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.court-field input:focus,
.court-field textarea:focus {
  border-color: #9aa88c;
  box-shadow: 0 0 0 3px rgba(122, 140, 105, 0.1);
}

.court-field textarea {
  min-height: 76px;
  resize: vertical;
  line-height: 1.6;
}

.quick-cases {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.quick-case {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 8px;
}

.court-participants {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.participant {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 7px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf3;
}

.participant .avatar {
  width: 28px;
  height: 28px;
  border-width: 0;
  font-size: 9px;
}

.participant strong {
  font-size: 9px;
}

.participant span {
  display: block;
  color: var(--muted);
  font-size: 7px;
}

.participant.is-me {
  border-color: var(--me);
  box-shadow: 0 0 0 2px var(--me-soft);
}

.court-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 46px;
  margin-top: 16px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
  font-weight: 500;
}

.court-cta:disabled {
  background: #e2d9cd;
  color: #a99b8f;
  box-shadow: none;
  cursor: not-allowed;
}

.court-cta svg {
  width: 15px;
  height: 15px;
}

.court-cta.accent {
  background: var(--sage-deep);
}

.court-hint {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.court-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.court-progress i {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #e5dbce;
  transition: background 0.3s;
}

.court-progress i.is-done {
  background: var(--sage);
}

.question-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.question-kicker span:first-child {
  color: var(--sage-deep);
}

.question-title {
  margin: 10px 0 5px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.question-sub {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.answer-option.is-selected {
  border-color: #98a98a;
  background: #eef1e5;
}

.answer-radio {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 1.5px solid #c8beb2;
  border-radius: 50%;
}

.answer-option.is-selected .answer-radio {
  border-color: var(--sage);
  background: var(--sage);
}

.answer-radio svg {
  width: 9px;
  height: 9px;
  color: #fffaf2;
  stroke-width: 2.5;
}

.answer-option-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.answer-option-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.question-nav {
  display: flex;
  gap: 7px;
  margin-top: 15px;
}

.court-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
}

.court-secondary svg {
  width: 13px;
  height: 13px;
}

.question-nav .court-cta {
  margin-top: 0;
  height: 44px;
  flex: 1;
}

.privacy-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.privacy-line svg {
  width: 10px;
  height: 10px;
}

.handoff-card {
  padding: 29px 20px 22px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.handoff-seal {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 15px;
  border: 1px solid #d3dcc7;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.handoff-seal svg {
  width: 25px;
  height: 25px;
}

.handoff-card h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.35;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.handoff-card p {
  max-width: 260px;
  margin: 9px auto 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.7;
}

.handoff-quote {
  margin: 15px auto 0;
  padding: 10px;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 11px;
  line-height: 1.7;
}

.handoff-participant {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--paper-deep);
  font-size: 9px;
}

.handoff-participant .avatar {
  width: 24px;
  height: 24px;
  border-width: 0;
  font-size: 8px;
}

.handoff-card .court-cta {
  max-width: 260px;
  margin-right: auto;
  margin-left: auto;
}

.ready-card {
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.ready-head {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ready-head img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #d9dece;
}

.ready-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
}

.ready-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.ready-lock {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 15px;
  padding: 10px;
  border-radius: 12px;
  background: var(--sage-soft);
  color: #58684f;
  font-size: 8.5px;
  line-height: 1.5;
}

.ready-lock svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
}

.ready-summary {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-strong);
}

.ready-summary span {
  color: var(--muted);
  font-size: 8px;
}

.ready-summary strong {
  display: block;
  margin-top: 3px;
  font-family: var(--font-serif);
  font-size: 16px;
}

.ready-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.loading-court {
  padding: 37px 22px 30px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--card);
  text-align: center;
}

.loading-mascot {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 17px;
}

.loading-mascot img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.loading-mascot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px dashed #aab99d;
  border-radius: 50%;
  animation: slow-spin 7s linear infinite;
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-court h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 22px;
}

.loading-court p {
  margin: 8px auto 0;
  max-width: 250px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 17px;
}

.loading-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
  animation: bounce-dot 1.2s infinite ease-in-out;
}

.loading-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.loading-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

.verdict {
  overflow: hidden;
  border: 1px solid #d6dcc9;
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 20px 40px -30px rgba(50, 62, 42, 0.45);
}

.verdict-head {
  position: relative;
  overflow: hidden;
  padding: 17px 17px 16px;
  background:
    radial-gradient(circle at 92% 5%, rgba(255, 249, 235, 0.95), transparent 40%),
    linear-gradient(140deg, #e6ebdd, #d8e1cf);
}

.verdict-head::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -62px;
  width: 138px;
  height: 138px;
  border: 1px dashed rgba(73, 86, 63, 0.2);
  border-radius: 50%;
}

.verdict-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.verdict-id {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.verdict-id span {
  color: #78866d;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.verdict-id strong {
  font-family: var(--font-serif);
  font-size: 13px;
  color: #4b5944;
}

.verdict-stamp {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border: 1.5px solid rgba(109, 77, 66, 0.55);
  border-radius: 50%;
  color: rgba(109, 77, 66, 0.72);
  font-family: var(--font-serif);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-12deg);
}

.verdict-head h2 {
  position: relative;
  z-index: 1;
  max-width: 94%;
  margin: 15px 0 0;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.03em;
  color: #333d2e;
  text-wrap: balance;
}

.verdict-head p {
  position: relative;
  z-index: 1;
  max-width: 92%;
  margin: 7px 0 0;
  color: #6b7761;
  font-size: 9.5px;
  line-height: 1.7;
}

.verdict-body {
  padding: 16px;
}

.verdict-block {
  margin-top: 16px;
}

.verdict-block:first-child {
  margin-top: 0;
}

.verdict-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.verdict-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.verdict-see {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}

.see-card {
  padding: 11px;
  border-radius: 13px;
  background: #f7f1e7;
}

.see-card.her {
  background: #fbf0ec;
}

.see-card.him {
  background: #eef3f2;
}

.see-card strong {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 600;
}

.see-card strong i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.see-card.him strong i {
  background: var(--blue);
}

.see-card p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.7;
}

.verdict-knot {
  margin: 9px 0 0;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: -0.01em;
}

.prescription {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.prescription-step {
  display: flex;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.prescription-num {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-family: var(--font-mono);
  font-size: 8px;
}

.prescription-step strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.prescription-step p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

.verdict-sentence {
  margin-top: 15px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #2f3a2b;
  color: #f4eddf;
}

.verdict-sentence span {
  display: block;
  color: rgba(244, 237, 223, 0.45);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.verdict-sentence p {
  margin: 7px 0 0;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.65;
}

.verdict-sign {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-strong);
}

.verdict-sign p {
  margin: 0;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.6;
}

.signature {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-family: var(--font-serif);
  font-size: 10px;
  color: var(--sage-deep);
}

.signature img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.verdict-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}

.verdict-actions .court-cta {
  margin-top: 0;
}

.verdict-secondary-row {
  display: flex;
  gap: 7px;
}

.verdict-secondary-row .court-secondary {
  flex: 1;
}

.made-peace {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  border: 1px solid #ced8c3;
  border-radius: 13px;
  background: var(--sage-soft);
  color: #55654c;
  font-size: 9px;
  line-height: 1.5;
}

.made-peace svg {
  width: 15px;
  height: 15px;
}

/* API settings */
.api-provider-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}

.api-provider {
  position: relative;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
}

.api-provider.is-active {
  border-color: #899b79;
  background: #f1f4e9;
  box-shadow: 0 0 0 2px rgba(115, 135, 97, 0.09);
}

.api-provider strong {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
}

.api-provider span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 6.5px;
  line-height: 1.4;
}

.api-provider i {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}

.api-provider.is-active i {
  background: var(--sage);
}

.api-warning {
  margin-top: 13px;
  padding: 10px;
  border: 1px dashed rgba(177, 132, 92, 0.32);
  border-radius: 11px;
  background: #faf3e8;
  color: #8e7156;
  font-size: 8px;
  line-height: 1.65;
}

.api-test-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
}

.api-test-row .court-secondary {
  height: 40px;
}

.api-test-status {
  flex: 1;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.api-test-status.success {
  color: #5c7250;
}

.api-test-status.error {
  color: #b25d4a;
}

.api-field-note {
  margin-top: 5px;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.5;
}

.api-models-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}

/* ─────────────────────────────── profile sheet / forms */
.sheet-layer {
  position: absolute;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: flex-end;
  visibility: hidden;
  pointer-events: none;
}

.sheet-layer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 33, 28, 0.4);
  opacity: 0;
  backdrop-filter: blur(4px);
  transition: opacity 0.3s;
}

.sheet-layer.is-open .sheet-backdrop {
  opacity: 1;
}

.sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 91%;
  overflow-y: auto;
  padding: 21px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 29px 29px 0 0;
  background: #fbf6ee;
  box-shadow: 0 -20px 60px -38px rgba(33, 27, 23, 0.6);
  transform: translateY(102%);
  transition: transform 0.45s var(--ease-out);
  scrollbar-width: none;
}

.sheet::-webkit-scrollbar {
  display: none;
}

.sheet-layer.is-open .sheet {
  transform: none;
}

.sheet-grab {
  width: 34px;
  height: 4px;
  margin: -6px auto 17px;
  border-radius: 999px;
  background: #ded2c5;
}

.sheet-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.6);
  color: var(--ink-soft);
  z-index: 2;
}

.sheet-close svg {
  width: 13px;
  height: 13px;
}

.sheet-content > .eyebrow {
  margin-bottom: 6px;
}

.sheet-title {
  margin: 0 40px 5px 0;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.sheet-sub {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.7;
}

.profile-pair {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.profile-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  text-align: left;
}

.profile-card .avatar {
  width: 39px;
  height: 39px;
  border-width: 0;
  font-size: 14px;
}

.profile-card strong {
  font-family: var(--font-serif);
  font-size: 14px;
}

.profile-card span {
  color: var(--muted);
  font-size: 8px;
}

.profile-card.is-active {
  border-color: var(--me);
  background: var(--me-soft);
}

.profile-card.is-active::after {
  content: "当前视角";
  position: absolute;
  top: 12px;
  right: 10px;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.65);
  color: var(--me-deep);
  font-size: 6.5px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink-soft);
  font-size: 8.5px;
  font-weight: 600;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: 0;
  background: #fffdf8;
  font-size: 11.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #a9927e;
  box-shadow: 0 0 0 3px rgba(163, 134, 108, 0.08);
}

.field textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.6;
}

.field-row {
  display: flex;
  gap: 9px;
}

.field-row .field {
  flex: 1;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 45px;
  margin-top: 15px;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 500;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-sage {
  background: var(--sage-deep);
  color: #f8f2e7;
}

.btn-ghost {
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}

.btn-danger {
  margin-top: 8px;
  border: 1px solid rgba(178, 93, 74, 0.22);
  background: rgba(178, 93, 74, 0.05);
  color: #a5503f;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn:disabled {
  opacity: 0.45;
}

.sheet-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sheet-section h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
}

.sheet-section p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.6;
}

.upload-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 126px;
  overflow: hidden;
  border: 1px dashed #cbbcb0;
  border-radius: 15px;
  background: #fdf8f0;
  color: var(--muted);
  text-align: center;
}

.upload-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.upload-zone svg {
  width: 22px;
  height: 22px;
  margin-bottom: 7px;
  color: #b9a99b;
}

.upload-zone strong {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 500;
}

.upload-zone span {
  margin-top: 4px;
  font-size: 8px;
}

.upload-preview {
  display: none;
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.upload-zone.has-preview {
  border-style: solid;
}

.upload-zone.has-preview .upload-placeholder {
  display: none;
}

.upload-zone.has-preview .upload-preview {
  display: block;
}

.upload-clear {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: rgba(40, 33, 28, 0.6);
  color: #fffaf1;
  backdrop-filter: blur(5px);
}

.upload-clear svg {
  width: 11px;
  height: 11px;
}

.mood-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 10px;
}

.mood-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 11px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
  color: var(--ink-soft);
  font-size: 8.5px;
}

.mood-choice svg {
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
}

.mood-choice.is-active {
  border-color: var(--me);
  background: var(--me-soft);
  color: var(--me-deep);
}

.mood-choice.is-active svg {
  color: var(--me-deep);
}

.case-detail {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #f6efe5;
}

.case-detail p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.7;
}

/* ─────────────────────────────── days subpage */
.subpage {
  position: absolute;
  z-index: 45;
  inset: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  background: var(--paper);
  transform: translateX(102%);
  transition: transform 0.42s var(--ease-out), visibility 0.42s;
}

.subpage.is-open {
  visibility: visible;
  transform: none;
}

.subpage-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  padding: calc(18px + env(safe-area-inset-top)) 20px 14px;
}

.subpage-head > div {
  min-width: 0;
  flex: 1;
}

.subpage-head h2 {
  margin: 3px 0 0;
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.icon-button.round {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-soft);
}

.icon-button.round svg {
  width: 16px;
  height: 16px;
}

.icon-button.round.accent {
  border-color: transparent;
  background: var(--ink);
  color: var(--paper);
}

.subpage-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px calc(25px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}

.subpage-scroll::-webkit-scrollbar {
  display: none;
}

.days-summary {
  position: relative;
  overflow: hidden;
  margin-top: 2px;
  padding: 19px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 0, rgba(255, 246, 226, 0.9), transparent 35%),
    linear-gradient(135deg, #e9d8bd, #dfc9a9);
  color: #49382c;
}

.days-summary::after {
  content: "∞";
  position: absolute;
  right: 12px;
  bottom: -31px;
  color: rgba(107, 80, 57, 0.12);
  font-family: Georgia, serif;
  font-size: 132px;
  line-height: 1;
}

.days-summary span {
  position: relative;
  z-index: 1;
  color: #856b54;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.days-summary h2 {
  position: relative;
  z-index: 1;
  margin: 7px 0 5px;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.3;
}

.days-summary h2 b {
  font-size: 37px;
  letter-spacing: -0.03em;
}

.days-summary p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #806750;
  font-size: 9px;
  line-height: 1.6;
}

.days-calendar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin: 15px -20px 0;
  padding: 0 20px 3px;
  scrollbar-width: none;
}

.days-calendar::-webkit-scrollbar {
  display: none;
}

.calendar-day {
  display: flex;
  flex: 0 0 44px;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 3px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.calendar-day small {
  color: var(--muted);
  font-size: 6.5px;
}

.calendar-day b {
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1;
}

.calendar-day i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: transparent;
}

.calendar-day.has-event i {
  background: var(--coral);
}

.calendar-day.is-today {
  border-color: var(--line-strong);
  background: var(--card);
}

.days-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 2px 11px;
}

.days-section-head h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
}

.days-section-head span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}

.timeline {
  position: relative;
  padding-left: 23px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 14px;
  left: 6px;
  width: 1px;
  background: linear-gradient(to bottom, #d8cbbb, transparent);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 10px;
  margin-bottom: 11px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 18px;
  left: -21px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--me);
  box-shadow: 0 0 0 1px var(--me);
}

.timeline-item.is-past {
  opacity: 0.58;
}

.timeline-item.is-past::before {
  background: #b7aa9d;
  box-shadow: 0 0 0 1px #b7aa9d;
}

.timeline-date {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 51px;
  border-radius: 11px;
  background: #f4ede3;
}

.timeline-date b {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
}

.timeline-date span {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.08em;
}

.timeline-copy {
  min-width: 0;
  flex: 1;
}

.timeline-copy h4 {
  margin: 1px 0 4px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}

.timeline-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.timeline-copy .timeline-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--me-soft);
  color: var(--me-deep);
  font-size: 7px;
}

.timeline-tag svg {
  width: 9px;
  height: 9px;
}

.event-add-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin-top: 5px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  color: var(--muted);
  font-size: 9.5px;
}

.event-add-card svg {
  width: 13px;
  height: 13px;
}

/* ─────────────────────────────── tab bar */
.tabbar {
  position: relative;
  z-index: 30;
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: 1px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(54, 44, 37, 0.08);
  background: rgba(250, 245, 237, 0.94);
  box-shadow: 0 -12px 30px -28px rgba(54, 44, 37, 0.35);
  backdrop-filter: blur(16px);
}

.tab {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  height: 48px;
  border-radius: 12px;
  color: #9b8d82;
  font-size: 8.5px;
  transition: color 0.25s;
}

.tab-icon {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 8px;
  transition: background 0.25s, color 0.25s, transform 0.25s var(--ease-out);
}

.tab-icon svg {
  width: 19px;
  height: 19px;
}

.tab.is-active {
  color: var(--ink);
}

.tab.is-active .tab-icon {
  background: var(--me-soft);
  color: var(--me-deep);
  transform: translateY(-1px);
}

.tab-court .tab-icon svg {
  stroke-width: 1.55;
}

.tab.is-active.tab-court .tab-icon {
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.tab-dot {
  position: absolute;
  top: 6px;
  right: calc(50% - 16px);
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.tab-dot.is-visible {
  display: block;
}

/* ─────────────────────────────── toast / hearts */
.toast {
  position: absolute;
  z-index: 120;
  top: calc(72px + env(safe-area-inset-top));
  left: 50%;
  max-width: calc(100% - 40px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 251, 244, 0.12);
  border-radius: 999px;
  background: rgba(43, 37, 34, 0.94);
  color: #fbf4e9;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.25s, transform 0.25s var(--ease-out);
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: rgba(150, 72, 58, 0.96);
}

.heart-float-layer,
.celebration-layer {
  position: absolute;
  z-index: 110;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-heart {
  position: absolute;
  bottom: 86px;
  color: var(--coral);
  font-family: var(--font-serif);
  font-size: 18px;
  opacity: 0;
  animation: float-heart 1.9s ease-out forwards;
}

@keyframes float-heart {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6) rotate(-8deg);
  }
  18% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift, 10px), -165px) scale(1.15) rotate(12deg);
  }
}

.confetti {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-pop 0.9s ease-out forwards;
}

@keyframes confetti-pop {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r));
  }
}

/* ─────────────────────────────── extra detail styles */
.moment-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 16%, rgba(236, 108, 91, 0.1), transparent 42%),
    linear-gradient(145deg, #f1e7da, #e4d8c8);
  color: #a59586;
}

.moment-placeholder svg {
  width: 25px;
  height: 25px;
}

.moment-placeholder em {
  font-family: var(--font-serif);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.06em;
}

.moment-placeholder.small svg {
  width: 20px;
  height: 20px;
}

.moment-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 24% 18%, rgba(236, 108, 91, 0.12), transparent 44%),
    linear-gradient(145deg, #f2e8da, #dfd2c2);
  color: #a39282;
}

.moment-photo-placeholder svg {
  width: 30px;
  height: 30px;
}

.moment-photo-placeholder span {
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.moment-detail {
  margin-top: 2px;
}

.moment-detail > img {
  width: 100%;
  max-height: 370px;
  margin-bottom: 8px;
  border-radius: 18px;
  object-fit: cover;
}

.moment-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 130px;
  border-radius: 17px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 9.5px;
}

.moment-detail-empty svg {
  width: 18px;
  height: 18px;
}

.moment-detail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.moment-detail-meta .moment-author {
  gap: 8px;
}

.moment-detail-meta .avatar {
  width: 30px;
  height: 30px;
  border-width: 0;
  font-size: 10px;
}

.moment-detail .moment-location {
  margin-top: 11px;
}

.install-hint {
  margin-top: 7px !important;
  color: #8c7968 !important;
  font-size: 8px !important;
  line-height: 1.65 !important;
}

.chat-more-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 13px;
}

.chat-more-actions > button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fffdf8;
  text-align: left;
}

.chat-more-actions > button > svg:first-child {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--sage-deep);
}

.chat-more-actions > button > span {
  min-width: 0;
  flex: 1;
}

.chat-more-actions strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
}

.chat-more-actions small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.chat-more-actions > button > svg:last-child {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  color: #b6a89b;
}

.chat-title-wrap p .typing-status {
  display: inline-flex;
  gap: 3px;
  padding: 0;
  margin-left: 2px;
  vertical-align: middle;
}

.court-file-number {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.court-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #f8f2e9;
}

.court-rules div {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 8px;
  line-height: 1.6;
}

.court-rules svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--sage-deep);
}

.court-rules strong {
  color: var(--ink);
  font-weight: 600;
}

.question-note-field {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}

.question-note-field textarea {
  min-height: 60px;
}

.verdict-closing {
  margin: 14px 2px 0;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 9.5px;
  line-height: 1.7;
  text-align: center;
}

.empty-state {
  width: 100%;
  font-family: inherit;
}

/* Make the empty state button sit correctly inside scrolling areas. */
button.empty-state {
  color: var(--muted);
}

/* ─────────────────────────────── cloud boot / auth */
.cloud-boot {
  position: absolute;
  z-index: 200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 76% 16%, rgba(236, 108, 91, 0.12), transparent 36%),
    radial-gradient(circle at 18% 82%, rgba(78, 127, 167, 0.12), transparent 38%),
    var(--paper);
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

.cloud-boot.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.cloud-boot-inner {
  text-align: center;
  transform: translateY(-12px);
}

.cloud-boot-logo {
  position: relative;
  width: 76px;
  height: 58px;
  margin: 0 auto 20px;
}

.cloud-boot-logo .brand-circle {
  top: 0;
  width: 48px;
  height: 48px;
}

.cloud-boot-logo .brand-coral {
  left: 0;
}

.cloud-boot-logo .brand-blue {
  right: 0;
}

.cloud-boot-logo svg {
  position: absolute;
  top: 17px;
  left: 28px;
  z-index: 2;
  width: 21px;
  height: 21px;
  fill: #fff8ee;
  stroke: #fff8ee;
  stroke-width: 1;
}

.cloud-boot-inner h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 34px;
  letter-spacing: 0.12em;
}

.cloud-boot-inner p {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.05em;
}

.cloud-boot-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}

.cloud-boot-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
  animation: bounce-dot 1.2s infinite ease-in-out;
}

.cloud-boot-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.cloud-boot-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

.cloud-auth {
  position: absolute;
  z-index: 190;
  inset: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 84% 8%, rgba(239, 213, 162, 0.35), transparent 32%),
    radial-gradient(circle at 10% 92%, rgba(78, 127, 167, 0.12), transparent 36%),
    var(--paper);
  scrollbar-width: none;
}

.cloud-auth::-webkit-scrollbar {
  display: none;
}

.auth-shell {
  min-height: 100%;
  padding: calc(26px + env(safe-area-inset-top)) 23px calc(24px + env(safe-area-inset-bottom));
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-brand .brand-type b {
  font-family: var(--font-serif);
  font-size: 20px;
}

.auth-brand .brand-type small {
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.auth-intro {
  margin-top: 38px;
}

.auth-intro .eyebrow {
  margin-bottom: 10px;
}

.auth-intro h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 35px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.auth-intro h1 em {
  font-style: normal;
  color: var(--coral-deep);
}

.auth-intro p {
  max-width: 232px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.75;
}

.auth-mascot {
  position: absolute;
  top: 148px;
  right: 15px;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border: 2px solid rgba(255, 249, 238, 0.82);
  border-radius: 50%;
  background: #f2eadc;
  box-shadow: 0 18px 36px -25px rgba(52, 64, 44, 0.5);
  transform: rotate(5deg);
}

.auth-mascot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.auth-card {
  margin-top: 25px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.88);
  box-shadow: 0 24px 50px -40px rgba(48, 37, 29, 0.55);
  backdrop-filter: blur(10px);
}

.auth-tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  border-radius: 13px;
  background: #eee4d7;
}

.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: 10px;
}

.auth-tab.is-active {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 4px 12px -8px rgba(46, 35, 27, 0.45);
}

.auth-card h2 {
  margin: 19px 0 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-card .auth-sub {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.auth-form .field {
  margin-top: 10px;
}

.auth-form .field label {
  font-size: 8px;
}

.auth-form .field input,
.auth-form .field select {
  height: 44px;
  padding: 0 12px;
  font-size: 11.5px;
}

.auth-submit {
  height: 45px;
  margin-top: 15px;
}

.auth-error {
  display: none;
  margin-top: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fae8e2;
  color: #a44f3e;
  font-size: 8.5px;
  line-height: 1.5;
}

.auth-error.is-visible {
  display: block;
}

.auth-footnote {
  margin: 13px 2px 0;
  color: var(--muted);
  font-size: 7.5px;
  line-height: 1.65;
  text-align: center;
}

.auth-demo {
  display: block;
  margin: 18px auto 0;
  padding: 5px 2px;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 9px;
  text-align: center;
}

.auth-pairing {
  margin-top: 27px;
}

.pair-card {
  margin-top: 18px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.pair-card h2 {
  margin: 0 0 5px;
  font-family: var(--font-serif);
  font-size: 23px;
  letter-spacing: -0.03em;
}

.pair-card > p {
  margin: 0 0 15px;
  color: var(--ink-soft);
  font-size: 9.5px;
  line-height: 1.65;
}

.pair-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 15px 0 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.pair-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.invite-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 62px;
  margin: 7px 0;
  border: 1px dashed #cbb9a5;
  border-radius: 15px;
  background: #fbf3e7;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #5e493a;
}

.invite-code span {
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
}

.pair-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.pair-divider {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 17px 0 13px;
  color: #b7a99c;
  font-size: 8px;
}

.pair-divider::before,
.pair-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.pair-waiting {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 8px;
}

.pair-waiting i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse-dot 1.4s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.35; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.auth-userline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(233, 226, 214, 0.55);
  color: var(--ink-soft);
  font-size: 8.5px;
}

.auth-userline strong {
  font-weight: 600;
  color: var(--ink);
}

.auth-userline span {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-size: 7px;
}

.auth-pill i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
}

/* Cloud profile blocks */
.cloud-account-card {
  margin-top: 15px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f7f0e5;
}

.cloud-account-card .account-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cloud-account-card .account-line + .account-line {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-strong);
}

.cloud-account-card .account-line svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--sage-deep);
}

.cloud-account-card .account-copy {
  min-width: 0;
  flex: 1;
}

.cloud-account-card .account-copy strong {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
}

.cloud-account-card .account-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
}

.cloud-sync-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #667a5b;
  font-family: var(--font-mono);
  font-size: 7px;
  white-space: nowrap;
}

.cloud-sync-state i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7f9b6e;
}

.cloud-sync-state.is-busy i {
  background: #c6a36c;
  animation: pulse-dot 1s infinite;
}

.cloud-sync-state.is-offline i {
  background: #b25d4a;
}

.cloud-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 10px;
}

.cloud-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink-soft);
  font-size: 8.5px;
}

.cloud-action svg {
  width: 12px;
  height: 12px;
}

.cloud-action.danger {
  color: #a5503f;
}

.storage-card {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f0e5;
}

.storage-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(60, 49, 43, 0.10);
}

.storage-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sage-deep), var(--terracotta));
  transition: width 0.4s ease;
}

.storage-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  font-size: 10px;
}

.storage-line strong {
  font-weight: 600;
}

.storage-line span {
  color: var(--muted);
  font-family: var(--font-mono);
}

.storage-breakdown {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.storage-breakdown > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fffaf2;
  font-size: 9px;
}

.storage-breakdown span { color: var(--muted); }
.storage-breakdown strong { font-weight: 500; }

.storage-warning {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(109, 141, 120, 0.10);
  color: #5e715e;
  font-size: 9px;
  line-height: 1.7;
}

.storage-warning.is-warning {
  background: rgba(185, 101, 81, 0.09);
  color: #9a5a49;
}

.storage-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}

.push-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.55;
}

.push-status i {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b6a99c;
}

.push-status.is-on i {
  background: #7f9b6e;
}

.security-card {
  margin-top: 13px;
  padding: 4px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f7f0e5;
}

.security-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
}

.security-row + .security-row {
  border-top: 1px dashed var(--line-strong);
}

.security-row > svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--sage-deep);
}

.security-row > span {
  min-width: 0;
  flex: 1;
}

.security-row strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7.5px;
}

.security-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.security-section h3,
.security-danger h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 16px;
}

.security-section p,
.security-danger p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.65;
}

.security-danger {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(178, 93, 74, 0.2);
  border-radius: 15px;
  background: rgba(178, 93, 74, 0.04);
}

.security-danger h3 {
  color: #a5503f;
}

.security-danger .field {
  margin-top: 10px;
}

.security-danger .field input {
  background: #fffbf8;
}

.cloud-offline-banner {
  position: absolute;
  z-index: 150;
  top: calc(70px + env(safe-area-inset-top));
  left: 50%;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 40px);
  padding: 7px 11px;
  border: 1px solid rgba(178, 93, 74, 0.18);
  border-radius: 999px;
  background: rgba(250, 236, 228, 0.95);
  color: #9a4f42;
  font-size: 8.5px;
  white-space: nowrap;
  transform: translateX(-50%);
  backdrop-filter: blur(9px);
  box-shadow: 0 8px 20px -16px rgba(68, 45, 32, 0.4);
}

.cloud-offline-banner svg {
  width: 11px;
  height: 11px;
}

.server-provider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  text-align: left;
}

.server-provider + .server-provider {
  margin-top: 7px;
}

.server-provider.is-active {
  border-color: #93a487;
  background: #f0f4e9;
}

.server-provider.is-disabled {
  opacity: 0.58;
}

.server-provider .provider-status-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c7b9aa;
}

.server-provider.is-active .provider-status-dot,
.server-provider.is-ready .provider-status-dot {
  background: #7f9b6e;
}

.server-provider-copy {
  min-width: 0;
  flex: 1;
}

.server-provider-copy strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
}

.server-provider-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
}

.server-provider .provider-check {
  color: var(--sage-deep);
  font-size: 8px;
}

/* ─────────────────────────────── responsive */
@media (min-width: 760px) {
  .app-shell {
    height: min(900px, calc(100dvh - 42px));
    border-radius: 36px;
    box-shadow:
      0 50px 110px -55px rgba(52, 40, 30, 0.65),
      0 0 0 1px rgba(64, 50, 39, 0.1);
  }

  .desktop-note {
    position: fixed;
    left: calc(50% - 430px);
    bottom: 82px;
    display: block;
    color: rgba(71, 57, 45, 0.62);
    pointer-events: none;
  }

  .desktop-note span {
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.2em;
  }

  .desktop-note p {
    margin: 8px 0 0;
    font-family: var(--font-serif);
    font-size: 23px;
    letter-spacing: 0.03em;
  }

  .paper-grain {
    opacity: 0.12;
  }
}

@media (max-width: 370px) {
  .main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .topbar {
    padding-right: 16px;
    padding-left: 16px;
  }

  .tabbar {
    padding-right: 6px;
    padding-left: 6px;
  }

  .tab {
    font-size: 8px;
  }

  .tab-icon svg {
    width: 18px;
    height: 18px;
  }

  .hero-card {
    min-height: 266px;
    padding: 17px;
  }

  .hero-photo {
    right: 14px;
    width: 91px;
    height: 111px;
  }

  .hero-quote {
    width: 58%;
    font-size: 10.5px;
  }

  .court-entry {
    gap: 10px;
    padding: 11px;
  }

  .court-entry-mascot {
    width: 70px;
    height: 70px;
  }

  .court-entry-copy h3 {
    font-size: 16px;
  }

  .court-hero {
    padding: 15px;
  }

  .court-mascot {
    width: 80px;
    height: 80px;
  }

  .court-hero h2 {
    font-size: 24px;
  }

  .chat-composer-wrap {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .moment-strip {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .days-calendar {
    margin-right: -16px;
    margin-left: -16px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .sheet {
    padding-right: 16px;
    padding-left: 16px;
  }

  .subpage-head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .subpage-scroll {
    padding-right: 16px;
    padding-left: 16px;
  }

  .mood-options {
    grid-template-columns: repeat(4, 1fr);
  }

  .api-provider-grid {
    gap: 6px;
  }
}

@media (max-height: 720px) {
  .greeting {
    padding-top: 8px;
    padding-bottom: 14px;
  }

  .hero-card {
    min-height: 256px;
  }

  .hero-photo {
    height: 110px;
  }

  .home-signoff {
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
