:root {
  --bg-sand-light: #ece0c4;
  --bg-sand-dark: #cfab72;
  --bg-panel: #f5ecd8;
  --bg-card: #f7f0e1;
  --border-soft: rgba(28, 74, 66, 0.22);
  --teal: #1c4a42;
  --teal-mid: #2f7566;
  --cream: #f2ede0;
  --gold: #d99a3a;
  --text-main: #3a2f1f;
  --text-dim: #6b5f47;

  --alkian: #2f8f7d;
  --geolia: #6b9e4f;
  --sahu: #d9a441;
  --refia: #c8622f;
  --dromh: #5f83a8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, var(--bg-sand-light) 0%, var(--bg-sand-dark) 75%);
  color: var(--text-main);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  line-height: 1.5;
}

h1, h2, h3, .tab-btn {
  font-family: 'Cinzel', Georgia, serif;
}

.site-header {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}

.site-header h1 {
  margin: 0;
  font-size: 2.1rem;
  color: var(--teal);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
}

.tagline {
  color: var(--text-dim);
  margin: 0.6rem 0 1.8rem;
  font-style: italic;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: var(--teal);
}

.tab-btn.active {
  background: var(--teal);
  color: var(--cream);
  border-color: var(--teal);
  font-weight: 700;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.loading, .hint, .error {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem;
}

.error { color: #a3402a; }

.bulletin-date {
  text-align: center;
  color: var(--teal);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.bulletin-iso {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.world-event {
  background: linear-gradient(135deg, rgba(217, 154, 58, 0.2), rgba(217, 154, 58, 0.05));
  border: 1px solid rgba(217, 154, 58, 0.4);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 0 auto 2rem;
  max-width: 700px;
  text-align: center;
  font-style: italic;
  color: var(--text-main);
}

.nations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.nation-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.3rem;
  border-top: 4px solid var(--nation-color, var(--teal));
  box-shadow: 0 2px 10px rgba(60, 45, 20, 0.08);
}

.nation-card h3 {
  margin: 0 0 0.6rem;
  color: var(--nation-color, var(--teal));
  font-size: 1.15rem;
}

.nation-condition {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.nation-temp {
  font-weight: 700;
}

.nation-phrase {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0.6rem 0 0;
}

.local-event {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border-soft);
  font-size: 0.9rem;
}

.local-event .label {
  font-weight: 700;
  color: var(--nation-color, var(--teal));
}

.archive-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
}

.archive-list {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.2rem;
  max-height: 70vh;
  overflow-y: auto;
}

.archive-list h2 {
  margin: 0 0 0.8rem;
  font-size: 1.1rem;
  color: var(--teal);
}

.archive-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-list li { margin-bottom: 0.3rem; }

.archive-date-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
}

.archive-date-btn:hover {
  background: rgba(28, 74, 66, 0.08);
  color: var(--text-main);
}

.archive-date-btn.active {
  background: var(--teal);
  color: var(--cream);
  font-weight: 700;
}

.site-footer {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 700px) {
  .archive-layout { grid-template-columns: 1fr; }
  .archive-list { max-height: none; }
}
