:root {
  --background: #171714;
  --surface: #1e1e19;
  --paper: #eae0c4;
  --ink: #eae0c4;
  --gold: #d7b571;
  --muted: #a39d88;
  --line: #39372c;
  --clay: #d8a257;
  --serif: Georgia, 'Times New Roman', serif;
  --mono: Consolas, 'Courier New', monospace;
  --sans: 'Segoe UI', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 35px; }
body { margin: 0; color: var(--paper); background: var(--background); font: 14px/1.8 var(--sans); -webkit-font-smoothing: antialiased; }
body::before { content: ''; position: fixed; inset: 0; background: url('../images/grain.svg'); opacity: .08; pointer-events: none; z-index: 5; }
::selection { background: var(--gold); color: var(--background); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
img, svg { display: block; max-width: 100%; }
p, h1, h2, h3, figure { margin: 0; }
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -100px; left: 20px; padding: 10px 15px; color: var(--background); background: var(--paper); z-index: 10; }
.skip-link:focus { top: 12px; }
.game-shell { width: min(88%, 1240px); margin-inline: auto; }
.game-header { height: 96px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 25px; }
.game-brand { display: flex; align-items: center; gap: 13px; font: 700 12px/1.4 var(--mono); letter-spacing: 1.2px; }
.game-brand small { display: block; color: var(--muted); font: 8px/1.6 var(--mono); letter-spacing: 1.8px; margin-top: 4px; }
.game-header nav { display: flex; align-items: center; gap: 34px; font-size: 11px; color: #beb7a0; }
.game-header nav a { transition: color .2s; }
.game-header nav a:hover { color: var(--gold); }
.game-header nav a span { margin-left: 8px; }
.game-eyebrow { font: 9px/1.7 var(--mono); letter-spacing: 1.7px; color: var(--muted); }
.game-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8%; padding-block: 72px 86px; align-items: center; }
.game-intro > .game-eyebrow { display: flex; align-items: center; gap: 10px; color: #b6a782; }
.game-eyebrow > span { width: 5px; height: 5px; background: var(--gold); box-shadow: 0 0 9px #d7b57166; }
.game-hero h1 { font: 700 clamp(65px, 7.8vw, 113px)/.92 var(--serif); letter-spacing: -.06em; margin-block: 28px 20px; white-space: nowrap; }
.game-hero h1 > span { display: inline-block; color: var(--gold); }
.title-period { color: #b97b43; }
.game-tagline { font: italic 24px/1.3 var(--serif); color: #d8cfb7; }
.game-description { margin-top: 25px; color: var(--muted); font-size: 13px; line-height: 1.95; }
.hero-actions { display: flex; gap: 25px; align-items: center; margin-top: 31px; }
.game-button { display: inline-flex; gap: 36px; align-items: center; padding: 15px 23px; background: var(--gold); color: #251f14; font: 600 11px var(--mono); clip-path: polygon(7px 0,100% 0,100% calc(100% - 7px),calc(100% - 7px) 100%,0 100%,0 7px); transition: background .25s, transform .25s; white-space: nowrap; }
.game-button > span { font: 20px var(--sans); }
.game-button:hover { background: #e6c889; transform: translateY(-2px); }
.game-platform { font: 10px/1.8 var(--mono); color: #cdc2a3; }
.game-platform > span { font: 8px var(--mono); color: #88826e; }
.game-art { position: relative; padding: 11px; border: 1px solid #4b3c29; background: #201d17; isolation: isolate; }
.game-key-art { width: 100%; height: auto; image-rendering: pixelated; }
.art-corners::before, .art-corners::after { content: ''; position: absolute; width: 15px; height: 15px; border-color: var(--gold); border-style: solid; z-index: 2; }
.art-corners::before { left: -1px; top: -1px; border-width: 2px 0 0 2px; }
.art-corners::after { right: -1px; bottom: -1px; border-width: 0 2px 2px 0; }
.firelight { position: absolute; inset: 11px 11px 37px; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse at 29% 24%, #e99a3338, transparent 20%), radial-gradient(ellipse at 67% 22%, #ffb13d33, transparent 17%); animation: fire-breathe 2.3s ease-in-out infinite alternate; }
.game-art figcaption { display: flex; justify-content: space-between; gap: 15px; padding-top: 13px; font: 7px var(--mono); letter-spacing: .8px; color: #a49370; }
.game-art figcaption span:last-child { color: #7a6c52; white-space: nowrap; }
.game-rules { border-top: 1px solid var(--line); padding-block: 48px 0; }
.rules-heading { display: flex; justify-content: space-between; align-items: start; gap: 30px; }
.rules-heading > .game-eyebrow { margin-top: 6px; font-size: 8px; max-width: 190px; line-height: 1.9; }
.rules-heading h2 { font: 400 30px/1.3 var(--serif); letter-spacing: -.6px; width: 58%; }
.rules-heading h2 em { color: #bdab7f; }
.rules-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; padding-block: 42px; }
.rule-number { color: #9e8657; font: 8px var(--mono); letter-spacing: 1px; }
.rules-grid h3 { font: 400 23px var(--serif); letter-spacing: -.4px; margin-block: 15px 13px; }
.rules-grid p { color: var(--muted); font-size: 12px; line-height: 1.9; max-width: 310px; }
.chess-sprite { --piece-size: 32px; --piece-index: 0; display: block; flex: 0 0 auto; width: var(--piece-size); height: var(--piece-size); background: url('../images/thelastpiece/pieces.png') calc(var(--piece-index) * var(--piece-size) * -1) 0 / calc(var(--piece-size) * 6) calc(var(--piece-size) * 2) no-repeat; image-rendering: pixelated; }
.sprite-pawn { --piece-index: 5; }
.sprite-knight { --piece-index: 4; }
.sprite-bishop { --piece-index: 3; }
.sprite-rook { --piece-index: 2; }
.sprite-queen { --piece-index: 1; }
.piece-line { display: flex; gap: 22px; align-items: center; padding-block: 30px; border-block: 1px solid var(--line); }
.piece-line .chess-sprite { --piece-size: 48px; opacity: .85; transition: transform .25s; }
.piece-line .chess-sprite:hover { transform: translateY(-5px); }
.piece-line-caption { margin-left: auto; color: #948c75; font: italic 17px/1.5 var(--serif); text-align: right; }
.game-bottom { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 48px; border-bottom: 1px solid var(--line); }
.game-bottom h2 { font: 400 38px var(--serif); letter-spacing: -1px; margin-top: 11px; }
.download-note { font-size: 11px; line-height: 1.8; color: var(--muted); }
.download-note a { display: inline-block; color: #c4b183; border-bottom: 1px solid #62553b; padding-block: 5px; margin-top: 5px; }
.download-note a span { margin-left: 15px; }
.game-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 100px; font: 9px var(--mono); color: #8e8773; }
.game-footer > a { font: 600 15px var(--sans); letter-spacing: -.5px; color: #c3b596; }
.game-footer > a span { font-weight: 400; color: #8e8773; }
.game-footer .torch-toggle { font: 9px var(--mono); }
.torch-glow { opacity: .25; }
@keyframes fire-breathe { 0% { opacity: .45; } 20% { opacity: .7; } 40% { opacity: .5; } 70% { opacity: .9; } 100% { opacity: .6; } }
@media (max-width: 1050px) and (min-width: 761px) {
  .game-hero { gap: 5%; }
  .game-hero h1 { font-size: 7.5vw; }
  .game-description { font-size: 12px; }
  .wide-only { display: none; }
  .hero-actions { gap: 18px; }
  .game-button { padding: 13px 18px; gap: 24px; font-size: 10px; }
  .game-platform { font-size: 9px; }
  .game-platform > span { font-size: 7px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 25px; }
  .game-header { height: 83px; gap: 15px; }
  .game-brand { gap: 8px; font-size: 10px; letter-spacing: .5px; }
  .game-brand small { font-size: 7px; }
  .game-header nav { gap: 16px; font-size: 10px; }
  .game-header nav > a:first-child { display: none; }
  .game-header nav a span { margin-left: 3px; }
  .game-hero { grid-template-columns: 1fr; gap: 43px; padding-block: 37px 45px; }
  .game-intro > .game-eyebrow { font-size: 8px; letter-spacing: 1px; }
  .game-hero h1 { font-size: clamp(54px, 16vw, 95px); letter-spacing: -.065em; margin-block: 25px 18px; }
  .game-tagline { font-size: 23px; }
  .game-description { font-size: 12px; margin-top: 21px; }
  .wide-only { display: none; }
  .hero-actions { margin-top: 27px; gap: 20px; }
  .game-button { padding: 13px 18px; gap: 23px; font-size: 10px; }
  .game-platform { font-size: 9px; }
  .game-platform > span { display: block; font-size: 7px; max-width: 100px; }
  .game-art { padding: 9px; }
  .game-art figcaption { font-size: 6px; letter-spacing: .5px; padding-top: 11px; }
  .game-rules { padding-top: 33px; }
  .rules-heading { display: block; }
  .rules-heading > .game-eyebrow { max-width: none; font-size: 7px; }
  .rules-heading h2 { width: 100%; font-size: 28px; margin-top: 19px; }
  .rules-grid { grid-template-columns: 1fr; gap: 26px; padding-block: 32px; }
  .rules-grid article + article { border-top: 1px solid #333126; padding-top: 25px; }
  .rules-grid h3 { font-size: 24px; margin-block: 12px 10px; }
  .rules-grid p { max-width: none; font-size: 12px; }
  .piece-line { gap: 17px; flex-wrap: wrap; padding-block: 25px; }
  .piece-line .chess-sprite { --piece-size: 40px; }
  .piece-line-caption { width: 100%; margin-top: 8px; text-align: left; font-size: 17px; }
  .game-bottom { flex-direction: column; align-items: start; padding-block: 35px; gap: 25px; }
  .game-bottom h2 { font-size: 35px; }
  .game-bottom .game-eyebrow { font-size: 8px; }
  .game-footer { flex-wrap: wrap; justify-content: start; padding-block: 26px; gap: 16px 25px; }
  .game-footer > span { font-size: 8px; }
  .game-footer .torch-toggle { font-size: 8px; }
}
@media (max-width: 360px) {
  .game-brand { font-size: 9px; }
  .game-brand small { font-size: 6px; }
  .game-hero h1 { font-size: 54px; }
  .game-tagline { font-size: 21px; }
  .hero-actions { gap: 15px; }
  .game-button { padding-inline: 15px; gap: 18px; font-size: 9px; }
  .game-platform { font-size: 8px; }
  .piece-line { gap: 15px; }
  .piece-line .chess-sprite { --piece-size: 36px; }
  .game-art figcaption { letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
