/* Sabonner 组件样式：沿用 1999 主题的粗边框 + 硬阴影 + 强调色页头 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Twemoji Country Flags', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Twemoji Country Flags', 'Archivo Black', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-weight: 400;
}

a { color: inherit; }
button { font: inherit; color: inherit; }
.muted { color: var(--text-muted); }
[hidden] { display: none !important; }

/* 每块表面的内部细线：本身墨色与纸色的混合 */
.card, .theme-menu, .dialog, .admin-block { --line: color-mix(in srgb, var(--black) var(--line-mix), var(--white)); }

/* ---------- 页头 ---------- */
.header {
  position: relative;
  z-index: 100;
  background: var(--accent);
  color: var(--black);
  border-bottom: var(--border-width) solid var(--black);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 3px solid var(--black);
}

.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--black); }
.logo h1 { font-size: 1.5rem; }
.logo-mark {
  width: 22px; height: 22px;
  background: var(--black);
  box-shadow: inset 0 0 0 5px var(--black), inset 0 0 0 11px var(--white);
}

.header-controls { display: flex; gap: 0.5rem; }

.btn-square, .btn-admin, .btn, .chip-btn {
  border: 3px solid var(--black);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn-square:hover, .btn-admin:hover, .btn:hover, .chip-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--shadow);
}
.btn-square:active, .btn-admin:active, .btn:active, .chip-btn:active {
  transform: translate(3px, 3px);
  box-shadow: none;
}

.btn-square {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white);
  color: var(--black);
}
.btn-square[aria-expanded="true"] { background: var(--black); color: var(--white); }

.btn-admin {
  display: flex; align-items: center; gap: 0.5rem;
  height: 44px; padding: 0 1rem;
  background: var(--black); color: var(--white);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-transform: uppercase;
}
.btn-admin svg { color: var(--accent); }

/* ---------- 统计条 ---------- */
.stats-bar { display: flex; overflow-x: auto; }
.stat-item {
  flex: 1; min-width: 90px;
  background: transparent; border: none; border-right: 3px solid var(--black); border-radius: 0;
  cursor: pointer; font: inherit; color: inherit;
  padding: 0.7rem 1rem;
  border-right: 3px solid var(--black);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: color-mix(in srgb, var(--black) 8%, transparent); }
.stat-item:focus-visible { outline: 3px solid var(--black); outline-offset: -6px; }
.stat-value { font-family: 'Archivo Black', sans-serif; font-size: 1.5rem; line-height: 1.1; color: var(--black); }
.stat-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); }

/* ---------- 主体 ---------- */
.main {
  flex: 1;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* 订阅条 */
.subs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.subs-label {
  font: 700 0.7rem 'Space Grotesk', sans-serif;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 32px; padding: 0 0.6rem;
  background: var(--card-bg);
  border: 2px solid var(--black);
  font-weight: 700; font-size: 0.8rem;
  white-space: nowrap;
}
.chip img { width: 18px; height: 18px; object-fit: contain; }
.chip-tier { background: var(--black); color: var(--white); font-family: 'Archivo Black', sans-serif; letter-spacing: 0.05em; }

/* 日期分组 */
.day { margin-bottom: 2rem; }
.day-head {
  display: flex; align-items: baseline; gap: 0.75rem;
  margin-bottom: 1rem; padding-bottom: 0.4rem;
  border-bottom: var(--border-width) solid var(--black);
}
.day-head h2 { font-size: 1.15rem; }
.day-head .muted { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ---------- 比赛卡片 ---------- */
.card {
  position: relative;
  background: var(--card-bg);
  border: var(--border-width) solid var(--black);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translate(-3px, -3px);
  box-shadow: calc(var(--shadow-offset) + 3px) calc(var(--shadow-offset) + 3px) 0 var(--shadow);
}

.card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 3px solid var(--line);
}
.tier {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black', sans-serif; font-size: 0.9rem;
  border: 2px solid var(--black);
  background: var(--tier-bg, var(--white)); color: var(--tier-fg, var(--black));
}
.tier-s { --tier-bg: var(--accent-red); --tier-fg: #fff; }
.tier-a { --tier-bg: var(--accent-orange); --tier-fg: #000; }
.tier-b { --tier-bg: var(--accent-blue); --tier-fg: #fff; }
.tier-c { --tier-bg: var(--accent-green); --tier-fg: #000; }
.tour { min-width: 0; }
.tour-name {
  display: block;
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tour-stage {
  display: block;
  font-size: 0.75rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none;
}
a.tour-stage:hover { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; }
.bo {
  font-family: 'Archivo Black', sans-serif; font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border: 2px solid var(--black);
}

.live-band {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 1rem;
  background: var(--black); color: var(--white);
  font: 700 0.72rem 'Space Grotesk', sans-serif; letter-spacing: 0.14em;
}
.live-dot { width: 10px; height: 10px; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { background: var(--accent-red); } 50% { background: var(--white); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; background: var(--accent-red); } }

.teams { padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.team { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 0.7rem; }
.team-logo {
  width: 34px; height: 34px;
  border: 2px solid var(--line);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-family: 'Archivo Black', sans-serif; font-size: 0.7rem;
}
.team-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.team-name {
  font-family: 'Twemoji Country Flags', 'Archivo Black', sans-serif;
  font-size: 1.05rem; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-name .flag { margin-right: 0.35rem; font-family: 'Twemoji Country Flags', sans-serif; }
.team.star .team-name::after { content: ' ★'; color: var(--accent-yellow); -webkit-text-stroke: 1px var(--black); }
.team-score {
  min-width: 2.2rem; height: 34px; padding: 0 0.4rem;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Archivo Black', sans-serif; font-size: 1.2rem;
  border: 2px solid var(--black);
}
.team.win .team-score { background: var(--accent); color: var(--on-accent); }
.team.lose .team-name, .team.lose .team-score { color: var(--text-muted); }
.team.lose .team-logo { opacity: 0.55; }

/* 每张图一行，和三网行一样共用一组列 */
.maps { border-top: 3px solid var(--line); padding: 0.55rem 1rem; display: flex; flex-direction: column; gap: 0.3rem; }
.map {
  display: grid; grid-template-columns: 1.4rem 1fr auto 1fr;
  align-items: center; gap: 0.6rem;
  font-size: 0.8rem; font-weight: 700;
}
.map-n {
  width: 1.4rem; height: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); font-size: 0.7rem;
}
.map-name { text-transform: uppercase; letter-spacing: 0.05em; }
.map-score { font-family: 'Archivo Black', sans-serif; font-size: 0.85rem; }
.map-win { text-align: right; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map.current .map-n { background: var(--accent-red); border-color: var(--black); color: #fff; }
.map.current .map-win { color: var(--accent-red); }
.map.upcoming { color: var(--text-muted); }

.card-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-top: 3px solid var(--line);
  font-size: 0.78rem; font-weight: 700;
}
.when { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.when-time { font-family: 'Archivo Black', sans-serif; font-size: 0.95rem; }
.countdown { color: var(--text-muted); letter-spacing: 0.04em; }
.ext {
  text-decoration: none; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.15rem 0.45rem; border: 2px solid var(--black);
}
.ext:hover { background: var(--black); color: var(--white); }

/* ---------- 空状态 / 加载 ---------- */
.empty {
  text-align: center; padding: 3.5rem 2rem;
  border: 4px dashed var(--black);
  background: var(--card-bg);
}
.empty h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.empty p { color: var(--text-muted); }

.loading { display: flex; justify-content: center; padding: 4rem 2rem; }
.loading-panel {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: var(--white); border: 3px solid var(--black); box-shadow: 4px 4px 0 var(--shadow);
  font: 700 0.8rem 'Space Grotesk', sans-serif; letter-spacing: 0.15em;
}
.pixel-loader { display: inline-flex; gap: 3px; }
.pixel-loader i { width: 8px; height: 8px; background: var(--black); animation: pix 0.9s steps(1) infinite; }
.pixel-loader i:nth-child(2) { animation-delay: 0.15s; }
.pixel-loader i:nth-child(3) { animation-delay: 0.3s; }
@keyframes pix { 0%, 100% { background: var(--black); } 50% { background: var(--accent); } }

/* ---------- 管理 ---------- */
.admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1.5rem; align-items: start; }
.admin-block {
  background: var(--card-bg);
  border: var(--border-width) solid var(--black);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow);
}
.admin-block h3 { font-size: 0.95rem; padding: 0.75rem 1rem; border-bottom: 3px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.admin-body { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.admin-hint { font-size: 0.78rem; color: var(--text-muted); }

.tier-toggles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.chip-btn {
  height: 48px;
  background: var(--white); color: var(--black);
  font-family: 'Archivo Black', sans-serif; font-size: 1.1rem;
}
.chip-btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.field { display: flex; gap: 0.5rem; }
input[type="text"], input[type="search"], input[type="password"] {
  flex: 1; min-width: 0;
  height: 42px; padding: 0 0.75rem;
  background: var(--white); color: var(--black);
  border: 3px solid var(--black);
  font: 500 0.95rem 'Space Grotesk', sans-serif;
  outline: none;
}
input:focus { box-shadow: 3px 3px 0 var(--accent); }

.btn {
  height: 42px; padding: 0 1rem;
  background: var(--white); color: var(--black);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase;
  white-space: nowrap;
}
.btn-primary { background: var(--black); color: var(--white); }
.btn-sm { height: 32px; padding: 0 0.6rem; font-size: 0.72rem; box-shadow: 2px 2px 0 var(--shadow); border-width: 2px; }
.btn-danger:hover { background: var(--accent-red); color: #fff; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--line);
  font-size: 0.85rem;
}
.row:last-child { border-bottom: none; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; }
.row-main img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; }
.badge {
  font: 700 0.65rem 'Space Grotesk', sans-serif; letter-spacing: 0.08em;
  padding: 0.1rem 0.35rem; border: 2px solid var(--black);
}
.badge-pending { background: var(--accent-yellow); color: #000; }
.badge-approved { background: var(--accent-green); color: #000; }
.badge-denied { background: var(--bg); color: var(--text-muted); }
.badge-live { background: var(--accent-red); color: #fff; }

/* ---------- 配色菜单（同 1999 主题） ---------- */
.theme-menu {
  position: fixed; z-index: 300;
  width: min(380px, calc(100vw - 16px));
  max-height: calc(100vh - 96px); overflow-y: auto;
  padding: 0.75rem;
  background: var(--white); color: var(--black);
  border: 3px solid var(--black); box-shadow: 6px 6px 0 var(--shadow);
}
.theme-menu-head { font-family: 'Archivo Black', sans-serif; font-size: 0.85rem; padding-bottom: 0.5rem; margin-bottom: 0.5rem; border-bottom: 2px solid var(--line); }
.theme-menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.theme-menu-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.25rem; }
.theme-item {
  display: flex; align-items: center; gap: 0.5rem;
  width: 100%; padding: 0.3rem 0.4rem; margin-bottom: 2px;
  background: transparent; border: 2px solid transparent;
  font: 700 0.72rem 'Space Grotesk', sans-serif; letter-spacing: 0.04em; text-transform: uppercase;
  text-align: left; cursor: pointer;
}
.theme-item:hover, .theme-item:focus-visible { border-color: var(--black); background: var(--bg); outline: none; }
.theme-item[aria-checked="true"] { border-color: var(--black); background: var(--accent); color: var(--on-accent); }
.swatch { display: inline-grid; grid-template-columns: 1fr 1fr; width: 18px; height: 18px; border: 2px solid var(--black); flex-shrink: 0; }
.swatch i:first-child { background: var(--sw-paper); }
.swatch i:last-child { background: var(--sw-accent); }

/* ---------- 对话框 / 提示 ---------- */
.dialog {
  margin: auto;
  width: min(420px, calc(100vw - 32px));
  background: var(--card-bg); color: var(--text);
  border: var(--border-width) solid var(--black);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow);
}
.dialog::backdrop { background: color-mix(in srgb, var(--black) 45%, transparent); }
.dialog form { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.dialog h2 { font-size: 1.2rem; }
.dialog p { font-size: 0.85rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.form-error { color: var(--accent-red); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  z-index: 400;
  max-width: calc(100vw - 32px);
  padding: 0.7rem 1rem;
  background: var(--black); color: var(--white);
  border: 3px solid var(--black); box-shadow: 4px 4px 0 var(--accent);
  font-weight: 700; font-size: 0.85rem;
}
.toast.error { box-shadow: 4px 4px 0 var(--accent-red); }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--black); color: var(--white);
  border-top: var(--border-width) solid var(--black);
  padding: 1rem 1.5rem;
  margin-top: 2rem;
}
.footer-content {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
}
.footer a { color: var(--accent); text-decoration: none; }

/* ---------- 吸顶导航 ---------- */
.jumpbar {
  position: sticky; top: 0; z-index: 90;
  background: var(--bg);
  border-bottom: 3px solid var(--black);
}
.jumpbar-inner {
  max-width: 1480px; margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex; gap: 0.5rem;
  overflow-x: auto; scrollbar-width: none;
}
.jumpbar-inner::-webkit-scrollbar { display: none; }
.jump {
  flex-shrink: 0;
  height: 38px; padding: 0 0.9rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--card-bg); color: var(--black);
  border: 3px solid var(--black); box-shadow: 3px 3px 0 var(--shadow);
  font-weight: 700; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.jump:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--shadow); }
.jump:active { transform: translate(3px, 3px); box-shadow: none; }
.jump[aria-current="true"] { background: var(--black); color: var(--white); box-shadow: 3px 3px 0 var(--accent); }
.jump-count, .sec-count {
  min-width: 1.5em; padding: 0 0.3em;
  font-family: 'Archivo Black', sans-serif; font-size: 0.75rem; line-height: 1.35;
  background: var(--accent); color: var(--on-accent);
  border: 2px solid currentColor; text-align: center;
}
.jump-count:empty, .sec-count:empty { display: none; }
.jump-count.hot { background: var(--accent-red); color: #fff; }

/* ---------- 分栏 ---------- */
.section { margin-bottom: 2.25rem; scroll-margin-top: 76px; outline: none; }
.section.flash > .sec-head { animation: flash 0.9s steps(2) 2; }
@keyframes flash { 50% { background: var(--accent); color: var(--on-accent); } }
.sec-head {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1rem; padding: 0.35rem 0;
  border-bottom: var(--border-width) solid var(--black);
}
.sec-head h2 { font-size: 1.35rem; }

.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 2rem;
  align-items: start;
}
.col-side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; padding: 0 10px 10px 0; scrollbar-width: thin; }
.col-main .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.col-main .day-head h2 { font-size: 1rem; }
.col-main .day-head { border-bottom-width: 3px; }

/* 进行中为空时的一条提示 */
.idle {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  padding: 0.8rem 1rem;
  background: var(--card-bg);
  border: 3px dashed var(--black);
  font-size: 0.88rem; font-weight: 700;
}
.idle .muted { font-weight: 500; }
.idle a { text-decoration: none; }
.idle a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- 侧栏紧凑列表 ---------- */
.mini {
  background: var(--card-bg);
  border: var(--border-width) solid var(--black);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--shadow);
  --line: color-mix(in srgb, var(--black) var(--line-mix), var(--white));
}
.mini-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 2px solid var(--line);
  text-decoration: none; color: inherit;
}
.mini-row:last-child { border-bottom: none; }
a.mini-row:hover { background: var(--row-hover); }
.mini-main { min-width: 0; }
.mini-title { display: block; font-weight: 700; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { display: block; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-arrow { font-size: 0.8rem; color: var(--text-muted); }
.mini-empty { padding: 1rem; font-size: 0.82rem; color: var(--text-muted); text-align: center; }

.room-avatar {
  position: relative;
  width: 40px; height: 40px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--black); background: var(--white);
  font-family: 'Archivo Black', sans-serif; font-size: 0.7rem;
}
.room-avatar img { width: 100%; height: 100%; object-fit: cover; }
.room-row:not(.live) .room-avatar img { filter: grayscale(1); opacity: 0.6; }
.room-dot {
  position: absolute; right: -5px; bottom: -5px;
  width: 12px; height: 12px;
  border: 2px solid var(--black); background: var(--text-muted);
}
.mini-row.live .room-dot { animation: blink 1s step-end infinite; }
.room-row .room-sub { color: var(--text); font-size: 0.78rem; }

.res-score {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.5rem;
  font-family: 'Twemoji Country Flags', 'Archivo Black', sans-serif; font-size: 0.85rem; text-transform: uppercase;
}
.res-score .t1 { text-align: right; }
.res-score span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-score .lose { color: var(--text-muted); }
.res-score b { font-weight: 400; padding: 0.05rem 0.4rem; border: 2px solid var(--black); background: var(--accent); color: var(--on-accent); }
.res-date { font: 700 0.65rem 'Space Grotesk', sans-serif; letter-spacing: 0.06em; color: var(--text-muted); writing-mode: horizontal-tb; width: 2.6rem; }

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed; z-index: 150;
  right: max(1.25rem, env(safe-area-inset-right)); bottom: max(1.25rem, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 54px; height: 54px;
  background: var(--accent); color: var(--on-accent);
  border: 3px solid var(--black); box-shadow: 4px 4px 0 var(--shadow);
  font: 700 0.6rem 'Archivo Black', sans-serif; letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0; transform: translateY(16px) rotate(-6deg); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.1s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top.show:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--shadow); }
.to-top.show:active { transform: translate(3px, 3px); box-shadow: none; }
.to-top svg { color: var(--on-accent); }
@media (prefers-reduced-motion: reduce) {
  .to-top { transition: opacity 0.2s ease; transform: none; }
  .section.flash > .sec-head { animation: none; }
}

@media (max-width: 1100px) {
  .columns { grid-template-columns: 1fr; gap: 0; }
  .col-side { position: static; max-height: none; overflow: visible; padding: 0; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 640px) {
  .header-content { padding: 0.6rem 1rem; }
  .logo h1 { font-size: 1.15rem; }
  .btn-admin span { display: none; }
  .btn-admin { padding: 0 0.75rem; }
  .stat-item { padding: 0.5rem 0.4rem; min-width: 0; }
  .stat-value { font-size: 1.15rem; }
  .stat-label { font-size: 0.6rem; letter-spacing: 0.04em; }
  .main { padding: 1rem; }
  .grid, .admin { grid-template-columns: 1fr; gap: 1.1rem; }
  .jumpbar-inner { padding: 0.5rem 1rem; }
  .jump { height: 34px; padding: 0 0.65rem; font-size: 0.76rem; }
  .section { scroll-margin-top: 64px; }
  .sec-head h2 { font-size: 1.15rem; }
  .to-top { width: 48px; height: 48px; }
  .theme-menu-cols { grid-template-columns: 1fr; }
}
