:root {
  color-scheme: dark;
  --ink: #27251e;
  --stone: #30342e;
  --stone-edge: #7b7e71;
  --parchment: #e9d7ab;
  --parchment-shadow: #b9a477;
  --gold: #e8ba47;
  --gold-deep: #9b671e;
  --lime: #b9e000;
  --lime-deep: #719b00;
  background: #1c201b;
  color: #f6edca;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid #e8d361; outline-offset: 4px; }
.skip-link { position: absolute; z-index: 20; top: -80px; left: 16px; padding: 12px 16px; background: var(--parchment); color: var(--ink); }
.skip-link:focus { top: 12px; }

.topbar {
  position: relative;
  z-index: 5;
  border-bottom: 4px ridge #93825d;
  background:
    linear-gradient(180deg, #4d5048 0, #282d28 12%, #20231f 58%, #141916 100%);
  box-shadow: 0 5px 16px #080d0bc9, inset 0 1px #c4c4a477;
}
.topbar-inner { max-width: 1280px; min-height: 88px; margin: auto; padding: 12px 32px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; color: #f5d678; font-family: "Arial Narrow", "Trebuchet MS", sans-serif; font-size: 30px; font-weight: 900; letter-spacing: .075em; line-height: .9; text-shadow: 0 3px 2px #10110d, 0 0 12px #efd97c4d; }
.brand small { display: block; margin-top: 9px; color: #d5c9a3; font-family: "Trebuchet MS", sans-serif; font-size: 9px; font-weight: 700; letter-spacing: .29em; white-space: nowrap; text-shadow: none; }
.brand-gem { width: 49px; height: 49px; flex: none; display: grid; place-items: center; transform: rotate(45deg); border: 3px ridge #d8b76a; border-radius: 10px; background: radial-gradient(circle at 30% 25%, #daec85, #4b7a2b 55%, #193d2c 90%); box-shadow: inset 0 2px 4px #e3ff9f, 0 2px 5px #000b; color: #f2fdb5; font-size: 29px; }
.brand-gem::first-letter { transform: rotate(-45deg); }
.topbar nav { display: flex; flex-wrap: wrap; gap: 7px; }
.topbar nav a { padding: 12px 20px; border: 1px solid #77765d; border-radius: 5px; background: linear-gradient(#41483e, #232821); box-shadow: inset 0 1px #a5aa8b5e, 0 2px 3px #0b0e0a; color: #e7dfbe; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.topbar nav a:hover { border-color: #d8ba63; color: #f9d76b; background: linear-gradient(#4b5347, #30382c); }

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #17323b url("/assets/login_background.jpg") center 42% / cover no-repeat;
  isolation: isolate;
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #092021cf 0%, #0b212aa8 43%, #0a17175e 100%), linear-gradient(0deg, #161c19 0%, transparent 30%); }
.hero::after { content: ""; position: absolute; inset: 13px; z-index: -1; border: 1px solid #ead58a2b; pointer-events: none; }
.hero-inner { width: min(1280px, 100%); margin: auto; padding: 70px 32px 85px; display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-plaque {
  position: relative;
  max-width: 660px;
  padding: clamp(30px, 4vw, 58px);
  border: 7px ridge #787e70;
  border-radius: 11px;
  background:
    radial-gradient(circle at 70% 0, #43504499, transparent 45%),
    linear-gradient(135deg, #30372fe8, #171d19f2 70%);
  box-shadow: 0 20px 45px #050c0bc9, inset 0 0 0 2px #151a17, inset 0 2px 8px #d7ddbe3d;
}
.hero-plaque::before, .hero-plaque::after { content: "◆"; position: absolute; top: 8px; color: #bcbfa8; font-size: 12px; text-shadow: 0 1px #111; }
.hero-plaque::before { left: 12px; }
.hero-plaque::after { right: 12px; }
.chapter { margin: 0 0 21px; color: #e8bc4c; font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.chapter span { padding: 0 8px; color: #98af5b; font-size: 10px; }
.hero h1 { margin: 0; max-width: 570px; font-family: "Arial Narrow", "Trebuchet MS", sans-serif; font-size: clamp(47px, 5vw, 65px); font-weight: 900; line-height: 1.03; letter-spacing: -.04em; text-shadow: 0 4px 5px #030704; }
.hero h1 span { display: block; color: #f3cb64; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 3px 2px #4d2d10, 0 0 17px #e9aa3e42; }
.hero-copy { max-width: 500px; margin: 25px 0 29px; color: #efe7d1; font-size: 18px; line-height: 1.55; }
.game-button {
  display: inline-flex;
  min-height: 53px;
  align-items: center;
  justify-content: center;
  gap: 27px;
  padding: 0 10px 0 23px;
  border: 4px ridge #a9b164;
  border-radius: 6px;
  background: linear-gradient(#d5f600 0%, #b4db00 48%, #8dbc00 52%, #82a900 100%);
  box-shadow: inset 0 2px #f1ff8a, inset 0 -2px #5d7f08, 0 5px 0 #324619, 0 9px 15px #000a;
  color: #24300a;
  font-family: "Arial Narrow", "Trebuchet MS", sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .055em;
  text-shadow: 0 1px #ebff79;
}
.game-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.button-arrow { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #779a13; border-radius: 4px; background: #719a1d62; font-size: 30px; line-height: 1; }
.hero-seal { width: clamp(155px, 19vw, 245px); height: clamp(155px, 19vw, 245px); flex: none; display: grid; place-items: center; border: 9px double #d5b66c; border-radius: 50%; background: radial-gradient(circle, #98bb4780 0, #435b364f 42%, #171d1bbf 68%); box-shadow: 0 0 0 9px #17251ba8, 0 0 0 12px #e3cd8061, 0 0 50px #e6d1865c, inset 0 0 22px #e8d38b81; }
.hero-seal span { font-size: clamp(70px, 10vw, 130px); color: #e5c564; text-shadow: 0 3px #805c20, 0 0 22px #f2e292; }
.hero-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 20px; border-top: 3px ridge #9f916f; background: linear-gradient(#454a3c, #20271f); text-align: center; color: #d5bd65; line-height: 15px; }

.world-section { padding: 76px 32px 97px; background: radial-gradient(circle at 50% 0, #3c483c 0, #272d27 46%, #1a211c 100%); border-bottom: 6px ridge #6d705f; }
.section-head { margin: 0 auto 38px; text-align: center; }
.section-ornament { display: inline-grid; place-items: center; width: 43px; height: 43px; border: 3px ridge #c6a95c; border-radius: 50%; background: #31432d; color: #e9d27f; font-size: 24px; box-shadow: 0 4px 10px #0007; }
.section-head p { margin: 13px 0 5px; color: #d5c06c; font-size: 11px; font-weight: 900; letter-spacing: .22em; }
.section-head h2 { margin: 0; color: #f4e9c8; font-family: "Arial Narrow", "Trebuchet MS", sans-serif; font-size: clamp(34px, 4vw, 50px); line-height: 1.1; text-shadow: 0 3px #111; }
.feature-grid { max-width: 1160px; margin: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.feature-card {
  position: relative;
  min-height: 270px;
  padding: 30px 27px 35px;
  border: 7px ridge #807c67;
  border-radius: 8px;
  background: repeating-linear-gradient(145deg, #f0dfb7 0, #e9d7ab 4px, #e5d2a4 8px);
  box-shadow: 0 13px 22px #060b088c, inset 0 0 0 2px #ba9e68, inset 0 0 30px #a5814559;
  color: #3b3327;
}
.feature-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid #b59b6c; border-radius: 2px; pointer-events: none; }
.card-number { position: absolute; top: 14px; right: 17px; color: #9d885e; font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.card-icon { display: inline-grid; place-items: center; width: 62px; height: 62px; border: 4px ridge #a3915c; border-radius: 10px; background: radial-gradient(circle at 33% 25%, #65764a, #303b32 65%, #1d2923); box-shadow: inset 0 1px #f9e4a2, 0 4px 6px #624e2b70; color: #f2d574; font-size: 31px; line-height: 1; }
.feature-card h3 { position: relative; margin: 23px 0 10px; font-family: "Arial Narrow", "Trebuchet MS", sans-serif; font-size: 25px; font-weight: 900; line-height: 1.1; }
.feature-card p { position: relative; margin: 0; color: #524633; font-size: 15px; line-height: 1.55; }

.join-section { padding: 85px 32px 105px; background: linear-gradient(#1b221bdf, #101811e8), url("/assets/login_background.jpg") center 65% / cover no-repeat; }
.join-panel { max-width: 890px; margin: auto; border: 8px ridge #76796c; border-radius: 10px; background: #2a302a; box-shadow: 0 18px 40px #020802b8, inset 0 0 0 2px #151c16; }
.panel-heading { min-height: 70px; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 13px 20px; border-bottom: 5px ridge #847657; background: linear-gradient(#4b5043, #2a3029 60%, #20271f); color: #e9c65f; }
.panel-heading h2 { margin: 0; font-family: "Arial Narrow", "Trebuchet MS", sans-serif; font-size: clamp(25px, 3vw, 35px); font-weight: 900; line-height: 1.05; text-align: center; text-shadow: 0 3px 2px #101510; }
.panel-heading span { color: #b1c274; }
.join-content { margin: 16px; padding: clamp(25px, 4vw, 45px); border: 3px solid #a28a5b; background: repeating-linear-gradient(140deg, #f0dfbb 0, #ead9b0 7px, #e4d1a3 14px); box-shadow: inset 0 0 30px #b3965f75; color: #342f25; }
.join-intro { margin: 0 0 28px; font-size: 17px; font-weight: 700; line-height: 1.5; }
.join-steps { margin: 0; padding: 0; list-style: none; }
.join-steps li { display: flex; align-items: flex-start; gap: 19px; padding: 18px 0; border-top: 1px solid #a58d6091; }
.step-number { width: 37px; height: 37px; flex: none; display: grid; place-items: center; border: 3px ridge #6e7e35; border-radius: 7px; background: linear-gradient(#bbd64f, #7e9d25); box-shadow: 0 2px 3px #6e5b34; color: #25310d; font-size: 18px; font-weight: 900; }
.join-steps strong { display: block; margin-top: 1px; font-size: 17px; }
.join-steps small { display: block; margin-top: 4px; color: #5e503b; font-size: 14px; line-height: 1.45; }
.join-note { margin: 23px 0 0; padding: 12px 15px; border: 1px solid #a89161; border-radius: 4px; background: #d7c18c9c; color: #4e422d; font-size: 13px; line-height: 1.45; }
.join-note span { margin-right: 7px; color: #71872e; }

footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 25px; padding: 25px max(32px, calc((100vw - 1216px) / 2)); border-top: 4px ridge #777563; background: linear-gradient(#30382e, #191f19); color: #d2c9a8; font-size: 12px; }
.footer-brand { color: #e8c561; font-weight: 900; letter-spacing: .09em; }

@media (max-width: 880px) {
  .hero { min-height: 560px; }
  .hero-seal { display: none; }
  .feature-grid { grid-template-columns: 1fr; max-width: 550px; }
  .feature-card { min-height: 0; }
}
@media (max-width: 580px) {
  .topbar-inner { min-height: 0; padding: 14px 18px; flex-wrap: wrap; gap: 18px; }
  .brand { font-size: 24px; }
  .brand-gem { width: 39px; height: 39px; font-size: 22px; }
  .topbar nav { width: 100%; }
  .topbar nav a { flex: 1; padding: 10px 8px; text-align: center; font-size: 11px; }
  .hero { min-height: 610px; background-position: 52% center; }
  .hero-inner { padding: 45px 16px 60px; }
  .hero-plaque { padding: 26px 19px; border-width: 5px; }
  .hero h1 { font-size: clamp(43px, 12vw, 62px); }
  .hero-copy { font-size: 16px; }
  .chapter { font-size: 10px; }
  .chapter span { padding: 0 3px; }
  .world-section, .join-section { padding-left: 16px; padding-right: 16px; }
  .join-content { margin: 9px; padding: 25px 18px; }
  .panel-heading { gap: 11px; }
  .panel-heading h2 { font-size: 25px; }
  footer { padding: 23px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game-button:hover { transform: none; }
}
