:root {
  --bg: #f0f1f5;
  --dock: #f8f5f6;
  --panel: #ffffff;
  --panel-2: #fff4f5;
  --line: rgba(157, 18, 33, 0.12);
  --text: #1a1520;
  --muted: #78707e;
  --gold: #c51c34;
  --red: #d1122f;
  --wine: #8f0a1f;
  --green: #1aa37f;
  --shadow: 0 24px 80px rgba(150, 18, 32, 0.12);
  --bottom-nav-height: 72px;
  --bottom-nav-gap: 12px;
  --bottom-safe: calc(var(--bottom-nav-height) + var(--bottom-nav-gap) + 36px);
  --neon-red: rgba(209, 18, 47, 0.6);
  --glow-red: 0 0 12px rgba(209, 18, 47, 0.35), 0 0 32px rgba(209, 18, 47, 0.12);
  --glow-red-strong: 0 0 16px rgba(209, 18, 47, 0.5), 0 0 48px rgba(209, 18, 47, 0.2);
  --hud-border: rgba(209, 18, 47, 0.22);
  --font-hud: "Orbitron", "Rajdhani", sans-serif;
  --font-ui: "Rajdhani", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color-scheme: light;
  font-family: "Rajdhani", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

@keyframes neon-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .72; }
}

@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 0 12px rgba(209,18,47,.25), 0 0 32px rgba(209,18,47,.08); }
  50% { box-shadow: 0 0 20px rgba(209,18,47,.45), 0 0 52px rgba(209,18,47,.18); }
}

@keyframes scan-line {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes hud-flicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: .82; }
  98% { opacity: .95; }
}

@keyframes energy-bar-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialog-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-bar-pulse {
  0%, 100% {
    opacity: 1;
    background-size: 100% 100%;
  }
  50% {
    opacity: .78;
    background-size: 120% 100%;
  }
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 24% 8%, rgba(209, 18, 47, 0.08), transparent 30%),
    linear-gradient(180deg, #f4f2f5 0%, #eeeff3 54%, #e8eaef 100%);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: wait; opacity: .55; }

.game-shell {
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  background: linear-gradient(90deg, rgba(244,240,244,1) 0 78px, transparent 78px);
}

.side-dock {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 10px;
  padding: 22px 8px;
  background:
    linear-gradient(180deg, #f6f2f5 0%, #f0ecf0 48%, #eae6ea 100%);
  border-right: 1px solid rgba(209,18,47,.12);
  box-shadow: inset -1px 0 0 rgba(209,18,47,.06);
  z-index: 3;
}

.dock-item {
  width: 100%;
  min-height: 58px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  text-align: center;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  position: relative;
}

.dock-item span {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}


.dock-item b {
  display: block;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .5px;
}
.dock-item:hover, .dock-item.active {
  background: rgba(209, 18, 47, .1);
  color: var(--red);
  transform: translateY(-1px);
}

.phone-frame {
  width: 100%;
  max-width: none;
  height: 100svh;
  min-height: 0;
  margin: 0 auto;
  position: relative;
  background:
    linear-gradient(180deg, rgba(252,250,253,.98), rgba(244,242,246,.96)),
    repeating-linear-gradient(135deg, rgba(209,18,47,.015) 0 1px, transparent 1px 18px);
  border-left: 1px solid var(--hud-border);
  border-right: 1px solid var(--hud-border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.club-header {
  min-height: 96px;
  padding: max(16px, env(safe-area-inset-top)) 18px 12px;
  background:
    linear-gradient(120deg, rgba(180,12,38,.92), rgba(209,18,47,.88), rgba(230,55,75,.84)),
    radial-gradient(circle at 78% 45%, rgba(255,255,255,.14), transparent 30%);
  border-bottom: 2px solid rgba(209,18,47,.3);
  box-shadow: 0 2px 16px rgba(209,18,47,.12);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.club-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: neon-pulse 2.5s ease-in-out infinite;
}

.section-head small {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
}

.brand-lockup img {
  display: block;
  width: min(220px, 54vw);
  max-height: 68px;
  object-fit: contain;
  object-position: left center;
}

.header-action-slot {
  flex: 0 0 96px;
  min-height: 42px;
}

h1, h2, p { margin: 0; }

.count-badge,
.small-pill {
  border: 1px solid var(--hud-border);
  background: rgba(255,255,255,.95);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--red);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .5px;
}

.status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 10px 14px;
  background:
    linear-gradient(180deg, rgba(248,245,248,.98), rgba(240,238,242,.92)),
    #f4f2f5;
  border-bottom: 1px solid var(--hud-border);
  position: relative;
}

.calendar-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  border-radius: 12px;
  border: 1px solid rgba(209,18,47,.25);
  background:
    linear-gradient(135deg, rgba(26,18,24,.04), rgba(209,18,47,.04)),
    rgba(255,255,255,.95);
  padding: 10px 12px 8px;
  box-shadow: inset 0 0 0 1px rgba(209,18,47,.06), 0 8px 24px rgba(150,18,32,.06);
  position: relative;
  overflow: hidden;
}

.calendar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), rgba(255,77,94,.6), var(--red));
  animation: neon-pulse 3s ease-in-out infinite;
}

.calendar-major {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.calendar-major span {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-content: center;
  padding: 4px 0;
  border-right: 1px solid rgba(209,18,47,.1);
}

.calendar-major span:last-child {
  border-right: 0;
}

.calendar-major small {
  color: rgba(209,18,47,.5);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.calendar-major strong {
  color: var(--text);
  font-family: var(--font-hud);
  font-size: 14px;
  line-height: 1.12;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .5px;
}

.calendar-major span:nth-child(2) strong {
  color: var(--red);
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(209,18,47,.3);
  animation: hud-flicker 4s ease-in-out infinite;
}

.calendar-minor {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  border-radius: 4px;
  background: rgba(209,18,47,.08);
  border: 1px solid rgba(209,18,47,.12);
  color: var(--red);
  padding: 0 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .5px;
}

.calendar-minor i {
  color: rgba(209,18,47,.35);
  font-style: normal;
}

.go-week-button {
  width: 84px;
  min-height: 68px;
  border: 1px solid rgba(209,18,47,.4);
  border-radius: 12px;
  background:
    linear-gradient(150deg, #d1122f 0%, #8a0c1e 100%);
  color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  box-shadow: var(--glow-red);
  transition: transform .18s ease, box-shadow .18s ease;
  animation: glow-breathe 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.go-week-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.15) 0%, transparent 50%);
  pointer-events: none;
}

.go-week-button::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.08), transparent);
  animation: scan-line 2.5s linear infinite;
  pointer-events: none;
}

.go-week-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--glow-red-strong);
}

.go-week-button strong {
  font-family: var(--font-hud);
  font-size: 26px;
  line-height: .95;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255,255,255,.4);
}

.go-week-button span {
  color: rgba(255,255,255,.75);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .5px;
}

.tab-panel {
  display: none;
  padding: 16px 14px var(--bottom-safe);
  height: calc(100svh - 219px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tab-panel.active { display: block; animation: rise .2s ease both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.section-head h2 {
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
}

.round-add {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(135deg, #d1122f, #8a0c1e);
  color: white;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(209, 18, 47, 0.22);
}

.group-block {
  margin-bottom: 16px;
}

.group-title {
  color: var(--red);
  font-weight: 900;
  font-size: 13px;
  margin: 0 0 8px;
}

.focus-card,
.person-row,
.profile-card,
.action-panel,
.phone-thread,
.story-log,
.time-board {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(150, 18, 32, 0.06);
}

.focus-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.focus-avatar,
.avatar,
.profile-avatar {
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(209,18,47,.9), rgba(255,170,178,.72)),
    #ffffff;
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(209,18,47,.16), inset 0 0 0 3px rgba(255,255,255,.8);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.focus-avatar.has-photo,
.avatar.has-photo,
.profile-avatar.has-photo,
.bubble-avatar.has-photo {
  background-image: var(--avatar-image);
  color: transparent;
  font-size: 0;
}

.focus-avatar { width: 56px; height: 56px; font-size: 24px; }
.focus-card strong { display: block; font-size: 18px; }
.focus-card p { color: var(--muted); font-size: 12px; margin-top: 4px; }

.team-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ops-ledger {
  border: 1px solid var(--hud-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,244,246,.94)),
    #fff;
  box-shadow: 0 12px 36px rgba(150,18,32,.08);
  overflow: hidden;
  position: relative;
}

.ops-ledger::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(209,18,47,.4) 50%, transparent 90%);
}

.ops-ledger-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--hud-border);
  background:
    linear-gradient(105deg, rgba(209,18,47,.06), rgba(248,244,246,.7) 48%, rgba(255,255,255,.9));
}

.ops-ledger-head span {
  color: var(--red);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
}

.ops-ledger-head strong {
  border-radius: 4px;
  background: rgba(209,18,47,.08);
  border: 1px solid rgba(209,18,47,.12);
  color: var(--red);
  padding: 4px 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
}

.ops-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  padding: 0;
  background: rgba(209,18,47,.08);
}

.ops-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: rgba(255,255,255,.96);
  position: relative;
  min-height: 80px;
  transition: background .18s ease;
}

.ops-stat-card:hover {
  background: rgba(255,248,249,.98);
}

.ops-stat-card::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 20%;
  right: 20%;
  height: 2px;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, rgba(209,18,47,.15), transparent);
}

.ops-stat-card[data-stat="funds"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--red);
  box-shadow: 0 0 8px rgba(209,18,47,.3);
}

.ops-stat-card[data-stat="cost"]::before {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: #e67a22;
  box-shadow: 0 0 8px rgba(230,122,34,.3);
}

.ops-stat-card[data-stat="opinion"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #1aa37f;
  box-shadow: 0 0 8px rgba(26,163,127,.3);
}

.ops-stat-card[data-stat="salary"]::before {
  content: "";
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 2px 0 0 2px;
  background: #6366f1;
  box-shadow: 0 0 8px rgba(99,102,241,.3);
}

.ops-stat-label {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.ops-stat-value {
  color: var(--red);
  font-family: var(--font-hud);
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(209,18,47,.15);
}

.ops-stat-card[data-stat="cost"] .ops-stat-value {
  color: #e67a22;
}

.ops-stat-card[data-stat="opinion"] .ops-stat-value {
  color: #1aa37f;
}

.ops-stat-card[data-stat="salary"] .ops-stat-value {
  color: #6366f1;
}

.todo-board {
  margin-top: 14px;
  border: 1px solid var(--hud-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,246,248,.94)),
    #fff;
  box-shadow: 0 12px 32px rgba(150,18,32,.06);
  overflow: hidden;
  position: relative;
}

.todo-board::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(209,18,47,.35) 50%, transparent 90%);
}

.todo-board-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--hud-border);
  background:
    linear-gradient(105deg, rgba(209,18,47,.05), rgba(248,244,246,.7) 48%, rgba(255,255,255,.92));
}

.todo-board-head div {
  display: grid;
  gap: 2px;
}

.todo-board-head span {
  color: var(--red);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
}

.todo-board-head small {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
}

.todo-board-head strong {
  min-width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d1122f, #8a0c1e);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-hud);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(209,18,47,.25);
}

.todo-list {
  display: grid;
  gap: 0;
}

.todo-item {
  min-height: 88px;
  display: grid;
  gap: 6px;
  padding: 12px 14px 13px;
  border-bottom: 1px solid rgba(209,18,47,.06);
  position: relative;
}

.todo-item:last-child {
  border-bottom: 0;
}

.todo-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: rgba(209,18,47,.2);
  box-shadow: 0 0 6px rgba(209,18,47,.1);
}

.todo-item.system::before {
  background: var(--red);
  box-shadow: 0 0 10px rgba(209,18,47,.3);
}

.todo-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.todo-type {
  border-radius: 4px;
  background: rgba(209,18,47,.08);
  border: 1px solid rgba(209,18,47,.1);
  color: var(--red);
  padding: 3px 7px;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.todo-item time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.todo-item strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
}

.todo-item p,
.todo-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.todo-empty {
  padding: 18px;
}

.team-metric {
  min-height: 86px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #fff6f7);
  padding: 14px;
  display: grid;
  align-content: space-between;
  box-shadow: 0 14px 30px rgba(150, 18, 32, 0.06);
}

.team-metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.team-metric strong {
  font-size: 30px;
  line-height: 1;
  color: var(--red);
}

.person-row {
  width: 100%;
  min-height: 116px;
  border-radius: 26px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.person-row::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -54px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(209,18,47,.08);
}

.person-row:hover,
.person-row.active {
  transform: translateY(-2px);
  border-color: rgba(209,18,47,.35);
  background: #fff7f8;
}

.avatar {
  width: 68px;
  height: 68px;
  align-self: center;
  font-size: 24px;
}

.person-main {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
}

.person-main strong {
  font-size: 19px;
  line-height: 1.1;
}

.person-main span {
  color: var(--muted);
  font-size: 12px;
}

.person-meta {
  color: var(--gold);
  font-size: 12px;
  margin-top: 3px;
}

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

.bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(209,18,47,.1);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--red);
}

.profile-cta {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.hidden-counter { display: none; }

.chat-card-list {
  display: grid;
  gap: 14px;
}

.chat-count {
  color: var(--muted);
  margin: 0 0 10px;
  font-size: 13px;
}

.contact-row {
  min-height: 114px;
}

.contact-row.active {
  border-color: rgba(209,18,47,.35);
  background: rgba(209,18,47,.08);
}

.contact-main strong,
.contact-main span {
  display: block;
}

.contact-main span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.chat-avatar {
  width: 66px;
  height: 66px;
}

.contact-main .profile-cta {
  margin-top: 10px;
  max-width: 96%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-thread {
  min-height: 310px;
  max-height: 42svh;
  overflow-y: auto;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.message {
  max-width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.55;
  font-size: 14px;
}

.log-entry {
  max-width: 88%;
  border-radius: 18px;
  padding: 10px 12px;
  line-height: 1.55;
  font-size: 14px;
}

.message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.message.assistant {
  justify-content: flex-start;
}

.bubble-stack {
  max-width: min(360px, 76%);
  display: grid;
  gap: 6px;
  position: relative;
}

.message.user .bubble-stack {
  justify-items: end;
}

.bubble-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(209,18,47,.88), rgba(255,177,184,.7)),
    #fff;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(209,18,47,.14), inset 0 0 0 2px rgba(255,255,255,.82);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.bubble {
  max-width: 100%;
  padding: 9px 12px 10px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  overflow-wrap: anywhere;
  border: 1px solid rgba(209,18,47,.1);
  box-shadow: 0 10px 24px rgba(150,18,32,.08);
}

.bubble.typing {
  min-width: 124px;
}

.bubble-text {
  white-space: pre-wrap;
}

.bubble-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  vertical-align: middle;
}

.bubble-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .28;
  animation: chat-typing-bounce 1s ease-in-out infinite;
  animation-delay: calc(var(--dot-index, 0) * .14s);
}

@keyframes chat-typing-bounce {
  0%, 80%, 100% {
    opacity: .28;
    transform: translateY(0);
  }
  40% {
    opacity: .82;
    transform: translateY(-3px);
  }
}

.message.assistant .bubble {
  border-bottom-left-radius: 5px;
}

.message.user .bubble {
  background: linear-gradient(135deg, #d7283b, #a71f30);
  border-bottom-right-radius: 5px;
}

.message.user .bubble-avatar {
  background:
    linear-gradient(135deg, rgba(255,220,223,.95), rgba(209,18,47,.72)),
    #fff;
}

.bubble time,
.log-entry time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 3px;
}

.message.user .bubble time {
  color: rgba(255,255,255,.72);
}

.message-actions,
.message-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message.user .message-actions,
.message.user .message-edit-actions {
  justify-content: flex-end;
}

.message-tool {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(209,18,47,.14);
  background: rgba(255,255,255,.9);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(150,18,32,.05);
}

.message-tool.edit,
.message-tool.muted {
  color: var(--muted);
}

.message-tool.regen {
  color: var(--red);
}

.message-tool.save {
  color: #fff;
  border-color: rgba(215,40,59,.65);
  background: linear-gradient(135deg, #d1122f, #941024);
}

.message-tool.danger {
  color: #b42318;
}

.message-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  min-width: 124px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(209,18,47,.18);
  background: rgba(255,255,255,.98);
  box-shadow: 0 18px 44px rgba(150,18,32,.18);
}

.message.user .message-menu {
  left: auto;
  right: 0;
}

.message-menu-item {
  width: 100%;
  min-height: 38px;
  display: block;
  border: 0;
  border-bottom: 1px solid rgba(209,18,47,.08);
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 800;
}

.message-menu-item:last-child {
  border-bottom: 0;
}

.message-menu-item:hover {
  background: rgba(209,18,47,.07);
}

.message-menu-item.regen {
  color: var(--red);
}

.message-menu-item.voice {
  color: var(--red);
}

.message-menu-item.danger {
  color: #b42318;
}

.voice-play-button {
  justify-self: start;
  width: 36px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(206, 196, 222, .45);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,246,250,.96));
  color: #7b79b4;
  position: relative;
  display: grid;
  place-items: center;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 8px 20px rgba(84, 52, 92, .12);
}

.voice-play-button.playing {
  border-color: rgba(209,18,47,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,237,242,.98));
  color: var(--red);
}

.voice-play-button::before,
.voice-play-button::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.voice-play-button::before {
  width: 11px;
  height: 10px;
  background: currentColor;
  clip-path: polygon(0 35%, 30% 35%, 60% 10%, 60% 90%, 30% 65%, 0 65%);
  transform: translate(-64%, -50%);
}

.voice-play-button::after {
  width: 6px;
  height: 6px;
  border: 1.8px solid rgba(191, 182, 225, .95);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 100% 0 0;
  transform: translate(-2%, -54%) rotate(45deg);
}

.voice-play-button.playing::before {
  width: 8px;
  height: 8px;
  clip-path: none;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.voice-play-button.playing::after {
  display: none;
}

.voice-play-button[data-state="loading"]::before {
  width: 4px;
  height: 4px;
  clip-path: none;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -7px 0 0 0 currentColor, 7px 0 0 0 currentColor;
  transform: translate(-50%, -50%);
}

.voice-play-button[data-state="loading"]::after {
  display: none;
}

.bubble-editor {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,.98);
}

.message-edit-input {
  min-height: 68px;
  max-height: 150px;
  resize: none;
  overflow-y: auto;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(209,18,47,.08);
}

.wechat-head {
  min-height: 70px;
  display: grid;
  grid-template-columns: 36px 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}

.wechat-head .focus-avatar {
  width: 46px;
  height: 46px;
  font-size: 20px;
}

.clickable-avatar {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}

.clickable-avatar:hover,
.clickable-avatar:focus-visible {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 16px 30px rgba(209,18,47,.2), inset 0 0 0 3px rgba(255,255,255,.88);
}

.wechat-head strong,
.wechat-head span {
  display: block;
}

.wechat-head span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.wechat-head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wechat-back,
.wechat-tool,
.wechat-send,
.wechat-profile,
.wechat-icon-button {
  border: 0;
  display: grid;
  place-items: center;
}

.wechat-back {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,242,247,.96));
  color: transparent;
  font-size: 0;
  line-height: 0;
  position: relative;
  box-shadow: 0 8px 22px rgba(209,18,47,.10), inset 0 0 0 1px rgba(209,18,47,.08);
}

.wechat-back::before,
.wechat-back::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

.wechat-back::before {
  width: 9px;
  height: 9px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: translate(-60%, -50%) rotate(45deg);
}

.wechat-back::after {
  width: 10px;
  height: 2px;
  background: var(--red);
  border-radius: 999px;
  transform: translate(-18%, -50%);
}

.wechat-profile {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.wechat-icon-button {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  color: var(--red);
  font-size: 18px;
  box-shadow: none;
}

.wechat-icon-button:hover,
.wechat-icon-button:focus-visible {
  transform: translateY(-1px) scale(1.04);
}

.wechat-icon-button:disabled {
  opacity: .55;
}

.wechat-composer {
  min-height: 68px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 64px;
  align-items: end;
  gap: 8px;
  padding: 10px 14px 12px;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--line);
}

.wechat-tool {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(209,18,47,.08);
  color: var(--red);
  font-weight: 900;
}

.wechat-composer textarea {
  min-height: 40px;
  max-height: 92px;
  resize: none;
  overflow-y: hidden;
  border-radius: 16px;
  padding: 9px 12px;
  background: #fff;
}

.wechat-send {
  min-height: 40px;
  border-radius: 16px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
}

#chatThreadView {
  min-height: 100%;
}

#chatThreadView:not(.hidden) {
  display: flex;
  flex-direction: column;
}

#tab-chat.chat-thread-mode {
  padding: 0;
  height: calc(100svh - 219px - var(--bottom-safe));
  margin-bottom: var(--bottom-safe);
  overflow: hidden;
}

#tab-chat.chat-thread-mode .section-head {
  display: none;
}

#tab-chat.chat-thread-mode .phone-thread {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255,244,245,.92), rgba(255,250,250,.82) 28%, rgba(247,248,251,.95)),
    repeating-linear-gradient(0deg, rgba(209,18,47,.025) 0 1px, transparent 1px 34px);
  padding: 18px 14px;
}

.composer,
.intent-box,
.system-prompt {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

select option { color: #111; }
textarea { resize: vertical; line-height: 1.55; }
textarea:focus, input:focus, select:focus { border-color: rgba(215,40,59,.65); }

.primary-button,
.ghost-button,
.tool-button {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0 16px;
  background: #fff;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: .3px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.primary-button {
  border-color: rgba(215,40,59,.55);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 40%),
    linear-gradient(135deg, #d1122f 0%, #941024 100%);
  color: #fff;
  font-weight: 900;
  box-shadow:
    0 0 0 1px rgba(209,18,47,.15),
    0 8px 20px rgba(209,18,47,.22),
    0 2px 6px rgba(209,18,47,.12);
  position: relative;
  overflow: hidden;
}

.primary-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, transparent 50%);
  pointer-events: none;
}

.primary-button:hover:not(:disabled) {
  box-shadow:
    0 0 0 1px rgba(209,18,47,.2),
    0 12px 28px rgba(209,18,47,.3),
    0 4px 10px rgba(209,18,47,.15);
}

.full { width: 100%; margin-top: 10px; }

.map-region-note {
  min-height: 58px;
  margin-bottom: 14px;
  border: 1px solid rgba(209,18,47,.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(209,18,47,.08), rgba(255,255,255,.92)),
    #fff;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.map-region-note strong {
  color: var(--red);
  font-size: 14px;
}

.map-region-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.map-sections {
  display: grid;
  gap: 18px;
  margin-bottom: 14px;
}

.map-area-section {
  display: grid;
  gap: 9px;
}

.map-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.map-area-head h3 {
  margin: 0;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0;
}

.map-area-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.map-card-list {
  display: grid;
  gap: 10px;
}

.map-card {
  min-height: 138px;
  border: 1px solid rgba(209,18,47,.16);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96) 0%, rgba(255,244,246,.92) 54%, rgba(255,255,255,.96) 100%),
    repeating-linear-gradient(135deg, rgba(209,18,47,.045) 0 1px, transparent 1px 18px);
  padding: 13px;
  display: grid;
  gap: 8px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.map-card:hover:not(:disabled),
.map-card.active {
  transform: translateY(-2px);
  border-color: rgba(209,18,47,.46);
  box-shadow: 0 18px 36px rgba(150,18,32,.12);
  background:
    linear-gradient(145deg, #fff 0%, #fff2f4 58%, #fff 100%),
    repeating-linear-gradient(135deg, rgba(209,18,47,.055) 0 1px, transparent 1px 18px);
}

.map-card.has-bg {
  min-height: 166px;
  background:
    linear-gradient(180deg, rgba(22, 10, 13, .16), rgba(22, 10, 13, .78)),
    var(--map-card-bg);
  background-size: cover;
  background-position: center;
  color: #fff;
  border-color: rgba(255,255,255,.36);
  box-shadow: 0 18px 38px rgba(150,18,32,.16);
}

.map-card.has-bg:hover:not(:disabled),
.map-card.has-bg.active {
  border-color: rgba(255,255,255,.72);
  background:
    linear-gradient(180deg, rgba(22, 10, 13, .08), rgba(22, 10, 13, .72)),
    var(--map-card-bg);
  background-size: cover;
  background-position: center;
}

.map-card.locked {
  opacity: .58;
  filter: grayscale(.14);
}

.map-card-meta,
.map-card-tags {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.map-card-meta {
  justify-content: space-between;
}

.map-card-meta span,
.map-card-tags span {
  border-radius: 999px;
  background: rgba(209,18,47,.08);
  color: var(--red);
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
}

.map-card-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.map-card strong,
.map-card p {
  position: relative;
  z-index: 1;
}

.map-card strong {
  font-size: 18px;
  line-height: 1.1;
}

.map-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.map-card-tags span {
  max-width: 100%;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(209,18,47,.08);
}

.map-card.has-bg strong,
.map-card.has-bg p,
.map-card.has-bg .map-card-meta small {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.46);
}

.map-card.has-bg .map-card-meta span {
  color: #fff;
  background: rgba(209,18,47,.82);
}

.map-card.has-bg .map-card-tags span {
  color: #fff;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  backdrop-filter: blur(10px);
}

.action-panel {
  padding: 12px;
}

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

label {
  color: var(--muted);
  font-size: 12px;
}

.action-row,
.dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.activity-hero-note,
.schedule-week-summary {
  margin-bottom: 14px;
}

.activity-hero-note,
.schedule-week-card {
  border: 1px solid rgba(209,18,47,.12);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(209,18,47,.08), rgba(255,255,255,.94)),
    repeating-linear-gradient(135deg, rgba(209,18,47,.03) 0 1px, transparent 1px 16px);
}

.activity-hero-note {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.activity-card-grid,
.activity-plan-list,
.schedule-week-summary {
  display: grid;
  gap: 12px;
}

.activity-card {
  min-height: 152px;
  border: 1px solid rgba(209,18,47,.14);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96) 0%, rgba(255,244,246,.94) 56%, rgba(255,255,255,.98) 100%),
    radial-gradient(circle at top right, rgba(209,18,47,.12), transparent 45%);
  padding: 14px;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  overflow: hidden;
  position: relative;
}

.activity-card:hover,
.activity-card.active {
  transform: translateY(-2px);
  border-color: rgba(209,18,47,.42);
  box-shadow: 0 16px 32px rgba(150,18,32,.12);
}

.activity-card.has-bg {
  background:
    linear-gradient(180deg, rgba(26, 12, 16, .16), rgba(26, 12, 16, .78)),
    var(--activity-card-bg);
  background-size: cover;
  background-position: center;
  color: #fff;
}

.activity-card-badges,
.activity-preview-stats,
.activity-plan-grid,
.activity-participant-list {
  display: grid;
  gap: 10px;
}

.activity-card-badges {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.activity-card-badges span,
.activity-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}

.activity-card-badges span {
  color: var(--red);
  background: rgba(209,18,47,.08);
  text-align: center;
}

.activity-card.has-bg .activity-card-badges span {
  color: #fff;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.24);
}

.activity-card-body {
  display: grid;
  gap: 12px;
}

.activity-card strong,
.activity-preview-copy strong,
.activity-plan-top strong {
  font-size: 18px;
  line-height: 1.15;
}

.activity-card p,
.activity-preview-copy p,
.activity-plan-body p,
.schedule-week-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.activity-card.has-bg p,
.activity-card.has-bg strong {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.36);
}

.activity-plan-shell {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 28px rgba(150,18,32,.06);
}

.activity-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.activity-plan-head.compact {
  margin-bottom: 10px;
}

.activity-plan-head small,
.activity-preview-copy small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.activity-plan-head strong {
  display: block;
  color: var(--red);
  font-size: 16px;
}

.activity-type-preview {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,249,250,.95), rgba(255,255,255,.98));
  border: 1px solid rgba(209,18,47,.1);
}

.activity-preview-copy {
  display: grid;
  gap: 6px;
}

.activity-preview-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-preview-stats article,
.activity-plan-card,
.schedule-week-card {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(209,18,47,.1);
  background: rgba(255,255,255,.96);
}

.activity-preview-stats article small,
.activity-plan-top small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.activity-preview-stats article strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 15px;
}

.activity-plan-grid {
  margin-top: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-participant-shell {
  margin-top: 14px;
}

.activity-participant-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-participant-item {
  position: relative;
  min-height: 74px;
  border: 1px solid rgba(209,18,47,.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff7f8);
  padding: 12px;
  display: grid;
  gap: 6px;
  align-content: start;
  cursor: pointer;
}

.activity-participant-item.active {
  border-color: rgba(209,18,47,.4);
  background: linear-gradient(180deg, rgba(255,244,246,.96), rgba(255,255,255,.98));
  box-shadow: inset 0 0 0 1px rgba(209,18,47,.08);
}

.activity-participant-item input {
  position: absolute;
  right: 12px;
  top: 12px;
}

.activity-participant-item strong {
  font-size: 14px;
  color: var(--text);
}

.activity-participant-item span {
  color: var(--muted);
  font-size: 12px;
}

.activity-plan-top,
.schedule-week-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.schedule-week-card {
  flex-direction: column;
}

.activity-plan-body {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.activity-plan-card.selling {
  border-color: rgba(214, 129, 22, .22);
}

.activity-plan-card.ongoing {
  border-color: rgba(209,18,47,.28);
}

.activity-plan-card.completed {
  border-color: rgba(24, 128, 86, .24);
}

.activity-status-chip.selling {
  color: #8c5100;
  background: rgba(255,196,87,.2);
}

.activity-status-chip.ongoing {
  color: #a00f28;
  background: rgba(209,18,47,.1);
}

.activity-status-chip.completed {
  color: #116246;
  background: rgba(28,160,109,.12);
}

.activity-status-chip.cancelled {
  color: var(--muted);
  background: rgba(128,128,128,.12);
}

.activity-empty-state {
  padding: 18px;
  border: 1px dashed rgba(209,18,47,.18);
  border-radius: 18px;
  background: rgba(255,250,251,.94);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.time-board {
  background: rgba(209,18,47,.05);
  border-radius: 22px;
  display: grid;
  grid-template-columns: 64px repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.schedule-head,
.schedule-day {
  min-height: 42px;
  display: grid;
  place-items: center;
  background: rgba(209,18,47,.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.schedule-head.corner {
  color: var(--muted);
}

.schedule-day {
  min-height: 64px;
  color: var(--gold);
}

.schedule-day.current {
  background: rgba(209,18,47,.16);
}

.time-cell {
  min-height: 64px;
  border: 0;
  background: rgba(255,255,255,.98);
  text-align: left;
  padding: 9px;
}

.time-cell.readonly {
  cursor: default;
}

.time-cell.current {
  background: rgba(209,18,47,.16);
}

.time-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-note {
  color: var(--muted);
  margin-top: 12px;
}

.schedule-row-bar {
  grid-column: 2 / span 3;
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,249,236,.96), rgba(255,255,255,.98));
}

.schedule-row-bar strong {
  font-size: 14px;
  color: var(--text);
}

.schedule-row-bar span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-row-bar.selling {
  background: linear-gradient(135deg, rgba(255,241,210,.96), rgba(255,255,255,.98));
}

.schedule-row-bar.ongoing {
  background: linear-gradient(135deg, rgba(255,232,236,.96), rgba(255,255,255,.98));
}

.schedule-row-bar.completed {
  background: linear-gradient(135deg, rgba(234,249,242,.96), rgba(255,255,255,.98));
}

.schedule-row-bar.current {
  box-shadow: inset 0 0 0 1px rgba(209,18,47,.2);
}

.schedule-editor {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  background: rgba(255,255,255,.94);
}

.manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.manager-tile {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, #fffefe, #fff6f7);
  text-align: left;
  padding: 12px;
}

.manager-tile strong,
.manager-tile span {
  display: block;
}

.manager-tile strong {
  font-size: 16px;
  color: var(--red);
}

.manager-tile span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.hidden {
  display: none !important;
}

.save-status-hidden {
  display: none;
}

.update-reload-notice {
  position: fixed;
  top: 18px;
  right: 18px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(209, 18, 47, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(255,244,245,.94)),
    rgba(255,255,255,.92);
  color: var(--wine);
  font: 700 15px/1.45 var(--font-ui);
  letter-spacing: .04em;
  box-shadow: 0 18px 48px rgba(143, 10, 31, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
  z-index: 260;
}

.update-reload-notice::before {
  content: "版本更新";
  display: inline-flex;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(209, 18, 47, 0.12);
  color: var(--red);
  font: 800 11px/1 var(--font-hud);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.update-reload-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.story-log {
  min-height: 520px;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.log-entry {
  max-width: none;
  background: rgba(255,255,255,.96);
  border-left: 3px solid var(--red);
}

.log-entry.error { border-color: var(--gold); }

.bottom-nav {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: var(--bottom-nav-gap);
  height: var(--bottom-nav-height);
  border: 1px solid var(--hud-border);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  box-shadow: 0 -2px 16px rgba(150,18,32,.06), 0 12px 32px rgba(150,18,32,.1);
  z-index: 5;
}

.bottom-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209,18,47,.35), transparent);
  z-index: 1;
}

.bottom-item {
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 6px 9px;
  color: var(--muted);
  text-align: center;
  position: relative;
  transition: color .18s ease, background .18s ease;
}

.bottom-item span {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.bottom-item b {
  display: block;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: .45px;
}
.bottom-item.active {
  color: var(--red);
  background: rgba(209,18,47,.06);
}

.bottom-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 8px rgba(209,18,47,.4);
  border-radius: 1px 1px 0 0;
}

body.date-scene-active {
  overflow: hidden;
  background: #10080b;
}

body.date-scene-active .game-shell {
  visibility: hidden;
}

.date-scene {
  position: fixed;
  inset: 0;
  z-index: 100;
  color: #fff;
  background: #12080b;
  overflow: hidden;
}

.date-scene-bg,
.date-scene-vignette {
  position: absolute;
  inset: 0;
}

.date-scene-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(1.06) contrast(1.02);
}

.date-scene-vignette {
  background:
    linear-gradient(180deg, rgba(18, 8, 11, .38), rgba(18, 8, 11, .12) 32%, rgba(18, 8, 11, .86) 78%, rgba(18, 8, 11, .96)),
    radial-gradient(circle at 50% 36%, transparent 0 26%, rgba(18,8,11,.45) 82%);
}

.date-scene-shell {
  width: 100%;
  height: 100svh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.date-scene-head {
  min-height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.date-scene-head small,
.date-encounter-card small {
  display: block;
  color: rgba(255,255,255,.66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.date-scene-head h2 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0,0,0,.46);
}

.date-exit-button {
  min-width: 58px;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(18,8,11,.34);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(18px);
}

.date-scene-counters {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.date-scene-counters span {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 950;
  backdrop-filter: blur(18px);
}

.date-scene-main {
  min-height: 0;
  align-self: end;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 10px 0 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.date-encounter-card {
  width: min(330px, 100%);
  min-height: 72px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(18, 8, 11, .42);
  padding: 10px 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
  backdrop-filter: blur(18px);
}

.date-encounter-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(209,18,47,.92), rgba(255,189,195,.74)),
    #fff;
  color: #fff;
  font-size: 21px;
  font-weight: 950;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), 0 12px 24px rgba(0,0,0,.24);
}

.date-encounter-avatar.has-photo {
  background-image: var(--avatar-image);
  color: transparent;
  font-size: 0;
}

.date-encounter-card strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.12;
}

.date-story-panel {
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.1)),
    rgba(18,8,11,.58);
  padding: 18px;
  box-shadow: 0 22px 56px rgba(0,0,0,.28);
  backdrop-filter: blur(22px);
}

.date-story-panel p {
  color: #fff;
  font-size: 16px;
  line-height: 1.78;
  white-space: pre-wrap;
  text-shadow: 0 2px 14px rgba(0,0,0,.46);
}

.date-scene-error {
  margin-top: 12px;
  border-radius: 16px;
  background: rgba(209,18,47,.26);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.date-scene-rewards {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.date-scene-rewards span {
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.26);
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.date-choice-list {
  display: grid;
  gap: 8px;
}

.date-choice-button {
  width: 100%;
  min-height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.92);
  color: #201419;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 10px 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
  transition: transform .18s ease, background .18s ease;
}

.date-choice-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #fff;
}

.date-choice-button span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d1122f, #941024);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 950;
}

.date-choice-button b {
  font-size: 14px;
  line-height: 1.45;
}

.date-scene-composer {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 10px;
  align-items: end;
  padding-top: 8px;
}

.date-scene-composer textarea {
  min-height: 48px;
  max-height: 120px;
  resize: none;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.92);
  color: #201419;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.date-scene-composer textarea:disabled,
.date-scene-composer button:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.date-scene-composer button:disabled {
  background: #8d6c74;
  box-shadow: none;
}

.date-send-button {
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #d1122f, #941024);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(209,18,47,.32);
}

.date-scene.outing-mode .date-scene-main {
  align-self: stretch;
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.date-scene.outing-mode .date-story-panel {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  padding: 12px;
}

.date-outing-thread {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.42) rgba(255,255,255,.08);
}

.date-outing-thread::-webkit-scrollbar {
  width: 6px;
}

.date-outing-thread::-webkit-scrollbar-track {
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}

.date-outing-thread::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.42);
  border-radius: 999px;
}

.date-outing-message {
  max-width: 100%;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.date-outing-message.user {
  flex-direction: row-reverse;
}

.date-outing-stack {
  max-width: min(560px, 78%);
  display: grid;
  gap: 6px;
  position: relative;
}

.date-outing-message.user .date-outing-stack {
  justify-items: end;
}

.date-outing-avatar {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(209,18,47,.92), rgba(255,189,195,.74)),
    #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72), 0 10px 20px rgba(0,0,0,.22);
}

.date-outing-avatar.has-photo {
  background-image: var(--avatar-image);
  color: transparent;
  font-size: 0;
}

.date-outing-message.user .date-outing-avatar {
  background:
    linear-gradient(135deg, rgba(255,220,223,.95), rgba(209,18,47,.72)),
    #fff;
}

.date-outing-bubble {
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.92);
  color: #201419;
  padding: 10px 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.date-outing-message.assistant .date-outing-bubble {
  border-bottom-left-radius: 6px;
}

.date-outing-message.user .date-outing-bubble {
  border-color: rgba(215,40,59,.5);
  border-bottom-right-radius: 6px;
  background: linear-gradient(135deg, #d1122f, #941024);
  color: #fff;
}

.date-outing-bubble p {
  margin: 0;
  color: inherit;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  text-shadow: none;
}

.date-outing-edited {
  display: block;
  margin-top: 5px;
  color: rgba(32,20,25,.52);
  font-size: 11px;
  font-weight: 800;
}

.date-outing-message.user .date-outing-edited {
  color: rgba(255,255,255,.7);
}

.date-outing-message.user .message-menu {
  left: auto;
  right: 0;
}

.date-outing-stack .voice-play-button {
  justify-self: start;
  background: rgba(255,255,255,.94);
}

.date-outing-message.user .message-edit-actions {
  justify-content: flex-end;
}

.date-outing-settlement {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(18,8,11,.44);
  color: #fff;
  padding: 13px 14px;
  line-height: 1.72;
  font-size: 14px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

.outing-dialog {
  width: min(420px, calc(100vw - 24px));
  max-height: min(760px, calc(100svh - 24px));
  border: 1px solid rgba(209,18,47,.18);
  border-radius: 28px;
  background:
    repeating-linear-gradient(180deg, rgba(209,18,47,.012) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,248,250,.96) 48%, rgba(255,255,255,.97) 100%);
  color: var(--text);
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(209,18,47,.06),
    0 4px 16px rgba(209,18,47,.08),
    0 24px 64px rgba(47,11,18,.22),
    0 48px 100px rgba(47,11,18,.12);
  overflow: clip;
}

.outing-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(90deg, rgba(148,16,36,.88), rgba(209,18,47,.95), rgba(255,110,130,.72), rgba(209,18,47,.95), rgba(148,16,36,.88));
  animation: dialog-bar-pulse 3s ease-in-out infinite;
}

.outing-dialog[open] {
  animation: dialog-enter .28s cubic-bezier(.22,.84,.26,1);
}

.outing-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 20%, rgba(209,18,47,.12), transparent 36%),
    rgba(10,6,10,.64);
  backdrop-filter: blur(14px);
  animation: dialog-backdrop-in .2s ease-out;
}

.outing-picker {
  max-height: min(760px, calc(100svh - 24px));
  overflow-y: auto;
  background:
    linear-gradient(180deg, #fff, #fff8f9 42%, #fff),
    #fff;
}

.outing-picker-hero {
  min-height: 210px;
  position: relative;
  display: grid;
  align-content: end;
  gap: 12px;
  padding: 14px;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.outing-picker-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(22,10,13,.18), rgba(22,10,13,.74)),
    radial-gradient(circle at 80% 12%, rgba(209,18,47,.26), transparent 32%);
}

.outing-picker-hero .date-exit-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.outing-picker-title {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.outing-picker-title small {
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.outing-picker-title h2 {
  color: #fff;
  font-size: 27px;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0,0,0,.46);
}

.outing-picker-title p {
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.outing-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 4px;
}

.outing-meta-list span {
  border-radius: 999px;
  background: rgba(209,18,47,.08);
  color: var(--red);
  border: 1px solid rgba(209,18,47,.12);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.outing-contact-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
}

.outing-contact-head div {
  display: grid;
  gap: 3px;
}

.outing-contact-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}

.outing-contact-head strong {
  font-size: 16px;
  color: var(--text);
}

.outing-contact-head span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.outing-contact-list {
  display: grid;
  gap: 10px;
  padding: 0 14px 16px;
}

.outing-contact {
  width: 100%;
  min-height: 82px;
  border: 1px solid rgba(209,18,47,.14);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  color: var(--text);
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
  box-shadow: 0 12px 28px rgba(150,18,32,.07);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.outing-contact:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(209,18,47,.36);
  background: #fff7f8;
}

.outing-contact.disabled {
  opacity: .52;
}

.outing-contact-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(209,18,47,.92), rgba(255,189,195,.74)),
    #fff;
  color: #fff;
  font-size: 19px;
  font-weight: 950;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.8), 0 10px 22px rgba(209,18,47,.12);
}

.outing-contact-avatar.has-photo {
  background-image: var(--avatar-image);
  color: transparent;
  font-size: 0;
}

.outing-contact strong,
.outing-contact span,
.outing-contact small {
  display: block;
}

.outing-contact strong {
  font-size: 17px;
  line-height: 1.1;
}

.outing-contact span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.outing-contact small {
  color: var(--red);
  margin-top: 5px;
  font-size: 12px;
  font-weight: 900;
}

body.prophet-tv-active {
  overflow: hidden;
  background: #10080b;
}

body.prophet-tv-active .game-shell {
  visibility: hidden;
}

.prophet-scene {
  position: fixed;
  inset: 0;
  z-index: 101;
  color: #fff;
  background: #12080b;
  overflow: hidden;
}

.prophet-scene-bg,
.prophet-scene-vignette {
  position: absolute;
  inset: 0;
}

.prophet-scene-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: saturate(1.04) contrast(1.03);
}

.prophet-scene-vignette {
  background:
    linear-gradient(180deg, rgba(18,8,11,.38), rgba(18,8,11,.18) 28%, rgba(18,8,11,.9) 82%, rgba(18,8,11,.96)),
    radial-gradient(circle at 70% 12%, rgba(209,18,47,.2), transparent 26%);
}

.prophet-scene-shell {
  width: 100%;
  height: 100svh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.prophet-scene-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.prophet-scene-head small {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prophet-scene-head h2 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0,0,0,.42);
}

.prophet-scene-head p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.6;
}

.prophet-refresh-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
  backdrop-filter: blur(18px);
}

.prophet-scene-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prophet-scene-overview article {
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(18,8,11,.38);
  padding: 12px 14px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

.prophet-scene-overview small {
  display: block;
  color: rgba(255,255,255,.68);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prophet-scene-overview strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.prophet-scene-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .9fr);
  gap: 14px;
}

.prophet-board-column,
.prophet-job-column {
  min-height: 0;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.1)),
    rgba(18,8,11,.52);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 60px rgba(0,0,0,.24);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.prophet-column-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.prophet-column-head small {
  display: block;
  color: rgba(255,255,255,.66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.prophet-column-head h3 {
  margin: 6px 0 0;
  font-size: 22px;
}

.prophet-notice-list,
.prophet-job-list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 14px;
  align-content: start;
}

.prophet-notice-list {
  grid-auto-rows: min-content;
}

.prophet-empty {
  border-radius: 22px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  padding: 18px 16px;
  line-height: 1.7;
  font-size: 14px;
}

.prophet-empty.compact {
  font-size: 13px;
}

.prophet-notice-card {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  padding: 14px;
  box-shadow: 0 16px 36px rgba(0,0,0,.14);
}

.prophet-job-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  padding: 10px 12px;
  box-shadow: 0 14px 28px rgba(0,0,0,.12);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.prophet-notice-top,
.prophet-job-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prophet-notice-top span,
.prophet-job-top span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.prophet-notice-top strong,
.prophet-job-top strong {
  color: rgba(255,255,255,.76);
  font-size: 12px;
  font-weight: 900;
}

.prophet-notice-card h3 {
  margin: 12px 0 0;
  font-size: 21px;
  line-height: 1.2;
}

.prophet-client {
  margin: 6px 0 0;
  color: rgba(255,255,255,.76);
  font-size: 13px;
  font-weight: 800;
}

.prophet-summary {
  margin: 10px 0 0;
  color: rgba(255,255,255,.9);
  font-size: 14px;
  line-height: 1.65;
}

.prophet-notice-metrics {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.prophet-metric {
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  padding: 9px 10px;
}

.prophet-metric small {
  display: block;
  color: rgba(255,255,255,.66);
  font-size: 11px;
  font-weight: 800;
}

.prophet-metric strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
}

.prophet-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prophet-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.86);
  font-size: 11px;
  font-weight: 900;
}

.prophet-roster-list {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.prophet-cast-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.prophet-cast-select {
  min-width: 0;
  height: 44px;
  border-radius: 14px;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.9);
  color: #341116;
  font-weight: 800;
}

.prophet-accept-button {
  min-width: 72px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
}

.prophet-cast-hint {
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 800;
}

.prophet-linked-job {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
}

.prophet-linked-job-icon,
.prophet-job-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 18px;
}

.prophet-linked-job-body,
.prophet-job-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.prophet-linked-job-body strong,
.prophet-job-title {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prophet-linked-job-body small,
.prophet-job-actor {
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 800;
}

.prophet-job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prophet-job-chip {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.86);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.prophet-job-chip.active,
.prophet-linked-job.active .prophet-linked-job-icon {
  background: rgba(255,255,255,.14);
}

.prophet-job-chip.completed,
.prophet-linked-job.completed .prophet-linked-job-icon {
  background: rgba(26,163,127,.22);
  border-color: rgba(96,255,200,.2);
}

.prophet-job-chip.breached,
.prophet-linked-job.breached .prophet-linked-job-icon {
  background: rgba(209,18,47,.26);
  border-color: rgba(255,108,133,.24);
}

.prophet-job-column .prophet-column-head small {
  letter-spacing: 0.5px;
}

@media (max-width: 560px) {
  .profile-relationship-bar {
    display: grid;
  }

  .prophet-cast-picker {
    grid-template-columns: 1fr;
  }

  .prophet-accept-button {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .prophet-scene-main {
    grid-template-columns: 1fr;
  }
}

.profile-dialog,
.settings-dialog,
.save-dialog {
  width: min(380px, calc(100vw - 24px));
  border: 1px solid rgba(209,18,47,.18);
  border-radius: 28px;
  background:
    repeating-linear-gradient(180deg, rgba(209,18,47,.012) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,248,250,.96) 48%, rgba(255,255,255,.97) 100%);
  color: var(--text);
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(209,18,47,.06),
    0 4px 16px rgba(209,18,47,.08),
    0 24px 64px rgba(47,11,18,.22),
    0 48px 100px rgba(47,11,18,.12);
  overflow: clip;
}

.profile-dialog::before,
.settings-dialog::before,
.save-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(90deg, rgba(148,16,36,.88), rgba(209,18,47,.95), rgba(255,110,130,.72), rgba(209,18,47,.95), rgba(148,16,36,.88));
  animation: dialog-bar-pulse 3s ease-in-out infinite;
}

.profile-dialog[open],
.settings-dialog[open],
.save-dialog[open] {
  animation: dialog-enter .28s cubic-bezier(.22,.84,.26,1);
}

.profile-dialog::backdrop,
.settings-dialog::backdrop,
.save-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 20%, rgba(209,18,47,.12), transparent 36%),
    rgba(10,6,10,.64);
  backdrop-filter: blur(14px);
  animation: dialog-backdrop-in .2s ease-out;
}

.profile-card,
.settings-dialog form,
.save-dialog form {
  padding: 20px 18px 18px;
  position: relative;
  max-height: min(calc(100svh - 48px), 720px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(209,18,47,.18) transparent;
}

.profile-card::-webkit-scrollbar,
.settings-dialog form::-webkit-scrollbar,
.save-dialog form::-webkit-scrollbar {
  width: 5px;
}

.profile-card::-webkit-scrollbar-thumb,
.settings-dialog form::-webkit-scrollbar-thumb,
.save-dialog form::-webkit-scrollbar-thumb {
  background: rgba(209,18,47,.18);
  border-radius: 999px;
}

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

.profile-hero {
  min-height: 172px;
  border-radius: 26px;
  padding: 22px;
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(143,10,31,.96), rgba(209,18,47,.92), rgba(255,116,130,.82)),
    repeating-linear-gradient(120deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px);
}

.profile-avatar {
  width: 78px;
  height: 78px;
  font-size: 30px;
}

.profile-hero small,
.profile-hero h2,
.profile-hero p { color: #fff; }
.profile-hero h2 { font-size: 23px; }
.profile-hero p { margin-top: 6px; font-weight: 800; }

.profile-relationship-bar,
.profile-action-bar {
  margin-top: 14px;
}

.profile-relationship-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(209,18,47,.12);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff8f9);
  box-shadow: 0 10px 24px rgba(150,18,32,.06);
}

.relationship-label {
  display: grid;
  gap: 4px;
}

.relationship-label small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.relationship-label strong {
  color: var(--text);
  font-size: 15px;
}

.relationship-label p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.relationship-pill {
  min-width: 92px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid transparent;
}

.relationship-pill.friend {
  background: rgba(209,18,47,.08);
  color: var(--red);
  border-color: rgba(209,18,47,.14);
}

.relationship-pill.crush {
  background: rgba(255,120,142,.18);
  color: #b21641;
  border-color: rgba(209,18,47,.18);
}

.relationship-pill.partner {
  background: linear-gradient(135deg, rgba(209,18,47,.14), rgba(255,128,148,.3));
  color: #941024;
  border-color: rgba(209,18,47,.2);
}

.profile-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-action-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(209,18,47,.12);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(150,18,32,.06);
}

.profile-action-button.secondary {
  color: var(--red);
}

.profile-action-button.danger {
  color: #a40c25;
  background: #fff6f7;
}

.profile-trash-button {
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(209,18,47,.14);
  border-radius: 14px;
  background: #fff6f7;
  color: #a40c25;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 10px 22px rgba(150,18,32,.06);
}

.profile-trash-button:disabled {
  opacity: .55;
}

.profile-dialog-actions {
  justify-content: flex-end;
  align-items: center;
}

.character-detail {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.detail-section-title {
  margin: 16px 0 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .5px;
}

.detail-section-title:first-child {
  margin-top: 0;
}

.detail-section {
  border: 1px solid rgba(209,18,47,.12);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #fff8f9);
  box-shadow: 0 12px 28px rgba(150,18,32,.06);
  overflow: hidden;
}

.detail-section-toggle {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  cursor: pointer;
}

.detail-section-toggle::-webkit-details-marker,
.detail-section-toggle::marker {
  display: none;
  content: "";
}

.detail-section-label {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .5px;
}

.detail-section-hint {
  min-width: 62px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(209,18,47,.08);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.detail-section-hint::before {
  content: "展开";
}

.detail-section-hint::after {
  content: "⌄";
  line-height: 1;
  transition: transform .16s ease;
}

.detail-section[open] .detail-section-hint::before {
  content: "收起";
}

.detail-section[open] .detail-section-hint::after {
  transform: rotate(180deg);
}

.detail-section-body {
  padding: 0 14px 10px;
}

.detail-section-body .detail-line:first-child {
  border-top: 1px solid var(--line);
}

.detail-section-body .tag-list {
  margin-top: 12px;
}

.detail-line {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.detail-line span { color: var(--muted); }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.tag-list span {
  border-radius: 999px;
  background: rgba(209,18,47,.08);
  padding: 6px 9px;
  color: var(--red);
  font-size: 12px;
}

.voice-card,
.voice-api-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #fff6f7);
  display: grid;
  gap: 10px;
}

.voice-api-card {
  margin: 12px 0;
}

.voice-card-head,
.voice-speed-row,
.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voice-card-head strong {
  color: var(--red);
}

.voice-card-head span,
.switch-line {
  color: var(--muted);
  font-size: 12px;
}

.voice-card label,
.voice-api-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.voice-speed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  color: var(--muted);
  font-size: 12px;
}

.voice-speed-row input {
  width: 100%;
}

.switch-line {
  display: flex;
  justify-content: flex-start;
  font-weight: 800;
}

.switch-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(209,18,47,.1);
  position: relative;
}

.dialog-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209,18,47,.25), transparent);
  pointer-events: none;
}

.dialog-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--text);
}

.dialog-head small {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.dialog-grid {
  display: grid;
  gap: 10px;
}

.api-presets,
.api-model-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 10px;
}

.api-preset-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.preset-icon-button {
  width: 36px;
  height: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--red);
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  box-shadow: 0 10px 22px rgba(209,18,47,.08);
}

.preset-icon-button.primary {
  background: linear-gradient(135deg, #d1122f, #941024);
  border-color: rgba(215,40,59,.68);
  color: #fff;
}

.preset-icon-button.danger {
  color: #a50924;
  background: #fff4f5;
}

.preset-icon-button.confirm {
  color: #0f8a4f;
  background: #f2fff8;
}

.api-preset-naming {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin: -2px 0 10px;
}

.dialog-grid.api-config-grid {
  grid-template-columns: 1fr;
}

.decision-dialog {
  width: min(396px, calc(100vw - 20px));
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.decision-dialog::before {
  display: none;
}

.decision-panel {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 18px;
  border-radius: 24px;
  border: 1px solid rgba(183, 21, 46, .12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(255,250,251,.97) 100%);
  box-shadow:
    0 0 0 1px rgba(209,18,47,.04),
    0 8px 24px rgba(47, 11, 18, .10),
    0 32px 72px rgba(47, 11, 18, .18),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.decision-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(148,16,36,.72), rgba(209,18,47,.88), rgba(255,140,154,.58), rgba(209,18,47,.88), rgba(148,16,36,.72));
  animation: dialog-bar-pulse 3.5s ease-in-out infinite;
}

.decision-dialog::backdrop {
  background:
    radial-gradient(circle at top, rgba(209,18,47,.12), transparent 28%),
    rgba(13, 8, 12, .66);
  backdrop-filter: blur(14px);
}

.decision-dialog[open] {
  animation: decisionDialogFade .18s ease-out;
}

.decision-dialog[open] .decision-panel {
  animation: decisionPanelRise .26s cubic-bezier(.2, .84, .22, 1);
}

.decision-dialog-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.decision-dialog-title-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.decision-dialog-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 5px 11px 3px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(209,18,47,.10);
  background: rgba(255,245,247,.82);
  color: #b81a32;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-indent: .06em;
}

.decision-dialog h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--text);
}

.decision-dialog-close {
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex: 0 0 auto;
  cursor: pointer;
  padding: 0;
  border: 1px solid rgba(209,18,47,.10);
  border-radius: 50%;
  background: rgba(246,240,242,.6);
  box-shadow: none;
  position: relative;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.decision-dialog-close::before,
.decision-dialog-close::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 11px;
  height: 1.5px;
  border-radius: 999px;
  background: #7c2030;
}

.decision-dialog-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.decision-dialog-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.decision-dialog-close:hover,
.decision-dialog-close:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(209,18,47,.24);
  background: rgba(255,246,248,.98);
}

.decision-dialog-body {
  position: relative;
  padding: 14px 15px 16px;
  border-radius: 16px;
  border: 1px solid rgba(209,18,47,.07);
  background: rgba(252,248,250,.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8);
}

.decision-dialog-message {
  margin: 0;
  color: #5a4549;
  line-height: 1.72;
  white-space: pre-wrap;
  font-size: 13.5px;
}

.decision-dialog-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.decision-dialog[data-action-count="1"] .decision-dialog-actions {
  grid-template-columns: 1fr;
}

.decision-dialog-actions .ghost-button,
.decision-dialog-actions .primary-button {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
}

.decision-dialog-actions .ghost-button {
  background: rgba(255,250,251,.96);
  border-color: rgba(209,18,47,.14);
  color: #7f2635;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86);
}

.decision-dialog-actions .primary-button {
  box-shadow: 0 18px 30px rgba(209,18,47,.22);
}

.decision-dialog-actions .danger {
  grid-column: 1 / -1;
}

.decision-dialog[data-tone="danger"] .decision-dialog-eyebrow {
  background: rgba(209,18,47,.10);
  border-color: rgba(209,18,47,.18);
  color: #97172d;
}

.decision-dialog[data-tone="danger"] .decision-panel::before {
  height: 6px;
}

.decision-dialog[data-tone="notice"] .decision-dialog-eyebrow {
  background: rgba(255,247,248,.98);
  color: #b03a50;
}

@keyframes decisionDialogFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes decisionPanelRise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ghost-button.danger {
  color: #a40c25;
  border-color: rgba(164,12,37,.18);
  background: #fff5f6;
}

.tool-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid rgba(209,18,47,.14);
  border-radius: 50%;
  background: rgba(255,255,255,.84);
  color: transparent;
  font-size: 0;
  position: relative;
  box-shadow: 0 8px 20px rgba(120,16,34,.08);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.tool-button::before,
.tool-button::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: #7c2030;
}

.tool-button::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.tool-button::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.tool-button:hover,
.tool-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(209,18,47,.24);
  background: rgba(255,246,248,.98);
}

@media (max-width: 520px) {
  .decision-dialog {
    width: min(calc(100vw - 14px), 396px);
  }

  .decision-panel {
    padding: 18px 16px 16px;
    border-radius: 28px;
  }

  .decision-dialog h2 {
    max-width: none;
    font-size: clamp(24px, 8vw, 30px);
  }

  .decision-dialog-message {
    font-size: 14px;
  }
}

/* ─── Diary Dialog ─── */

.diary-dialog {
  width: min(430px, calc(100vw - 18px));
  max-height: min(760px, calc(100svh - 24px));
  overflow: hidden;
  border: 1px solid rgba(209,18,47,.18);
}

.diary-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(90deg, rgba(148,16,36,.88), rgba(209,18,47,.95), rgba(255,110,130,.72), rgba(209,18,47,.95), rgba(148,16,36,.88));
  animation: dialog-bar-pulse 3s ease-in-out infinite;
}

.diary-dialog[open] {
  animation: dialog-enter .28s cubic-bezier(.22,.84,.26,1);
}

.diary-panel {
  --diary-wine: #82162a;
  --diary-red: #be2039;
  --diary-ink: #241820;
  --diary-muted: #8f6873;
  --diary-paper: #fffaf8;
  --diary-border: rgba(150, 22, 42, .11);
  padding: 16px 16px 14px;
  max-height: min(760px, calc(100svh - 24px));
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.diary-panel::-webkit-scrollbar {
  width: 6px;
}

.diary-panel::-webkit-scrollbar-thumb {
  background: rgba(190,32,57,.18);
  border-radius: 999px;
}

/* ─── Team Planner ─── */

.team-planner-board {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(209,18,47,.14);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255,163,178,.18), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,248,250,.96));
  box-shadow:
    0 18px 40px rgba(139, 17, 36, .08),
    inset 0 1px 0 rgba(255,255,255,.9);
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.team-planner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.team-planner-head small {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.team-planner-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-hud);
  font-size: 18px;
  letter-spacing: .04em;
}

.team-planner-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.team-planner-card-shell {
  display: grid;
  gap: 12px;
}

.team-planner-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.team-planner-nav-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(209,18,47,.14);
  background: linear-gradient(180deg, #fff, #fff4f6);
  color: var(--red);
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(150,18,32,.08);
}

.team-planner-pager {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.team-planner-page-dot {
  width: 11px;
  height: 11px;
  min-height: 11px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: rgba(209,18,47,.18);
  box-shadow: inset 0 0 0 1px rgba(209,18,47,.12);
}

.team-planner-page-dot.active {
  width: 28px;
  background: linear-gradient(90deg, #d1122f, #ff7e95);
  box-shadow: 0 6px 16px rgba(209,18,47,.22);
}

.team-planner-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(209,18,47,.12);
  background:
    radial-gradient(circle at top left, rgba(255,167,181,.2), transparent 26%),
    linear-gradient(140deg, rgba(255,255,255,.98), rgba(255,245,247,.96));
  box-shadow:
    0 22px 42px rgba(150,18,32,.08),
    inset 0 1px 0 rgba(255,255,255,.95);
  display: grid;
  gap: 16px;
}

.team-planner-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,170,184,.22), transparent 68%);
  pointer-events: none;
}

.team-planner-card-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.team-planner-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.team-planner-avatar {
  width: 60px;
  height: 60px;
  font-size: 26px;
  flex: 0 0 auto;
}

.team-planner-copy small {
  display: block;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.team-planner-copy strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.team-planner-copy p {
  margin: 7px 0 0;
  color: #6f5560;
  font-size: 12px;
  line-height: 1.6;
}

.team-planner-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.team-planner-quick-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(209,18,47,.14);
  background: rgba(255,251,252,.94);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 10px 20px rgba(165,18,38,.08);
}

.team-planner-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
  gap: 16px;
  align-items: stretch;
}

.team-planner-radar-shell,
.team-planner-vitals {
  border-radius: 24px;
  border: 1px solid rgba(209,18,47,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,244,247,.9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

.team-planner-radar-shell {
  padding: 14px;
}

.team-planner-radar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 160px);
  gap: 12px;
  align-items: center;
}

.team-planner-radar-figure {
  display: grid;
  place-items: center;
}

.team-planner-radar-figure svg {
  width: min(100%, 220px);
  height: auto;
  overflow: visible;
}

.team-planner-radar-ring {
  fill: rgba(255,247,249,.4);
  stroke: rgba(209,18,47,.12);
  stroke-width: 1;
}

.team-planner-radar-axis {
  stroke: rgba(209,18,47,.18);
  stroke-width: 1.2;
}

.team-planner-radar-data {
  fill: rgba(209,18,47,.2);
  stroke: #c21534;
  stroke-width: 2.4;
}

.team-planner-radar-dot {
  fill: #c21534;
  stroke: #fff;
  stroke-width: 1.5;
}

.team-planner-radar-label {
  fill: #7f2b3b;
  font-size: 9px;
  font-weight: 900;
  text-anchor: middle;
}

.team-planner-radar-legend {
  display: grid;
  gap: 8px;
}

.team-planner-radar-stat {
  padding: 9px 10px;
  border-radius: 16px;
  background: rgba(209,18,47,.06);
  border: 1px solid rgba(209,18,47,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.team-planner-radar-stat small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.team-planner-radar-stat strong {
  color: var(--red);
  font-family: var(--font-hud);
  font-size: 18px;
  letter-spacing: .04em;
}

.team-planner-vitals {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.team-planner-vital {
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(209,18,47,.1);
  background: rgba(255,255,255,.8);
  display: grid;
  gap: 9px;
}

.team-planner-vital-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.team-planner-vital-top small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.team-planner-vital-top strong {
  color: var(--text);
  font-size: 20px;
  font-family: var(--font-hud);
  letter-spacing: .04em;
}

.team-planner-vital-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(209,18,47,.08);
  overflow: hidden;
}

.team-planner-vital-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d1122f, #ff8ba0);
}

.team-planner-vital.morale .team-planner-vital-track span {
  background: linear-gradient(90deg, #ef5776, #ffb0bc);
}

.team-planner-vital-footer {
  padding: 4px 2px 0;
  display: grid;
  gap: 8px;
}

.team-planner-fatigue-badge {
  width: fit-content;
  padding: 7px 12px 5px;
  border-radius: 999px;
  background: rgba(209,18,47,.1);
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
}

.team-planner-vital-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.team-planner-grid {
  display: grid;
  gap: 10px;
}

.team-planner-grid-head,
.team-planner-grid-row {
  display: grid;
  grid-template-columns: 92px repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.team-planner-grid-corner,
.team-planner-grid-slot-label {
  min-height: 28px;
  display: grid;
  place-items: center;
  color: rgba(139, 29, 46, .72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
}

.team-planner-grid-corner {
  justify-items: start;
  place-items: center start;
}

.team-planner-grid-day {
  padding: 12px 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(209,18,47,.12);
  background: rgba(209,18,47,.05);
  display: grid;
  gap: 6px;
  align-content: center;
}

.team-planner-grid-day.locked {
  background: rgba(209,18,47,.1);
}

.team-planner-grid-day strong {
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
}

.team-planner-grid-day small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.team-planner-cell {
  min-height: 92px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(209,18,47,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,246,248,.92));
  display: grid;
  align-content: start;
  gap: 7px;
  text-align: left;
  position: relative;
  box-shadow: 0 12px 24px rgba(150,18,32,.06);
}

.team-planner-cell strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.team-planner-cell small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.team-planner-cell.empty {
  border-style: dashed;
  border-color: rgba(209,18,47,.18);
  background: linear-gradient(180deg, rgba(255,253,253,.98), rgba(255,248,250,.92));
}

.team-planner-cell.training {
  background: linear-gradient(180deg, rgba(255,247,249,.98), rgba(255,234,239,.94));
}

.team-planner-cell.versus {
  background: linear-gradient(180deg, rgba(255,246,242,.98), rgba(255,231,224,.94));
}

.team-planner-cell.recover {
  background: linear-gradient(180deg, rgba(250,255,252,.98), rgba(233,248,240,.96));
  border-color: rgba(31,127,79,.12);
}

.team-planner-cell.commercial {
  background: linear-gradient(180deg, rgba(255,248,241,.98), rgba(255,236,218,.96));
  border-color: rgba(184,92,24,.16);
}

.team-planner-cell.locked {
  background: linear-gradient(180deg, rgba(244,238,241,.98), rgba(234,226,230,.96));
  color: #6a5460;
}

.team-planner-cell-source {
  justify-self: start;
  padding: 5px 8px 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}

.team-planner-status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(209,18,47,.1);
  background: rgba(255,248,250,.88);
  color: #754c57;
  font-size: 12px;
  line-height: 1.65;
}

.team-planner-dialog {
  width: min(460px, calc(100vw - 16px));
  max-height: min(760px, calc(100svh - 18px));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.team-planner-dialog::before {
  display: none;
}

.team-planner-dialog::backdrop {
  background:
    radial-gradient(circle at bottom, rgba(209,18,47,.12), transparent 28%),
    rgba(13, 8, 12, .62);
  backdrop-filter: blur(12px);
}

.team-planner-dialog-sheet {
  padding: 18px 18px 16px;
  border-radius: 28px;
  border: 1px solid rgba(209,18,47,.14);
  background:
    radial-gradient(circle at top right, rgba(255,165,179,.18), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,.99), rgba(255,247,249,.97));
  box-shadow:
    0 24px 56px rgba(40, 12, 20, .2),
    inset 0 1px 0 rgba(255,255,255,.95);
  display: grid;
  gap: 14px;
}

.team-planner-dialog-head {
  margin-bottom: 0;
}

.team-planner-action-groups {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding-right: 2px;
}

.team-planner-action-groups::-webkit-scrollbar {
  width: 6px;
}

.team-planner-action-groups::-webkit-scrollbar-thumb {
  background: rgba(209,18,47,.18);
  border-radius: 999px;
}

.team-planner-action-group {
  display: grid;
  gap: 10px;
}

.team-planner-action-group h3 {
  margin: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.team-planner-action-option {
  width: 100%;
  min-height: 72px;
  padding: 12px 14px;
  border-radius: 20px;
  border: 1px solid rgba(209,18,47,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,249,.95));
  text-align: left;
  display: grid;
  gap: 6px;
  box-shadow: 0 12px 22px rgba(150,18,32,.06);
}

.team-planner-action-option strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.team-planner-action-option p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.team-planner-action-option.recover {
  border-color: rgba(31,127,79,.12);
  background: linear-gradient(180deg, rgba(251,255,253,.99), rgba(236,248,241,.96));
}

.team-planner-action-option.versus,
.team-planner-action-option.commercial {
  background: linear-gradient(180deg, rgba(255,250,244,.99), rgba(255,238,223,.96));
}

.team-planner-action-empty {
  padding: 16px;
  border-radius: 20px;
  border: 1px dashed rgba(209,18,47,.16);
  background: rgba(255,250,251,.82);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.team-planner-dialog-actions {
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 920px) {
  .update-reload-notice {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .team-planner-card-main {
    grid-template-columns: 1fr;
  }

  .team-planner-radar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .team-planner-board {
    padding: 14px;
    border-radius: 24px;
  }

  .team-planner-card {
    padding: 14px;
    border-radius: 24px;
  }

  .team-planner-card-meta {
    grid-template-columns: 1fr;
  }

  .team-planner-quick-actions {
    justify-content: flex-start;
  }

  .team-planner-grid-head,
  .team-planner-grid-row {
    grid-template-columns: 72px repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .team-planner-grid-day {
    padding: 10px 8px;
  }

  .team-planner-cell {
    min-height: 98px;
    padding: 10px;
  }
}

@media (max-width: 520px) {
  .team-planner-nav {
    gap: 8px;
  }

  .team-planner-nav-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .team-planner-copy strong {
    font-size: 20px;
  }

  .team-planner-grid-head,
  .team-planner-grid-row {
    grid-template-columns: 64px repeat(3, minmax(0, 1fr));
  }

  .team-planner-cell strong {
    font-size: 13px;
  }

  .team-planner-cell small {
    font-size: 10px;
  }
}

.diary-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 12px;
}

.diary-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.diary-tab-button {
  min-height: 34px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(190,32,57,.11);
  background: rgba(255,255,255,.9);
  color: var(--diary-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(90, 12, 24, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
}

.diary-tab-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ca2743 0%, #8f1730 100%);
  box-shadow: 0 10px 22px rgba(154, 21, 43, .26);
}

.diary-tab-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(190,32,57,.2);
}

.diary-generate-button {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 12px 24px rgba(154, 21, 43, .2);
}

.diary-book {
  margin-top: 12px;
  display: grid;
  gap: 12px;
  animation: diary-fade-in .22s ease;
}

@keyframes diary-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diary-page-overview {
  display: grid;
  gap: 10px;
}

.diary-calendar-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.diary-month-nav-button {
  min-width: 38px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.diary-page-index {
  display: grid;
  gap: 4px;
  text-align: center;
  padding: 11px 16px;
  border: 1px solid rgba(190,32,57,.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,248,248,.94) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 10px 24px rgba(90,12,24,.05);
}

.diary-page-index strong {
  color: var(--diary-ink);
  font-size: 22px;
  line-height: 1.1;
}

.diary-page-index span {
  color: var(--diary-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  opacity: .82;
}

.diary-page-grid {
  display: grid;
  gap: 8px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.diary-month-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--diary-border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,248,247,.94) 100%);
  box-shadow: 0 16px 36px rgba(90,12,24,.05);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.diary-month-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(190,32,57,.05), transparent 38%);
  pointer-events: none;
}

.diary-month-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 0 2px;
}

.diary-month-head strong {
  color: var(--red);
  font-size: 14px;
}

.diary-month-head span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  opacity: .65;
}

.diary-weekend-grid {
  display: grid;
  gap: 10px;
}

.diary-week-row {
  display: grid;
  grid-template-columns: 50px repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.diary-week-label {
  color: var(--diary-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  opacity: .76;
  padding-top: 10px;
}

.diary-grid-card {
  min-height: 76px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(190,32,57,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  color: var(--diary-ink);
  display: grid;
  gap: 5px;
  align-content: start;
  justify-items: start;
  text-align: left;
  box-shadow: 0 10px 24px rgba(90,12,24,.06);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
  cursor: pointer;
}

.diary-grid-card:hover:not(:disabled) {
  border-color: rgba(190,32,57,.24);
  box-shadow: 0 18px 34px rgba(154,21,43,.1);
  transform: translateY(-2px);
}

.diary-grid-card strong {
  font-size: 14px;
  font-weight: 800;
}

.diary-grid-card span {
  color: var(--diary-muted);
  font-size: 11px;
  font-weight: 700;
  opacity: .84;
}

.diary-grid-card small {
  color: var(--diary-muted);
  font-size: 11px;
  line-height: 1.6;
  opacity: .78;
}

.diary-grid-card.active {
  border-color: rgba(190,32,57,.3);
  background: linear-gradient(180deg, rgba(255,243,245,.95) 0%, rgba(255,251,251,.98) 100%);
  box-shadow: 0 18px 34px rgba(154,21,43,.13);
}

.diary-grid-card:disabled {
  opacity: .56;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.diary-grid-card.empty {
  background: rgba(255,251,251,.72);
  border-style: dashed;
  border-color: rgba(190,32,57,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.diary-grid-card.empty:hover:not(:disabled) {
  background: rgba(255,246,247,.9);
}

.diary-grid-card.can-generate {
  border-color: rgba(190,32,57,.22);
  background: linear-gradient(180deg, rgba(255,247,247,.96) 0%, rgba(255,252,252,.96) 100%);
  box-shadow: 0 16px 28px rgba(154,21,43,.08);
}

.diary-grid-empty {
  grid-column: 1 / -1;
  min-height: 104px;
  border: 1px dashed rgba(190,32,57,.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,251,251,.92) 0%, rgba(255,246,247,.74) 100%);
  color: var(--diary-muted);
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.8;
  padding: 16px 18px;
  font-size: 13px;
}

/* ─── Diary Page Shell (Detail View) ─── */

.diary-page-shell {
  min-height: 360px;
  border: 1px solid rgba(190,32,57,.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(190,32,57,.07), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,249,247,.95) 100%);
  box-shadow: 0 18px 40px rgba(90,12,24,.08);
  padding: 18px 18px 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  position: relative;
}

.diary-page-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg, rgba(190,32,57,.022) 0 1px, transparent 1px 34px);
  pointer-events: none;
  border-radius: inherit;
}

.diary-page-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "back title mood"
    ". title mood"
    "hint hint hint";
  align-items: start;
  gap: 8px 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(190,32,57,.08);
}

.diary-page-view-index {
  grid-area: title;
  display: grid;
  gap: 4px;
  text-align: center;
}

.diary-page-view-index strong {
  color: var(--diary-ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.diary-page-view-index span {
  color: var(--diary-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: .84;
}

.diary-back-button {
  grid-area: back;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12px;
}

.diary-page-head small {
  grid-area: hint;
  color: var(--diary-muted);
  font-size: 12px;
  line-height: 1.75;
  opacity: .88;
}

.diary-page-mood {
  grid-area: mood;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(190,32,57,.08);
  color: var(--diary-red);
  font-size: 11px;
  font-weight: 800;
}

.diary-page-content,
.diary-page-editor {
  min-height: 252px;
  max-height: 320px;
  overflow-y: auto;
}

.diary-page-content {
  color: var(--diary-ink);
  font-size: 14px;
  line-height: 2;
  white-space: pre-wrap;
  padding-right: 6px;
  position: relative;
  z-index: 1;
}

.diary-page-content::-webkit-scrollbar,
.diary-page-editor::-webkit-scrollbar {
  width: 4px;
}

.diary-page-content::-webkit-scrollbar-thumb,
.diary-page-editor::-webkit-scrollbar-thumb {
  background: rgba(190,32,57,.16);
  border-radius: 999px;
}

.diary-page-editor {
  width: 100%;
  resize: none;
  border: 1px dashed rgba(190,32,57,.18);
  outline: 0;
  background: rgba(255,252,252,.78);
  color: var(--diary-ink);
  font-size: 14px;
  line-height: 2;
  padding: 14px 16px;
  border-radius: 16px;
  font: inherit;
  position: relative;
  z-index: 1;
}

.diary-page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.diary-action-button {
  min-height: 40px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 800;
  border-radius: 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.diary-action-button.is-primary {
  box-shadow: 0 12px 24px rgba(154,21,43,.2);
}

.diary-action-button.is-secondary {
  background: rgba(255,255,255,.9);
  border-color: rgba(190,32,57,.12);
  color: var(--diary-ink);
}

.diary-action-button.is-danger {
  background: #fff5f6;
  border-color: rgba(164,12,37,.18);
  color: #a40c25;
}

.diary-action-button:hover:not(:disabled),
.diary-month-nav-button:hover:not(:disabled),
.diary-generate-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.diary-action-button:disabled,
.diary-month-nav-button:disabled,
.diary-generate-button:disabled {
  opacity: .58;
  box-shadow: none;
  transform: none;
}

.diary-empty-state {
  min-height: 220px;
  border: 1px dashed rgba(190,32,57,.16);
  border-radius: 18px;
  padding: 20px 18px;
  color: var(--diary-muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.85;
  background: linear-gradient(180deg, rgba(255,252,252,.9) 0%, rgba(255,247,248,.7) 100%);
  display: grid;
  place-items: center;
  gap: 14px;
}

.diary-empty-state-text {
  margin: 0;
}

.diary-inline-action {
  min-width: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 800;
  color: var(--diary-red);
  border-color: rgba(190,32,57,.16);
  background: rgba(255,255,255,.92);
  box-shadow: 0 10px 20px rgba(154,21,43,.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.diary-inline-action:hover:not(:disabled) {
  transform: translateY(-1px);
}

.diary-inline-action:disabled {
  opacity: .58;
  box-shadow: none;
}

.api-model-tools {
  align-items: center;
  margin-top: 10px;
}

.api-model-tools select {
  min-width: 0;
}

#modelFetchStatus {
  min-height: 20px;
  margin: 8px 0 0;
}

.birthday-grid,
.appearance-grid {
  margin-top: 12px;
}

.birthday-grid > label,
.appearance-grid > label {
  display: grid;
  gap: 6px;
  align-content: start;
}

.birthday-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.appearance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unit-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.unit-field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dialog-note {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .2px;
}

@media (min-width: 920px) {
  .card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .map-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .control-row,
  .dialog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .phone-thread {
    max-height: 45svh;
  }
}

@media (max-width: 640px) {
  .birthday-inline,
  .appearance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diary-dialog {
    width: min(calc(100vw - 14px), 100%);
  }

  .diary-panel {
    padding: 14px 12px 12px;
  }

  .diary-toolbar {
    gap: 8px;
  }

  .diary-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .diary-tab-button,
  .diary-generate-button {
    width: 100%;
    justify-content: center;
  }

  .diary-page-grid {
    gap: 10px;
    max-height: none;
  }

  .diary-week-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .diary-week-label {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 0;
    padding-left: 4px;
  }

  .diary-page-index {
    padding: 10px 12px;
  }

  .diary-page-index strong {
    font-size: 18px;
  }

  .diary-month-section {
    padding: 12px;
  }

  .diary-grid-card {
    min-height: 72px;
  }

  .diary-page-shell {
    min-height: 320px;
    padding: 16px 14px 14px;
  }

  .diary-page-head {
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "title"
      "mood"
      "hint";
    justify-items: start;
  }

  .diary-page-view-index {
    text-align: left;
  }

  .diary-page-mood {
    justify-self: start;
  }

  .diary-page-content,
  .diary-page-editor {
    min-height: 220px;
    max-height: 260px;
  }

  .diary-page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diary-action-button {
    width: 100%;
  }

  .diary-action-button.is-primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .game-shell {
    grid-template-columns: 62px minmax(0, 1fr);
    background: linear-gradient(90deg, rgba(244,240,244,1) 0 62px, transparent 62px);
  }
  .side-dock {
    padding: 18px 6px;
  }
  .dock-item {
    min-height: 56px;
    gap: 5px;
    padding: 7px 2px;
  }
  .dock-item b {
    font-size: 11px;
  }
  .phone-frame {
    width: 100%;
  }
  .club-header {
    min-height: 88px;
    padding: max(14px, env(safe-area-inset-top)) 14px 10px;
  }
  .brand-lockup img {
    width: min(190px, 56vw);
    max-height: 58px;
  }
  .header-action-slot {
    flex-basis: 64px;
    min-height: 36px;
  }
}

body.mall-scene-active {
  overflow: hidden;
  background: #12080b;
}

body.mall-scene-active .game-shell {
  visibility: hidden;
}

.mall-scene {
  position: fixed;
  inset: 0;
  z-index: 101;
  color: #fff;
  background: #12080b;
  overflow: hidden;
}

.mall-scene-bg,
.mall-scene-vignette {
  position: absolute;
  inset: 0;
}

.mall-scene-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.04);
}

.mall-scene-vignette {
  background:
    linear-gradient(180deg, rgba(18,8,11,.28), rgba(18,8,11,.18) 26%, rgba(18,8,11,.88) 82%, rgba(18,8,11,.96)),
    radial-gradient(circle at 82% 12%, rgba(255,140,155,.18), transparent 26%),
    radial-gradient(circle at 18% 22%, rgba(209,18,47,.22), transparent 30%);
}

.mall-scene-shell {
  width: 100%;
  height: 100svh;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.mall-scene-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.mall-scene-head small {
  display: block;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mall-scene-head h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 3px 18px rgba(0,0,0,.42);
}

.mall-scene-head p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.7;
}

.mall-scene-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mall-scene-overview article {
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08)),
    rgba(18,8,11,.4);
  padding: 12px 14px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

.mall-scene-overview small {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mall-scene-overview strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.mall-catalog {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  align-content: start;
  padding-right: 2px;
}

.mall-category-section {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08)),
    rgba(18,8,11,.42);
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
  backdrop-filter: blur(20px);
  padding: 16px;
}

.mall-category-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.mall-category-head small {
  display: block;
  color: rgba(255,255,255,.66);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.mall-category-head h3 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.1;
}

.mall-category-head p {
  margin: 8px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 13px;
  line-height: 1.6;
}

.mall-category-head strong {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mall-item-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.mall-item-card {
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  padding: 14px;
  box-shadow: 0 16px 34px rgba(0,0,0,.12);
  display: grid;
  gap: 12px;
}

.mall-item-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.mall-item-top strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.mall-item-top span {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 900;
}

.mall-item-top em {
  font-style: normal;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.mall-item-tags,
.gift-inventory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mall-item-tags span,
.gift-inventory-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.9);
  font-size: 11px;
  font-weight: 900;
}

.mall-buy-button {
  min-height: 42px;
  border-radius: 14px;
}

.mall-buy-button:disabled {
  opacity: .72;
}

.gift-dialog {
  width: min(390px, calc(100vw - 24px));
  border: 1px solid rgba(209,18,47,.18);
  border-radius: 28px;
  background:
    repeating-linear-gradient(180deg, rgba(209,18,47,.012) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,248,250,.96) 48%, rgba(255,255,255,.97) 100%);
  color: var(--text);
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(209,18,47,.06),
    0 4px 16px rgba(209,18,47,.08),
    0 24px 64px rgba(47,11,18,.22),
    0 48px 100px rgba(47,11,18,.12);
  overflow: clip;
}

.gift-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(90deg, rgba(148,16,36,.88), rgba(209,18,47,.95), rgba(255,110,130,.72), rgba(209,18,47,.95), rgba(148,16,36,.88));
  animation: dialog-bar-pulse 3s ease-in-out infinite;
}

.gift-dialog[open] {
  animation: dialog-enter .28s cubic-bezier(.22,.84,.26,1);
}

.gift-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 20%, rgba(209,18,47,.12), transparent 36%),
    rgba(10,6,10,.64);
  backdrop-filter: blur(14px);
  animation: dialog-backdrop-in .2s ease-out;
}

.airport-dialog {
  width: min(390px, calc(100vw - 24px));
  border: 1px solid rgba(209,18,47,.18);
  border-radius: 28px;
  background:
    repeating-linear-gradient(180deg, rgba(209,18,47,.012) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,248,250,.96) 48%, rgba(255,255,255,.97) 100%);
  color: var(--text);
  padding: 0;
  box-shadow:
    0 0 0 1px rgba(209,18,47,.06),
    0 4px 16px rgba(209,18,47,.08),
    0 24px 64px rgba(47,11,18,.22),
    0 48px 100px rgba(47,11,18,.12);
  overflow: clip;
}

.airport-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 10;
  background: linear-gradient(90deg, rgba(148,16,36,.88), rgba(209,18,47,.95), rgba(255,110,130,.72), rgba(209,18,47,.95), rgba(148,16,36,.88));
  animation: dialog-bar-pulse 3s ease-in-out infinite;
}

.airport-dialog[open] {
  animation: dialog-enter .28s cubic-bezier(.22,.84,.26,1);
}

.airport-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 20%, rgba(209,18,47,.12), transparent 36%),
    rgba(10,6,10,.64);
  backdrop-filter: blur(14px);
  animation: dialog-backdrop-in .2s ease-out;
}

.airport-panel {
  padding: 20px 18px 18px;
  display: grid;
  gap: 14px;
  position: relative;
  max-height: min(calc(100svh - 48px), 720px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(209,18,47,.18) transparent;
}

.airport-hero {
  min-height: 190px;
  border-radius: 26px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: grid;
  align-content: space-between;
}

.airport-hero-copy {
  position: relative;
  z-index: 1;
  color: #fff;
}

.airport-hero-copy small {
  display: block;
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.airport-hero-copy h2 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1;
}

.airport-hero-copy p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.9);
  font-size: 13px;
  line-height: 1.7;
}

.airport-panel-status {
  border-radius: 16px;
  border: 1px solid rgba(209,18,47,.12);
  background: linear-gradient(135deg, rgba(209,18,47,.07), rgba(255,255,255,.94));
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.airport-destination-list {
  display: grid;
  gap: 10px;
}

.airport-destination-card {
  border-radius: 22px;
  border: 1px solid rgba(209,18,47,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,248,.96));
  box-shadow: 0 16px 40px rgba(150,18,32,.08);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.airport-destination-head,
.airport-destination-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.airport-destination-head strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.airport-destination-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.airport-destination-cost {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(209,18,47,.08);
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.airport-destination-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.airport-destination-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  align-self: center;
}

.gift-panel {
  padding: 20px 18px 18px;
  display: grid;
  gap: 14px;
  position: relative;
  max-height: min(calc(100svh - 48px), 720px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(209,18,47,.18) transparent;
}

.gift-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(209,18,47,.1);
  position: relative;
}

.gift-panel-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(209,18,47,.25), transparent);
  pointer-events: none;
}

.gift-panel-head h2 {
  font-weight: 800;
  letter-spacing: .02em;
}

.gift-panel-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gift-panel-head h2 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1;
}

.gift-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.gift-panel-summary {
  border-radius: 18px;
  border: 1px solid rgba(209,18,47,.12);
  background: linear-gradient(135deg, rgba(209,18,47,.07), rgba(255,255,255,.94));
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.gift-panel-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.gift-panel-summary strong {
  color: var(--red);
  font-size: 18px;
  font-weight: 900;
}

.gift-inventory-list {
  max-height: min(54svh, 460px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 2px;
}

.gift-inventory-item,
.gift-empty-state {
  border-radius: 22px;
  border: 1px solid rgba(209,18,47,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,248,.96));
  box-shadow: 0 16px 40px rgba(150,18,32,.08);
  padding: 14px;
}

.gift-inventory-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.gift-inventory-head strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.gift-inventory-head small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gift-send-button {
  min-width: 78px;
  min-height: 40px;
  border-radius: 14px;
  flex-shrink: 0;
}

.gift-inventory-tags {
  margin-top: 12px;
}

.gift-empty-state {
  display: grid;
  gap: 12px;
}

.gift-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.wechat-tool {
  position: relative;
}

.wechat-tool.has-badge::after {
  content: attr(data-count);
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5772, #d1122f);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px rgba(209,18,47,.24);
}

@media (max-width: 560px) {
  .mall-scene-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mall-item-list {
    grid-template-columns: 1fr;
  }

  .gift-inventory-head {
    flex-direction: column;
  }

  .gift-send-button {
    width: 100%;
  }
}
