:root {
  --bg: #f3f6fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --line: #dbe3ef;
  --text: #122033;
  --muted: #607089;
  --brand: #1f5eff;
  --brand-2: #1d9bf0;
  --accent: #ffb703;
  --success: #0f9d58;
  --danger: #d97706;
  --shadow: 0 18px 48px rgba(22, 34, 58, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 999px;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 94, 255, 0.2), transparent 30%),
    radial-gradient(circle at bottom right, rgba(255, 183, 3, 0.18), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 46%, #f5f7fb 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(248, 251, 255, 0.82);
  border-bottom: 1px solid rgba(217, 226, 240, 0.8);
}

.site-header-inner,
.site-footer-inner,
.site-footer-bottom,
.info-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

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

.site-brand-mark,
.site-footer-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(31, 94, 255, 0.24);
}

.site-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-brand-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.site-brand-copy small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.site-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  color: #4f6078;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
  background: rgba(31, 94, 255, 0.1);
  color: var(--brand);
}

.site-nav-link:hover {
  transform: translateY(-1px);
}

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

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.site-shell,
.detail-shell {
  width: min(1320px, calc(100% - 32px));
  margin: 18px auto 28px;
}

.site-footer {
  margin-top: 30px;
  padding: 28px 0 18px;
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(217, 226, 240, 0.85);
  backdrop-filter: blur(18px);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(360px, 1.5fr) minmax(200px, 0.7fr) minmax(200px, 0.7fr);
  gap: 28px 44px;
  align-items: start;
}

.site-footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.site-footer-brand h3,
.site-footer-group h4 {
  margin: 0 0 10px;
}

.site-footer-brand p,
.site-footer-group a,
.site-footer-bottom {
  color: #66778f;
}

.site-footer-brand p {
  margin: 0;
  line-height: 1.8;
  font-size: 13px;
}

.site-footer-group {
  display: grid;
  gap: 10px;
}

.site-footer-group a {
  font-size: 13px;
}

.site-footer-group a:hover {
  color: var(--brand);
}

.site-footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(221, 230, 243, 0.9);
  font-size: 12px;
}

.info-shell {
  margin: 22px auto 30px;
}

.info-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 239, 0.92);
  box-shadow: var(--shadow);
}

.info-card h1 {
  margin: 0 0 12px;
  font-size: 30px;
}

.info-card p,
.info-card li {
  color: #51627b;
  font-size: 14px;
  line-height: 1.85;
}

.info-card ul {
  margin: 14px 0 0 20px;
  padding: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 20px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(18, 32, 51, 0.94), rgba(26, 74, 189, 0.92)),
    linear-gradient(135deg, #1f5eff, #1d9bf0);
  color: #f9fbff;
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0 10px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.08;
}

.hero-text {
  margin: 0;
  max-width: 56ch;
  color: rgba(245, 248, 255, 0.9);
  font-size: 13px;
  line-height: 1.62;
}

.hero-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-note-label {
  display: inline-block;
  margin-bottom: 6px;
  color: #ffe08a;
  font-weight: 800;
  font-size: 12px;
}

.hero-note p {
  margin: 0;
  color: rgba(250, 252, 255, 0.92);
  line-height: 1.65;
  font-size: 13px;
}

.hero-stats {
  display: grid;
  gap: 10px;
}

.stat-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.stat-label {
  display: block;
  font-size: 11px;
  color: rgba(234, 239, 249, 0.78);
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.layout {
  margin-top: 18px;
}

.panel {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid rgba(219, 227, 239, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-head,
.toolbar,
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.toolbar h2,
.info-panel h3 {
  margin: 0;
  font-size: 16px;
}

.toolbar {
  margin: 14px 0 12px;
}

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

.toolbar-link,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(31, 94, 255, 0.14);
  background: rgba(31, 94, 255, 0.08);
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.filters-panel {
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.95));
  border: 1px solid rgba(215, 226, 243, 0.95);
}

.filters-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(520px, 2fr) minmax(220px, 0.8fr);
  gap: 18px 22px;
  align-items: start;
}

.field-search {
  grid-column: 1 / -1;
  margin-top: 0;
}

.filters-panel.is-collapsed {
  padding-top: 10px;
  padding-bottom: 10px;
}

.filters-panel.is-collapsed .filters-grid {
  display: none;
}

.filters-panel.is-collapsed .legend-row {
  display: none;
}

.field > span {
  font-size: 11px;
  font-weight: 700;
  color: #62748e;
  letter-spacing: 0.04em;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(204, 216, 235, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.field input:focus {
  outline: 2px solid rgba(31, 94, 255, 0.12);
  border-color: rgba(31, 94, 255, 0.36);
}

.segmented {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border-radius: 999px;
  background: #edf3fb;
  border: 1px solid rgba(212, 223, 240, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.segmented-btn,
.chip {
  border: 0;
  border-radius: var(--radius-sm);
  background: #eef3fb;
  color: #4f6078;
  padding: 8px 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.segmented-btn {
  min-width: 116px;
  min-height: 38px;
  background: transparent;
  color: #5f7090;
  font-size: 13px;
  font-weight: 700;
}

.segmented-btn:hover,
.chip:hover {
  transform: translateY(-1px);
}

.segmented-btn.is-active,
.chip.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 94, 255, 0.24);
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  background: #f1f5fb;
  color: #596a84;
}

.field-group-view {
  grid-column: 1;
}

.field-group-bank {
  grid-column: 2;
}

.field-group-time {
  grid-column: 3;
}

.legend-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(221, 230, 243, 0.9);
}

.legend-label {
  color: #62748e;
  font-size: 11px;
  font-weight: 800;
}

@media (min-width: 980px) {
  .site-header {
    box-shadow: 0 10px 24px rgba(22, 34, 58, 0.04);
  }

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

  .toolbar {
    align-items: flex-end;
  }
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #f4f7fc;
  color: #52647d;
  font-size: 11px;
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot-default {
  background: #d8e6ff;
  border: 1px solid #aac6ff;
}

.legend-dot-recurring {
  background: #cceedd;
  border: 1px solid #90d7b7;
}

.legend-dot-credit {
  background: #ffe7b5;
  border: 1px solid #f3c86c;
}

.result-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.state-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 239, 0.92);
  box-shadow: var(--shadow);
  color: var(--muted);
}

.state-card.is-error {
  border-color: rgba(217, 119, 6, 0.26);
  color: #9a3412;
  background: #fff7ed;
}

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

.expired-panel {
  grid-column: 1 / -1;
  padding: 14px 16px 16px;
  border-radius: 22px;
  background: rgba(244, 247, 252, 0.96);
  border: 1px solid rgba(220, 228, 239, 0.95);
  box-shadow: 0 12px 28px rgba(32, 49, 72, 0.05);
}

.expired-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  background: transparent;
  color: #41526b;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 2px 0;
}

.expired-toggle-icon {
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

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

.campaign-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(219, 227, 239, 0.92);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
}

.campaign-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 46px rgba(23, 37, 65, 0.16);
}

.campaign-card:active {
  transform: translateY(-2px) scale(0.996);
}

.campaign-card.tone-default {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(219, 227, 239, 0.92);
}

.campaign-card.tone-default .card-bank {
  background: #edf3ff;
  color: var(--brand);
}

.campaign-card.tone-recurring {
  background: linear-gradient(180deg, rgba(239, 253, 248, 0.98), rgba(232, 249, 243, 0.98));
  border-color: rgba(152, 225, 199, 0.9);
}

.campaign-card.tone-recurring .card-bank {
  background: #dff7ed;
  color: #0f766e;
}

.campaign-card.tone-credit {
  background: linear-gradient(180deg, rgba(255, 249, 235, 0.98), rgba(255, 245, 223, 0.98));
  border-color: rgba(243, 211, 143, 0.9);
}

.campaign-card.tone-credit .card-bank {
  background: #fff1cf;
  color: #b45309;
}

.campaign-card.is-expired {
  opacity: 0.72;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.card-bank {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 800;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.tag {
  background: #fff3d8;
  color: #b45309;
}

.badge.soon {
  background: #fee2b9;
  color: #b45309;
}

.badge.recurring {
  background: #dff7ed;
  color: #0f766e;
}

.badge.expired {
  background: #e5e7eb;
  color: #6b7280;
}

.card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.34;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 12px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #5f6f87;
  font-size: 11px;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(31, 94, 255, 0.22);
}

.secondary-btn {
  background: #eef4fb;
  color: #28415f;
}

.card-entry {
  pointer-events: none;
}

.detail-topbar {
  margin-bottom: 14px;
}

.detail-topbar-title {
  font-weight: 800;
  font-size: 14px;
}

.detail-root {
  display: grid;
  gap: 16px;
}

.detail-card {
  padding: 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 239, 0.92);
  box-shadow: 0 24px 64px rgba(31, 49, 84, 0.12);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(15, 30, 56, 0.96), rgba(33, 93, 201, 0.94));
  color: #f8fbff;
  border: 1px solid rgba(56, 102, 197, 0.35);
}

.detail-hero-copy {
  display: grid;
  gap: 14px;
}

.detail-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.detail-hero-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.detail-bank-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 244, 214, 0.95);
  color: #b45309;
  font-size: 11px;
  font-weight: 800;
}

.detail-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(233, 240, 255, 0.72);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-hero h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.detail-desc {
  margin: 0;
  color: rgba(239, 244, 255, 0.84);
  line-height: 1.75;
  font-size: 14px;
  max-width: 54ch;
}

.detail-summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(247, 250, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
}

.detail-metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.detail-metric-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(231, 239, 255, 0.72);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detail-metric-value {
  display: block;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.78fr);
  gap: 20px;
  margin-top: 20px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 16px;
}

.detail-section,
.detail-side-panel,
.detail-side-note {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(246, 249, 253, 0.96));
  border: 1px solid #e4ebf5;
  box-shadow: 0 8px 24px rgba(32, 49, 72, 0.05);
}

.detail-section-emphasis {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98));
}

.detail-section-compact {
  padding-bottom: 14px;
}

.detail-section-kicker {
  font-size: 10px;
  font-weight: 800;
  color: #7a8ba2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-section-head h2,
.detail-side-head h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  margin-bottom: 12px;
}

.detail-section-copy {
  margin: 0;
  color: #203148;
  line-height: 1.95;
  font-size: 14px;
  white-space: pre-line;
  word-break: break-word;
}

.detail-inline-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(246, 249, 254, 0.95);
  border: 1px solid #e2eaf4;
}

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

.detail-stat {
  padding: 12px 12px 11px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
}

.detail-stat-label {
  display: block;
  margin-bottom: 6px;
  color: #7a8aa0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.detail-stat-value {
  margin: 0;
  color: #122033;
  line-height: 1.55;
  font-size: 13px;
  word-break: break-word;
}

.detail-link {
  color: var(--brand);
  line-height: 1.7;
  font-size: 13px;
  word-break: break-word;
}

.detail-poster-name {
  font-weight: 700;
  font-size: 13px;
}

.detail-side {
  align-content: start;
}

.detail-side-panel {
  position: sticky;
  top: 16px;
}

.detail-side-note p {
  margin: 6px 0 0;
  color: #66778f;
  line-height: 1.7;
  font-size: 13px;
}

.detail-footer {
  margin-top: 18px;
  padding: 13px 15px;
  border-radius: 18px;
  background: #f6f8fc;
  color: #7a8699;
  line-height: 1.65;
  font-size: 12px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 20, 0.82);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 960px);
  max-height: 88vh;
  padding: 18px 18px 24px;
  border-radius: 28px;
  background: rgba(11, 18, 31, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.42);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(88vh - 120px);
  margin: 0 auto;
  border-radius: 18px;
  object-fit: contain;
}

.lightbox-error {
  display: grid;
  gap: 10px;
  width: min(88vw, 520px);
  margin: 0 auto;
  padding: 20px 22px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e7eefc;
}

.lightbox-error strong {
  font-size: 18px;
}

.lightbox-error p {
  margin: 0;
  color: rgba(231, 238, 252, 0.82);
  line-height: 1.6;
}

.lightbox-hint {
  margin: 16px 0 0;
  text-align: center;
  color: #ffd166;
  font-weight: 800;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .site-shell,
  .detail-shell,
  .site-header-inner,
  .site-footer-inner,
  .site-footer-bottom,
  .info-shell {
    width: min(100% - 20px, 100%);
    margin: 10px auto 24px;
  }

  .site-header-inner,
  .site-footer-inner {
    width: min(100% - 20px, 100%);
  }

  .site-header-inner,
  .site-footer-inner,
  .site-footer-brand {
    align-items: flex-start;
  }

  .site-header-inner,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-header-inner {
    display: grid;
  }

  .site-nav {
    width: 100%;
  }

  .hero,
  .panel,
  .detail-card {
    padding: 14px;
    border-radius: 22px;
  }

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

  .toolbar,
  .panel-head,
  .detail-topbar,
  .card-head,
  .card-meta,
  .detail-inline-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge-row {
    justify-content: flex-start;
  }

  .detail-hero,
  .detail-layout,
  .detail-stat-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-top {
    align-items: flex-start;
  }

  .card-title {
    font-size: 18px;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .legend-row {
    gap: 8px;
  }

  .field-group-view,
  .field-group-bank,
  .field-group-time {
    grid-column: auto;
  }

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

  .segmented {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .segmented-btn {
    min-width: 96px;
  }

  .lightbox-dialog {
    width: calc(100vw - 16px);
    padding: 16px 16px 22px;
    border-radius: 20px;
  }

  .detail-hero h1 {
    font-size: 28px;
  }

  .detail-metric-grid {
    grid-template-columns: 1fr;
  }

  .detail-side-panel {
    position: static;
  }
}
