:root {
  --bg: #05080d;
  --panel: #0b1119;
  --panel-2: #171d26;
  --line: #2d3643;
  --line-soft: #1a2430;
  --text: #edf3ff;
  --text-soft: #c4cfdd;
  --accent: #9aa8bb;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at top, rgba(9, 30, 61, 0.35), transparent 28%),
    linear-gradient(180deg, #0a1018 0%, #06090e 55%, #04070b 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  width: min(1420px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
}

.page-header { margin: 6px 0 18px; }
.page-header h1 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.status {
  color: var(--text-soft);
  font-size: 15px;
}
.error { color: #ff9d9d; }

.section {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
}

.section-bar {
  border-bottom: 1px solid #9098a4;
  background: linear-gradient(180deg, #b8c2ce 0%, #8f99a7 100%);
  color: #f3f7fb;
  font-size: 22px;
  font-weight: 700;
  padding: 6px 10px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.28);
}

.section-meta {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255,255,255,0.02);
}

.discussion-link {
  display: inline-block;
  min-width: 184px;
  padding: 8px 14px;
  background: #2a313b;
  border: 1px solid #718095;
  color: #f2f6fb;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.discussion-link:hover { background: #313b47; }

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  padding: 16px;
}

.thumb-card {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
  text-align: left;
}

.thumb-frame {
  display: block;
  width: 100%;
  background: #05080d;
  border: 1px solid #415066;
}
.thumb-frame svg {
  display: block;
  width: 100%;
  height: auto;
  background: #07101a;
}
.thumb-label {
  padding: 8px 4px 0;
  text-align: center;
  color: #eef5ff;
  font-size: 15px;
}

.modal.hidden { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
}
.modal-panel {
  position: relative;
  width: min(1220px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  margin: 15px auto;
  border: 1px solid #5a6678;
  background: #0b1017;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2f3948;
  padding: 10px 12px;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  appearance: none;
  border: 1px solid #6d7c90;
  background: #28313b;
  color: #fff;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.modal-body {
  overflow: auto;
  padding: 12px;
}
.modal-body svg {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #445064;
  background: #07101a;
}

@media (max-width: 720px) {
  .page { width: calc(100vw - 16px); padding-top: 12px; }
  .page-header h1 { font-size: 28px; }
  .section-bar { font-size: 18px; }
  .thumb-grid { grid-template-columns: 1fr; gap: 14px; padding: 12px; }
}
