/* =============================================
   clean.css — TVRPG Club Site (Clean / E-ink Mode)
   Updated: Style switcher now sits at the bottom of the page
   ============================================= */

:root {
  /* Core colors - optimized for e-ink and high contrast */
  --bg: #ffffff;
  --text: #1a1a1a;
  --accent: #2c3e50;
  --accent-light: #34495e;
  --border: #cccccc;
  --light-bg: #f8f8f8;
  --highlight: #fff9c4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #f0f0f0;
    --accent: #a8c0d8;
    --accent-light: #b8c8e0;
    --border: #555555;
    --light-bg: #2a2a2a;
    --highlight: #3a3a2a;
  }
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.75;
  font-size: 1.1rem;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--accent);
  margin: 1.8em 0 0.6em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.4rem; }

p, ul, ol, dl {
  margin-bottom: 1.25em;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover, a:focus {
  color: var(--accent-light);
  text-decoration-thickness: 2px;
}

/* Layout */
.book-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .book-container {
    grid-template-columns: 240px 1fr 240px;
    padding: 2rem 3rem;
  }
}

header[role="banner"] {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-bottom: 3px solid var(--border);
  margin-bottom: 2rem;
}

.emblem {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.book-title {
  margin: 0.4rem 0 0.2rem;
  font-size: 2.1rem;
}

.subtitle {
  margin: 0;
  font-style: italic;
  color: #555;
  font-size: 1.1rem;
}

/* Navigation */
nav[role="navigation"] ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

nav[role="navigation"] a {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
}

nav[role="navigation"] a:hover {
  background: var(--light-bg);
}

/* Side panels */
.left-panel, .right-panel {
  background: var(--light-bg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.left-panel blockquote {
  font-style: italic;
  border-left: 5px solid var(--accent);
  padding-left: 1.2rem;
  margin: 1.2rem 0;
  color: #444;
}

.callout-box {
  background: var(--light-bg);
  border: 2px solid var(--accent);
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.callout-box:last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.85rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 0.8rem;
}

.button:hover {
  background: var(--accent-light);
  color: white;
}

/* Main content */
main {
  max-width: 100%;
}

.content-block {
  margin-bottom: 2.5rem;
}

.highlight {
  background: var(--highlight);
  padding: 1.5rem;
  border-left: 6px solid var(--accent);
  border-radius: 4px;
}

.event-list {
  list-style: none;
  padding: 0;
}

.event-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.event-list li:last-child {
  border-bottom: none;
}

.featured-art {
  margin: 2.5rem 0;
  text-align: center;
}

.featured-art img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

figcaption {
  font-style: italic;
  color: #666;
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

/* ==================== STYLE SWITCHER ==================== */
/* Now placed at the bottom of the page (non-floating) */
.style-switcher {
  background: var(--light-bg);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
  padding: 1rem 1rem 1.2rem;
  margin: 3rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.style-switcher button {
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}

.style-switcher button:hover,
.style-switcher button[aria-current="true"] {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-top: 1px solid var(--border);
  color: #666;
  font-size: 0.95rem;
}

/* Accessibility & Print */
@media print {
  .style-switcher {
    display: none;
  }
  body {
    background: white;
    color: black;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ==================== LOGO ==================== */
.logo {
  height: 96px;           /* Good clean size for this theme */
  width: auto;
  flex-shrink: 0;
  margin-right: 1rem;
}

/* Make logo a bit smaller on mobile */
@media (max-width: 768px) {
  .logo {
    height: 58px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  body {
    font-size: 1.05rem;
  }
  .book-container {
    padding: 1rem;
  }
  .style-switcher {
    padding: 1rem 0.8rem;
    gap: 8px;
  }
}

/* Featured art image - responsive */
.featured-art {
  margin: 2.5rem 0;
  text-align: center;
}

.featured-art img {
  max-width: 90%;
  height: auto;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Regular images inside content - scale cleanly, no border */
main img,
.left-panel img,
.right-panel img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Optional: Limit very tall images */
main img {
  max-height: 85vh;
}