:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page-bg {
  position: fixed;
  inset: 0 0 auto 0;
  height: 260px;
  background: linear-gradient(135deg, #2563eb, #60a5fa 55%, #dbeafe);
  z-index: -1;
}

.container {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hidden { display: none !important; }

.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(470px, 100%);
  margin: 90px auto;
  padding: 34px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  border-radius: 16px;
  background: var(--primary);
  font-size: 26px;
  font-weight: 800;
}

h1, h2, p { margin: 0; }
.brand h1,
.topbar h1 { font-size: 28px; letter-spacing: -0.02em; }
.brand p,
.topbar p,
.tip { color: var(--muted); margin-top: 7px; line-height: 1.6; }

.login-form { display: grid; gap: 18px; }

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 650;
}

input, textarea, button, a.ghost {
  font: inherit;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button, a.ghost {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 15px;
  font-weight: 700;
  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .1s ease, transform .06s ease, box-shadow .1s ease, opacity .1s ease;
}
button:not(:disabled):active,
a.ghost:active,
button.instant-tap,
a.ghost.instant-tap {
  transform: translateY(1px) scale(.99);
}
button:disabled,
button.is-busy {
  cursor: not-allowed;
  opacity: .58;
}

.primary {
  background: var(--primary);
  color: white;
}
.primary:hover { background: var(--primary-dark); }

.primary-light {
  background: #e0f2fe;
  color: #075985;
}
.primary-light:hover { background: #bae6fd; }

.ghost, a.ghost {
  background: #eef2ff;
  color: #1e40af;
}
.ghost:hover, a.ghost:hover { background: #dbeafe; }

.danger-light {
  background: #fee2e2;
  color: #b91c1c;
}
.danger-light:hover { background: #fecaca; }

.full { width: 100%; }

.tip code {
  background: #eef2ff;
  color: #1d4ed8;
  padding: 2px 6px;
  border-radius: 6px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  color: white;
  margin-bottom: 22px;
}
.topbar p { color: rgba(255, 255, 255, 0.86); }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.message.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 8px; font-size: 28px; }

.view-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.tab {
  background: rgba(255, 255, 255, 0.92);
  color: #1e40af;
  border: 1px solid rgba(226, 232, 240, 0.95);
}
.tab.active {
  background: var(--primary);
  color: white;
}

.score-card, .list-card, .history-card {
  padding: 22px;
  margin-bottom: 16px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.section-title h2 { font-size: 20px; }
.score-title { align-items: flex-start; }

.admin-count {
  display: grid;
  grid-template-columns: 140px auto;
  gap: 10px;
  align-items: end;
  min-width: 280px;
}
.admin-count input { text-align: center; font-size: 18px; font-weight: 800; }

.score-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.slide-status {
  text-align: center;
  display: grid;
  gap: 4px;
}
.slide-status strong { font-size: 18px; }
.slide-status span { color: var(--muted); font-size: 13px; }

.score-carousel {
  display: flex;
  overflow-x: hidden;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8fafc;
  -webkit-overflow-scrolling: touch;
}
.score-carousel::-webkit-scrollbar { display: none; }
.score-carousel { scrollbar-width: none; overscroll-behavior-x: contain; }

.score-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 18px;
}
.slide-inner {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.slide-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.slide-header h3 { margin: 0; font-size: 20px; }
.slide-header p { color: var(--muted); margin-top: 4px; }
.edit-badge {
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.slide-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.slide-form label:nth-child(1),
.slide-form label:nth-child(2) { grid-column: span 2; }
.slide-form label:nth-child(3),
.slide-form label:nth-child(4),
.slide-form label:nth-child(5),
.slide-form label:nth-child(6) { grid-column: span 1; }
.wide { grid-column: 1 / -1; }
.required { color: var(--danger); }

.mobile-score-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 16px;
  margin: 0;
}
.mobile-score-panel legend {
  color: var(--muted);
  font-weight: 700;
  padding: 0 8px;
}
.score-row {
  display: grid;
  grid-template-columns: 110px 1fr 48px;
  gap: 12px;
  align-items: center;
  min-height: 46px;
}
.score-row span:first-child { color: #334155; font-weight: 750; }
.score-row output {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 12px;
  background: #eef2ff;
  color: #1e40af;
  font-weight: 900;
  font-size: 18px;
}
.score-row input[type="range"] {
  padding: 0;
  height: 34px;
  accent-color: var(--primary);
}
.total-box {
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 13px 14px;
  display: grid;
  gap: 4px;
}
.total-box span { color: var(--muted); font-size: 13px; font-weight: 700; }
.total-box strong { font-size: 30px; line-height: 1; }
.total-box em { color: var(--primary); font-style: normal; font-weight: 800; }

.slide-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 14px 0 0;
}
.slide-dot {
  width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #cbd5e1;
}
.slide-dot.active { background: var(--primary); width: 24px; }
.slide-dot.saved { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18); }
.slide-dot:disabled { opacity: 0.35; cursor: not-allowed; }

.score-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.search-title { align-items: flex-start; }
.search-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.search-form input { width: 210px; }
.search-form input[type="date"] { width: 155px; }
.mobile-help {
  display: none;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
.review-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  background: white;
}
.review-table th,
.review-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px 9px;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
}
.review-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}
.review-table tr:hover td { background: #f8fbff; }
.review-table td:last-child,
.review-table th:last-child { border-right: 0; }
.review-table tr:last-child td { border-bottom: 0; }

.photo {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: #f1f5f9;
}
.photo-placeholder {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
  font-size: 12px;
}

.score-cell { font-weight: 750; }
.total-cell { font-size: 18px !important; font-weight: 900; color: #1d4ed8; }
.remark-cell { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left !important; }
.actions { display: flex; gap: 8px; justify-content: center; }
.actions button { min-height: 34px; padding: 7px 10px; border-radius: 10px; }

.empty {
  padding: 34px !important;
  color: var(--muted);
}

.history-list { display: grid; gap: 12px; }
.history-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}
.history-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 10px;
}
.history-item pre {
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  font-size: 12px;
  color: #334155;
}

@media (max-width: 1060px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-form label:nth-child(n) { grid-column: span 1; }
  .wide { grid-column: 1 / -1 !important; }
}

@media (max-width: 680px) {
  .container { width: min(100% - 20px, 1480px); padding-top: 18px; padding-bottom: 88px; }
  .login-card { margin: 36px auto; padding: 24px; }
  .brand h1, .topbar h1 { font-size: 23px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 24px; }
  .view-tabs { position: sticky; top: 0; z-index: 3; padding: 8px 0; background: rgba(245, 247, 251, 0.92); backdrop-filter: blur(10px); }
  .view-tabs .tab { flex: 1; min-height: 40px; padding: 8px 10px; }
  .score-card, .list-card, .history-card { padding: 14px; border-radius: 16px; }
  .section-title, .search-title, .score-title { flex-direction: column; align-items: stretch; }
  .admin-count { grid-template-columns: 1fr auto; min-width: 0; }
  .score-toolbar { grid-template-columns: 1fr 1fr; }
  .slide-status { grid-column: 1 / -1; grid-row: 1; }
  #prevSlideBtn { grid-column: 1; grid-row: 2; }
  #nextSlideBtn { grid-column: 2; grid-row: 2; }
  .score-slide { padding: 10px; }
  .slide-inner { padding: 14px; }
  .slide-header { align-items: flex-start; flex-direction: column; }
  .slide-form { grid-template-columns: 1fr; gap: 14px; }
  .slide-form label:nth-child(n) { grid-column: 1 / -1; }
  input, textarea { font-size: 16px; }
  .score-row { grid-template-columns: 86px 1fr 44px; gap: 8px; }
  .score-row input[type="range"] { height: 40px; }
  .score-actions, .search-form, .top-actions { flex-direction: column; align-items: stretch; }
  .search-form input, .search-form input[type="date"] { width: 100%; }
  .mobile-help { display: block; }
  .review-table { min-width: 980px; }
}

@media print {
  body { background: #fff; }
  .page-bg, .score-card, .top-actions, .stats-grid, .search-form, .no-print, .message, .view-tabs { display: none !important; }
  .container { width: 100%; padding: 0; }
  .topbar { color: #000; margin: 0 0 12px; }
  .topbar p { color: #333; }
  .card { box-shadow: none; border: 0; padding: 0; }
  .table-wrap { overflow: visible; border: 1px solid #000; }
  .review-table { min-width: 0; }
  .review-table th,
  .review-table td { border-color: #000; font-size: 11px; padding: 5px; }
}

.public-card .tip + .tip { margin-top: 10px; }

.image-field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.image-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.file-input {
  max-width: 220px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
}

.image-preview-wrap {
  margin-top: 10px;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
  overflow: hidden;
  color: var(--muted);
}

.image-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

@media (max-width: 720px) {
  .image-input-row {
    grid-template-columns: 1fr;
  }

  .file-input {
    max-width: none;
    width: 100%;
  }
}

button:disabled,
button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.page-bottom-nav {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}

.bottom-nav-btn {
  min-height: 48px;
  border-radius: 12px;
  background: #d1d5db;
  color: #ffffff;
  font-size: 15px;
}

.bottom-nav-btn:not(:disabled):hover {
  filter: brightness(0.96);
}

.primary-bottom {
  background: var(--primary);
  color: #ffffff;
}

@media (max-width: 680px) {
  .score-card {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .page-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    background: rgba(203, 213, 225, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
  }

  .bottom-nav-btn {
    min-height: 54px;
    font-size: 16px;
  }
}

/* 2026-06: 后台配置款式、前端直接评分流程 */
.public-container { max-width: 980px; }
.public-topbar { margin-bottom: 18px; }
.reviewer-pill {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e40af;
  font-weight: 700;
}
.public-slide-inner { display: grid; gap: 16px; }
.public-style-header { margin-bottom: 0; }
.public-style-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.public-style-image {
  width: 100%;
  height: 210px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.public-style-image.placeholder {
  display: grid;
  place-items: center;
  color: #94a3b8;
  border-style: dashed;
}
.public-style-info {
  display: grid;
  align-content: center;
  gap: 12px;
}
.public-style-info div {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.public-style-info span { color: var(--muted); font-size: 13px; font-weight: 700; }
.public-style-info strong { font-size: 22px; }
.public-style-info p {
  line-height: 1.7;
  color: #475569;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.public-remark { display: grid; gap: 8px; }
.empty-public {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
.saved-badge { background: #dcfce7; color: #166534; }
.admin-style-form,
.score-edit-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.admin-style-form .image-field { grid-column: 1 / -1; }
.admin-style-form .style-code-field { grid-column: span 6; }
.admin-style-form .season-field,
.admin-style-form .price-field { grid-column: span 3; }
.admin-style-form .switch-label { grid-column: span 2; }
.admin-style-form .wide { grid-column: 1 / -1; }
.score-edit-form label:nth-child(2),
.score-edit-form label:nth-child(3),
.score-edit-form label:nth-child(4) { grid-column: span 4; }
.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.switch-label {
  align-content: center;
  justify-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
}
.switch-label input { width: 24px; height: 24px; accent-color: var(--primary); }
.table-section-title { margin-top: 8px; }
.style-table { min-width: 900px; }
.status-on { color: var(--success); }
.status-off { color: var(--muted); }
.nested-card {
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: none;
}

@media (max-width: 960px) {
  .public-style-card { grid-template-columns: 1fr; }
  .public-style-image { height: 260px; }
  .admin-style-form,
  .score-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-style-form label:nth-child(n),
  .score-edit-form label:nth-child(n) { grid-column: span 1; }
  .admin-style-form .image-field,
  .admin-style-form .style-code-field,
  .admin-style-form .wide,
  .score-edit-form .wide { grid-column: 1 / -1 !important; }
}

@media (max-width: 680px) {
  .public-style-card { padding: 10px; }
  .public-style-image { height: 220px; }
  .public-style-info strong { font-size: 18px; }
  .reviewer-pill { width: 100%; }
  .admin-style-form,
  .score-edit-form { grid-template-columns: 1fr; padding: 12px; }
  .admin-style-form label:nth-child(n),
  .score-edit-form label:nth-child(n) { grid-column: 1 / -1 !important; }
  .form-actions { flex-direction: column; align-items: stretch; }
}

/* 2026-06: 后台拖拽上传图片 + 自定义评分项 */
.visually-hidden {
  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;
}

.drop-zone {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 170px;
  border: 2px dashed #bfdbfe;
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: #dbeafe;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .12);
  outline: none;
}

.drop-zone.drag-over {
  transform: translateY(-1px);
}

.drop-preview {
  min-height: 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.drop-preview .image-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
}

.drop-text {
  display: grid;
  gap: 8px;
  color: #1e3a8a;
}

.drop-text strong { font-size: 20px; }
.drop-text span { line-height: 1.7; color: #475569; }

.url-details {
  margin-top: 10px;
  color: var(--muted);
}
.url-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #1e40af;
}
.url-details input { margin-top: 8px; }

.score-field-list {
  display: grid;
  gap: 10px;
}

.score-field-editor-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.score-field-order {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-weight: 900;
}

@media (max-width: 720px) {
  .drop-zone { grid-template-columns: 1fr; }
  .score-field-editor-row { grid-template-columns: 36px minmax(0, 1fr); }
  .score-field-editor-row button { grid-column: 2; justify-self: stretch; }
}

/* 2026-06: 后台表单布局二次调整：图片独占一行，款式资料压缩到同一行 */
.admin-style-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}
.admin-style-form .image-field { grid-column: 1 / -1 !important; }
.admin-style-form .style-code-field { grid-column: span 3 !important; }
.admin-style-form .season-field { grid-column: span 2 !important; }
.admin-style-form .price-field { grid-column: span 2 !important; }
.admin-style-form .switch-label { grid-column: span 2 !important; min-height: 78px; }
.admin-style-form .style-remark-field { grid-column: span 3 !important; }
.admin-style-form .form-actions.wide { grid-column: 1 / -1 !important; }
.admin-style-form .style-remark-field textarea { min-height: 78px; resize: vertical; }

/* 评分项配置压缩，并支持每项满分 */
.score-field-list { gap: 8px; }
.score-field-editor-row {
  grid-template-columns: 36px minmax(180px, 1fr) 128px auto;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
}
.score-field-editor-row input { min-height: 40px; }
.score-field-order { width: 30px; height: 30px; }
.score-max-editor {
  display: grid;
  grid-template-columns: auto minmax(56px, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.score-max-editor input { padding: 8px 10px; text-align: center; }

@media (max-width: 1080px) {
  .admin-style-form .style-code-field { grid-column: span 4 !important; }
  .admin-style-form .season-field,
  .admin-style-form .price-field,
  .admin-style-form .switch-label,
  .admin-style-form .style-remark-field { grid-column: span 4 !important; }
}

@media (max-width: 720px) {
  .admin-style-form .style-code-field,
  .admin-style-form .season-field,
  .admin-style-form .price-field,
  .admin-style-form .switch-label,
  .admin-style-form .style-remark-field { grid-column: 1 / -1 !important; }
  .score-field-editor-row { grid-template-columns: 32px minmax(0, 1fr); }
  .score-max-editor, .score-field-editor-row button { grid-column: 2; }
}

/* 2026-06: 已配置款式支持表格内直接编辑 */
.style-inline-edit-row td {
  background: #f8fbff !important;
  vertical-align: top;
}
.inline-style-input {
  width: 100%;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  min-height: 40px;
  background: #fff;
  font-weight: 700;
  outline: none;
}
.inline-style-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.inline-remark {
  min-width: 180px;
  min-height: 68px;
  resize: vertical;
  line-height: 1.45;
}
.inline-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
}
.inline-switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}
.inline-image-editor {
  display: grid;
  gap: 8px;
  justify-items: center;
  min-width: 150px;
}
.inline-photo,
.inline-image-editor .photo-placeholder {
  width: 72px;
  height: 72px;
}
.inline-image-editor .image-url-input {
  min-width: 150px;
  font-size: 12px;
  padding: 8px 9px;
}
.mini-btn {
  min-height: 30px !important;
  padding: 5px 9px !important;
  font-size: 12px;
}
.inline-actions {
  flex-wrap: wrap;
  min-width: 150px;
}

@media (max-width: 720px) {
  .inline-style-input { min-width: 140px; }
  .inline-image-editor { min-width: 160px; }
}

/* 评分结果按一次提交聚合展示 */
.link-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
}
.link-button:hover { text-decoration: underline; }
.group-count {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.score-group-row.opened td { background: #f8fbff; }
.score-group-detail-row > td { padding: 0 !important; background: #f8fbff; }
.score-group-detail {
  margin: 10px;
  padding: 14px;
  border: 1px solid #dbe7ff;
  border-radius: 16px;
  background: #fff;
}
.compact-title { margin-bottom: 10px; }
.nested-table-wrap { border-radius: 14px; }
.detail-score-table th,
.detail-score-table td { white-space: nowrap; }
@media print {
  .score-group-detail-row { display: table-row; }
}
