:root {
  --bg-0: var(--tk-bone);
  --glass: var(--tk-bone);
  --glass-strong: var(--tk-file);
  --glass-border: var(--tk-line);
  --text: var(--tk-ink);
  --muted: #68625b;
  --muted-2: #827970;
  --accent: var(--tk-accent);
  --accent-2: var(--tk-accent);
  --accent-soft: var(--tk-accent-soft);
  --danger: var(--tk-alert);
  --online: var(--tk-gain);
  --chip: var(--tk-bone-warm);
  --track: var(--tk-line);
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 8px 24px rgba(20, 22, 26, 0.06);
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 三页的滚动条占位保持一致，顶栏位置才不会因为有没有滚动条而左右偏移 */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-0);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  transition: color 0.25s ease, background 0.25s ease;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg-0);
  background-position: center;
  background-size: cover;
}

body[data-theme="light"] .recent-game-time { color: var(--tk-accent); }

.bg-particles {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.sakura {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s ease;
}

body[data-theme="light"] .sakura {
  opacity: 1;
}

.petal {
  position: absolute;
  top: -18px;
  width: 15px;
  height: 22px;
  border-radius: 70% 15% 70% 15%;
  background: linear-gradient(135deg, #fff9ee, #edddc8 55%, #d7c1a5);
  animation: petal-fall linear infinite;
  opacity: 0.85;
}

body[data-theme="light"] .motto,
body[data-theme="light"] .section-heading h2,
body[data-theme="light"] .section-note,
body[data-theme="light"] .profile-content h1,
body[data-theme="light"] .music-meta h2 {
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.92), 0 2px 14px rgba(255, 255, 255, 0.8);
}

@keyframes petal-fall {
  0% {
    transform: translate3d(0, -4vh, 0) rotate(0deg) scale(var(--petal-scale, 1));
  }
  25% {
    transform: translate3d(-36px, 28vh, 0) rotate(95deg) scale(var(--petal-scale, 1));
  }
  50% {
    transform: translate3d(30px, 56vh, 0) rotate(190deg) scale(var(--petal-scale, 1));
  }
  75% {
    transform: translate3d(-26px, 84vh, 0) rotate(285deg) scale(var(--petal-scale, 1));
  }
  100% {
    transform: translate3d(16px, 116vh, 0) rotate(380deg) scale(var(--petal-scale, 1));
  }
}

.particle {
  position: absolute;
  bottom: -12px;
  border-radius: 50%;
  background: var(--accent-soft);
  animation: float-up linear infinite;
  opacity: 0;
}

@keyframes float-up {
  0% {
    transform: translateY(0) translateX(0) scale(0.6);
    opacity: 0;
  }
  12% {
    opacity: 0.75;
  }
  88% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-110vh) translateX(28px) scale(1.15);
    opacity: 0;
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  border: 1px solid var(--glass-border);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--tk-accent);
  box-shadow: none;
}

.icon-button,
.round-button,
.lightbox-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.icon-button:hover,
.round-button:hover,
.lightbox-close:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 121, 74, 0.65);
  background: rgba(180, 121, 74, 0.16);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.icon-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-theme="dark"] .icon-sun {
  display: none;
}

body[data-theme="light"] .icon-moon {
  display: none;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 22px;
  align-items: stretch;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), transparent 42%);
}

.profile-card {
  display: flex;
  gap: 24px;
  padding: 30px;
  min-height: 280px;
}

.avatar {
  flex: 0 0 auto;
  width: 122px;
  height: 122px;
  border: 3px solid rgba(180, 121, 74, 0.8);
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 0 34px rgba(180, 121, 74, 0.35);
}

.profile-content {
  min-width: 0;
}

.profile-content h1,
.music-meta h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.profile-content h1 {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.intro {
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 16px;
}

.sub-intro {
  margin: -18px 0 20px;
  color: var(--muted-2);
  font-size: 13px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 13px;
  transition: color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.social-link:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.steam-link {
  gap: 8px;
}

.steam-status {
  display: inline-flex;
  align-items: center;
  padding-left: 8px;
  border-left: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0.9;
}

.steam-status::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.steam-status.is-online {
  color: var(--online);
}

.steam-status.is-online::before {
  opacity: 1;
  box-shadow: 0 0 8px currentColor;
}

.recent-games {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 22px 0 0;
  padding: 13px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.recent-games[hidden] {
  display: none;
}

.recent-games-title {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.recent-games-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recent-game {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 11px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--chip);
  font-size: 12.5px;
  color: var(--muted);
}

.recent-game-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.recent-game-name {
  overflow: hidden;
  max-width: 200px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-game-time {
  color: var(--accent-2);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.contact-line {
  margin: 10px 0 0;
  color: var(--muted-2);
  font-size: 13px;
}

.music-card {
  padding: 28px;
  min-height: 280px;
}

.music-head {
  display: flex;
  align-items: center;
  gap: 20px;
}

.record-wrap {
  flex: 0 0 auto;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 6px;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 30px rgba(180, 121, 74, 0.28);
}

.record-wrap.playing {
  animation: spin 8s linear infinite;
}

.music-cover {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(39, 36, 31, 0.85);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.music-meta {
  min-width: 0;
}

.music-source {
  display: inline-block;
  margin-bottom: 7px;
  padding: 3px 8px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.music-meta h2 {
  overflow: hidden;
  font-size: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-meta p {
  margin: 5px 0 0;
  color: var(--muted);
}

.music-progress {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 12px;
  align-items: center;
  margin: 24px 0 14px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.progress {
  width: 100%;
  height: 5px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent) var(--value, 0%), var(--track) var(--value, 0%), var(--track) 100%);
  cursor: pointer;
}

.progress::-webkit-slider-thumb {
  width: 15px;
  height: 15px;
  appearance: none;
  -webkit-appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(180, 121, 74, 0.8);
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.round-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 15px;
}

.round-button.play-button {
  width: 54px;
  height: 54px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 19px;
  box-shadow: 0 10px 28px rgba(180, 121, 74, 0.4);
}

.quote-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 28px 0 8px;
  padding: 22px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: center;
}

body[data-theme="dark"] .quote-block {
  background: rgba(255, 255, 255, 0.035);
}

.quote-deco {
  color: var(--accent-2);
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1;
}

.motto {
  margin: 0;
  flex: 1;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.06em;
}

.motto-swap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.18s ease, color 0.18s ease;
}

.motto-swap:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: rotate(30deg);
}

.motto-swap svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.content-section {
  margin-top: 46px;
}

.section-heading {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
}

.section-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.note-with-help {
  display: flex;
  align-items: center;
  gap: 7px;
}

.help-button {
  position: relative;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

body[data-theme="light"] .help-button {
  color: #20233d;
  border-color: rgba(74, 63, 48, 0.3);
  background: rgba(255, 255, 255, 0.66);
}

body[data-theme="light"] .form-row input {
  border-color: rgba(74, 63, 48, 0.22);
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .form-row input::placeholder {
  color: var(--muted-2);
}

body[data-theme="light"] .eyebrow {
  color: var(--tk-accent);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.85);
}

body[data-theme="light"] .music-source {
  color: var(--muted);
}

.help-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 240px;
  padding: 7px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 9px;
  background: var(--glass-strong);
  color: var(--text);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.help-button:hover .help-tooltip,
.help-button:focus-visible .help-tooltip,
.help-button.tooltip-open .help-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.message-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.empty-hint {
  margin: 0;
  padding: 20px;
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--muted-2);
  text-align: center;
}

.message-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.message-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
}

.message-body {
  min-width: 0;
  flex: 1;
}

.message-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted-2);
  font-size: 12px;
}

.message-name {
  color: var(--text);
  font-weight: 600;
}

.message-text {
  margin: 4px 0 0;
  color: var(--muted);
}

.message-form {
  padding: 16px 18px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.form-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) 1fr auto;
  gap: 10px;
}

.form-row input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.form-row input::placeholder {
  color: var(--muted-2);
}

.form-row input:focus {
  border-color: var(--accent);
  background: rgba(180, 121, 74, 0.08);
}

.primary-button {
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(180, 121, 74, 0.35);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.form-hint {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 12px;
}

.gallery-carousel {
  position: relative;
}

.carousel-viewport {
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.gallery-slide {
  position: relative;
  flex: 0 0 100%;
  aspect-ratio: 16 / 8.2;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 34px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.66));
  color: #fff;
  font-size: 14px;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(74, 63, 48, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  color: var(--tk-ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: background 0.18s ease, transform 0.18s ease;
}

.carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
}

.carousel-arrow.prev {
  left: 14px;
}

.carousel-arrow.next {
  right: 14px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

body[data-theme="light"] .carousel-dot {
  background: rgba(74, 63, 48, 0.38);
}

.carousel-dot.active {
  width: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 16px 24px;
  border: 1px solid var(--glass-border);
  border-radius: 18px 18px 0 0;
  border-bottom: 0;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: var(--muted);
  font-size: 13px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-status strong,
.footer-time {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
}

.footer-icp a {
  color: var(--muted-2);
}
.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-gongan a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-gongan img {
  display: block;
  width: 15px;
  height: auto;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(4, 7, 18, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox p {
  margin: 12px 0 0;
  color: #fff;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 26px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 25px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .profile-card {
    min-height: 0;
  }

  .gallery-slide {
    aspect-ratio: 16 / 10;
  }


  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding: 10px 16px;
  }

  .page {
    padding: 22px 14px 56px;
  }

  .profile-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }

  .avatar {
    width: 94px;
    height: 94px;
    border-radius: 22px;
  }

  .music-card {
    padding: 22px;
  }

  .music-head {
    gap: 14px;
  }

  .record-wrap {
    width: 82px;
    height: 82px;
  }

  .music-meta h2 {
    font-size: 21px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .quote-block {
    gap: 10px;
  }

  .recent-games {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .lightbox img {
    max-width: 96vw;
  }
}

/* 公共导航 */

@view-transition {
  navigation: auto;
}

.site-brand {
  text-decoration: none;
  color: inherit;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  /* 每页都保留主题按钮的位置，导航不随按钮有无而移动。 */
  padding-right: 50px;
}

.site-header .theme-toggle {
  position: absolute;
  top: 50%;
  right: 24px;
  margin-top: -20px;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.is-current {
  color: var(--text);
  border-color: rgba(180, 121, 74, 0.45);
  background: rgba(180, 121, 74, 0.16);
}

@media (max-width: 620px) {
  .site-header {
    padding: 10px 14px;
  }

  .nav-link {
    height: 34px;
    padding: 0 11px;
    font-size: 13px;
  }

  .site-nav-links {
    gap: 2px;
  }

  .site-header .theme-toggle {
    right: 14px;
  }
}

@media (max-width: 480px) {
  /* 窄屏将导航放在独立一行，给站名和主题按钮留足空间。 */
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    row-gap: 6px;
  }

  .site-header .site-brand {
    min-height: 40px;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 34px;
    padding-right: 0;
  }

  .site-header .theme-toggle {
    top: 10px;
    margin-top: 0;
  }
}
