/* ============================================================
   Toolbar pills & piano keys
   ============================================================ */
.sub-pill {
  position: relative;
  flex-shrink: 0;
  height: 38px;
  padding: 0 12px 0 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 12px;
  background: #fffaf3;
  border: 1.5px solid var(--line);
  font-size: var(--fs-sm);
  font-weight: 800;
  white-space: nowrap;
  scroll-snap-align: center;
  transition: transform .15s var(--ease-spring), background .15s, border-color .15s;
}
.sub-pill-icon { font-size: 18px; line-height: 1; }
.sub-pill.is-pressed { transform: scale(.92); background: #fff1e6; }
.sub-pill.is-selected {
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border-color: color-mix(in srgb, var(--accent) 70%, transparent);
  color: color-mix(in srgb, var(--accent) 80%, #000);
}
.sub-pill.is-accent { background: var(--primary-grad); border-color: transparent; color: #fff; }
.sub-pill.is-locked { opacity: .7; }
.sub-pill-lock { font-size: 11px; }
.sub-pill-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.piano-key {
  flex: 1 0 34px;
  height: 38px;
  border-radius: 10px;
  background: var(--key);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 900;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--key) 60%, #000);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  transition: transform .08s, box-shadow .08s, filter .08s;
  touch-action: manipulation;
}
.piano-key.is-playing { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--key) 60%, #000); filter: brightness(1.15); }

/* ============================================================
   Toasts
   ============================================================ */
.toast-host {
  position: fixed;
  top: calc(max(6px, var(--safe-top)) + 96px);
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  padding: 0 12px;
}
.toast {
  max-width: min(92vw, 440px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--sh-2);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-10px) scale(.96);
  transition: opacity .2s, transform .3s var(--ease-spring);
}
.toast.is-in { opacity: 1; transform: none; }
/* a sheet is open: news shows at the bottom, not over the sheet's title */
body.has-sheet .toast-host { top: auto; bottom: calc(max(10px, var(--safe-bottom, 0px)) + 84px); flex-direction: column-reverse; }
.toast.is-out { opacity: 0; transform: translateY(-8px); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast-action { flex-shrink: 0; margin-left: 4px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #9a3412; font-size: var(--fs-xs); font-weight: 900; }
.toast-partner { background: linear-gradient(90deg, #fff1f2, #fff7ed); box-shadow: var(--sh-2), 0 0 0 2px #fecdd3; }
.toast-reward { background: linear-gradient(90deg, #fefce8, #fff7ed); box-shadow: var(--sh-2), 0 0 0 2px #fde68a; }
.toast-warn { background: #fff7ed; box-shadow: var(--sh-2), 0 0 0 2px #fdba74; }

/* ============================================================
   Buttons, inputs, chips
   ============================================================ */
.btn {
  height: 46px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: var(--fs-md);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .15s var(--ease-spring), filter .15s;
  white-space: nowrap;
}
.btn.is-pressed { transform: scale(.95); }
.btn-primary { background: var(--primary-grad); color: #fff; box-shadow: 0 4px 12px rgba(244, 63, 94, .3); }
.btn-soft { background: var(--rose-soft); color: #be123c; }
.btn-amber { background: #fde68a; color: #78350f; }
.btn-ghost { background: #f5efe9; color: var(--ink-2); }
.btn-danger { background: #ef4444; color: #fff; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn-sm { height: 34px; padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f5efe9;
  color: var(--ink-2);
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-2);
  background: #fffdfa;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { border-color: var(--rose-2); box-shadow: 0 0 0 3px rgba(251, 113, 133, .2); }
textarea.input { resize: none; line-height: 1.5; }
.input-code { font-size: 24px; letter-spacing: .25em; text-align: center; font-weight: 900; text-transform: uppercase; }

.field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.field-label { font-size: var(--fs-sm); font-weight: 800; color: var(--ink-2); margin-top: 6px; }
.field-hint { font-size: var(--fs-xs); color: var(--ink-3); }
.field-row { display: flex; gap: 10px; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--rose-soft);
  color: #be123c;
  font-size: var(--fs-xs);
  font-weight: 800;
  white-space: nowrap;
}
.chip-amber { background: var(--amber-soft); color: #92400e; }
.chip-btn { height: 32px; font-size: var(--fs-sm); background: #fff; border: 1.5px solid #fecdd3; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

.switch {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 15px;
  background: #e7ddd3;
  transition: background .2s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-1);
  transition: transform .25s var(--ease-spring);
}
.switch.is-on { background: var(--rose-2); }
.switch.is-on::after { transform: translateX(20px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 700; border-bottom: 1px solid var(--line); }

/* segmented control */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-md); background: #f5efe9; margin-bottom: 12px; }
.seg-btn { flex: 1; height: 38px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.seg-btn.is-active { background: #fff; color: var(--rose); box-shadow: var(--sh-1); }

/* ============================================================
   Cards & lists
   ============================================================ */
.card { padding: 14px; border-radius: var(--r-lg); background: #fffaf4; border: 1.5px solid var(--line); margin-bottom: 12px; }
.card-info { background: var(--sky-soft); border-color: #bae6fd; color: #075985; font-size: var(--fs-sm); font-weight: 700; margin-top: 12px; }
.card-warn { background: #fff7ed; border-color: #fed7aa; font-size: var(--fs-sm); margin-top: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 8px; }
.section-head h3 { font-size: var(--fs-md); font-weight: 900; }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: #fffaf4;
  border: 1.5px solid var(--line);
}
.list-row.is-done { background: #f0fdf4; border-color: #bbf7d0; }
.list-row-icon { font-size: 22px; flex-shrink: 0; }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-size: var(--fs-sm); font-weight: 800; }
.list-row-sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 1px; }
.quest-checks { display: flex; gap: 3px; }
.quest-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  background: #f1e9e1;
  color: var(--ink-3);
}
.quest-check.is-on { background: var(--sky); color: #fff; }
.quest-check.is-partner.is-on { background: var(--rose-2); }

.footnote { font-size: var(--fs-xs); color: var(--ink-3); text-align: center; margin: 12px 0 4px; line-height: 1.5; word-break: break-all; }
.empty { text-align: center; padding: 28px 0; color: var(--ink-3); font-size: var(--fs-sm); }
.empty-icon { font-size: 44px; margin-bottom: 6px; }

/* streak */
.streak-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fff7ed, #ffe4e6); border-color: #fed7aa; }
.streak-flame { font-size: 34px; animation: heartBeat 1.4s ease-in-out infinite; }
.streak-main { flex: 1; }
.streak-num { font-size: var(--fs-xl); font-weight: 900; color: #c2410c; }
.streak-sub { font-size: var(--fs-xs); color: var(--ink-2); }
.streak-best { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; }

/* PK */
.pk-labels { display: flex; justify-content: space-between; font-size: var(--fs-sm); font-weight: 900; margin-bottom: 6px; }
.pk-a { color: #0369a1; } .pk-b { color: #be123c; }
.pk-bar { height: 14px; border-radius: 7px; overflow: hidden; display: flex; background: #fb7185; }
.pk-bar-a { background: linear-gradient(90deg, #38bdf8, #3b82f6); transition: width .5s; }
.pk-bar-b { flex: 1; background: linear-gradient(90deg, #f472b6, #f43f5e); }
.pk-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 12px; text-align: center; }
.pk-cell { background: #fff; border-radius: var(--r-sm); padding: 6px 2px; border: 1px solid var(--line); }
.pk-cell .muted { font-size: 10px; }
.pk-val { font-weight: 900; font-size: var(--fs-sm); }
.pk-mvp { margin-top: 12px; text-align: center; font-weight: 800; color: var(--rose); font-size: var(--fs-sm); }

/* badges */
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { padding: 10px 6px; border-radius: var(--r-md); background: #f7f2ed; text-align: center; border: 1.5px solid transparent; filter: grayscale(.6); opacity: .75; }
.badge.is-on { background: linear-gradient(180deg, #fffbeb, #fff1f2); border-color: #fde68a; filter: none; opacity: 1; }
.badge-icon { font-size: 28px; }
.badge-name { font-size: var(--fs-xs); font-weight: 900; margin-top: 2px; }
.badge-desc { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.badge-reward { font-size: 10px; color: #b45309; font-weight: 800; margin-top: 2px; }

/* menu */
.couple-card {
  text-align: center;
  padding: 16px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 100%);
  border: 1.5px solid #fecdd3;
  margin-bottom: 14px;
}
.couple-avatars { display: flex; align-items: center; justify-content: center; gap: 10px; }
.avatar {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: var(--fs-xl);
  font-weight: 900;
  color: #fff;
  box-shadow: var(--sh-1);
}
.avatar.is-a { background: linear-gradient(135deg, #7dd3fc, #3b82f6); }
.avatar.is-b { background: linear-gradient(135deg, #f9a8d4, #f43f5e); }
.avatar.is-online::after { content: ""; position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.couple-heart { font-size: 26px; animation: heartBeat 1.4s ease-in-out infinite; }
.couple-days { margin-top: 8px; font-size: var(--fs-md); font-weight: 700; }
.couple-days b { font-size: 28px; color: var(--rose); margin: 0 2px; }
.couple-next { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }
.couple-status { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-3); font-weight: 700; }
.couple-status.is-online { color: #15803d; }

.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.menu-group-title { margin: 14px 2px 8px; font-size: var(--fs-sm); font-weight: 900; color: var(--ink-3); letter-spacing: .02em; }
.couple-card + .menu-group-title { margin-top: 0; }
.menu-utils { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1.5px dashed var(--line); }
.menu-tile {
  position: relative;
  height: 84px;
  border-radius: var(--r-lg);
  background: #fffaf4;
  border: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: transform .15s var(--ease-spring);
}
.menu-tile.is-pressed { transform: scale(.93); background: #fff1e6; }
.menu-tile-icon { font-size: 28px; }
.menu-tile-label { font-size: var(--fs-sm); font-weight: 800; color: var(--ink-2); }
/* progress ("2/9"), not something waiting for you */
.menu-tile-badge.is-soft { background: var(--line); color: var(--ink-2); }
.menu-tile-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--rose);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.menu-action-card { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.menu-action-card + .menu-action-card { margin-top: 8px; }
.menu-action-icon { font-size: 28px; line-height: 1; flex: none; }
.menu-action-main { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }

/* notes chat */
.composer { position: sticky; top: -2px; z-index: 2; padding: 10px; margin: 0 -2px 12px; border-radius: var(--r-lg); background: #fff1f2; border: 1.5px solid #fecdd3; }
.composer .chip-row { margin-bottom: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.composer .chip-row::-webkit-scrollbar { display: none; }
.composer-row { display: flex; gap: 8px; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; align-self: flex-start; display: flex; flex-direction: column; gap: 2px; }
.chat-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.chat-meta { font-size: 10px; color: var(--ink-3); font-weight: 700; padding: 0 6px; }
.chat-bubble {
  padding: 9px 13px;
  border-radius: 18px 18px 18px 6px;
  background: #fff;
  border: 1.5px solid var(--line);
  font-size: var(--fs-md);
  line-height: 1.45;
  word-break: break-word;
  user-select: text;
  -webkit-user-select: text;
}
.chat-msg.is-mine .chat-bubble { border-radius: 18px 18px 6px 18px; background: linear-gradient(135deg, #fecdd3, #fbcfe8); border-color: transparent; }
.chat-read { font-size: 10px; color: var(--ink-3); padding: 0 6px; }

/* album */
.album-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.polaroid-card {
  padding: 8px 8px 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--sh-1);
  text-align: center;
  transform: rotate(-1.2deg);
  transition: transform .2s var(--ease-spring);
}
.polaroid-card:nth-child(2n) { transform: rotate(1.4deg); }
.polaroid-card.is-pressed { transform: scale(.95); }
.polaroid-thumb { width: 100%; aspect-ratio: 600 / 760; object-fit: cover; border-radius: 4px; display: block; background: #fff7ed; }
.polaroid-thumb.is-empty { display: grid; place-items: center; font-size: 30px; aspect-ratio: 1; }
.polaroid-thumb.is-large { font-size: 60px; }
.polaroid-title { font-size: var(--fs-sm); font-weight: 900; margin-top: 6px; }
.polaroid-caption { font-size: var(--fs-xs); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.polaroid-meta { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.polaroid-preview { width: 100%; max-width: 360px; display: block; margin: 0 auto 12px; border-radius: 8px; box-shadow: var(--sh-2); transform: rotate(-1deg); animation: develop 1.2s ease-out; }
@keyframes develop { from { filter: brightness(2) saturate(0); } }
.photo-view { text-align: center; }
.photo-view img { width: 100%; max-width: 320px; border-radius: 8px; box-shadow: var(--sh-2); margin: 0 auto; }
.photo-caption { margin: 12px 0 4px; font-weight: 700; }

/* shop */
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.shop-card {
  padding: 12px 10px;
  border-radius: var(--r-lg);
  background: #fffaf4;
  border: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}
.shop-card.is-on { background: #fff1f2; border-color: #fda4af; }
.shop-card.is-off { opacity: .6; }
.shop-icon { font-size: 32px; }
.shop-icon.is-art { height: 56px; display: flex; align-items: flex-end; justify-content: center; }
.shop-icon.is-art svg { height: 100%; width: auto; max-width: 100%; overflow: visible; }
.shop-name { font-size: var(--fs-sm); font-weight: 900; }
.shop-desc { font-size: var(--fs-xs); color: var(--ink-3); min-height: 30px; }
.shop-card .btn { margin-top: 6px; width: 100%; }

/* poke */
.poke-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.poke-btn {
  height: 96px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #fff1f2, #fff7ed);
  border: 1.5px solid #fecdd3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 800;
  font-size: var(--fs-sm);
  transition: transform .15s var(--ease-spring);
}
.poke-btn.is-pressed { transform: scale(.9); }
.poke-icon { font-size: 36px; }

/* daily question */
.qa-card { background: linear-gradient(135deg, #ede9fe, #fce7f3); border-color: #ddd6fe; text-align: center; }
.qa-date { font-size: var(--fs-xs); color: var(--violet); font-weight: 800; }
.qa-q { font-size: var(--fs-lg); font-weight: 900; margin-top: 6px; line-height: 1.4; }
.qa-input { margin-bottom: 10px; }
.qa-answer { padding: 12px 14px; border-radius: var(--r-lg); background: #fff1f2; margin-bottom: 10px; line-height: 1.5; user-select: text; -webkit-user-select: text; }
.qa-answer.is-mine { background: #e0f2fe; }
.qa-answer.is-locked { background: #f5f5f4; color: var(--ink-3); }
.qa-who { font-size: var(--fs-xs); font-weight: 900; color: var(--ink-2); margin-bottom: 4px; }
.qa-past { font-size: var(--fs-sm); line-height: 1.5; }

/* onboarding */
.hero { text-align: center; padding: 12px 0 20px; }
.hero-art { font-size: 84px; animation: heroBob 2.4s ease-in-out infinite; }
@keyframes heroBob { 50% { transform: translateY(-8px) rotate(-4deg); } }
.hero-text { color: var(--ink-2); line-height: 1.6; font-size: var(--fs-md); padding: 0 8px; }
.invite-hero .hero-text b { color: var(--ink); }
.invite-hero .muted { margin-top: 4px; font-size: var(--fs-sm); }
.invite-card { display: flex; align-items: center; gap: 10px; }
.invite-card > div { flex: 1; min-width: 0; }
.invite-card .muted { font-weight: 500; margin-top: 2px; }
.invite-card .btn { flex: none; }
.hero + .btn { margin-bottom: 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.choice {
  padding: 10px;
  border-radius: var(--r-md);
  border: 2px solid var(--line);
  background: #fffaf4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  transition: transform .15s var(--ease-spring), border-color .15s;
}
.choice.is-active { border-color: var(--rose-2); background: #fff1f2; }
.choice.is-disabled { opacity: .45; pointer-events: none; }
.account-form { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.account-form .btn { margin-top: 8px; }
.choice.is-pressed { transform: scale(.95); }
.choice-icon { font-size: 26px; }
.choice-name { font-weight: 900; font-size: var(--fs-sm); }
.choice-desc { font-size: 10px; color: var(--ink-3); line-height: 1.35; }
.choice-grid.is-two .choice { padding: 18px 10px; }
.choice-grid.is-two .choice-icon { font-size: 38px; }
.code-box { margin: 14px 0 4px; font-size: 34px; font-weight: 900; letter-spacing: .3em; text-align: center; color: var(--rose); padding: 12px; border-radius: var(--r-lg); background: #fff1f2; border: 2px dashed #fda4af; user-select: all; -webkit-user-select: all; }
.code-inline { font-size: var(--fs-xl); font-weight: 900; letter-spacing: .15em; color: var(--rose); user-select: all; -webkit-user-select: all; }

/* cat profile */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.profile-avatar { width: 68px; height: 68px; border-radius: 50%; background: #fff7ed; display: grid; place-items: center; font-size: 26px; border: 2px solid #fde68a; }
.profile-name { font-size: var(--fs-xl); font-weight: 900; }
.profile-head .chip-row { margin-top: 6px; }
.profile-meter { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: var(--fs-sm); font-weight: 700; }
.profile-meter > span:first-child { width: 64px; flex-shrink: 0; }
.profile-meter .meter-track { height: 10px; }
.profile-meter .meter-fill { height: 100%; display: block; border-radius: 5px; }
.profile-meter .meter-num { width: 28px; font-size: var(--fs-sm); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-cell { text-align: center; padding: 10px 4px; border-radius: var(--r-md); background: #fffaf4; border: 1.5px solid var(--line); }
.stat-icon { font-size: 22px; }
.stat-val { font-size: var(--fs-lg); font-weight: 900; }

.confirm-text { color: var(--ink-2); line-height: 1.6; text-align: center; padding: 6px 0 4px; word-break: break-word; }

/* ============================================================
   Coach marks
   ============================================================ */
.coach-overlay { position: fixed; inset: 0; z-index: 70; opacity: 0; transition: opacity .25s; touch-action: none; }
.coach-overlay.is-in { opacity: 1; }
.coach-overlay.is-out { opacity: 0; }
.coach-spot {
  position: absolute;
  box-shadow: 0 0 0 9999px rgba(20, 16, 40, .62);
  border: 3px solid #fff;
  transition: all .35s var(--ease-spring);
  pointer-events: none;
}
.coach-card {
  position: absolute;
  left: 16px;
  right: 16px;
  max-width: 420px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--sh-2);
  transition: top .3s, bottom .3s;
}
.coach-emoji { font-size: 28px; }
.coach-text { font-size: var(--fs-md); font-weight: 700; line-height: 1.5; margin-top: 4px; }
.coach-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.coach-next { color: var(--rose); font-weight: 900; }

/* relay toggle in the note composer */
.relay-toggle {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1.5px solid #fecdd3;
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--ink-2);
}
.relay-dot { width: 10px; height: 10px; border-radius: 50%; background: #e7ddd3; transition: background .2s; }
.relay-toggle.is-on { background: #fff1f2; border-color: var(--rose-2); color: #be123c; }
.relay-toggle.is-on .relay-dot { background: var(--rose); }
.chat-relay { font-size: 10px; color: var(--rose); font-weight: 800; padding: 0 6px; }

/* cat diary */
.diary-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.diary-date { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.diary-page {
  position: relative;
  padding: 18px 18px 14px;
  border-radius: 6px var(--r-lg) var(--r-lg) 6px;
  background:
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(244, 114, 182, .18) 29px 30px),
    #fffdf7;
  border-left: 6px solid #fda4af;
  box-shadow: var(--sh-1);
  line-height: 30px;
  font-size: var(--fs-md);
  color: #57534e;
  user-select: text;
  -webkit-user-select: text;
}
.diary-head { font-weight: 900; color: var(--rose); margin-bottom: 4px; }
.diary-page p { margin: 0 0 4px; text-indent: 2em; }
.diary-sign { text-align: right; font-weight: 800; color: var(--ink-3); margin-top: 6px; }

.couple-fav { margin-top: 4px; font-size: var(--fs-xs); font-weight: 800; color: #b45309; }

/* ---------------- cat profile: growth ---------------- */
.stage-track { display: flex; gap: 6px; margin: 10px 0 4px; }
.stage-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: #f5efe9; opacity: .55; font-size: 12px; }
.stage-step.is-past { opacity: .85; }
.stage-step.is-now { opacity: 1; background: var(--rose-soft); box-shadow: 0 0 0 2px var(--rose-2, #fda4af) inset; }
.stage-icon { font-size: 22px; }
.stage-name { font-weight: 800; }
.sick-card { border: 2px solid #fecaca; background: #fff7f7; margin: 10px 0; }
.sick-title { font-weight: 800; margin-bottom: 4px; }
.sick-actions { display: flex; gap: 8px; margin-top: 10px; }
.sick-actions .btn { flex: 1; }
.sick-actions .btn:disabled { opacity: .45; }
.profile-meter.is-top > span:first-child { color: #be123c; }
.need-block { margin-top: 4px; }
.need-effect { margin: 2px 0 0 72px; font-size: var(--fs-xs); color: var(--ink-2); }
.need-block.is-warn .need-effect { color: #b45309; }
.need-block.is-red .need-effect { color: #be123c; font-weight: 700; }
.bond-name { width: auto !important; white-space: nowrap; font-size: 12px; }

/* ---------------- collection book ---------------- */
.dex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.dex-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: #f5efe9; opacity: .6; text-align: center; }
.dex-cell.is-on { opacity: 1; background: #fff; box-shadow: 0 1px 4px rgba(90, 50, 20, .12); }
.dex-icon { font-size: 24px; }
.dex-name { font-size: 11px; font-weight: 700; }
.dex-count { font-size: 11px; color: var(--ink-3); }
.visitor-card { border: 2px dashed #fcd34d; background: #fffbeb; margin: 10px 0; }

/* ---------------- recap ---------------- */
.recap-card { text-align: center; }
.recap-title { font-weight: 900; font-size: var(--fs-lg); }
.recap-people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.recap-big { font-size: 32px; font-weight: 900; line-height: 1.1; }

/* ---------- teaching tricks (interactions/tricks.js) ---------- */
.trick-pad { position: fixed; inset: 0; z-index: 60; touch-action: none; }
.trick-pad-hint {
  position: absolute; left: 16px; right: 16px; top: calc(env(safe-area-inset-top, 0px) + 110px);
  display: flex; justify-content: center; pointer-events: none;
}
.trick-pad-hint span {
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .95); box-shadow: var(--sh-1);
  font-weight: 800; font-size: var(--fs-sm); text-align: center;
}
.trick-pad-cancel { position: absolute; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 150px); }
.trick-row { align-items: center; gap: 10px; }
.trick-icon { font-size: 26px; flex-shrink: 0; width: 32px; text-align: center; }
.trick-main { flex: 1; min-width: 0; }
.trick-name { font-weight: 800; }
.trick-meter { height: 6px; margin-top: 4px; }
.trick-row .btn { flex-shrink: 0; }

/* 🧭 开启指引 (js/setup.js) */
.setup-progress { font-weight: 800; color: var(--ink-2); margin: 0 0 10px; }
.setup-card { margin-bottom: 12px; }
.setup-card.is-done { opacity: .78; }
.setup-title { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.setup-num { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: var(--fs-xs); background: var(--rose-soft, #ffe4e6); color: #be123c; flex: none; }
.setup-card.is-done .setup-num { background: #dcfce7; color: #15803d; }
.setup-badge { font-size: var(--fs-xs); font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: var(--ink-3); white-space: nowrap; }
.setup-badge.is-done { background: #dcfce7; color: #15803d; }
.setup-badge.is-todo { background: #ffe4e6; color: #be123c; }
.setup-badge.is-blocked { background: #ffedd5; color: #c2410c; }
.setup-sub { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.55; margin: 8px 0; }
.setup-hint { font-size: var(--fs-sm); font-weight: 800; color: #be123c; margin: 8px 0 0; }
.setup-tabs { margin: 10px 0 4px; }
.setup-steps { margin: 6px 0 4px; padding-left: 1.4em; font-size: var(--fs-sm); line-height: 1.6; }
.setup-steps li { margin: 4px 0; }
.setup-never { display: block; margin: 6px auto 0; }
.setup-lost { margin: 0 0 12px; font-weight: 700; }

/* study: the 番茄 lengths, folded under one line */
.study-lengths { margin: 14px 0 6px; padding: 10px 12px; border-radius: var(--r-md); background: var(--cream-2, #fff7ed); }
.study-lengths summary { cursor: pointer; font-weight: 800; font-size: var(--fs-sm); color: var(--ink-2); list-style: none; }
.study-lengths summary::-webkit-details-marker { display: none; }
.study-lengths summary::after { content: " ›"; color: var(--ink-3, #78716c); }
.study-lengths[open] summary::after { content: " ⌄"; }

/* 默契问答: the question about me and the guess about TA look different */
.tacit-card { position: relative; margin-bottom: 10px; }
.tacit-card.is-guess { background: #f5f3ff; box-shadow: inset 0 0 0 2px #ddd6fe; }
.tacit-tag { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: #fff1f2; color: #e11d48; }
.tacit-card.is-guess .tacit-tag { background: #ede9fe; color: #6d28d9; }

/* 五子棋 */
.gmk-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 2px; }
.gmk-board {
  display: grid; grid-template-columns: repeat(15, 1fr); width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto 10px;
  padding: 2%; border-radius: 12px; background: #f2c38b; box-shadow: inset 0 0 0 3px #b7793f, 0 4px 12px rgba(120, 72, 40, .2);
}
.gmk-cell {
  position: relative; border: 0; padding: 0; background:
    linear-gradient(#8a5a2b, #8a5a2b) center / 100% 1px no-repeat, linear-gradient(#8a5a2b, #8a5a2b) center / 1px 100% no-repeat;
  -webkit-tap-highlight-color: transparent;
}
.gmk-cell.is-black::after, .gmk-cell.is-white::after {
  content: ""; position: absolute; inset: 8%; border-radius: 50%; animation: gmkDrop .25s var(--ease-spring);
}
.gmk-cell.is-black::after { background: radial-gradient(circle at 35% 30%, #6b6b75, #141419 70%); }
.gmk-cell.is-white::after { background: radial-gradient(circle at 35% 30%, #fff, #e7e2dc 75%); box-shadow: 0 0 0 1px #b8aea4; }
.gmk-cell.is-last::before { content: ""; position: absolute; inset: 30%; z-index: 1; border-radius: 50%; box-shadow: 0 0 0 2px #f43f5e; }
.gmk-cell.is-win::after { box-shadow: 0 0 0 2px #fde047, 0 0 10px 2px #fbbf24; }
@keyframes gmkDrop { from { transform: scale(1.5); opacity: 0; } }
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 320px); margin: 14px auto; }
.ttt-cell { aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fffaf4; font-size: 38px; display: grid; place-items: center; }
.ttt-cell.is-win { background: #fef3c7; border-color: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.memory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.memory-card { aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fef3c7; font-size: 25px; display: grid; place-items: center; }
.memory-card.is-miss { background:#fee2e2; border-color:#fca5a5; animation:memoryMiss .4s ease; }
@keyframes memoryMiss { 25% { transform:translateX(-3px); } 75% { transform:translateX(3px); } }
.memory-card.is-open { background: #fff; }
.memory-card.is-matched { background: #dcfce7; border-color: #86efac; }
.draw-canvas { display: block; width: 100%; max-width: 360px; aspect-ratio: 320 / 260; margin: 12px auto; border: 2px dashed #fda4af; border-radius: var(--r-lg); background: #fff; touch-action: none; }
.draw-tools { justify-content: center; margin: 6px 0; }
.draw-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: var(--c); box-shadow: 0 0 0 1.5px var(--line); font-size: 15px; display: grid; place-items: center; padding: 0; }
.draw-swatch.is-eraser { background: #fff; }
.draw-swatch.is-on { box-shadow: 0 0 0 3px #fb7185; transform: scale(1.1); }
.draw-dot { display: inline-block; border-radius: 50%; background: currentColor; margin-right: 4px; vertical-align: middle; }
.draw-word { text-align: center; }
.draw-word-text { font-size: 28px; font-weight: 800; letter-spacing: 2px; color: #be123c; margin: 4px 0; }
.draw-miss { color: var(--muted, #9ca3af); text-decoration: line-through; }
/* ---------------- real-time couple games ---------------- */
.live-scorebar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0 14px; padding:10px 14px; border-radius:16px; background:var(--surface-2, #fff7ed); color:var(--ink-2, #6b4f3d); }
.live-action-button { display:grid; place-items:center; width:min(72vw, 260px); aspect-ratio:1; margin:18px auto; border:0; border-radius:50%; color:#fff; font-size:28px; font-weight:800; cursor:pointer; box-shadow:0 12px 30px rgba(190,24,93,.25); background:linear-gradient(145deg,#fb7185,#be123c); touch-action:manipulation; }
.live-action-button.is-relay { background:linear-gradient(145deg,#f59e0b,#ea580c); }
.live-action-button:active { transform:scale(.94); }
.live-mode-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.live-mode-card { display:flex; min-height:126px; flex-direction:column; align-items:flex-start; justify-content:center; gap:6px; text-align:left; }
/* ---------------- 🔎 寻物记 ---------------- */
.find-intro { margin:2px 0 12px; }
.find-invite { display:flex; align-items:center; gap:10px; margin:2px 0 14px; padding:12px; border:2px solid #f9a8d4; }
.find-invite-icon { font-size:28px; }
.find-invite-main { display:flex; flex:1; min-width:0; flex-direction:column; gap:2px; }
.find-invite-main b { overflow-wrap:anywhere; }
.find-invite-actions { display:flex; flex-direction:column; gap:6px; }
.find-level-head { display:flex; align-items:baseline; gap:8px; margin:18px 2px 8px; }
.find-level-head b { font-size:17px; }
.find-stars { color:#f59e0b; letter-spacing:1px; font-size:13px; }
.find-style { flex:1; font-size:12px; color:var(--ink-3, #a08a78); }
.find-pick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; }
.find-pick-card { display:flex; flex-direction:column; gap:8px; padding:8px; }
.find-thumb { aspect-ratio:3/2; border-radius:14px; overflow:hidden; background:#f3e6d4; }
.find-thumb svg { display:block; width:100%; height:100%; }
.find-pick-info { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 8px; }
.find-pick-info .muted { flex-basis:100%; font-size:12px; }
.find-pick-actions { display:grid; grid-template-columns:1fr; gap:6px; margin-top:auto; }
.sheet-body.find-play-body { display:flex; flex-direction:column; padding:0; overflow:hidden; touch-action:none; }
.find-hud { display:flex; flex-shrink:0; align-items:center; gap:10px; padding:6px 12px 8px; color:var(--ink-2, #6b4f3d); }
.find-back { flex-shrink:0; font-size:26px; line-height:1; }
.find-hud-title { display:flex; flex:1; min-width:0; flex-direction:column; }
.find-hud-title b { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.find-who { font-size:12px; }
.find-count { flex-shrink:0; padding:4px 10px; border-radius:999px; background:#fff7ed; font-variant-numeric:tabular-nums; }
.find-hint-btn { flex-shrink:0; min-width:78px; }
.find-stage { position:relative; flex:1; min-height:0; overflow:hidden; touch-action:none; user-select:none; -webkit-user-select:none; cursor:grab; background:#f3e6d4; }
.find-stage:active { cursor:grabbing; }
.find-stage > svg { display:block; width:100%; height:100%; }
.find-mark .find-ring { fill:rgba(255,255,255,.18); stroke:#22c55e; stroke-width:4; }
.find-mark.is-theirs .find-ring { stroke:#3b82f6; }
.find-burst { fill:none; stroke:#22c55e; stroke-width:5; transform-box:fill-box; transform-origin:center; animation:findBurst .8s ease-out both; }
.find-mark.is-theirs .find-burst { stroke:#3b82f6; }
.find-miss path { fill:none; stroke:#ef4444; stroke-width:4; stroke-linecap:round; animation:findFade .7s ease-out both; }
.find-hint { fill:rgba(250,204,21,.12); stroke:#f59e0b; stroke-width:4; stroke-dasharray:10 8; transform-box:fill-box; transform-origin:center; animation:findHint 1.2s ease-in-out 3.5 both; }
@keyframes findBurst { from { transform:scale(.6); opacity:1; } to { transform:scale(1.8); opacity:0; } }
@keyframes findFade { from { opacity:1; } to { opacity:0; } }
@keyframes findHint { 0% { opacity:0; transform:scale(1.4); } 40% { opacity:1; transform:scale(1); } 100% { opacity:.2; transform:scale(1.06); } }
.find-tray { display:flex; flex-shrink:0; gap:8px; padding:10px 12px max(10px, var(--safe-bottom, 0px)); overflow-x:auto; overscroll-behavior-x:contain; touch-action:pan-x; border-top:1px solid var(--line, #f1e4d3); background:var(--cream, #fff8ee); scrollbar-width:none; }
.find-tray::-webkit-scrollbar { display:none; }
.find-chip { display:flex; flex-shrink:0; align-items:center; gap:5px; padding:6px 10px; border-radius:999px; background:#fff; box-shadow:0 2px 8px rgba(90,67,52,.12); font-size:13px; font-weight:700; color:var(--ink-2, #6b4f3d); transition:opacity .25s, background .25s; }
.find-chip-icon { font-size:18px; }
.find-chip-pic { flex-shrink:0; width:36px; height:36px; margin:-4px 0 -4px -4px; border-radius:10px; background-color:#f3e6d4; background-repeat:no-repeat; box-shadow:inset 0 0 0 1px rgba(90,67,52,.15); }
.find-chip.is-found { opacity:.55; background:#dcfce7; text-decoration:line-through; }
.find-chip.is-found.is-theirs { background:#dbeafe; }
.find-done { position:absolute; inset:0; display:grid; place-items:center; padding:16px; background:rgba(60,40,30,.32); }
.find-done[hidden] { display:none; }
.find-done-card { width:min(100%, 340px); padding:20px 18px 16px; border-radius:22px; background:var(--cream, #fff8ee); text-align:center; box-shadow:0 18px 50px rgba(60,30,20,.3); animation:findPop .35s var(--ease-spring, ease-out) both; }
.find-done-title { margin-bottom:6px; font-size:24px; font-weight:900; }
.find-done-actions { display:flex; flex-direction:column; gap:8px; margin-top:14px; }
@keyframes findPop { from { transform:scale(.85); opacity:0; } to { transform:scale(1); opacity:1; } }
/* ---------------- 藏猫猫 ---------------- */
.hide-room { position:relative; width:100%; aspect-ratio:1/1; margin:10px 0 14px; border-radius:18px; overflow:hidden; background:linear-gradient(180deg,#fde7d3 0 34%,#f6d2b3 34% 36%,#fff4e6 36% 66%,#e9c9a6 66% 68%,#f3dcc0 68% 100%); box-shadow:inset 0 0 0 2px rgba(190,120,70,.12); }
.hide-spot { position:absolute; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; gap:1px; width:clamp(58px,21%,96px); padding:4px 2px; border:2px solid transparent; border-radius:14px; background:rgba(255,255,255,.55); color:var(--ink-2,#6b4f3d); cursor:pointer; touch-action:manipulation; transition:transform .15s, background .15s, border-color .15s; }
.hide-spot:active { transform:translate(-50%,-50%) scale(.92); }
.hide-spot:disabled { cursor:default; }
.hide-spot-icon { font-size:clamp(24px,7vw,36px); line-height:1.1; }
.hide-spot-label { font-size:11px; font-weight:700; white-space:nowrap; }
.hide-spot-room { font-size:9.5px; opacity:.7; white-space:nowrap; }
.hide-spot.is-picked { border-color:#f97316; background:#fff; box-shadow:0 0 0 4px rgba(249,115,22,.18); }
.hide-spot.is-tried { opacity:.9; }
.hide-spot.is-hot { background:#fecaca; }
.hide-spot.is-warm { background:#fed7aa; }
.hide-spot.is-cold { background:#dbeafe; }
.hide-spot.is-found, .hide-spot.has-cat { background:#bbf7d0; border-color:#22c55e; }
.hide-spot-hint { position:absolute; top:-8px; right:-6px; font-size:18px; }
.hide-spot.has-cat .hide-spot-icon { animation:hidePeek .5s ease-out both; }
@keyframes hidePeek { from { transform:translateY(10px) scale(.4); opacity:0; } to { transform:none; opacity:1; } }
.hide-status { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:8px 0; padding:10px 14px; border-radius:16px; background:var(--surface-2,#fff7ed); color:var(--ink-2,#6b4f3d); }
.hide-last { margin:6px 2px 0; font-weight:700; }
/* ---------------- 心有灵犀 ---------------- */
.sync-target { display:flex; flex-direction:column; align-items:center; gap:2px; margin:14px 0 0; }
.sync-target b { font-size:40px; font-weight:800; color:#be123c; letter-spacing:1px; }
.live-action-button.is-counting { animation:syncBeat 1s ease-in-out infinite; }
@keyframes syncBeat { 0%,100% { box-shadow:0 12px 30px rgba(234,88,12,.25), 0 0 0 0 rgba(249,115,22,.35); } 50% { box-shadow:0 12px 30px rgba(234,88,12,.25), 0 0 0 18px rgba(249,115,22,0); } }
.sync-hint { text-align:center; }
.sync-row { display:flex; flex-direction:column; gap:2px; padding:8px 0; border-top:1px solid rgba(190,120,70,.14); }
.sync-row:first-of-type { border-top:0; }
.sync-tier { font-weight:700; }
/* ---------------- 拔河 ---------------- */
.tug-field { margin:14px 0 4px; }
.tug-ends { display:flex; justify-content:space-between; font-size:13px; color:var(--ink-2,#6b4f3d); margin-bottom:8px; }
.tug-track { position:relative; height:44px; border-radius:22px; background:linear-gradient(90deg,#fecdd3 0 5%,#fff7ed 5% 95%,#bfdbfe 95% 100%); box-shadow:inset 0 0 0 2px rgba(190,120,70,.14); }
.tug-track::before { content:""; position:absolute; left:4%; right:4%; top:50%; height:6px; margin-top:-3px; border-radius:3px; background:repeating-linear-gradient(60deg,#c08a5a 0 6px,#a16b3d 6px 12px); }
.tug-mid { position:absolute; left:50%; top:6px; bottom:6px; width:2px; margin-left:-1px; background:rgba(107,79,61,.35); }
.tug-knot { position:absolute; top:50%; transform:translate(-50%,-50%); font-size:30px; transition:left .18s ease-out; filter:drop-shadow(0 3px 3px rgba(30,41,59,.2)); }
/* the two cats lean back harder the further they're being dragged toward the middle */
.tug-cats { display:flex; justify-content:space-between; padding:6px 10px 0; font-size:34px; line-height:1; }
.tug-cat { --lean:0; display:inline-block; transition:transform .18s ease-out; }
.tug-cat.is-mine { transform:rotate(calc(var(--lean) * -22deg)) translateX(calc(var(--lean) * 10px)); }
.tug-cat.is-theirs { transform:scaleX(-1) rotate(calc(var(--lean) * -22deg)) translateX(calc(var(--lean) * 10px)); }
.live-result { text-align:center; margin:10px 0 12px; animation:liveResultIn .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes liveResultIn { from { transform:scale(.88); opacity:0; } to { transform:none; opacity:1; } }
@media (prefers-reduced-motion: reduce) { .tug-cat, .tug-knot, .live-result { transition:none; animation:none; } }
/* ---------------- 海战棋 ---------------- */
.bs-seas { display:grid; gap:14px; margin:10px 0; }
.bs-sea-title { font-weight:700; margin-bottom:6px; color:var(--ink-2,#6b4f3d); }
.bs-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:4px; padding:6px; border-radius:14px; background:#bfe4f7; }
.bs-cell { aspect-ratio:1; display:grid; place-items:center; border:0; border-radius:8px; background:#e0f2fe; font-size:clamp(14px,4.5vw,22px); color:#64748b; padding:0; }
.bs-cell.is-ship { background:#94a3b8; box-shadow:inset 0 0 0 2px #64748b; }
.bs-cell.is-target { background:#f0f9ff; cursor:pointer; box-shadow:inset 0 0 0 1px rgba(14,116,144,.18); }
.bs-cell.is-target:active { transform:scale(.9); background:#fde68a; }
.bs-cell.is-miss { background:#dbeafe; font-size:26px; color:#60a5fa; }
.bs-cell.is-hit { background:#fecaca; }
.bs-cell:disabled { cursor:default; }
/* 布阵: ship chips, the three ships in their own colours, a preview of where the selected one would go */
.bs-chips { display:flex; gap:8px; margin:8px 0; }
.bs-chip { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:8px 4px; border-radius:12px; border:2px solid transparent; background:var(--card-soft,#fff7ed); font-size:12px; color:var(--ink-2,#6b4f3d); }
.bs-chip-hull { letter-spacing:-2px; font-size:14px; }
.bs-chip.is-ship-0 .bs-chip-hull { color:#64748b; } .bs-chip.is-ship-1 .bs-chip-hull { color:#0f766e; } .bs-chip.is-ship-2 .bs-chip-hull { color:#b45309; }
.bs-chip.is-selected { border-color:#f97316; background:#fff1e6; box-shadow:0 4px 12px rgba(249,115,22,.2); }
.bs-chip.is-placed:not(.is-selected) { opacity:.7; }
.bs-grid.is-setup .bs-cell { cursor:pointer; }
.bs-grid.is-setup .bs-cell.is-ship-1 { background:#99d5c9; box-shadow:inset 0 0 0 2px #0f766e; }
.bs-grid.is-setup .bs-cell.is-ship-2 { background:#f5c98b; box-shadow:inset 0 0 0 2px #b45309; }
.bs-grid.is-setup .bs-cell.is-selected { outline:2px solid #f97316; outline-offset:-2px; }
.bs-cell.is-preview { background:#fde68a; }
.bs-cell.is-clash { background:#fecaca; }
.bs-tools { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:10px 0; }
/* ---------------- 心意密码 ---------------- */
.code-history { display:grid; gap:4px; }
.code-row { display:grid; grid-template-columns:24px 1fr auto; align-items:center; gap:8px; padding:4px 0; }
.code-digits { font-size:20px; letter-spacing:4px; font-variant-numeric:tabular-nums; }
.code-score { font-weight:800; color:#be123c; }
.code-score.is-win { color:#16a34a; }
.code-pad { margin-top:10px; }
.code-slots { display:flex; justify-content:center; gap:10px; margin:6px 0 12px; }
.code-slot { display:grid; place-items:center; width:52px; height:60px; border-radius:14px; border:2px dashed rgba(190,120,70,.35); font-size:30px; font-weight:800; color:var(--ink,#3f2d22); }
.code-slot.is-on { border-style:solid; border-color:#f97316; background:#fff; }
.code-keys { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:10px; }
.code-key { height:48px; font-size:20px; font-weight:700; }
/* ---------------- 故事接龙 ---------------- */
.story-lines { display:grid; gap:6px; margin-top:8px; }
.story-line { margin:0; padding:8px 12px; border-radius:14px; background:var(--surface-2,#fff7ed); line-height:1.5; }
.story-line.is-mine { background:#ffe4e6; }
.story-who { display:block; font-size:11px; font-weight:700; color:var(--muted,#9ca3af); }
.story-book summary { cursor:pointer; list-style:none; }
.story-book summary::-webkit-details-marker { display:none; }

/* ---------------- 游戏大厅: grouped tiles with "your turn" badges ---------------- */
.game-lobby-head { margin:2px 0 10px; font-size:13px; color:var(--ink-2,#6b4f3d); }
.game-stats-card { background:linear-gradient(135deg,#fff1f2,#fffbeb); border-color:#fda4af; }
.game-group-head { display:flex; align-items:baseline; gap:8px; margin:16px 2px 8px; }
.game-group-head b { font-size:15px; }
.game-group-head .muted { font-size:12px; }
.game-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.game-tile { position:relative; display:flex; flex-direction:column; align-items:flex-start; gap:3px; min-height:96px; padding:12px; text-align:left; cursor:pointer; transition:transform .12s, box-shadow .12s; }
.game-tile:active { transform:scale(.97); }
.game-tile-icon { font-size:26px; line-height:1; margin-bottom:2px; }
.game-tile-name { font-size:14px; }
.game-tile-desc { font-size:12px; line-height:1.35; color:var(--ink-3,#8a7262); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.game-tile.is-waiting { border-color:#fb7185; box-shadow:0 4px 14px rgba(251,113,133,.22); }
.game-tile.is-dim { opacity:.62; }
.game-tile-badge { position:absolute; top:8px; right:8px; padding:2px 8px; border-radius:999px; background:#fb7185; color:#fff; font-size:11px; font-weight:800; animation:tileBadge 1.6s ease-in-out infinite; }
@keyframes tileBadge { 50% { transform:scale(1.08); } }
@media (min-width:560px) { .game-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .game-tile-badge { animation:none; } }

/* terms, privacy and 备案 links (public/js/legal.js) */
.consent-row a, .legal-footer a, .confirm-text a, .loc-hero ~ .footnote a, .footnote a { color:var(--rose); text-decoration:none; font-weight:600; }
.consent-row input { margin-top:3px; width:16px; height:16px; flex:none; accent-color:var(--rose); }
.chat-ai { opacity:.7; }
