/* Republic of Rome Gamehelper — gemeinsames Fundament
   Wird von jeder Seite geladen; danach folgt das seiteneigene Stylesheet. */

:root {
  /* Pergament */
  --parchment-top: rgba(244, 232, 206, 0.96);
  --parchment-bottom: rgba(232, 216, 183, 0.94);
  --ink: #3d2a11;
  --ink-soft: #5c3d16;
  --ink-faint: #7a5b2c;
  --rule: rgba(120, 88, 40, 0.35);
  --rule-faint: rgba(120, 88, 40, 0.18);

  /* Bronze & Nacht */
  --brass: #8a5a1b;
  --brass-bright: #b3801f;
  --gold: #cbab6e;
  --gold-dim: #8d7448;
  --cream: #f0e2c4;
  --night: #16110b;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --display: 'Cinzel', Georgia, serif;

  --shadow-panel: 0 24px 60px rgba(0, 0, 0, 0.55);
  --frame-inset: inset 0 0 0 6px rgba(255, 255, 255, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--night); }

body {
  font-family: var(--serif);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brass); }
a:hover { color: var(--brass-bright); }

/* Der Marmorgrund liegt auf jeder Seite. */
.page {
  min-height: 100vh;
  width: 100%;
  padding: 40px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  background-image:
    linear-gradient(rgba(22, 15, 8, 0.63), rgba(22, 15, 8, 0.7)),
    url('../img/background.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
}

/* ---------- Kopfzeile ---------- */

.masthead { text-align: center; color: var(--cream); }

.masthead h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: 0.22em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

.masthead p {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(10px, 1.6vw, 14px);
  letter-spacing: 0.32em;
  color: var(--gold);
}

.masthead a { color: inherit; text-decoration: none; }

/* ---------- Pergamenttafel ---------- */

.panel {
  width: min(1080px, 100%);
  padding: 22px 26px 26px;
  border: 1px solid rgba(120, 88, 40, 0.5);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--parchment-top), var(--parchment-bottom));
  box-shadow: var(--shadow-panel), var(--frame-inset);
}

/* ---------- Bronzeknopf aus den gerahmten Kacheln ---------- */

.tile-btn {
  display: block;
  padding: 0;
  border: none;
  background: transparent no-repeat center / contain;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.tile-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  filter: brightness(1.08);
}

.tile-btn:active:not(:disabled) { transform: translateY(0); }

.tile-btn:disabled { opacity: 0.3; cursor: default; }

.tile-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-prev { background-image: url('../img/arrow-left.png'); }
.btn-next { background-image: url('../img/arrow-right.png'); }
.btn-menu { background-image: url('../img/hamburger.png'); }

/* Nur für Screenreader. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Fußzeile ---------- */

.site-foot {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  opacity: 0.8;
}

.site-foot a { color: inherit; text-decoration: none; }
.site-foot a:hover { color: var(--gold); }

@media (max-width: 520px) {
  .page { padding: 24px 12px 48px; }
  .panel { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Rücksprung zum Portal ---------- */

.backlink {
  align-self: flex-start;
  width: min(1080px, 100%);
  margin: -10px auto -12px;
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.backlink:hover { color: var(--cream); }
.backlink::before { content: '◄  '; letter-spacing: 0; }
