/* =========================================================
   深圳奶蛙中学 · 视觉系统 v2.1
   奶蛙黄 / 奶油底 / 圆润卡片 / 夜间模式
   ========================================================= */

/* ---------- 1. 设计变量 ---------- */

:root {
  --frog: #FFD84D;
  --frog-deep: #F2B92E;
  --frog-light: #FFF0B0;
  --frog-border: #E7A91F;

  --cream: #FFF9EA;
  --surface: #FFFFFF;
  --surface-2: #FFF4D6;
  --surface-3: #FFFBF2;

  --ink: #4A3A1A;
  --ink-soft: #6B5830;
  --muted: #8A7649;
  --line: #F0DFA8;
  --line-strong: #E8CF8A;
  --amber-ink: #A97400;

  --green: #6FBF73;
  --green-deep: #4E9E55;
  --orange: #FF8A3D;
  --pink: #FFB4A2;
  --on-accent: #4A3A1A;

  --nav-bg: rgba(255, 216, 77, 0.9);
  --hero-overlay: linear-gradient(180deg, rgba(255, 216, 77, 0.16) 0%, rgba(255, 249, 234, 0.7) 58%, var(--cream) 100%);

  --shadow-xs: 0 2px 6px rgba(120, 91, 20, 0.08);
  --shadow-sm: 0 8px 22px rgba(138, 105, 24, 0.12);
  --shadow: 0 18px 44px rgba(138, 105, 24, 0.16);

  --radius-sm: 14px;
  --radius: 22px;
  --radius-lg: 30px;
  --wrap: 1120px;
}

[data-theme="dark"] {
  --frog: #E8C64F;
  --frog-deep: #D9B33C;
  --frog-light: #453B1D;
  --frog-border: #8A7228;

  --cream: #15130E;
  --surface: #211E16;
  --surface-2: #2A261B;
  --surface-3: #252117;

  --ink: #F7EDD2;
  --ink-soft: #DCCDA8;
  --muted: #B5A57E;
  --line: #3A3322;
  --line-strong: #4A4128;
  --amber-ink: #E8C64F;

  --green: #7BC67E;
  --green-deep: #5FA963;
  --orange: #FF9A5A;
  --pink: #D98A7A;
  --on-accent: #3A2C0C;

  --nav-bg: rgba(28, 25, 17, 0.92);
  --hero-overlay: linear-gradient(180deg, rgba(21, 19, 14, 0.3) 0%, rgba(21, 19, 14, 0.74) 56%, var(--cream) 100%);

  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.4);
  --shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
}

/* ---------- 2. 基础 ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.75;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(255, 216, 77, 0.28), transparent 62%),
    radial-gradient(900px 560px at 100% 4%, rgba(111, 191, 115, 0.17), transparent 60%),
    var(--cream);
  background-attachment: fixed;
}

[data-theme="dark"] body {
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(232, 198, 79, 0.1), transparent 62%),
    radial-gradient(900px 560px at 100% 4%, rgba(123, 198, 126, 0.08), transparent 60%),
    var(--cream);
  background-attachment: fixed;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.02em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.naiwa-icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
  vertical-align: -0.24em;
  flex-shrink: 0;
}

.inline-naiwa {
  width: 18px;
  height: 18px;
  padding: 1px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(120, 91, 20, 0.14);
  vertical-align: -4px;
}

[hidden] {
  display: none !important;
}

button,
input,
textarea {
  font: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--frog);
  color: var(--on-accent);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: none;
}

#main,
#campus,
#fortune,
#stats {
  scroll-margin-top: 92px;
}

/* ---------- 3. 通用布局 / 卡片 ---------- */

.container {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 34px 22px 72px;
  flex: 1;
}

.container.narrow {
  max-width: 760px;
}

.card {
  position: relative;
  padding: clamp(22px, 3.4vw, 38px);
  margin-bottom: 26px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card > p + p {
  margin-top: 0.65em;
}

.card strong {
  color: var(--ink);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.section-head.row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.section-head .muted {
  max-width: 34em;
}

.chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.fineprint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.back-home {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.back-home a {
  font-weight: 700;
  border-bottom: 1px dashed currentColor;
  padding-bottom: 1px;
}

.back-home a:hover {
  color: var(--ink);
}

/* ---------- 4. 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid var(--frog-border);
  border-radius: 999px;
  background: var(--frog);
  color: var(--on-accent);
  font-family: inherit;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--frog-border), var(--shadow-xs);
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--frog-border), var(--shadow-sm);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--frog-border);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--frog), var(--frog-deep));
}

.btn .naiwa-icon {
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(120, 91, 20, 0.16);
}

.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.btn.ghost:hover {
  box-shadow: var(--shadow-sm);
}

.btn.big {
  padding: 16px 36px;
  font-size: 18px;
}

.btn.small {
  padding: 8px 16px;
  border-width: 1.5px;
  font-size: 13px;
  box-shadow: 0 2px 0 var(--line-strong);
}

.btn.danger {
  background: #FFE1D6;
  border-color: #F3A98A;
  color: #A9441C;
}

[data-theme="dark"] .btn.danger {
  background: #3B221A;
  border-color: #7A4A36;
  color: #FFB59A;
}

/* ---------- 5. 顶部导航 ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--nav-bg);
  border-bottom: 1.5px solid var(--frog-border);
  box-shadow: 0 6px 24px rgba(138, 105, 24, 0.12);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

[data-theme="dark"] .nav {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 10px 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 20px;
  transition: transform 0.2s;
}

.logo-mark .logo-naiwa {
  width: 30px;
  height: 30px;
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.06);
}

.menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.menu a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 700;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.menu a:hover {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  transform: translateY(-1px);
}

[data-theme="dark"] .menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu a.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.icon-btn:hover {
  transform: translateY(-2px) rotate(-6deg);
  box-shadow: var(--shadow-xs);
}

.menu-btn {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 13px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.menu-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.menu-btn[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ---------- 6. 首页主视觉 ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: 620px;
  padding: clamp(48px, 7vw, 92px) 22px clamp(96px, 11vw, 138px);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: -3;
  background-position: center 42%;
  background-size: cover;
  transform: scale(1.04);
  animation: heroDrift 24s ease-in-out infinite alternate;
}

.hero-mask {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hero-overlay);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.22;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 65%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
}

.hero-text {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="dark"] .eyebrow {
  background: rgba(33, 30, 22, 0.65);
  border-color: rgba(255, 255, 255, 0.12);
}

.hero h1 {
  margin-top: 16px;
  color: #3F2F0C;
  font-size: clamp(42px, 7vw, 76px);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .hero h1 {
  color: #FFF4D2;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.65);
}

.hl {
  padding: 0 0.04em;
  border-radius: 4px;
  background: linear-gradient(180deg, transparent 60%, rgba(255, 216, 77, 0.72) 60%, rgba(255, 216, 77, 0.72) 94%, transparent 94%);
}

[data-theme="dark"] .hl {
  background: linear-gradient(180deg, transparent 60%, rgba(232, 198, 79, 0.38) 60%, rgba(232, 198, 79, 0.38) 94%, transparent 94%);
}

.hero-sub {
  display: inline-flex;
  margin-top: 16px;
  padding: 5px 16px;
  border: 1.5px dashed var(--frog-border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-xs);
}

.slogan {
  max-width: 34em;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 13px;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-pill strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .hero-pill {
  background: rgba(33, 30, 22, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  justify-self: center;
}

.hero-mascot {
  width: min(300px, 100%);
  height: auto;
  filter: drop-shadow(0 24px 30px rgba(80, 60, 10, 0.28));
  animation: bob 4.5s ease-in-out infinite;
}

.mascot-note {
  position: relative;
  padding: 8px 18px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  box-shadow: var(--shadow-xs);
}

.mascot-note::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-top: 1.5px solid var(--line);
  border-left: 1.5px solid var(--line);
  border-radius: 3px 0 0;
  background: var(--surface);
  transform: translateX(-50%) rotate(45deg);
}

.mascot-note small {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.hero-spark {
  position: absolute;
  z-index: 0;
  font-size: clamp(20px, 3vw, 34px);
  opacity: 0.85;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
  animation: floaty 7s ease-in-out infinite;
  pointer-events: none;
}

.hero-spark.s1 {
  top: 22%;
  left: 6%;
}

.hero-spark.s2 {
  top: 14%;
  right: 38%;
  animation-delay: -2s;
}

.hero-spark.s3 {
  right: 7%;
  bottom: 24%;
  animation-delay: -4s;
}

/* ---------- 7. 人气统计条 ---------- */

.stats-band {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: clamp(20px, 3vw, 38px);
  width: min(var(--wrap), calc(100% - 44px));
  margin: -62px auto 36px;
  padding: clamp(20px, 3vw, 30px);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stats-head h2 {
  font-size: 18px;
  letter-spacing: 0.04em;
}

.stats-updated {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
}

.live-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(111, 191, 115, 0.55);
  animation: pulse 2s infinite;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  transition: transform 0.18s, box-shadow 0.18s;
}

.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}

.stat-tile:first-child {
  border-color: var(--frog-border);
  background: linear-gradient(140deg, var(--frog-light), var(--surface-2));
}

.stat-tile:first-child .stat-num {
  color: var(--amber-ink);
  font-size: clamp(24px, 2.8vw, 36px);
}

.stat-icon {
  font-size: 16px;
  line-height: 1.2;
}

.stat-num {
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(19px, 2.1vw, 28px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-chart {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-left: clamp(18px, 2.5vw, 30px);
  border-left: 1.5px dashed var(--line);
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.chart-head b {
  color: var(--ink);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  height: 108px;
}

.chart-col {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  height: 100%;
}

.chart-val {
  color: var(--muted);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 0.2s;
}

.chart-col:hover .chart-val {
  opacity: 1;
}

.chart-bar {
  width: 100%;
  max-width: 26px;
  height: var(--h, 4%);
  min-height: 5px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--frog), var(--frog-deep));
  transform-origin: bottom;
  animation: barGrow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition: height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.2s;
}

.chart-bar.today {
  background: linear-gradient(180deg, var(--green), var(--green-deep));
}

.chart-bar.zero {
  background: var(--line-strong);
  opacity: 0.65;
}

.chart-col:hover .chart-bar {
  filter: saturate(1.2) brightness(1.04);
}

.chart-label {
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.chart-label.today {
  color: var(--green-deep);
  font-weight: 800;
}

/* ---------- 8. 简介 / 自述 ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  margin-bottom: 26px;
}

.intro-grid .card {
  margin-bottom: 0;
}

.intro-card p + p {
  margin-top: 0.65em;
}

.motto-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.motto-list li {
  padding: 5px 13px;
  border: 1px dashed var(--frog-border);
  border-radius: 999px;
  background: var(--frog-light);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.quote-card {
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
}

.quote-mark {
  position: absolute;
  top: -14px;
  right: 20px;
  color: var(--frog);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  opacity: 0.32;
  pointer-events: none;
}

.quote-card .section-head,
.quote-card p {
  position: relative;
  z-index: 1;
}

.quote-sign {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: right;
}

/* ---------- 9. 校园图集 ---------- */

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

.photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
}

.photo:first-child,
.photo:last-child {
  grid-column: 1 / -1;
}

.photo-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.photo-open::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(30, 24, 10, 0.42));
  opacity: 0;
  transition: opacity 0.3s;
}

.photo-open:hover::after {
  opacity: 1;
}

.photo img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.photo:first-child img {
  height: 350px;
}

.photo:last-child img {
  height: 280px;
}

.photo-open:hover img {
  transform: scale(1.055);
}

.photo-zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #4A3A1A;
  font-size: 15px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s, transform 0.25s;
}

.photo-open:hover .photo-zoom,
.photo-open:focus-visible .photo-zoom {
  opacity: 1;
  transform: scale(1);
}

.photo figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 30px 16px 12px;
  background: linear-gradient(transparent, rgba(35, 27, 8, 0.78));
  color: #FFF8E7;
  font-size: 13px;
  line-height: 1.5;
  pointer-events: none;
}

.photo figcaption .photo-naiwa {
  width: 15px;
  height: 15px;
  margin-right: 3px;
  vertical-align: -3px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

/* ---------- 10. 今日奶蛙签 ---------- */

.fortune-section {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(22px, 4vw, 50px);
  overflow: hidden;
  margin-bottom: 26px;
  padding: clamp(26px, 4vw, 46px);
  border: 1.5px solid var(--frog-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FFE98F 0%, #FFD84D 55%, #FFC93C 100%);
  box-shadow: var(--shadow);
  color: #4A3A1A;
}

.fortune-section::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -60px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.fortune-section::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.fortune-copy,
.fortune-ticket {
  position: relative;
  z-index: 1;
}

.fortune-copy .chip {
  border-color: rgba(74, 58, 26, 0.16);
  background: rgba(255, 255, 255, 0.55);
  color: #4A3A1A;
}

.fortune-copy h2 {
  margin: 10px 0 8px;
  font-size: clamp(26px, 3.6vw, 38px);
}

.fortune-copy p {
  max-width: 28em;
  color: rgba(74, 58, 26, 0.8);
}

.fortune-copy .btn {
  margin-top: 20px;
  border-color: #3A2C0C;
  background: #4A3A1A;
  color: #FFE98F;
  box-shadow: 0 4px 0 #3A2C0C;
}

.fortune-copy .btn:hover {
  box-shadow: 0 6px 0 #3A2C0C;
}

.fortune-copy .btn:active {
  box-shadow: 0 1px 0 #3A2C0C;
}

.fortune-ticket {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  padding: clamp(22px, 3vw, 32px);
  border: 2px dashed #D9A81F;
  border-radius: 22px;
  background: rgba(255, 251, 239, 0.84);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  color: #4A3A1A;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.fortune-ticket::before,
.fortune-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--frog-border);
  border-radius: 50%;
  background: #FFD84D;
  transform: translateY(-50%);
}

.fortune-ticket::before {
  left: -12px;
}

.fortune-ticket::after {
  right: -12px;
}

.fortune-luck {
  display: inline-flex;
  padding: 3px 14px;
  border-radius: 999px;
  background: #4A3A1A;
  color: #FFE98F;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.fortune-text {
  display: flex;
  align-items: center;
  min-height: 3.4em;
  color: #3A2C0C;
  font-size: clamp(16px, 2vw, 19px);
  font-weight: 800;
  line-height: 1.7;
}

.fortune-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.fortune-meta span {
  padding: 4px 12px;
  border: 1px solid rgba(74, 58, 26, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #6B5830;
  font-size: 12.5px;
}

.fortune-meta b {
  color: #4A3A1A;
}

.fortune-ticket.is-drawing {
  animation: shake 0.5s;
}

.fortune-ticket.is-revealed .fortune-text {
  animation: popIn 0.45s;
}

/* ---------- 11. 行动号召 ---------- */

.cta {
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
}

.cta::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: -28px;
  width: 150px;
  height: 170px;
  background: url("naiwa.svg?v=2.2.0") center / contain no-repeat;
  opacity: 0.08;
  transform: rotate(-12deg);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
}

.cta-naiwa {
  width: clamp(92px, 12vw, 128px);
  height: auto;
  filter: drop-shadow(0 10px 14px rgba(138, 105, 24, 0.22));
  animation: bob 4s ease-in-out infinite;
}

.cta-text {
  flex: 1;
  min-width: 220px;
}

.cta h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.cta p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 14px;
}

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

/* ---------- 12. 表单 ---------- */

.msg-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

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

.field label {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.field-optional {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.msg-form input,
.msg-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
}

.msg-form input::placeholder,
.msg-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.msg-form input:focus,
.msg-form textarea:focus {
  border-color: var(--orange);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.14);
}

.msg-form textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.7;
}

.field-hint {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.form-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.form-foot .fineprint {
  margin-top: 0;
}

.form-tip {
  min-height: 20px;
  margin: 0;
  color: var(--green-deep);
  font-size: 13.5px;
  font-weight: 700;
}

.form-tip.error {
  color: #D9622D;
}

[data-theme="dark"] .form-tip.error {
  color: #FF9A6B;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 54px;
}

.pass-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  transform: translateY(-50%);
}

.pass-toggle:hover {
  background: var(--surface);
  color: var(--ink);
}

/* ---------- 13. 留言列表 ---------- */

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

.msg-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.msg-item:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.msg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.msg-name {
  color: var(--ink);
  font-weight: 900;
}

.msg-name::before {
  content: "";
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--surface) url("naiwa-icon.svg?v=2.2.0") center / contain no-repeat;
  box-shadow: 0 1px 2px rgba(120, 91, 20, 0.14);
  vertical-align: -3px;
}

.msg-time {
  color: var(--muted);
  font-size: 11.5px;
}

.msg-content {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-ip {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.msg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.msg-actions .btn {
  padding: 6px 14px;
  border-width: 1.5px;
  font-size: 12.5px;
  box-shadow: none;
}

.counter-pill,
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 1px 9px;
  border-radius: 999px;
  background: var(--frog-light);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  vertical-align: 3px;
}

.empty-state {
  padding: 36px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state .empty-emoji {
  display: block;
  margin-bottom: 8px;
  font-size: 42px;
  animation: bob 4s ease-in-out infinite;
}

.empty-state .empty-naiwa {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 6px 10px rgba(138, 105, 24, 0.18));
  animation: bob 4s ease-in-out infinite;
}

/* ---------- 14. 打卡墙 ---------- */

.checkin-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 5vw, 56px) clamp(18px, 4vw, 44px);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.checkin-hero::before {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 216, 77, 0.16);
  pointer-events: none;
}

.checkin-hero h1 {
  margin: 12px auto 8px;
  font-size: clamp(26px, 4vw, 40px);
}

.checkin-hero > p {
  position: relative;
  z-index: 1;
}

.checkin-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px auto 0;
}

.checkin-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  margin-bottom: 6px;
  border-radius: 50%;
}

.checkin-ring::before,
.checkin-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.checkin-ring::before {
  inset: -10px;
  border: 2px dashed rgba(242, 185, 46, 0.55);
  animation: spin 20s linear infinite;
}

.checkin-ring::after {
  inset: -24px;
  border: 1.5px solid rgba(123, 198, 126, 0.25);
  animation: spin 30s linear infinite reverse;
}

.checkin-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 5px solid var(--frog-border);
  border-radius: 50%;
  background: radial-gradient(circle at 32% 26%, #FFF3C4, var(--frog) 68%);
  color: var(--on-accent);
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 0 var(--frog-border), 0 18px 34px rgba(242, 185, 46, 0.38);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.2s;
}

.checkin-btn::after {
  content: "";
  position: absolute;
  top: 8%;
  left: 18%;
  width: 26%;
  height: 16%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(4px);
  transform: rotate(-24deg);
  pointer-events: none;
}

.checkin-btn .checkin-naiwa {
  width: 104px;
  height: 104px;
  padding: 5px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(120, 91, 20, 0.18);
  pointer-events: none;
}

.checkin-btn .label {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
}

.checkin-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 0 var(--frog-border), 0 22px 38px rgba(242, 185, 46, 0.42);
}

.checkin-btn:active {
  transform: translateY(5px);
  box-shadow: 0 5px 0 var(--frog-border);
}

.checkin-btn:disabled {
  filter: grayscale(0.15);
  opacity: 0.7;
  cursor: not-allowed;
  transform: translateY(3px);
  box-shadow: 0 6px 0 var(--frog-border);
}

.checkin-btn.tap .checkin-naiwa {
  animation: hop 0.4s;
}

.cooldown-tip {
  min-height: 26px;
  margin: 14px 0 4px;
  color: var(--orange);
  font-size: 14.5px;
  font-weight: 800;
}

.total-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4px;
}

.total-num {
  color: var(--amber-ink);
  font-size: clamp(48px, 8vw, 72px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.55);
}

[data-theme="dark"] .total-num {
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

.total-num.pop {
  animation: popIn 0.45s;
}

.total-label {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.16em;
}

.mini-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--muted);
  font-size: 12.5px;
}

.mini-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.mini-stats b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---------- 15. 登录 / 管理 ---------- */

.empty-card {
  padding: 52px 24px;
  text-align: center;
}

.empty-card h1 {
  font-size: clamp(24px, 4vw, 34px);
}

.empty-emoji {
  display: block;
  margin-bottom: 10px;
  font-size: 56px;
  line-height: 1;
  animation: bob 4.5s ease-in-out infinite;
}

.login-card {
  padding: clamp(26px, 4vw, 40px);
}

.login-card.shake {
  animation: shake 0.45s;
}

.login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.login-head h1 {
  font-size: clamp(22px, 3vw, 28px);
}

.login-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.login-avatar .login-naiwa {
  width: 44px;
  height: 44px;
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.admin-bar h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(22px, 3vw, 30px);
}

.admin-bar h1 .admin-naiwa {
  width: 38px;
  height: 38px;
  padding: 2px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 26px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  text-align: center;
}

.admin-stats .stat-num {
  color: var(--amber-ink);
  font-size: clamp(22px, 2.6vw, 32px);
}

.admin-stats .stat span:last-child {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.list-head h2 {
  font-size: clamp(18px, 2.4vw, 22px);
}

.badge-pending {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  padding: 1px 9px;
  border-radius: 999px;
  background: #FFE3D6;
  color: #D9622D;
  font-size: 12px;
  font-weight: 800;
  vertical-align: 2px;
}

[data-theme="dark"] .badge-pending {
  background: #3B221A;
  color: #FFB59A;
}

/* ---------- 16. 页脚 / 隐藏入口 ---------- */

.footer {
  position: relative;
  margin-top: auto;
  padding: 34px 22px 26px;
  border-top: 2px solid var(--frog-border);
  background: linear-gradient(180deg, var(--frog), var(--frog-deep));
  color: var(--on-accent);
}

[data-theme="dark"] .footer {
  border-top-color: var(--line);
  background: linear-gradient(180deg, #242015, #1B1810);
  color: var(--ink);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: var(--wrap);
  margin: 0 auto;
  text-align: center;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  width: 100%;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(74, 58, 26, 0.25);
}

[data-theme="dark"] .footer-top {
  border-bottom-color: var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 900;
}

.footer-brand .footer-naiwa {
  width: 24px;
  height: 24px;
  padding: 2px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.footer-brand small {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a,
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.8;
  cursor: pointer;
}

.footer-links a:hover,
.link-btn:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy {
  font-size: 12.5px;
  opacity: 0.8;
}

.footer-copy .footer-inline-naiwa {
  width: 17px;
  height: 17px;
  padding: 1.5px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(120, 91, 20, 0.16);
  vertical-align: -3px;
}

.secret-frog {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: transform 0.18s;
}

.secret-frog .secret-naiwa {
  width: 38px;
  height: 38px;
}

.secret-frog:hover {
  transform: scale(1.12) rotate(6deg);
}

.secret-frog.tap {
  animation: hop 0.35s;
}

/* ---------- 17. 浮层 / 彩带 / 提示 ---------- */

.to-top {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  transform: translateY(-2px);
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 220;
  max-width: min(92vw, 440px);
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13.5px;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 16px);
  transition: opacity 0.22s, visibility 0.22s, transform 0.22s;
}

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

.toast.error {
  background: #B34A24;
  color: #fff;
}

[data-theme="dark"] .toast {
  background: #F7EDD2;
  color: #2A2416;
}

[data-theme="dark"] .toast.error {
  background: #B34A24;
  color: #fff;
}

.burst {
  position: fixed;
  z-index: 210;
  font-size: 20px;
  pointer-events: none;
  animation: burst 0.95s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.burst-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(80, 60, 10, 0.25));
}

/* ---------- 18. 图片灯箱 ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 40px);
  background: rgba(24, 20, 10, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s;
}

.lightbox[hidden] {
  display: none;
}

.lightbox.open {
  opacity: 1;
}

.lb-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: min(1100px, 94vw);
  max-height: 88vh;
  margin: 0;
  transform: scale(0.97);
  transition: transform 0.25s;
}

.lightbox.open .lb-figure {
  transform: scale(1);
}

.lb-figure img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 14px;
  background: #111;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lb-figure figcaption {
  color: #FFF8E7;
  font-size: 13.5px;
  text-align: center;
}

.lb-close,
.lb-nav {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.18s, transform 0.18s;
}

.lb-close:hover,
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.26);
}

.lb-close {
  top: 20px;
  right: 22px;
  width: 44px;
  height: 44px;
  font-size: 18px;
}

.lb-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
}

.lb-nav:hover {
  transform: translateY(-50%) scale(1.06);
}

.lb-nav.prev {
  left: 18px;
}

.lb-nav.next {
  right: 18px;
}

.no-scroll {
  overflow: hidden;
}

/* ---------- 19. 动效 ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.refresh-icon {
  display: inline-block;
  transition: transform 0.4s;
}

.is-spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}

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

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

@keyframes heroDrift {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.1) translateY(-10px); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(111, 191, 115, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(111, 191, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 191, 115, 0); }
}

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

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes hop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-12px) scale(1.16); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-7px) rotate(-1deg); }
  40% { transform: translateX(7px) rotate(1deg); }
  60% { transform: translateX(-5px) rotate(-0.6deg); }
  80% { transform: translateX(5px) rotate(0.6deg); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.86); }
  60% { opacity: 1; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes burst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -60px))) scale(1.1) rotate(18deg); }
}

/* ---------- 20. 响应式 ---------- */

@media (max-width: 1040px) {
  .stats-band {
    grid-template-columns: 1fr;
  }

  .stats-chart {
    padding-top: 18px;
    padding-left: 0;
    border-top: 1.5px dashed var(--line);
    border-left: 0;
  }

  .admin-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-bottom: 104px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-side {
    display: none;
  }

  .hero-text {
    max-width: none;
  }

  .stats-band {
    margin-top: -54px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .fortune-section {
    grid-template-columns: 1fr;
  }

  .hero-spark.s2 {
    display: none;
  }
}

@media (max-width: 860px) {
  .menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-left: 0;
    padding: 10px;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  }

  .menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .menu a {
    padding: 11px 14px;
    border-radius: 12px;
  }

  .menu-btn {
    display: flex;
  }

  .nav-tools {
    margin-left: auto;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 24px 16px 56px;
  }

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

  .hero h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .stats-band {
    width: calc(100% - 24px);
    padding: 16px;
    border-radius: 22px;
  }

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

  .stat-num {
    font-size: 22px;
  }

  .chart {
    height: 92px;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo:first-child,
  .photo:last-child {
    grid-column: auto;
  }

  .photo img,
  .photo:first-child img,
  .photo:last-child img {
    height: 230px;
  }

  .checkin-btn .checkin-naiwa {
    width: 86px;
    height: 86px;
  }

  .fortune-ticket::before,
  .fortune-ticket::after {
    display: none;
  }

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

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .to-top {
    right: 12px;
    bottom: 14px;
  }

  .lb-nav {
    width: 42px;
    height: 42px;
    font-size: 26px;
  }

  .lb-nav.prev {
    left: 8px;
  }

  .lb-nav.next {
    right: 8px;
  }
}

@media (max-width: 420px) {
  .logo-text {
    font-size: 17px;
  }

  .hero-spark.s3 {
    display: none;
  }

  .stat-num {
    font-size: 20px;
  }

  .msg-head {
    gap: 4px;
  }
}

/* ---------- 21. 减少动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
