:root {
  --bg: #12141f;
  --bg2: #1d2030;
  --gold: #d4b67b;
  --gold-soft: #f0debb;
  --line: #4d4353;
  --text: #f4f0e8;
  --muted: #d1c4aa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Karla", sans-serif;
  background: radial-gradient(circle at 50% -30%, #343752 0%, #12141f 70%);
}

body.runelock {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

.runehead {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.6rem;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(18, 20, 31, 0.94);
}

.runebrand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "Cinzel", serif;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
}

.runebrand img {
  width: 42px;
  height: 42px;
}

.runeburger {
  margin-left: auto;
  width: 44px;
  height: 40px;
  border: 1px solid #5a4d5f;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
}

.runeburger span {
  height: 2px;
  background: var(--gold-soft);
}

.runemenu {
  grid-column: 1 / -1;
  display: none;
  flex-direction: column;
  gap: 0.3rem;
}

.runemenu.open {
  display: flex;
}

.runemenu a {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
}

.runemenu a:hover,
.runemenu a:focus-visible {
  background: rgba(212, 182, 123, 0.14);
}

.runepage {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.runehero {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
  background: linear-gradient(165deg, rgba(57, 46, 65, 0.64), rgba(29, 32, 48, 0.9));
}

.glyphline {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #e8d3ab;
  font-size: 0.76rem;
}

h1,
h2 {
  font-family: "Cinzel", serif;
}

h1 {
  margin: 0.55rem 0;
  font-size: clamp(1.95rem, 5.3vw, 3.45rem);
  line-height: 1.08;
}

.runebtn {
  margin-top: 0.7rem;
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #b79660;
  color: #f8ebce;
}

.runepolicy {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.7rem;
}

.runepolicy article,
.runeextras div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(27, 29, 45, 0.88);
}

.runepolicy p,
.runeextras p {
  margin-bottom: 0;
  color: var(--muted);
}

.runeextras {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.7rem;
}

.runegame {
  margin-top: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.95rem;
  background: rgba(25, 27, 41, 0.9);
}

.runeframe {
  margin-top: 0.5rem;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #62566c;
  background: #000;
}

.runeframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.runedoc {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 1rem;
}

.parchment {
  border: 1px solid #5a4f63;
  border-radius: 15px;
  background: rgba(24, 25, 38, 0.92);
}

.parchment h2 {
  margin-top: 1.06rem;
}

.runefoot {
  margin-top: 1.2rem;
  border-top: 1px solid #584c61;
  padding: 1rem;
  color: var(--muted);
}

.runefoot div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.runefoot a {
  color: #f1d28f;
}

.runegate {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 120;
  background: rgba(13, 14, 22, 0.86);
  padding: 1rem;
}

.runegate.show {
  display: grid;
}

.runeslab {
  width: min(420px, 100%);
  border-radius: 16px;
  border: 1px solid #6e6075;
  background: #1e2030;
  padding: 1rem;
}

.runeslab-actions {
  margin-top: 0.78rem;
  display: flex;
  gap: 0.65rem;
}

.runeslab-actions button {
  flex: 1;
  border: 1px solid #7a6a7f;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  color: #f2e6cf;
  font-weight: 700;
  padding: 0.65rem;
}

@media (min-width: 920px) {
  .runehead {
    grid-template-columns: auto 1fr;
    padding-inline: 1.45rem;
  }

  .runeburger {
    display: none;
  }

  .runemenu {
    display: flex;
    grid-column: auto;
    flex-direction: row;
    justify-content: flex-end;
  }

  .runepolicy {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .runeextras {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}