:root {
  color-scheme: dark;
  --bg: #7f0909;
  --panel: #990000;
  --panel-dark: #6f0707;
  --accent: #ffb13b;
  --accent-soft: #ffd36e;
  --text: #fff2ad;
  --muted: #ffd995;
  --line: rgba(255, 191, 73, 0.35);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a { color: var(--accent); }
a:visited { color: #ff934f; }
a:hover { color: #fff1a8; }

.site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, var(--panel-dark), var(--panel));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.site-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px 10px;
}

.site-title {
  margin: 0 0 10px;
  color: var(--accent-soft);
  font-size: clamp(1.25rem, 2.8vw, 2rem);
  line-height: 1.15;
}

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

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 180, 60, 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 180, 60, 0.18);
  outline: none;
}

.content-frame {
  width: 100%;
  min-height: calc(100vh - 118px);
  border: 0;
  background: var(--bg);
}

.legacy-page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px;
}

.legacy-page img {
  max-width: 100%;
  height: auto;
}

.legacy-page table {
  max-width: 100%;
}

.legacy-top-link {
  display: inline-flex;
  margin: 12px 0 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 180, 60, 0.08);
  text-decoration: none;
}

@media (max-width: 760px) {
  .site-bar { padding: 12px; }
  .site-nav { gap: 6px; }
  .site-nav a { flex: 1 1 calc(50% - 6px); justify-content: center; font-size: 0.9rem; }
  .content-frame { min-height: calc(100vh - 190px); }
  .legacy-page { padding: 12px; }
}
