/* ==========================================================================
   在线图片名册 — 全站样式
   原生 CSS，无外部字体或 CDN。
   ========================================================================== */

:root {
  color-scheme: light;
  --paper: #f4f0e7;
  --paper-deep: #ebe5d8;
  --cream: #fbf8f1;
  --surface: #fffdf8;
  --ink: #17241f;
  --ink-soft: #394840;
  --muted: #69766f;
  --muted-light: #8c978f;
  --line: #dfd8ca;
  --line-strong: #cfc7b7;
  --forest: #0d5f4b;
  --forest-deep: #094637;
  --forest-soft: #e7f2ed;
  --forest-faint: #f1f8f5;
  --amber: #e0a52e;
  --amber-deep: #b78016;
  --amber-soft: #fcf3dc;
  --coral: #b64a38;
  --coral-soft: #fceeea;
  --danger: #a33a2c;
  --danger-soft: #fbece9;
  --shadow-sm: 0 2px 7px rgba(30, 44, 35, 0.05);
  --shadow-md: 0 14px 38px rgba(29, 42, 33, 0.09);
  --shadow-lg: 0 28px 80px rgba(20, 32, 26, 0.2);
  --radius-sm: 9px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html {
  min-width: 300px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 100% -5%, rgba(224, 165, 46, 0.11), transparent 60%),
    radial-gradient(900px 600px at -5% 20%, rgba(13, 95, 75, 0.07), transparent 60%),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
}

body.modal-open,
body.busy-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(13, 95, 75, 0.28);
  outline-offset: 2px;
}

::selection {
  background: rgba(224, 165, 46, 0.3);
}

/* --------------------------------------------------------------------------
   基础元素
   -------------------------------------------------------------------------- */

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
}

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

.file-input-hidden {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: none;
  border: 2.5px solid rgba(13, 95, 75, 0.18);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-dark {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: var(--amber);
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--forest);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover:not(:disabled) {
  background: #fff;
  border-color: #bdb5a6;
  box-shadow: var(--shadow-sm);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  border-color: var(--amber);
  color: #2e240d;
  background: linear-gradient(180deg, #f1bd4c, var(--amber));
  box-shadow: 0 8px 20px rgba(224, 165, 46, 0.25);
}

.btn-primary:hover:not(:disabled) {
  border-color: var(--amber-deep);
  background: linear-gradient(180deg, #f4c45e, #e4ab35);
}

.btn-forest {
  border-color: var(--forest);
  color: #fff;
  background: linear-gradient(180deg, #116e58, var(--forest));
  box-shadow: 0 8px 20px rgba(13, 95, 75, 0.18);
}

.btn-forest:hover:not(:disabled) {
  border-color: var(--forest-deep);
  background: linear-gradient(180deg, #127660, var(--forest-deep));
}

.btn-quiet {
  border-color: var(--line);
  color: var(--ink-soft);
  background: transparent;
  box-shadow: none;
}

.btn-quiet:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper);
}

.btn-hero-quiet {
  border-color: rgba(255, 255, 255, 0.3);
  color: #f7f3e8;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.btn-hero-quiet:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.14);
}

.btn-danger {
  color: var(--danger);
  border-color: #e7c5bf;
  background: var(--danger-soft);
  box-shadow: none;
}

.btn-danger:hover:not(:disabled) {
  border-color: #dda9a0;
  background: #fae5e1;
  color: #8d2d21;
}

.btn-danger-solid {
  border-color: #97362a;
  color: #fff;
  background: linear-gradient(180deg, #bd4f3e, #97362a);
  box-shadow: 0 8px 20px rgba(151, 54, 42, 0.18);
}

.btn-tiny {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  gap: 5px;
}

.btn-tiny .icon {
  width: 14px;
  height: 14px;
}

.btn-light {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.btn-light:hover:not(:disabled) {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.16);
}

.round-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition: color 0.16s ease, background-color 0.16s ease,
    border-color 0.16s ease;
}

.round-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fff;
}

.round-btn .icon {
  width: 17px;
  height: 17px;
}

/* --------------------------------------------------------------------------
   顶部栏
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(220, 212, 198, 0.8);
  background: rgba(250, 247, 240, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(100% - 32px, 1240px);
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--forest);
  background: linear-gradient(145deg, #fffdf6, #eee6d4);
  box-shadow: inset 0 0 0 1px rgba(212, 202, 185, 0.9);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sync-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.sync-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #a0a89f;
  box-shadow: 0 0 0 3px rgba(160, 168, 159, 0.13);
}

.sync-pill[data-state="live"] {
  color: var(--forest);
  border-color: #c8dfd6;
  background: var(--forest-faint);
}

.sync-pill[data-state="live"] .sync-dot {
  background: #14805f;
  box-shadow: 0 0 0 3px rgba(20, 128, 95, 0.13);
}

.sync-pill[data-state="polling"] {
  color: var(--amber-deep);
  border-color: #eadbb7;
  background: #fffbf0;
}

.sync-pill[data-state="polling"] .sync-dot {
  background: var(--amber);
}

.sync-pill[data-state="error"] {
  color: var(--danger);
  border-color: #edccc5;
  background: var(--danger-soft);
}

.sync-pill[data-state="error"] .sync-dot {
  background: var(--danger);
}

.sync-pill[data-state="loading"] .sync-dot {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(105, 118, 111, 0.2);
  border-top-color: var(--forest);
  background: transparent;
  box-shadow: none;
  animation: spin 0.8s linear infinite;
}

.admin-entry {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease,
    background-color 0.16s ease;
}

.admin-entry:hover {
  color: var(--forest);
  border-color: #b9d2c7;
  background: var(--forest-faint);
}

.admin-entry .icon {
  width: 14px;
  height: 14px;
}

.admin-entry.is-admin {
  color: var(--forest);
  border-color: #b9d2c7;
  background: var(--forest-faint);
}

.admin-bar {
  position: relative;
  z-index: 35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: #f8f2e6;
  background:
    linear-gradient(90deg, rgba(224, 165, 46, 0.09), transparent 40%),
    #17241f;
}

.admin-bar-inner {
  width: min(100% - 32px, 1240px);
  min-height: 54px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 11px;
}

.admin-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(224, 165, 46, 0.4);
  border-radius: 6px;
  color: #f0c572;
  background: rgba(224, 165, 46, 0.1);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-flag .icon {
  width: 13px;
  height: 13px;
}

.admin-who {
  min-width: 0;
  flex: 1;
  color: #bac7bf;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-bar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* --------------------------------------------------------------------------
   主区域与 Hero
   -------------------------------------------------------------------------- */

.page-shell {
  width: min(100% - 32px, 1240px);
  margin: 25px auto 0;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 42px;
  border-radius: var(--radius-xl);
  color: #f8f3e8;
  background:
    radial-gradient(700px 380px at 90% 10%, rgba(224, 165, 46, 0.2), transparent 60%),
    radial-gradient(600px 300px at 2% 100%, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(135deg, #0f5a49, #0a4034 68%, #09372d);
  box-shadow: 0 22px 55px rgba(13, 61, 48, 0.17);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.33;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 0.65px, transparent 0.7px);
  background-size: 13px 13px;
  mask-image: linear-gradient(110deg, transparent 20%, #000 90%);
  -webkit-mask-image: linear-gradient(110deg, transparent 20%, #000 90%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 670px;
}

.hero .eyebrow {
  color: rgba(247, 239, 219, 0.65);
  margin-bottom: 11px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(29px, 3.9vw, 46px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.17;
}

.hero-lead {
  max-width: 610px;
  margin: 14px 0 0;
  color: rgba(248, 243, 232, 0.75);
  font-size: 13.5px;
  line-height: 1.75;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: rgba(248, 243, 232, 0.72);
  background: rgba(255, 255, 255, 0.06);
  font-size: 10.5px;
  font-weight: 600;
}

.hero-tags .icon {
  width: 12px;
  height: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
}

.hero-actions .btn {
  min-height: 43px;
}

.hero-stamp {
  position: relative;
  z-index: 1;
  width: 176px;
  min-width: 176px;
  align-self: center;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.19);
  border-radius: 50%;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #f4e3bc;
  background: rgba(9, 49, 39, 0.28);
  box-shadow: inset 0 0 0 7px rgba(255, 255, 255, 0.06);
  text-align: center;
  transform: rotate(4deg);
}

.stamp-number {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.9;
  color: var(--amber);
}

.stamp-text {
  margin-top: 5px;
  color: rgba(248, 243, 232, 0.78);
  font-size: 9.5px;
  line-height: 1.45;
}

.stamp-line {
  width: 34px;
  height: 1px;
  margin: 7px 0 5px;
  background: rgba(224, 165, 46, 0.48);
}

.stamp-note {
  color: rgba(224, 165, 46, 0.8);
  font-size: 8.5px;
  letter-spacing: 0.12em;
}

.hero-line {
  display: block;
}

/* --------------------------------------------------------------------------
   横幅与我的状态
   -------------------------------------------------------------------------- */

.system-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #e9d5a7;
  border-radius: 12px;
  color: #644a18;
  background: #fffaf0;
  box-shadow: var(--shadow-sm);
}

.system-banner.is-error {
  border-color: #ebc8c1;
  color: #74291f;
  background: var(--danger-soft);
}

.system-banner.is-success {
  border-color: #c7e2d6;
  color: #185e49;
  background: var(--forest-faint);
}

.banner-icon {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(224, 165, 46, 0.15);
}

.system-banner.is-error .banner-icon {
  background: rgba(163, 58, 44, 0.1);
}

.system-banner.is-success .banner-icon {
  background: rgba(13, 95, 75, 0.1);
}

.banner-icon .icon {
  width: 16px;
  height: 16px;
}

.banner-copy {
  min-width: 0;
  flex: 1;
}

.banner-copy strong {
  display: block;
  font-size: 12.5px;
  font-weight: 750;
}

.banner-copy p {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.banner-close {
  width: 30px;
  height: 30px;
}

.my-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 16px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 248, 0.8);
  box-shadow: var(--shadow-sm);
}

.my-panel::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -38px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(13, 95, 75, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.my-panel.is-mine {
  border-color: #bfd7cc;
  background: linear-gradient(105deg, #f8fcfa, #f4faf7);
}

.my-panel.is-error {
  border-color: #ebc8c1;
  background: var(--danger-soft);
}

.my-panel-icon {
  width: 35px;
  height: 35px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--forest);
  background: var(--forest-soft);
}

.my-panel-icon .icon {
  width: 18px;
  height: 18px;
}

.my-panel-copy {
  min-width: 0;
  flex: 1;
}

.my-panel-copy strong {
  display: block;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 750;
}

.my-panel-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.my-panel-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.claim-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--forest);
  background: var(--forest-soft);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.claim-chip .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   名册
   -------------------------------------------------------------------------- */

.roster-shell {
  margin-top: 19px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.86);
  box-shadow: var(--shadow-md);
}

.roster-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 11px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ebe5da;
}

.group-tabs {
  display: flex;
  align-items: stretch;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.group-tab {
  min-width: 125px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px 7px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.group-tab:hover:not(.is-active) {
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.52);
}

.group-tab.is-active {
  color: var(--forest);
  border-color: #e0d7c6;
  background: #fffdf8;
  box-shadow: 0 3px 10px rgba(50, 46, 34, 0.06);
}

.group-tab-index {
  width: 27px;
  height: 27px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  background: #f1ece1;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.group-tab.is-active .group-tab-index {
  color: var(--forest);
  background: var(--forest-soft);
}

.group-tab-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.group-tab-main strong {
  font-size: 12.5px;
  font-weight: 750;
}

.group-tab-main small {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 9.5px;
  white-space: nowrap;
}

.roster-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.summary-loading {
  color: var(--muted-light);
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffdf8;
  white-space: nowrap;
}

.summary-chip strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
}

.summary-chip .icon {
  width: 12px;
  height: 12px;
  color: var(--muted-light);
}

.roster-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 1px 11px;
}

.roster-heading h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.roster-hint {
  max-width: 340px;
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: right;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 12px;
}

.loading-panel {
  grid-column: 1 / -1;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: #faf7f0;
  text-align: center;
}

.loading-panel strong {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 13px;
}

.loading-panel small {
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   位置卡片
   -------------------------------------------------------------------------- */

.slot-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(35, 47, 39, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

.slot-card:hover {
  border-color: #d2caba;
  box-shadow: 0 8px 20px rgba(35, 47, 39, 0.075);
}

.slot-card.is-mine {
  border-color: #a9cdbd;
  box-shadow: 0 0 0 2px rgba(13, 95, 75, 0.08), 0 8px 20px rgba(35, 47, 39, 0.07);
}

.slot-card.is-mine:hover {
  border-color: #83b6a0;
}

.slot-card.is-locked {
  background: #fbf8f1;
}

.slot-card.is-busy {
  pointer-events: none;
}

.slot-card.is-busy::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  background: rgba(255, 253, 248, 0.72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.card-busy-label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow-md);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.card-busy-label .spinner {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

.slot-head {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.slot-number {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.slot-number::before {
  content: "NO.";
  margin-right: 2px;
  color: var(--muted-light);
  font-family: var(--font-sans);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.slot-badges {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 3px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

.badge .icon {
  width: 9px;
  height: 9px;
}

.badge-mine {
  color: var(--forest);
  background: var(--forest-soft);
}

.badge-locked {
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.badge-claimed {
  color: #7c6f5a;
  background: #f3eee4;
}

.badge-empty {
  color: var(--forest);
  background: #f0f7f3;
}

.photo-button {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e8e0d2;
  border-radius: 9px;
  color: var(--muted);
  background:
    linear-gradient(45deg, rgba(239, 234, 222, 0.48) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(239, 234, 222, 0.48) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(239, 234, 222, 0.48) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(239, 234, 222, 0.48) 75%),
    #fbf9f3;
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  cursor: pointer;
}

.photo-button.is-empty {
  border-style: dashed;
  border-color: #cfc5b3;
  background: #faf7f0;
}

.photo-button.is-placeholder {
  cursor: default;
}

.photo-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 253, 248, 0.65);
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #8b928a;
  text-align: center;
}

.photo-placeholder .icon {
  width: 22px;
  height: 22px;
  color: #95a59a;
}

.photo-placeholder strong {
  color: #68766d;
  font-size: 10.5px;
  font-weight: 650;
}

.photo-placeholder small {
  color: var(--muted-light);
  font-size: 8px;
}

.photo-view-hint {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border-radius: 4px;
  color: #fff;
  background: rgba(17, 31, 25, 0.64);
  font-size: 8px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.photo-button:hover .photo-view-hint {
  opacity: 1;
}

.photo-view-hint .icon {
  width: 10px;
  height: 10px;
}

.photo-broken {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.photo-broken .icon {
  width: 20px;
  height: 20px;
  color: var(--muted-light);
}

.slot-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.slot-name {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slot-name.is-empty {
  color: var(--muted-light);
  font-size: 11.5px;
  font-weight: 500;
}

.slot-name.is-mine {
  color: var(--forest-deep);
}

.slot-mini-state {
  flex: none;
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.slot-actions {
  display: flex;
  align-items: stretch;
  gap: 4px;
  min-height: 0;
}

.slot-actions:empty {
  display: none;
}

.mini-btn {
  min-width: 0;
  min-height: 30px;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: #fffdf8;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease,
    border-color 0.16s ease;
}

.mini-btn:hover:not(:disabled) {
  border-color: #c9bfaf;
  background: #fff;
}

.mini-btn .icon {
  width: 12px;
  height: 12px;
}

.mini-btn-claim {
  flex-basis: auto;
  width: 100%;
  min-height: 32px;
  color: var(--forest);
  border-color: #c2dbd1;
  background: var(--forest-faint);
  font-size: 10px;
}

.mini-btn-claim:hover:not(:disabled) {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.mini-btn-upload {
  color: var(--forest);
  border-color: #c2dbd1;
  background: var(--forest-faint);
}

.mini-btn-upload:hover:not(:disabled) {
  color: #fff;
  border-color: var(--forest);
  background: var(--forest);
}

.mini-btn-delete {
  color: var(--coral);
  border-color: #e8cfc8;
  background: #fff9f6;
}

.mini-btn-delete:hover:not(:disabled) {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #d8b2a9;
}

.mini-btn-admin {
  flex: none;
  width: 100%;
  color: #77571e;
  border-color: #e7d7b2;
  background: #fffbf1;
  font-size: 9px;
}

.mini-btn-admin:hover:not(:disabled) {
  color: #4f3b14;
  background: var(--amber-soft);
  border-color: #d9c28e;
}

.slot-lock-note {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--amber-deep);
  font-size: 8.5px;
  line-height: 1.35;
}

.slot-lock-note .icon {
  width: 11px;
  height: 11px;
}

.admin-manage-wrap {
  padding-top: 1px;
}

/* --------------------------------------------------------------------------
   提示 / 步骤 / 页脚
   -------------------------------------------------------------------------- */

.roster-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid #ebe5da;
  color: var(--muted-light);
  font-size: 9.5px;
}

.roster-footnote span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.roster-footnote .icon {
  width: 12px;
  height: 12px;
}

.tips-panel {
  margin-top: 17px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(110deg, rgba(255, 253, 248, 0.95), rgba(247, 243, 234, 0.9));
  box-shadow: var(--shadow-sm);
}

.tips-panel-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e8e0d2;
  border-radius: var(--radius-sm);
  background: rgba(255, 253, 248, 0.8);
}

.step-num {
  color: var(--amber-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.steps strong {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 750;
}

.steps p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.site-footer {
  margin-top: 27px;
  border-top: 1px solid rgba(206, 198, 183, 0.7);
}

.footer-inner {
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
  padding: 19px 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-light);
  font-size: 10px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(105, 118, 111, 0.35);
  text-underline-offset: 2px;
}

.footer-links button:hover {
  color: var(--forest);
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast-region {
  position: fixed;
  z-index: 1300;
  right: 17px;
  bottom: max(17px, env(safe-area-inset-bottom));
  width: min(360px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 10px 11px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--forest);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: 0 12px 35px rgba(25, 37, 29, 0.16);
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: auto;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(5px);
}

.toast--error {
  border-left-color: var(--danger);
}

.toast--warning {
  border-left-color: var(--amber);
}

.toast--success {
  border-left-color: #19805f;
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--forest);
  margin-top: 1px;
}

.toast--error .toast-icon {
  color: var(--danger);
}

.toast--warning .toast-icon {
  color: var(--amber-deep);
}

.toast--success .toast-icon {
  color: #19805f;
}

.toast-icon .icon {
  width: 16px;
  height: 16px;
}

.toast-copy {
  min-width: 0;
  flex: 1;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.toast-copy strong {
  display: block;
  margin-bottom: 1px;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 750;
}

.toast-copy p {
  margin: 0;
}

.toast-close {
  width: 23px;
  height: 23px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--muted-light);
  background: transparent;
  cursor: pointer;
}

.toast-close:hover {
  color: var(--ink);
  background: var(--paper);
}

.toast-close .icon {
  width: 12px;
  height: 12px;
}

/* --------------------------------------------------------------------------
   模态框
   -------------------------------------------------------------------------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 19px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 30, 24, 0.58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fade-in 0.16s ease-out;
}

.modal-positioner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}

.modal-card {
  width: min(530px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-card.is-wide {
  width: min(760px, 100%);
}

.modal-head {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  padding: 18px 18px 0;
}

.modal-heading {
  min-width: 0;
}

.modal-kicker {
  margin: 0 0 3px;
  color: var(--forest);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.35;
}

.modal-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.modal-head .round-btn {
  width: 33px;
  height: 33px;
  margin-top: -2px;
  border-color: transparent;
  background: transparent;
}

.modal-head .round-btn:hover {
  background: var(--paper);
}

.modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 18px 17px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.modal-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 18px 18px;
}

.modal-footer:empty {
  display: none;
}

.modal-footer .btn {
  min-width: 82px;
  min-height: 39px;
}

.modal-footer .footer-note {
  flex: 1;
  min-width: 140px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.modal-lead {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

.modal-lead + .modal-lead {
  margin-top: 7px;
}

.modal-callout {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #e8dfcf;
  border-radius: 9px;
  color: #725e36;
  background: #fffaf0;
  font-size: 10.5px;
  line-height: 1.6;
}

.modal-callout.is-danger {
  border-color: #ecc8c1;
  color: #792d23;
  background: var(--danger-soft);
}

.modal-callout.is-info {
  border-color: #cfe2d9;
  color: #315c4e;
  background: var(--forest-faint);
}

.modal-callout .icon {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
}

.modal-callout p {
  margin: 0;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 13px;
}

.form-field:first-child {
  margin-top: 0;
}

.field-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: #fffdf8;
  font-size: 14px;
  line-height: 1.45;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(13, 95, 75, 0.12);
}

.textarea {
  min-height: 92px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.form-error {
  margin: 11px 0 0;
  padding: 8px 10px;
  border: 1px solid #eac7c0;
  border-radius: 8px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 11px;
  line-height: 1.55;
}

.form-success {
  color: var(--forest);
  background: var(--forest-faint);
  border-color: #cbe1d7;
}

.modal-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.inline-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}

.inline-note .icon {
  width: 12px;
  height: 12px;
}

.token-box {
  width: 100%;
  min-height: 86px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  resize: none;
  color: var(--ink);
  background: #f9f6ee;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  word-break: break-all;
}

.token-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.token-copied {
  color: var(--forest);
  font-size: 10.5px;
  font-weight: 650;
}

.confirm-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.confirm-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--forest);
  background: var(--forest-soft);
}

.confirm-icon.is-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.confirm-icon.is-warning {
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.confirm-icon .icon {
  width: 18px;
  height: 18px;
}

.confirm-copy {
  min-width: 0;
  flex: 1;
}

.confirm-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.confirm-detail {
  margin-top: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #faf7f0;
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.preview-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  overflow: hidden;
  border-radius: 9px;
  background:
    radial-gradient(500px 280px at center, rgba(59, 78, 66, 0.28), transparent 75%),
    #19241f;
}

.preview-image-wrap img {
  display: block;
  max-width: 100%;
  max-height: min(60vh, 560px);
  object-fit: contain;
}

.modal-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.admin-slot-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf7f0;
}

.admin-slot-thumb {
  width: 48px;
  height: 48px;
  flex: none;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted-light);
  background: #fffdf8;
}

.admin-slot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-slot-thumb .icon {
  width: 20px;
  height: 20px;
}

.admin-slot-summary-copy {
  min-width: 0;
}

.admin-slot-summary-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.admin-slot-summary-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

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

.admin-action-btn {
  width: 100%;
  min-height: 41px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink-soft);
  background: #fffdf8;
  text-align: left;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.admin-action-btn:hover:not(:disabled) {
  background: #fff;
  border-color: #cfc5b4;
}

.admin-action-btn.is-danger {
  color: var(--danger);
  border-color: #eac9c2;
  background: #fff9f6;
}

.admin-action-btn.is-danger:hover {
  background: var(--danger-soft);
  border-color: #d9b1a8;
}

.admin-action-btn .icon {
  width: 15px;
  height: 15px;
  flex: none;
}

.admin-action-btn span {
  min-width: 0;
}

.admin-action-btn small {
  display: block;
  margin-top: 1px;
  color: var(--muted-light);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.4;
}

.admin-action-btn.is-danger small {
  color: #a9766d;
}

/* 使用说明 */
.help-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.help-list li {
  display: flex;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.65;
}

.help-list li::before {
  content: "•";
  flex: none;
  color: var(--amber-deep);
  font-weight: 800;
}

.help-list strong {
  font-weight: 750;
}

.help-section {
  margin-top: 15px;
}

.help-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 750;
}

/* 日志 */
.log-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: min(55vh, 500px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf7f0;
}

.log-item {
  display: flex;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #eee8dc;
  background: #fffdf8;
}

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

.log-index {
  flex: none;
  width: 22px;
  color: var(--muted-light);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.8;
}

.log-copy {
  min-width: 0;
  flex: 1;
}

.log-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.log-title-row strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.log-time {
  flex: none;
  color: var(--muted-light);
  font-size: 8.5px;
  white-space: nowrap;
}

.log-detail {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.log-empty {
  padding: 25px 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   全局忙碌层
   -------------------------------------------------------------------------- */

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 1550;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 29, 23, 0.48);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.busy-card {
  width: min(290px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  color: #f8f3e8;
  background: #17241f;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.busy-card .spinner {
  width: 27px;
  height: 27px;
  margin-bottom: 2px;
}

.busy-card strong {
  font-size: 13px;
  font-weight: 700;
}

.busy-card p {
  margin: 0;
  color: rgba(248, 243, 232, 0.62);
  font-size: 10.5px;
  line-height: 1.5;
}

.noscript {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2000;
  padding: 13px;
  border: 1px solid #ecc8c1;
  border-radius: 10px;
  color: var(--danger);
  background: #fff7f5;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.6;
}

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

@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.987); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 状态补充：加载失败、空位高亮、刷新中 */
.load-error-panel {
  grid-column: 1 / -1;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: #faf7f0;
  text-align: center;
}

.load-error-panel > .icon {
  width: 27px;
  height: 27px;
  margin-bottom: 3px;
  color: var(--amber-deep);
}

.load-error-panel strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
}

.load-error-panel p {
  max-width: 380px;
  margin: 0 0 7px;
  font-size: 10.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.slot-card.is-highlight {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(224, 165, 46, 0.18), 0 10px 24px rgba(43, 50, 39, 0.08);
}

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

.my-panel-side .btn {
  white-space: nowrap;
}

.photo-button {
  appearance: none;
  -webkit-appearance: none;
}

.photo-button.is-empty {
  min-height: 92px;
}

.photo-button.is-placeholder {
  cursor: default;
}

@media (max-width: 680px) {
  .load-error-panel {
    min-height: 205px;
    padding: 18px 12px;
  }

  .my-panel-side .btn {
    font-size: 9.5px;
    padding: 5px 7px;
  }
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1040px) {
  .hero {
    padding: 32px;
  }

  .hero-stamp {
    width: 150px;
    min-width: 150px;
  }

  .stamp-number {
    font-size: 42px;
  }

  .slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(174px, 1fr));
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 62px;
  }

  .hero {
    gap: 20px;
    padding: 27px;
    border-radius: 24px;
  }

  .hero-stamp {
    display: none;
  }

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

  .hero h1 {
    font-size: clamp(26px, 6vw, 37px);
  }

  .hero-lead {
    font-size: 12.5px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .tips-panel {
    padding: 20px;
  }

  .step {
    align-items: center;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .header-inner {
    width: calc(100% - 24px);
    min-height: 58px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
    border-radius: 10px;
  }

  .brand-mark svg {
    width: 25px;
    height: 25px;
  }

  .brand-copy strong {
    font-size: 14.5px;
  }

  .brand-copy small {
    font-size: 9px;
  }

  .header-tools {
    gap: 4px;
  }

  .sync-pill {
    padding: 5px 7px;
    font-size: 9.5px;
    gap: 5px;
  }

  .sync-dot {
    width: 6px;
    height: 6px;
  }

  .round-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .round-btn .icon {
    width: 16px;
    height: 16px;
  }

  .admin-entry {
    width: 34px;
    height: 34px;
    min-height: 34px;
    justify-content: center;
    padding: 0;
    border-radius: 9px;
  }

  .admin-entry span {
    display: none;
  }

  .admin-entry .icon {
    width: 16px;
    height: 16px;
  }

  .admin-bar-inner {
    width: calc(100% - 24px);
    min-height: 48px;
    gap: 7px;
  }

  .admin-flag {
    font-size: 9px;
    padding: 3px 6px;
  }

  .admin-who {
    font-size: 9.5px;
  }

  .btn-tiny {
    min-height: 29px;
    font-size: 10px;
    padding: 4px 8px;
  }

  .page-shell {
    width: calc(100% - 20px);
    margin-top: 12px;
  }

  .hero {
    padding: 22px 18px 20px;
    border-radius: 19px;
    gap: 0;
  }

  .hero .eyebrow {
    font-size: 8.5px;
    margin-bottom: 8px;
  }

  .hero h1 {
    font-size: 27px;
    letter-spacing: -0.04em;
    line-height: 1.2;
  }

  .mobile-break {
    display: block;
  }

  .hero-lead {
    margin-top: 9px;
    font-size: 11.5px;
    line-height: 1.65;
  }

  .hero-tags {
    margin-top: 11px;
    gap: 5px;
  }

  .hero-tags span {
    font-size: 9px;
    padding: 4px 6px;
  }

  .hero-actions {
    margin-top: 15px;
    gap: 7px;
  }

  .hero-actions .btn {
    min-height: 40px;
    font-size: 12px;
    padding: 8px 12px;
  }

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

  .hero-actions .btn-primary {
    flex: 1.2;
  }

  .system-banner {
    margin-top: 10px;
    padding: 10px;
    border-radius: 10px;
    gap: 7px;
  }

  .banner-icon {
    width: 25px;
    height: 25px;
  }

  .banner-copy strong {
    font-size: 11.5px;
  }

  .banner-copy p {
    font-size: 10px;
  }

  .my-panel {
    margin-top: 10px;
    padding: 11px;
    border-radius: 11px;
    gap: 9px;
    align-items: flex-start;
  }

  .my-panel-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .my-panel-icon .icon {
    width: 16px;
    height: 16px;
  }

  .my-panel-copy strong {
    font-size: 11.5px;
  }

  .my-panel-copy p {
    font-size: 10px;
    line-height: 1.5;
  }

  .my-panel-side {
    align-self: center;
  }

  .claim-chip {
    font-size: 8.5px;
    padding: 3px 5px;
  }

  .roster-shell {
    margin-top: 10px;
    padding: 10px;
    border-radius: 15px;
  }

  .roster-toolbar {
    padding-bottom: 10px;
    gap: 8px;
  }

  .group-tabs {
    width: 100%;
    padding: 3px;
    border-radius: 10px;
  }

  .group-tab {
    min-width: 0;
    flex: 1 1 0;
    padding: 6px;
    gap: 6px;
    border-radius: 7px;
  }

  .group-tab-index {
    width: 23px;
    height: 23px;
    font-size: 8.5px;
    border-radius: 5px;
  }

  .group-tab-main strong {
    font-size: 11.5px;
  }

  .group-tab-main small {
    font-size: 8.5px;
  }

  .roster-summary {
    width: 100%;
    justify-content: flex-start;
    gap: 5px;
    font-size: 9.5px;
  }

  .summary-chip {
    padding: 3px 6px;
  }

  .roster-heading {
    padding: 11px 1px 8px;
    gap: 8px;
  }

  .roster-heading h2 {
    font-size: 17px;
  }

  .roster-heading .eyebrow {
    font-size: 8px;
    margin-bottom: 2px;
  }

  .roster-hint {
    font-size: 8.5px;
    max-width: 180px;
  }

  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .slot-card {
    padding: 8px;
    gap: 6px;
    border-radius: 11px;
  }

  .slot-number {
    font-size: 16px;
  }

  .slot-number::before {
    font-size: 6.5px;
  }

  .badge {
    font-size: 7.5px;
    padding: 2px 4px;
    gap: 2px;
  }

  .badge .icon {
    width: 8px;
    height: 8px;
  }

  .photo-button {
    border-radius: 7px;
  }

  .photo-placeholder {
    gap: 3px;
  }

  .photo-placeholder .icon {
    width: 18px;
    height: 18px;
  }

  .photo-placeholder strong {
    font-size: 9px;
  }

  .photo-placeholder small {
    font-size: 7px;
  }

  .photo-view-hint {
    font-size: 7px;
    right: 4px;
    bottom: 4px;
    padding: 2px 4px;
  }

  .slot-name {
    font-size: 11.5px;
  }

  .slot-name.is-empty {
    font-size: 10px;
  }

  .slot-mini-state {
    font-size: 7px;
  }

  .mini-btn {
    min-height: 29px;
    font-size: 8.5px;
    padding: 4px 3px;
    gap: 2px;
  }

  .mini-btn .icon {
    width: 10px;
    height: 10px;
  }

  .mini-btn-claim {
    font-size: 9px;
    min-height: 30px;
  }

  .slot-lock-note {
    font-size: 7.5px;
  }

  .slot-lock-note .icon {
    width: 9px;
    height: 9px;
  }

  .roster-footnote {
    margin-top: 10px;
    padding-top: 9px;
    gap: 5px 10px;
    font-size: 8px;
  }

  .roster-footnote .icon {
    width: 10px;
    height: 10px;
  }

  .tips-panel {
    margin-top: 10px;
    padding: 16px 14px;
    border-radius: 15px;
  }

  .tips-panel-head h2 {
    font-size: 16px;
  }

  .steps {
    margin-top: 11px;
    gap: 6px;
  }

  .steps li {
    padding: 9px;
    gap: 7px;
  }

  .step-num {
    font-size: 8.5px;
  }

  .steps strong {
    font-size: 10.5px;
  }

  .steps p {
    font-size: 9.5px;
    line-height: 1.55;
    margin-top: 2px;
  }

  .site-footer {
    margin-top: 14px;
  }

  .footer-inner {
    width: calc(100% - 24px);
    padding: 14px 0 calc(19px + env(safe-area-inset-bottom));
    display: block;
    font-size: 8.5px;
    line-height: 1.6;
  }

  .footer-links {
    margin-top: 7px;
    gap: 8px;
  }

  .footer-links button {
    font-size: 9px;
  }

  .toast-region {
    right: 10px;
    left: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: auto;
  }

  .toast {
    padding: 9px;
  }

  .toast-copy {
    font-size: 10.5px;
  }

  .modal-root {
    align-items: flex-end;
    padding: 7px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 14px);
    max-height: calc(100dvh - 14px);
    border-radius: 16px;
  }

  .modal-head {
    padding: 14px 14px 0;
  }

  .modal-head h2 {
    font-size: 16px;
  }

  .modal-body {
    padding: 11px 14px 14px;
    font-size: 12px;
  }

  .modal-footer {
    padding: 0 14px 14px;
    gap: 6px;
  }

  .modal-footer .btn {
    min-height: 38px;
    font-size: 12px;
  }

  .modal-footer .footer-note {
    min-width: 100%;
    flex-basis: 100%;
    font-size: 9px;
  }

  .log-list {
    max-height: 52vh;
  }

  .admin-action-btn {
    min-height: 39px;
    font-size: 11px;
  }

  .admin-action-btn small {
    font-size: 8.5px;
  }

  .busy-card {
    width: min(265px, 100%);
    padding: 18px 14px;
  }
}

@media (max-width: 370px) {
  .sync-pill span:last-child {
    display: none;
  }

  .sync-pill {
    width: 30px;
    height: 30px;
    min-height: 30px;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .header-inner {
    gap: 5px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy small {
    font-size: 8px;
  }

  .header-tools {
    gap: 2px;
  }

  .round-btn,
  .admin-entry {
    width: 31px;
    height: 31px;
    min-height: 31px;
  }

  .hero {
    padding: 18px 14px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .slot-grid {
    gap: 6px;
  }

  .slot-card {
    padding: 6px;
  }

  .group-tab {
    padding: 5px;
    gap: 4px;
  }

  .group-tab-index {
    width: 20px;
    height: 20px;
    font-size: 8px;
  }

  .group-tab-main strong {
    font-size: 10.5px;
  }

  .group-tab-main small {
    font-size: 8px;
  }

  .roster-heading h2 {
    font-size: 16px;
  }

  .mini-btn {
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
