/* ============================================================
   FOR DJ — 私人小站样式表
============================================================ */
:root {
  --bg-paper: #f6f7f9;
  --bg-card: #ffffff;
  --bg-subtle: #eef0f4;
  --ink-primary: #14171c;
  --ink-secondary: #4f5663;
  --ink-muted: #7a8290;
  --border-hairline: rgba(20, 23, 28, 0.08);
  --border-strong: rgba(20, 23, 28, 0.16);
  --accent-cyan: #0077b6;
  --accent-amber: #c26a24;
  --upc-blue: #003c7e;
  --upc-blue-hover: #002d5f;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-serif: 'Noto Serif SC', 'Songti SC', Georgia, serif;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background: #0b0c0e;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* 屏幕切换 */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: block;
}

/* ============================================================
   第一幕：黑底白字开场仪式
============================================================ */
#splash-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0c0e;
  color: #f6f4ef;
  cursor: pointer;
  user-select: none;
}

.splash-inner {
  text-align: center;
  padding: 2rem;
}

.splash-line-1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #a4a29c;
  opacity: 0;
  transform: translateY(10px);
  animation: splashFadeUp 1.1s ease forwards 0.25s;
}

.splash-line-2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3.1rem, 8.5vw, 5.8rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.1;
  color: #f8f6f1;
  opacity: 0;
  transform: translateY(14px);
  animation: splashFadeUp 1.3s ease forwards 0.85s;
}

.splash-meta {
  margin: 2.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: #5e6168;
  opacity: 0;
  animation: splashFadeUp 1s ease forwards 1.6s;
}

.splash-skip {
  margin-top: 2.4rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #cfcdc7;
  padding: 0.55rem 1.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  opacity: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  animation: splashFadeUp 0.9s ease forwards 1.9s;
}

.splash-skip:hover {
  border-color: #f8f6f1;
  color: #0b0c0e;
  background: #f8f6f1;
}

@keyframes splashFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   第二幕：仿中国石油大学（华东）统一身份认证登录页
============================================================ */
#login-screen {
  background: #ffffff;
}

.upc-layout {
  display: flex;
  min-height: 100vh;
}

.upc-hero {
  position: relative;
  flex: 1;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #5da9e9 0%, #98ccf4 48%, #d7ecfb 78%, #eef4f8 100%);
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.upc-hero.has-flow-bg {
  background-image: url('assets/upc_anime_bg.jpg');
  background-size: cover;
  background-position: center;
}

.upc-hero.has-flow-bg .upc-sky,
.upc-hero.has-flow-bg .upc-hill,
.upc-hero.has-flow-bg .upc-building {
  display: none;
}

.upc-hero.has-flow-bg .upc-lawn {
  background: transparent;
}

.upc-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  filter: blur(2px);
}
.cloud-1 { width: 320px; height: 90px; top: 9%; left: 10%; }
.cloud-2 { width: 420px; height: 110px; top: 18%; right: 12%; opacity: 0.82; }
.cloud-3 { width: 260px; height: 70px; top: 32%; left: 36%; opacity: 0.7; }

.upc-building-wrap {
  position: relative;
  width: 100%;
  height: 58vh;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.upc-hill {
  position: absolute;
  bottom: 72px;
  left: -40px;
  width: 260px;
  height: 120px;
  background: linear-gradient(135deg, #7fb069 0%, #5c8a47 100%);
  border-radius: 60% 40% 0 0;
}

.upc-building {
  position: relative;
  z-index: 2;
  width: 84%;
  max-width: 860px;
  height: 270px;
  background: #d9e2e8;
  border-radius: 3px 3px 0 0;
  box-shadow: 0 18px 40px rgba(24, 48, 74, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.upc-roof-trim {
  height: 10px;
  background: #f0f3f5;
  border-bottom: 2px solid #b9c5ce;
}

.upc-facade {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 5px;
  padding: 0 8px;
  background: linear-gradient(180deg, #4b7485 0%, #375a6b 65%, #2b4754 100%);
}

.upc-facade span {
  background: linear-gradient(90deg, #eef1f3 0%, #d8dee2 100%);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.14);
}

.upc-ground-floor {
  height: 46px;
  background: linear-gradient(180deg, #283f4a 0%, #1d2f38 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.upc-entrance {
  width: 110px;
  height: 30px;
  background: rgba(255, 255, 255, 0.18);
  border-top: 2px solid #c9d4dc;
}

.upc-lawn {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 76px;
  background: linear-gradient(180deg, #d7dce0 0%, #c6cdd3 40%, #83a867 42%, #6d9452 100%);
}

.login-djw-peek {
  position: absolute;
  right: 9%;
  bottom: 14px;
  width: 72px;
  height: 56px;
  cursor: help;
  animation: djwFloat 2.8s ease-in-out infinite;
}

/* 右侧白色认证栏 */
.upc-sidebar {
  width: 390px;
  flex-shrink: 0;
  background: #ffffff;
  padding: 28px 34px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 5;
}

.upc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upc-crest {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--upc-blue);
  background: #f0f6fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.djw-crest-icon {
  width: 34px;
  height: 28px;
}

.upc-school-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--upc-blue);
  letter-spacing: 0.04em;
}

.upc-branch {
  font-size: 0.78rem;
  font-weight: 500;
  color: #4f6f94;
}

.upc-school-en {
  font-size: 0.62rem;
  color: #6b7b8c;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.upc-subtitle {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #666;
}

.upc-warning {
  margin: 14px 0 22px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #d93025;
}

.upc-target-label {
  font-size: 0.82rem;
  color: #666;
}

.upc-target-title {
  margin: 4px 0 20px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2b49;
}

.upc-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e5e8ec;
  margin-bottom: 22px;
}

.upc-tab {
  background: none;
  border: none;
  padding: 0 4px 10px;
  font-size: 0.92rem;
  color: #777;
  cursor: pointer;
  position: relative;
  font-family: inherit;
}

.upc-tab.active {
  color: var(--upc-blue);
  font-weight: 600;
}

.upc-tab.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--upc-blue);
}

.upc-input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid #d5dbe2;
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
  background: #f5f8fc;
}

.upc-input-group:focus-within {
  border-color: var(--upc-blue);
}

.upc-input-icon {
  width: 40px;
  background: #c7cdd4;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.upc-input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 12px;
  font-size: 0.9rem;
  color: #222;
  outline: none;
  font-family: inherit;
}

.upc-feedback {
  min-height: 20px;
  font-size: 0.78rem;
  color: #d93025;
  margin: -6px 0 10px;
}

.upc-feedback.info {
  color: var(--upc-blue);
}

.upc-submit-btn {
  width: 100%;
  background: var(--upc-blue);
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 11px;
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.18s;
  font-family: inherit;
}

.upc-submit-btn:hover {
  background: var(--upc-blue-hover);
}

.upc-links {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 12px;
}

.upc-link-btn {
  background: none;
  border: none;
  color: var(--upc-blue);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.upc-link-btn:hover {
  text-decoration: underline;
}

.upc-qr-panel {
  padding: 18px 12px;
  text-align: center;
  border: 1px dashed #ccd5df;
  background: #f9fbfd;
  border-radius: 4px;
}

.djw-qr-icon {
  width: 110px;
  height: 86px;
}

.upc-qr-caption {
  margin: 8px 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a2b49;
}

.upc-qr-sub {
  margin: 0;
  font-size: 0.78rem;
  color: #667587;
}

.upc-footer {
  margin-top: auto;
  padding-top: 28px;
  font-size: 0.72rem;
  line-height: 1.65;
  color: #9098a3;
}

.upc-footer-nav {
  color: #6b7684;
  margin-bottom: 6px;
}

.upc-footer p {
  margin: 0;
}

/* ============================================================
   第三幕：文艺 · 私人小站
============================================================ */
#dashboard-screen {
  background: var(--bg-paper);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 247, 249, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-mark {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.brand-code {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  color: var(--ink-secondary);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 140ms var(--ease-out), background-color 140ms var(--ease-out);
}

.nav-link:hover {
  color: var(--ink-primary);
  background: rgba(20, 23, 28, 0.04);
}

.nav-link.active {
  color: var(--ink-primary);
  background: #ffffff;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.hub-view {
  display: none;
}

.hub-view.active {
  display: block;
  animation: viewFadeIn 220ms var(--ease-out);
}

.single-col-section {
  max-width: 760px;
  margin: 0 auto 32px;
}

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

.nav-pill {
  background: var(--ink-primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 150ms var(--ease-out);
}

.nav-pill:hover {
  background: var(--accent-cyan);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--ink-secondary);
  padding: 6px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.btn-ghost:hover {
  border-color: var(--ink-primary);
  color: var(--ink-primary);
}

.btn-subtle {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  color: var(--ink-primary);
  padding: 8px 14px;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 140ms var(--ease-out);
}

.btn-subtle:hover {
  background: #e3e6ec;
}

.btn-accent {
  background: var(--ink-primary);
  border: 1px solid var(--ink-primary);
  border-radius: 8px;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.btn-accent:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.hub-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* 核心看板 2x2 网格 */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
}

.card-timer { grid-column: span 7; }
.card-countdown { grid-column: span 5; }
.card-djw { grid-column: span 7; }
.card-vinyl { grid-column: span 5; }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mono-tag {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.status-dot {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

.card-sub {
  margin: 4px 0 20px;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

.timer-display {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.timer-unit {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 16px 10px;
  text-align: center;
}

.timer-unit span {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.1;
}

.timer-unit small {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.literary-quote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--ink-secondary);
  border-left: 2px solid var(--border-strong);
  padding-left: 12px;
}

/* 倒计时 */
.countdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.countdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
}

.cd-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.cd-date {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.cd-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--accent-amber);
}

/* djw 小助手卡片 */
.djw-stage {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 8px 0 18px;
}

.djw-mascot-btn {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  width: 112px;
  height: 96px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 150ms var(--ease-out), border-color 150ms var(--ease-out);
}

.djw-mascot-btn:hover {
  border-color: var(--ink-primary);
  transform: translateY(-2px);
}

.djw-mascot-btn.hop {
  animation: djwHop 0.42s ease;
}

.djw-main {
  width: 92px;
  height: 74px;
}

.djw-bubble {
  flex: 1;
}

.djw-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 6px;
}

.djw-bubble p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.djw-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 小唱片音乐盒 */
.vinyl-body {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 10px;
}

.turntable {
  position: relative;
  width: 118px;
  height: 118px;
  flex-shrink: 0;
}

.vinyl-disc {
  width: 114px;
  height: 114px;
  border-radius: 50%;
  background: radial-gradient(circle at center, #2c2f34 0%, #15171a 55%, #23262b 60%, #111316 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  animation: spinVinyl 6s linear infinite;
  animation-play-state: paused;
}

.turntable.playing .vinyl-disc {
  animation-play-state: running;
}

.vinyl-label {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e6dfd1;
  border: 2px solid var(--accent-amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.vinyl-label small {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--ink-secondary);
  margin-top: 2px;
}

.tonearm {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 6px;
  height: 58px;
  background: #8c9199;
  border-radius: 3px;
  transform-origin: top center;
  transform: rotate(-18deg);
  transition: transform 0.35s ease;
}

.turntable.playing .tonearm {
  transform: rotate(10deg);
}

.vinyl-info {
  flex: 1;
  min-width: 0;
}

.track-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
  margin: 4px 0 14px;
}

.vinyl-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctrl-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-strong);
  background: var(--bg-paper);
  color: var(--ink-primary);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-play {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #fff;
  font-size: 0.82rem;
}

.ctrl-play:hover {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ============================================================
   回忆长廊、备忘录、留言板
============================================================ */
.hub-section {
  margin-bottom: 44px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.section-title {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
}

.inline-form {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  padding: 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-row-end {
  justify-content: space-between;
}

.inline-form input[type="text"],
.inline-form input[type="date"],
.inline-form textarea,
.compact-form input,
.compact-form select {
  border: 1px solid var(--border-strong);
  background: var(--bg-paper);
  padding: 9px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--ink-primary);
  outline: none;
}

.inline-form input[type="text"] { flex: 1; }

.file-label {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.memory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.memory-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
}

.memory-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.08rem;
}

.memory-content {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.memory-img {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border: 1px solid var(--border-hairline);
  margin-top: 6px;
}

/* 双栏：备忘录 + 留言板 */
.two-col-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.compact-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.compact-form input {
  flex: 1;
}

.memo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memo-item {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.memo-left {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  font-size: 0.9rem;
}

.memo-item.done .memo-text {
  text-decoration: line-through;
  color: var(--ink-muted);
}

.btn-del {
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
}

.btn-del:hover {
  color: #d93025;
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
}

.message-item {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 12px 16px;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.message-author {
  font-weight: 600;
  color: var(--ink-primary);
}

.message-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.hub-footer {
  border-top: 1px solid var(--border-hairline);
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* ============================================================
   弹窗：djw 跑酷游戏 & 12.06 生日祝福
============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 12, 14, 0.72);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  width: 100%;
  max-width: 740px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 4px 0 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink-muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--ink-primary);
}

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}

.game-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.game-stats strong {
  color: var(--ink-primary);
  font-weight: 500;
}

.game-stage {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
}

#djw-game-canvas {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg-paper);
  cursor: pointer;
}

.game-settlement {
  position: absolute;
  inset: 0;
  background: rgba(246, 247, 249, 0.86);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.settlement-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  padding: 18px 24px;
  text-align: center;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(20, 23, 28, 0.12);
}

.settlement-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-cyan);
  background: rgba(0, 119, 182, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
}

.settlement-title {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink-primary);
}

.settlement-desc {
  margin: 0 0 14px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

.settlement-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.settlement-metrics > div {
  background: var(--bg-paper);
  border-radius: 8px;
  padding: 8px 6px;
}

.settlement-metrics small {
  display: block;
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.settlement-metrics strong {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  color: var(--ink-primary);
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--ink-secondary);
}

/* 生日弹窗 */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.birthday-card {
  max-width: 520px;
  text-align: center;
  padding: 36px 32px 28px;
}

.birthday-card .modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
}

.birthday-djw-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  animation: djwFloat 2.2s ease-in-out infinite;
}

.djw-birthday-img {
  width: 156px;
  height: 156px;
  object-fit: contain;
  border-radius: 12px;
}

.birthday-tag {
  color: var(--accent-amber);
}

.birthday-title {
  margin: 8px 0 18px;
  font-family: var(--font-serif);
  font-size: 1.85rem;
}

.birthday-body {
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.birthday-body p {
  margin: 0 0 10px;
}

.birthday-sign {
  text-align: right;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--ink-primary);
  margin: 14px 0 22px;
}

.birthday-btn {
  padding: 10px 28px;
}

/* 动效 */
@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes djwFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes djwHop {
  0% { transform: translateY(0); }
  40% { transform: translateY(-16px) rotate(-4deg); }
  100% { transform: translateY(0); }
}

/* 响应式 */
@media (max-width: 900px) {
  .upc-hero { display: none; }
  .upc-sidebar { width: 100%; min-height: 100vh; }
  .card-timer, .card-countdown, .card-djw, .card-vinyl { grid-column: span 12; }
  .two-col-section { grid-template-columns: 1fr; }
  .topbar {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
  }
  .topbar-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-top: 6px;
    border-top: 1px solid var(--border-hairline);
  }
}

/* =========================================================
   心愿清单：一起想做的 100 件小事
   ========================================================= */
.card-wish,
.card-firstaid {
  grid-column: span 6;
}

.wish-mini-track {
  height: 6px;
  margin: 18px 0 14px;
  background: var(--bg-paper);
  border-radius: 999px;
  overflow: hidden;
}

.wish-mini-bar {
  width: 0;
  height: 100%;
  background: var(--accent-cyan);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.wish-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-muted);
}

.firstaid-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.firstaid-entry-note {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.wishlist-section {
  padding: 34px 36px 28px;
}

.wish-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-hairline);
}

.wish-hero-title {
  margin: 10px 0 8px;
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-primary);
}

.wish-hero-sub {
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.wish-counter {
  flex-shrink: 0;
  text-align: right;
}

.wish-counter-num {
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

.wish-counter-goal {
  margin-left: 4px;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink-muted);
}

.wish-counter-label {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
}

.wish-progress {
  height: 3px;
  margin: 0 0 22px;
  background: var(--bg-paper);
  overflow: hidden;
}

.wish-progress-bar {
  width: 0;
  height: 100%;
  background: var(--ink-primary);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.wish-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.wish-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.wish-tab:hover {
  border-color: var(--border-strong);
}

.wish-tab.active {
  background: var(--ink-primary);
  border-color: var(--ink-primary);
  color: #ffffff;
}

.wish-tab-num {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.55;
}

.wish-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wish-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border-hairline);
}

.wish-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  padding: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wish-check:hover {
  border-color: var(--ink-primary);
  transform: scale(1.08);
}

.wish-check.checked {
  display: flex;
  align-items: center;
  justify-content: center;
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  color: #ffffff;
  font-size: 12px;
  cursor: default;
}

.wish-body {
  flex: 1;
  min-width: 0;
}

.wish-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: nowrap;
}

.wish-cat {
  flex-shrink: 0;
  padding: 2px 7px;
  border: 1px solid var(--border-hairline);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.wish-title {
  min-width: 0;
  font-size: 15px;
  color: var(--ink-primary);
}

.wish-item.done .wish-title {
  color: var(--ink-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(20, 23, 28, 0.18);
}

.wish-note {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-secondary);
}

.wish-undo {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 11px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wish-item:hover .wish-undo {
  opacity: 1;
}

.wish-stamp {
  flex-shrink: 0;
  align-self: center;
  transform: rotate(var(--rot, -4deg));
  padding: 6px 10px;
  border: 2px solid var(--accent-cyan);
  border-radius: 4px;
  text-align: center;
  color: var(--accent-cyan);
  opacity: 0.85;
  mix-blend-mode: multiply;
  transition: transform 0.25s ease;
}

.wish-item:hover .wish-stamp {
  transform: rotate(0deg) scale(1.04);
}

.wish-stamp span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.wish-stamp em {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.wish-checkin {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--bg-paper);
  border-radius: 10px;
}

.wish-checkin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.wish-checkin-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-muted);
}

.wish-checkin-date input {
  padding: 4px 8px;
  border: 1px solid var(--border-hairline);
  border-radius: 6px;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-primary);
}

.wish-checkin-tip {
  font-size: 11px;
  color: var(--ink-muted);
}

.wish-checkin textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-primary);
  resize: vertical;
}

.wish-checkin-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.wish-empty {
  padding: 40px 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

.wish-year {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 26px 4px 8px;
}

.wish-year span {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--ink-primary);
}

.wish-year em {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

.wish-add {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px dashed var(--border-hairline);
}

.wish-add select,
.wish-add input {
  padding: 10px 12px;
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink-primary);
}

.wish-add select {
  cursor: pointer;
}

.wish-add input {
  flex: 1;
  min-width: 200px;
}

/* =========================================================
   坏情绪急救箱 / 夸夸盲盒
   ========================================================= */
.nav-pill-soft {
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
}

.nav-pill-soft:hover {
  background: var(--accent-cyan);
  color: #ffffff;
}

.modal-card {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}

.firstaid-card {
  max-width: 560px;
}

.firstaid-head {
  text-align: center;
  padding: 4px 12px 0;
}

.firstaid-title {
  margin: 10px 0 6px;
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-primary);
}

.firstaid-hint {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-muted);
}

.firstaid-djw {
  display: flex;
  justify-content: center;
  margin: 6px 0 2px;
}

.djw-mini {
  width: 96px;
  height: auto;
  opacity: 0.9;
}

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

.aid-choice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  background: var(--bg-card);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.aid-choice strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}

.aid-choice span {
  font-size: 11px;
  color: var(--ink-muted);
}

.aid-choice:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 119, 182, 0.04);
  transform: translateX(3px);
}

.firstaid-draw {
  margin-top: 4px;
}

.aid-slip {
  position: relative;
  margin: 16px 0 18px;
  padding: 26px 26px 20px;
  border: 1px solid var(--border-hairline);
  border-radius: 4px;
  background: #fbfaf7;
  box-shadow: 0 2px 0 rgba(20, 23, 28, 0.04), 0 12px 28px -18px rgba(20, 23, 28, 0.35);
}

.aid-slip::before {
  content: '';
  position: absolute;
  top: -7px;
  left: 50%;
  width: 46px;
  height: 14px;
  margin-left: -23px;
  background: rgba(0, 119, 182, 0.1);
  transform: rotate(-2deg);
}

.aid-text {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2;
  letter-spacing: 0.02em;
  color: var(--ink-primary);
}

.aid-photo {
  display: block;
  width: 100%;
  border-radius: 3px;
}

.aid-photo-caption {
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  text-align: center;
}

.aid-sign {
  margin-top: 16px;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--ink-muted);
  text-align: right;
}

.aid-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.slip-in {
  animation: slipIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slipIn {
  from {
    opacity: 0;
    transform: translateY(10px) rotate(-1.2deg) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(0) scale(1);
  }
}

@media (max-width: 900px) {
  .card-wish,
  .card-firstaid {
    grid-column: span 12;
  }

  .wishlist-section {
    padding: 24px 18px 20px;
  }

  .wish-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .wish-counter {
    text-align: left;
    align-self: flex-start;
    display: flex;
    align-items: baseline;
    gap: 12px;
  }

  .wish-counter-label {
    margin-top: 0;
  }

  .wish-hero-title {
    font-size: 30px;
  }

  .wish-counter-num {
    font-size: 34px;
  }

  .wish-check {
    width: 26px;
    height: 26px;
    margin-top: 0;
  }

  .wish-title {
    font-size: 14px;
  }

  .wish-item {
    flex-wrap: wrap;
  }

  .wish-item .wish-body {
    flex: 1 1 calc(100% - 44px);
  }

  .wish-stamp {
    align-self: flex-end;
    margin-left: auto;
    padding: 4px 7px;
    border-width: 1.5px;
  }

  .wish-stamp span {
    font-size: 9px;
    letter-spacing: 0.14em;
  }

  .wish-stamp em {
    font-size: 8px;
  }

  .topbar-nav {
    flex-wrap: nowrap;
  }

  .nav-link,
  .topbar-nav .nav-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .wish-checkin-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .aid-slip {
    padding: 20px 18px 16px;
  }
}

/* ============================================================
   完整手机端适配（上线级优化：iPhone / Android / 微信内置浏览器）
============================================================ */
button,
#djw-game-canvas {
  touch-action: manipulation;
}

@media (hover: none) {
  .wish-undo {
    opacity: 0.72;
  }
}

@media (max-width: 900px) {
  .screen {
    min-height: 100dvh;
  }

  #splash-screen.active {
    min-height: 100dvh;
  }

  /* 登录页：手机端保留顶部动漫校园横幅 + 右下角小 djw */
  .upc-layout {
    flex-direction: column;
    min-height: 100dvh;
  }

  .upc-hero {
    display: flex !important;
    flex: none;
    width: 100%;
    height: 210px;
    min-height: 210px;
  }

  .upc-building-wrap {
    height: 100%;
    min-height: 0;
  }

  .upc-lawn {
    height: 54px;
  }

  .login-djw-peek {
    right: 16px;
    bottom: 8px;
    width: 58px;
    height: 46px;
  }

  .upc-sidebar {
    width: 100%;
    min-height: auto;
    flex: 1;
    padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  }

  /* 顶栏与导航横向流畅滑动 */
  .topbar {
    padding: 10px 14px 8px;
    gap: 8px;
  }

  .topbar-nav {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .topbar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link,
  .topbar-nav .nav-pill {
    min-height: 34px;
    padding: 6px 11px;
  }

  .hub-container {
    padding: 20px 14px 48px;
  }

  .hub-footer {
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  /* 防止 iOS Safari 聚焦输入框时页面自动缩放 */
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .brand-code {
    display: none;
  }

  .overview-grid {
    gap: 14px;
    margin-bottom: 32px;
  }

  .card {
    padding: 18px 16px;
  }

  /* 恋爱计时器 4 格紧凑对齐，不溢出 */
  .timer-display {
    gap: 8px;
    margin-bottom: 16px;
  }

  .timer-unit {
    padding: 12px 4px;
  }

  .timer-unit span {
    font-size: 1.35rem;
  }

  .timer-unit small {
    font-size: 0.7rem;
  }

  /* 倒计时卡片 */
  .countdown-item {
    padding: 12px 14px;
  }

  .cd-value {
    font-size: 1.08rem;
  }

  /* djw 助手卡片 */
  .djw-stage {
    gap: 14px;
  }

  .djw-mascot-btn {
    width: 88px;
    height: 76px;
  }

  .djw-main {
    width: 74px;
    height: 60px;
  }

  .djw-actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
  }

  /* 小唱片机 */
  .vinyl-body {
    gap: 16px;
  }

  .turntable {
    width: 96px;
    height: 96px;
  }

  .vinyl-disc {
    width: 92px;
    height: 92px;
  }

  .vinyl-label {
    width: 34px;
    height: 34px;
    font-size: 0.64rem;
  }

  .tonearm {
    height: 48px;
  }

  /* 急救箱入口 */
  .firstaid-entry {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* 回忆长廊 / 备忘录 / 留言板 / 心愿清单表单 */
  .timeline {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .form-row-end {
    gap: 10px;
  }

  .compact-form {
    flex-wrap: wrap;
  }

  .message-form select {
    width: 88px;
  }

  .message-form input {
    min-width: 0;
    flex: 1 1 160px;
  }

  .message-form button {
    width: 100%;
  }

  .wish-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .wish-tabs::-webkit-scrollbar {
    display: none;
  }

  .wish-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .wish-add {
    flex-wrap: wrap;
  }

  .wish-add select {
    width: 104px;
  }

  .wish-add input {
    flex: 1 1 180px;
    min-width: 0;
  }

  .wish-add button {
    width: 100%;
  }

  /* 所有弹窗：支持小屏滚动、防裁切 */
  .modal {
    padding: 12px;
    align-items: center;
  }

  .modal-card {
    max-height: 90dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 18px 16px;
  }

  .birthday-card {
    padding: 26px 20px 22px;
  }

  .birthday-title {
    font-size: 1.5rem;
  }

  .djw-birthday-img {
    width: 128px;
    height: 128px;
  }

  /* 跑酷游戏弹窗：小屏 HUD 折行，结算卡片放在画布下方避免裁切 */
  .game-hud {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .game-stage {
    overflow: visible;
    border: none;
  }

  #djw-game-canvas {
    border: 1px solid var(--border-strong);
    border-radius: 10px;
  }

  .game-settlement {
    position: static;
    margin-top: 12px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .settlement-card {
    max-width: none;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(20, 23, 28, 0.08);
  }

  .game-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .game-footer button {
    width: 100%;
  }
}
