:root {
  color-scheme: dark;
  font-family: Georgia, "Times New Roman", serif;
  background: #0b0e16;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: radial-gradient(circle at 50% 20%, #263249 0%, #0b0e16 58%, #05060a 100%); }
body { display: grid; place-items: center; }
#game-shell { position: relative; width: min(100vw, 1600px); aspect-ratio: 16 / 9; max-height: 100vh; box-shadow: 0 0 70px #000; background: #000; overflow: hidden; }
canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: crosshair; }
.overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: radial-gradient(circle at center, rgba(27,41,53,.55), rgba(3,4,8,.92)); backdrop-filter: blur(4px); }
.overlay.shown { display: flex; }
.title-card { width: min(610px, calc(100% - 32px)); padding: clamp(28px, 5vw, 48px) clamp(20px, 6vw, 56px) clamp(26px, 4vw, 42px); text-align: center; border: 2px solid #c99a49; border-radius: 18px; color: #f8e6bb; background: linear-gradient(145deg, rgba(43,32,34,.98), rgba(16,22,29,.98)); box-shadow: inset 0 0 0 6px #160f0e, inset 0 0 0 8px rgba(235,191,104,.25), 0 18px 80px #000; }
.crest { margin: auto auto 8px; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 3px double #e4b95f; color: #ffd97d; font-size: 40px; background: radial-gradient(circle, #833f2c, #281c25 67%); box-shadow: 0 0 22px rgba(247,176,80,.25); }
h1 { margin: 5px 0 0; letter-spacing: .1em; font-size: clamp(32px, 4.2vw, 60px); line-height: .95; white-space: nowrap; text-shadow: 0 4px #5b291e, 0 0 22px rgba(250,180,64,.25); }
h2 { margin: 8px 0 22px; color: #d38a55; letter-spacing: .24em; font-size: clamp(14px, 1.5vw, 18px); }
p { color: #c6bdad; font-style: italic; }
label { display: grid; gap: 8px; margin: 26px auto 20px; text-align: left; color: #d9c89f; font-size: 14px; letter-spacing: .08em; }
input { width: 100%; padding: 13px 14px; border: 1px solid #9d7542; border-radius: 7px; color: #ffeab6; background: #0f131a; font: inherit; letter-spacing: .08em; outline: none; }
input:focus { box-shadow: 0 0 0 3px rgba(218,168,87,.2); }
.button-row { display: flex; gap: 14px; }
button { flex: 1; border: 1px solid #d8a95a; border-radius: 8px; padding: 13px 18px; color: #fff1c7; background: linear-gradient(#78412c, #42251f); font: 700 15px Georgia, serif; letter-spacing: .06em; cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.15), 0 5px 18px rgba(0,0,0,.45); }
button:hover { filter: brightness(1.15); transform: translateY(-1px); }
.controls-note { margin-top: 22px; color: #8f9aa6; font: 12px/1.45 system-ui, sans-serif; }
#toast { position: absolute; left: 50%; bottom: 100px; translate: -50% 20px; opacity: 0; padding: 10px 16px; border: 1px solid #cda55e; border-radius: 8px; color: #fff0c8; background: rgba(25,18,20,.92); font: 14px system-ui, sans-serif; pointer-events: none; transition: .25s; }
#toast.show { opacity: 1; translate: -50% 0; }
@media (max-width: 620px) {
  .title-card { border-radius: 14px; }
  .crest { width: 58px; height: 58px; font-size: 32px; }
  h1 { font-size: clamp(28px, 8vw, 44px); letter-spacing: .08em; }
  .button-row { flex-direction: column; gap: 10px; }
  label { margin-top: 20px; }
}
