/* =========================================================
   Continea – sdílený styl obsahových a právních stránek
   Bez externích fontů, CDN a skriptů třetích stran.
   ========================================================= */

:root {
  color-scheme: dark;

  /* Barvy */
  --bg: #0e0c0b;          /* téměř černá, teplá */
  --bg-raised: #17130f;   /* karty, tabulky */
  --bg-sunken: #0a0908;
  --line: #3a2f25;        /* jemné linky */
  --line-strong: #5a4632;

  --text: #e9dfca;        /* kost / pergamen  (kontrast ~14:1) */
  --text-muted: #b9a98d;  /* tlumený text      (kontrast ~8:1) */
  --heading: #f3e8d0;

  --ember: #e0a84a;       /* žhavé zlato       (kontrast ~9:1) */
  --ember-soft: #c98f35;
  --ember-glow: rgba(224, 168, 74, 0.10);

  --blood: #8e1c22;       /* jen na ozdoby a linky */
  --blood-text: #e86a62;  /* krvavá pro text   (kontrast ~5.6:1) */

  /* Písmo */
  --font-display: "Cormorant Garamond", "Cormorant", "Iowan Old Style", "Palatino Linotype",
    Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia,
    "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 42rem;
  --radius: 6px;
  --gutter: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% -8%, var(--ember-glow), transparent 70%),
    radial-gradient(ellipse 60% 30% at 50% 110%, rgba(142, 28, 34, 0.10), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

@media (min-width: 40em) {
  body {
    font-size: 1.125rem;
  }
}

/* ---------- Přístupnost ---------- */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--ember);
  color: var(--bg);
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Hlavička ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(10, 9, 8, 0.9), rgba(14, 12, 11, 0.6));
}

.site-header__inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--heading);
  text-decoration: none;
  line-height: 1.2;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-right: 0.5em;
  vertical-align: 0.15em;
  background: var(--ember);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(224, 168, 74, 0.6);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.25rem;
}

.site-nav a {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  min-height: 44px;
  line-height: 1.8;
}

.site-nav a:hover {
  color: var(--ember);
  background: rgba(224, 168, 74, 0.06);
}

.site-nav a[aria-current="page"] {
  color: var(--ember);
  box-shadow: inset 0 -2px 0 var(--ember);
  border-radius: 0;
}

.site-nav .nav-play {
  color: var(--bg);
  background: var(--ember);
  font-weight: 600;
}

.site-nav .nav-play:hover {
  color: var(--bg);
  background: #f0bc62;
}

/* ---------- Obsah ---------- */

main {
  flex: 1 0 auto;
  width: 100%;
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 3.5rem;
}

.page--wide {
  max-width: 56rem;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--heading);
  line-height: 1.2;
  font-weight: 600;
  margin: 2.2em 0 0.6em;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  letter-spacing: 0.02em;
  margin-top: 0.3em;
  text-align: center;
}

h2 {
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--line);
}

h2::before {
  content: "";
  display: inline-block;
  width: 0.35em;
  height: 0.35em;
  margin-right: 0.55em;
  vertical-align: 0.2em;
  border: 1px solid var(--ember);
  transform: rotate(45deg);
}

h3 {
  font-size: 1.35rem;
  color: var(--ember);
}

p,
ul,
ol,
dl,
table,
blockquote,
details {
  margin: 0 0 1.1em;
}

ul,
ol {
  padding-left: 1.4em;
}

li + li {
  margin-top: 0.35em;
}

li::marker {
  color: var(--ember-soft);
}

a {
  color: var(--ember);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #f3c46f;
  text-decoration-thickness: 2px;
}

strong {
  color: var(--heading);
  font-weight: 700;
}

small,
.muted {
  color: var(--text-muted);
}

.kicker {
  margin: 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: 1.15em;
  color: var(--text);
  text-align: center;
  font-style: italic;
  margin: 0 auto 1.5em;
  max-width: 36rem;
}

.meta {
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Fráze, které hráč píše do komentáře nebo DM */
.say {
  font-family: var(--font-ui);
  font-size: 0.9em;
  font-weight: 600;
  color: var(--heading);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0.05em 0.4em;
  white-space: nowrap;
}

@media (max-width: 24em) {
  .say {
    white-space: normal;
  }
}

/* ---------- Ornamentální oddělovač (čisté CSS) ---------- */

.ornament {
  position: relative;
  height: 1.5rem;
  margin: 2.5rem auto;
  border: 0;
  max-width: 20rem;
  overflow: visible;
  background:
    linear-gradient(to right, transparent, var(--line-strong) 30%, var(--line-strong) 42%, transparent 44%) left center / 100% 1px no-repeat,
    linear-gradient(to left, transparent, var(--line-strong) 30%, var(--line-strong) 42%, transparent 44%) right center / 100% 1px no-repeat;
}

.ornament::before,
.ornament::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.ornament::before {
  width: 0.7rem;
  height: 0.7rem;
  background: var(--ember);
  box-shadow: 0 0 12px rgba(224, 168, 74, 0.45);
}

.ornament::after {
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid var(--blood);
}

/* ---------- Bloky ---------- */

.callout {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
}

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

.callout--blood {
  border-left-color: var(--blood-text);
}

.callout__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--heading);
  margin-bottom: 0.3em;
}

blockquote,
.quote {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 2px solid var(--blood);
  background: linear-gradient(to right, rgba(142, 28, 34, 0.12), transparent 80%);
  font-family: var(--font-display);
  font-size: 1.35em;
  font-style: italic;
  line-height: 1.45;
  color: var(--heading);
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote footer,
.quote cite {
  display: block;
  margin-top: 0.6em;
  font-family: var(--font-ui);
  font-size: 0.6em;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Číslované kroky */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  margin: 0 0 0 1.2rem;
  padding: 0 0 1.2rem 2.2rem;
  border-left: 1px solid var(--line);
}

.steps > li:last-child {
  border-left-color: transparent;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: -1.2rem;
  top: -0.1rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--ember);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg), 0 0 14px rgba(224, 168, 74, 0.35);
}

.steps > li > strong:first-child {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.2em;
}

/* Tabulky */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
}

.table-wrap:focus-visible {
  outline-offset: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.95em;
}

caption {
  text-align: left;
  padding: 0.7rem 0.9rem 0;
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

th,
td {
  padding: 0.55rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

thead th {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--line-strong);
}

@media (max-width: 30em) {
  table {
    font-size: 0.875em;
  }
  th,
  td {
    padding: 0.5rem 0.55rem;
  }
  thead th {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
  }
  table td.num {
    white-space: normal;
  }
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody th {
  font-weight: 600;
  color: var(--heading);
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Mřížka tříd */
.class-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
  gap: 0.6rem;
}

.class-grid li {
  margin: 0;
  padding: 0.7rem 0.9rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  line-height: 1.35;
}

.class-grid .class-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--heading);
}

.class-grid .class-building {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ember);
}

/* Řebříček (domy, milníky) */
.ladder {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.ladder li {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--heading);
}

.ladder li + li::before {
  content: "→";
  margin-right: 0.4rem;
  color: var(--ember-soft);
  font-family: var(--font-ui);
  font-weight: 400;
}

/* Oltář – dny */
.days {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
  text-align: center;
}

.days li {
  margin: 0;
  padding: 0.5rem 0.1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--text-muted);
}

.days li b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--heading);
}

.days li.chest {
  border-color: var(--ember);
  background: linear-gradient(to bottom, rgba(224, 168, 74, 0.14), var(--bg-raised));
}

.days li.chest b {
  color: var(--ember);
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  margin: 0 0 0.6rem;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 2.6rem 0.85rem 1rem;
  position: relative;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--heading);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--ember);
  border-bottom: 2px solid var(--ember);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq summary:hover {
  color: var(--ember);
}

.faq .answer {
  padding: 0 1rem 0.4rem;
}

/* Tlačítka */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  min-height: 44px;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--ember);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: 0 0 18px rgba(224, 168, 74, 0.25);
}

.btn:hover {
  color: var(--bg);
  background: #f0bc62;
  text-decoration: none;
}

.btn--ghost {
  color: var(--ember);
  background: transparent;
  border: 1px solid var(--ember-soft);
  box-shadow: none;
}

.btn--ghost:hover {
  color: var(--heading);
  background: rgba(224, 168, 74, 0.08);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin: 2rem 0;
}

/* Obsah právních stránek */
.toc {
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}

.toc ol {
  margin: 0.4em 0 0;
}

.legal h2 {
  font-size: clamp(1.35rem, 4vw, 1.6rem);
}

.legal h3 {
  font-size: 1.15rem;
}

/* ---------- 404 ---------- */

.lost {
  text-align: center;
  padding-top: 4rem;
}

.lost .big {
  font-family: var(--font-display);
  font-size: clamp(4rem, 20vw, 7rem);
  line-height: 1;
  color: var(--blood-text);
  margin: 0;
  letter-spacing: 0.1em;
  text-shadow: 0 0 30px rgba(142, 28, 34, 0.55);
}

/* ---------- Patička ---------- */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.8rem var(--gutter) 2.2rem;
  display: grid;
  gap: 1rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  color: var(--text);
  display: inline-block;
  padding: 0.3rem 0;
}

.site-footer a:hover {
  color: var(--ember);
}

.site-footer p {
  margin: 0;
}

@media (min-width: 48em) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .site-footer .footer-small {
    grid-column: 1 / -1;
  }
}

/* ---------- Tisk ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }
  .site-header,
  .site-footer,
  .skip-link,
  .actions {
    display: none;
  }
  a {
    color: #000;
  }
  h1, h2, h3, strong, .say {
    color: #000;
  }
}
