:root {
  color-scheme: dark;
  --bg: #1b130f;
  --panel: #271b15;
  --line: #563c2b;
  --ink: #fff3e4;
  --text: #e4cdb8;
  --gold: #f4ad61;
  --muted: #d5ad8a;
  --wide: 1120px;
  font: 16px/1.6 system-ui,sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 3%,#372316 0,transparent 37rem),var(--bg);
}

img {
  max-width: 100%;
  height: auto;
}

button,input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .45;
}

button,a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,a:focus-visible,summary:focus-visible {
  outline: 3px solid #fbd19c;
  outline-offset: 3px;
}

h1,h2,h3,p,figure,dl,dd {
  margin: 0;
}

h1,h2 {
  font-family: Georgia,serif;
  line-height: 1.08;
  letter-spacing: -.045em;
}

h1 {
  font-size: clamp(2.25rem,6vw,4.55rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(1.9rem,4.4vw,3.25rem);
}

h3 {
  line-height: 1.25;
  font-size: 1.15rem;
}

html {
  scroll-padding-top: 1.2rem;
}

.wrap {
  width: min(var(--wide),calc(100% - 40px));
  margin-inline: auto;
}

.skip {
  position: fixed;
  z-index: 4;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  padding: .6rem 1rem;
  background: var(--gold);
  color: var(--bg);
  border-radius: 8px;
}

.skip:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: #241810df;
}

.header-row {
  min-height: 69px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  column-gap: 14px;
}

.header-row > .brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -.02em;
  min-height: 44px;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex: none;
}

.nav {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(5,5.9rem);
  gap: 6px;
  font-size: .79rem;
  font-weight: 670;
  color: var(--text);
}

.nav-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 3px;
  border: 1px solid #634631;
  border-radius: 9px;
  background: #322219;
  line-height: 1.15;
  text-align: center;
  transition: background-color .18s, border-color .18s, color .18s;
}

.nav-button svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: #efb477;
}

.nav-button:first-child,.nav-button[aria-current="page"] {
  border-color: #a3764a;
  background: #4b311f;
  color: #ffe7c5;
}

.nav-button:is(:hover,:focus-visible) {
  background: #563821;
  border-color: #b98554;
  color: #fff3e4;
}

.nav-button:active {
  background: #2b1d16;
}

.quiet-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.quiet-link:hover,.footer-links a:hover {
  color: var(--gold);
}

.install {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  white-space: nowrap;
}

.button,.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .52rem;
  border: 1px solid #8b6548;
  border-radius: 9px;
  color: var(--ink);
  background: #38251b;
  padding: .52rem .9rem;
  font-weight: 740;
  line-height: 1.2;
  transition: background-color .18s,color .18s,box-shadow .18s;
}

.button:hover,.icon-button:not(:disabled):hover {
  background: #573821;
}

.button.primary {
  color: #2c190e;
  background: #ffc375;
  border-color: #ffc375;
  padding-inline: 1.3rem;
  box-shadow: 0 7px 22px #1b110999;
}

.button.primary:hover {
  background: #ffda9c;
}

.quiet-link {
  color: var(--muted);
  font-weight: 650;
  font-size: .95rem;
  text-underline-offset: .2em;
}

.quiet-link:hover {
  text-decoration: underline;
}

.icon-button {
  width: 46px;
  padding: 0;
  font-size: 1.22rem;
}

.play-section {
  width: min(100%,calc((100svh - 200px)*16/9));
  margin-inline: auto;
  padding-top: 20px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 12px;
}

.game-title {
  padding-inline-start: .33em;
  border-inline-start: 3px solid #dd9853;
  color: #fff0d8;
  font-family: Bahnschrift,"Aptos Display","Trebuchet MS",system-ui,sans-serif;
  font-size: clamp(1.52rem,4.1vw,3.12rem);
  font-weight: 780;
  line-height: 1.03;
  letter-spacing: .015em;
  text-transform: uppercase;
}

.game-title span {
  color: #ffba72;
  text-shadow: 0 2px 0 #59371e;
}

.title-row .quiet-link {
  flex: none;
}

.stage {
  position: relative;
  aspect-ratio: 16/9;
  background: #100c0a;
  border: 1px solid #ad7846;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 18px 38px #0b06065c;
}

.stage:fullscreen {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.stage:fullscreen #game-slot {
  inset: auto;
  width: min(100vw,calc(100vh*16/9));
  height: min(100vh,calc(100vw*9/16));
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}

.cover,#game-slot {
  position: absolute;
  inset: 0;
}

.cover {
  z-index: 1;
  display: grid;
  place-items: center;
}

.cover[hidden] {
  display: none;
}

.cover img,.cover::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover::after {
  content: "";
  background: radial-gradient(ellipse,#17100c0d,#1b1009a8);
}

.cover-action {
  position: relative;
  z-index: 1;
  display: grid;
  gap: .55rem;
  justify-items: center;
  font-size: .86rem;
  font-weight: 740;
  color: #fff1db;
  text-shadow: 0 1px 5px #000;
}

.cover-action .button {
  text-shadow: none;
  min-height: 52px;
  font-size: 1.03rem;
}

.stage iframe,.video-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #100c0a;
}

.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-top: 9px;
  color: var(--muted);
  font-size: .88rem;
}

.game-buttons {
  display: grid;
  grid-template-columns: repeat(2,46px);
  gap: .4rem;
  flex: none;
}

.stage-bar p {
  flex: 1;
  line-height: 1.35;
}

.intro,.section,.legal {
  margin-block: clamp(48px,8vw,94px);
}

.intro {
  border-top: 1px solid var(--line);
  padding-top: clamp(28px,5vw,48px);
}

.section h2,.intro h2,.legal h1 {
  margin-bottom: 1.2rem;
}

.section-lede,.prose,.faq details p,.gallery p,.legal p {
  color: var(--text);
  text-align: justify;
  text-align-last: start;
  overflow-wrap: break-word;
}

.prose p+p,.legal p+p {
  margin-top: 1rem;
}

.prose h3 {
  color: var(--ink);
  margin: 2rem 0 .7rem;
}

.prose h3:first-child {
  margin-top: 0;
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(16px,4vw,50px);
  align-items: start;
}

.keys {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: .45rem 1rem;
}

.keys div {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: .75rem;
  min-height: 52px;
  padding: .5rem 0;
  font-size: .94rem;
}

.keys div+div {
  border-top: 1px solid var(--line);
}

.keys dt {
  font-weight: 730;
}

.keys dd {
  color: var(--text);
}

kbd {
  display: inline-block;
  border: 1px solid #98734f;
  background: #39271c;
  border-radius: 4px;
  padding: 0 .33em;
  font: 600 .84em/1.6 ui-monospace,monospace;
  color: #fff1de;
}

.gallery,.video-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: clamp(13px,2.8vw,24px);
}

.gallery figure,.video-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
}

.gallery figcaption {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: .55rem;
  padding: 1rem 1.2rem 1.25rem;
  flex: 1;
}

.gallery figure h3 {
  min-height: 1.5rem;
}

.image-button {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #140d09;
  cursor: zoom-in;
}

.image-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s;
}

.image-button:hover img {
  transform: scale(1.035);
}

.article {
  margin-top: clamp(30px,5vw,50px);
}

.section-lede {
  margin-bottom: 1.1rem;
}

.video-player {
  display: grid;
  place-items: center;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: radial-gradient(ellipse at 35% 20%,#493022,#170e0a);
}

.video-card .quiet-link {
  margin: .4rem 1rem .5rem;
  align-self: start;
}

.faq details {
  border-top: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  min-height: 52px;
  cursor: pointer;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-weight: 730;
  list-style: none;
  padding: .55rem 0;
}

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

.faq summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--gold);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding: 0 0 1rem;
}

.legal {
  min-height: 34vh;
}

.legal h2 {
  font-size: 1.55rem;
  margin: 1.8rem 0 .7rem;
  letter-spacing: -.025em;
}

.legal a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer {
  background: #130d0a;
  border-top: 1px solid var(--line);
  padding: 42px 0 0;
  color: var(--text);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(210px,1fr) minmax(0,2.2fr);
  gap: clamp(34px,5vw,68px);
}

.footer-brand p {
  margin-top: .65rem;
  color: var(--muted);
  text-align: justify;
  text-align-last: start;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 28px;
}

.footer-links h2 {
  font: 800 .9rem/1.5 system-ui,sans-serif;
  letter-spacing: .015em;
  min-height: 40px;
  color: var(--ink);
}

.footer-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: .96rem;
  line-height: 1.5;
}

.copyright {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 14px 0 18px;
  font-size: .87rem;
}

dialog {
  max-width: min(775px,calc(100% - 28px));
  max-height: calc(100% - 28px);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 1.1rem;
  background: var(--panel);
  color: var(--ink);
}

dialog::backdrop {
  background: #100904dc;
}

dialog img {
  max-height: 75vh;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

dialog .dialog-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .7rem;
}

dialog h2 {
  margin: 0 0 .9rem;
}

dialog p {
  color: var(--text);
  text-align: justify;
  text-align-last: start;
}

@media(max-width:900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .play-section {
    width: 100%;
  }
  .footer-links h2 {
    min-height: 31px;
  }
}

@media(max-width:920px) {
  .header-row {
    grid-template-columns: minmax(0,1fr) auto;
    row-gap: 5px;
    padding-block: 5px 8px;
  }
  .install {
    grid-column: 2;
  }
  .nav {
    grid-column: 1/-1;
    grid-row: 2;
    grid-template-columns: repeat(5,minmax(0,1fr));
    width: min(100%,30rem);
    justify-self: center;
  }
}

@media(max-width:650px) {
  .wrap {
    width: calc(100% - 26px);
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .title-row {
    gap: .7rem;
  }
  .title-row .quiet-link {
    font-size: .81rem;
  }
  .controls-grid {
    grid-template-columns: 1fr;
  }
  .play-section {
    padding-top: 14px;
  }
  .gallery,.video-grid {
    grid-template-columns: 1fr;
  }
  .footer-links {
    gap: 12px;
  }
  .stage {
    border-radius: 10px;
  }
}

@media(max-width:520px) {
  .footer-links {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media(max-width:490px) {
  .nav-button {
    flex-direction: column;
    gap: 3px;
    min-height: 48px;
    font-size: .75rem;
  }
}

@media(max-width:420px) {
  .header-row > .brand {
    font-size: .86rem;
  }
  .install {
    padding-inline: .55rem;
    font-size: .8rem;
  }
  .title-row .quiet-link {
    font-size: .75rem;
  }
  .cover-action .button {
    min-height: 44px;
  }
  .gallery figcaption {
    padding-inline: .9rem;
  }
}

[hidden] {
  display: none!important;
}

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

.guide-intro {
  padding-top: clamp(2rem,5vw,4rem);
}

.guide-intro p,.guide-entry p,.guide-figure figcaption,.checklist-progress p,.mobile-play-note p {
  color: var(--muted);
  text-align: justify;
  text-align-last: start;
  overflow-wrap: break-word;
}

.guide-intro p {
  margin-top: 1rem;
}

.guide-jumps {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .6rem;
  margin-top: 1.2rem;
}

.guide-topic {
  justify-content: flex-start;
  align-items: flex-start;
  min-height: 72px;
  padding: .75rem .7rem;
  text-align: left;
}

.guide-topic strong,.guide-topic small {
  display: block;
}

.guide-topic small {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.35;
}

.depth-rule {
  margin-block: clamp(1.8rem,4vw,3.6rem);
}

.search-pattern {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.search-pattern ol {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.search-pattern li {
  padding: 1rem;
  border-top: 4px solid #e1b382;
  background: #32251c;
}

.search-pattern li:nth-child(2) {
  border-color: #bc874f;
  background: #2e2017;
}

.search-pattern li:nth-child(3) {
  border-color: #9e5e35;
  background: #281a13;
}

.search-pattern li + li {
  border-left: 1px solid var(--line);
}

.search-pattern strong,.search-pattern span,.find-method strong {
  display: block;
}

.search-pattern span,.find-method strong {
  margin-bottom: .35rem;
  color: #f4be83;
  font-size: .87rem;
}

.search-pattern p,.search-pattern figcaption,.find-method p {
  color: var(--text);
  text-align: justify;
  text-align-last: start;
  overflow-wrap: break-word;
}

.search-pattern figcaption {
  padding: .65rem 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .86rem;
}

.guide-entry,.checklist-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.4rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.guide-entry {
  margin-bottom: 1.25rem;
}

.guide-entry h3,.checklist-progress strong {
  display: block;
  margin-bottom: .3rem;
}

.guide-entry a {
  flex: none;
}

.guide-split {
  display: grid;
  grid-template-columns: minmax(0,1.07fr) minmax(0,.93fr);
  align-items: start;
  gap: clamp(1.1rem,4vw,2.8rem);
}

.guide-steps {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-left: 1.35rem;
}

.guide-steps li::marker {
  color: var(--gold);
  font-weight: 750;
}

.guide-figure {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.guide-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.guide-figure figcaption {
  padding: .75rem 1rem;
}

.checklist-progress {
  margin-bottom: 1rem;
}

.checklist-progress progress {
  width: min(30%,12rem);
  accent-color: var(--gold);
}

.find-list {
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#find-checklist {
  --find-columns: minmax(0,1.12fr) minmax(0,2.28fr) 96px;
}

.find-row,.find-list-header {
  display: grid;
  grid-template-columns: var(--find-columns);
  align-items: center;
  gap: .8rem 1rem;
  padding-inline: .85rem;
}

.find-list-header {
  padding-block: .25rem .55rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.find-list-header span:last-child {
  text-align: right;
}

.find-row {
  min-height: 72px;
  padding-block: .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.find-row h3 {
  font-size: 1rem;
  overflow-wrap: break-word;
}

.find-identity {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: .65rem;
}

.find-art {
  display: block;
  width: clamp(44px,8vw,56px);
  height: auto;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #38271a;
}

.find-method p {
  font-size: .93rem;
}

.find-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .7rem;
  color: var(--muted);
  font-size: .85rem;
}

.find-rarity {
  color: #e3ceb8;
}

.find-rarity[data-rarity="uncommon"] {
  color: #b7dba8;
}

.find-rarity[data-rarity="rare"] {
  color: #abd4ff;
}

.find-rarity[data-rarity="legendary"] {
  color: #ffca81;
}

.find-marks {
  display: flex;
  justify-content: flex-end;
  gap: .3rem;
}

.find-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  min-width: 44px;
  min-height: 44px;
  padding: .35rem .5rem;
  border: 1px solid #775038;
  border-radius: 7px;
  color: var(--text);
  background: #342419;
  font-size: .81rem;
  cursor: pointer;
}

.find-mark input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--gold);
}

.find-mark:has(input:checked) {
  border-color: var(--gold);
  color: var(--ink);
}

.find-mark:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.guide-split a.button {
  margin-top: 1rem;
}

.mobile-play-note {
  display: none;
}

@media(max-width:680px) {
  .guide-jumps {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .guide-entry {
    align-items: start;
    flex-direction: column;
  }
  .guide-split,.search-pattern ol {
    grid-template-columns: 1fr;
  }
  .search-pattern li + li {
    border-left: 0;
  }
  .find-list-header {
    display: none;
  }
  .find-row {
    grid-template-columns: minmax(0,1fr) auto;
  }
  .find-method {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: .55rem;
    border-top: 1px solid var(--line);
  }
  .find-marks {
    grid-column: 2;
    grid-row: 1;
  }
}

@media(max-width:450px) {
  .checklist-progress {
    align-items: stretch;
    flex-direction: column;
  }
  .checklist-progress progress {
    width: 100%;
  }
}

@media(pointer:coarse),(max-width:650px) {
  .mobile-play-note {
    display: block;
    margin-top: .7rem;
    padding: .6rem .8rem 0;
    border-left: 2px solid #ad7846;
    background: var(--panel);
  }
}
