/* M96: the site (index.html #disc): what the page shows before a disc is imported, and with `?site` after. One
   scrolling page in the game's menu style (grid-paper wall, gold bar, white panels with thick dark outlines, outlined
   white headings, pill buttons), drawn in CSS only: the game's own menu art is rebuilt from the player's disc and
   isn't here. Every block wraps to one column on a narrow screen. */
#disc {
  --ink: #1b1d22; --gold: #f5b81c; --gold-hi: #ffd84a; --green: #2fae4a; --green-hi: #7be06a; --sky: #5fb9e6;
  --paper: #f6f3ea; --line: #d9e4ec; --muted: #4c5260;
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; color: var(--ink);
  font: 500 16px/1.5 "M PLUS Rounded 1c", ui-rounded, "Arial Rounded MT Bold", "Varela Round", Nunito, system-ui, sans-serif;
  background: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
#disc[hidden], #disc [hidden] { display: none !important; }
/* M107: a visit going straight into the game (index.html head) */
html[data-game] #disc { display: none !important; }
/* the page scrolls and its text can be selected and copied, unlike the game's canvas (the `*` rules above) */
#disc, #disc *, #disc *::before, #disc *::after { touch-action: manipulation; user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
#disc button, #disc .pill { user-select: none; -webkit-user-select: none; }
#disc a { color: inherit; }
#disc h2, #disc h3 { margin: 0; line-height: 1.15; font-weight: 800; }
#disc p { margin: .5em 0; }
#disc .wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(12px, 4vw, 32px); }
#disc section { padding: clamp(28px, 6vw, 56px) 0 0; }

/* Discord bar */
#disc .discord { background: #5865f2; color: #fff; border-bottom: 4px solid var(--ink); padding-top: env(safe-area-inset-top, 0px); }
#disc .discord .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4em 1em; padding-block: .55em; text-align: center; }
#disc .discord b { font-weight: 800; }

/* the logo band: the badge on the left, the title beside it, over a darkened court */
#disc .band { position: relative; color: #fff; border-bottom: 6px solid var(--gold); background: #17311f; overflow: hidden; }
/* the band fades through the celebration close-ups (docs/screenshots/celebrate-*.jpg), 6 s each */
/* darkened by an overlay, not a filter: a filter over the fading slides left a stale, stretched layer after a resize */
#disc .band .slides { position: absolute; inset: 0; }
#disc .band .build { position: absolute; right: .7em; bottom: .45em; z-index: 1; font-size: 11px; color: #ffffffa8; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
#disc .band .slides::after { content: ''; position: absolute; inset: 0; background: #00000094; }
#disc .band .slides i { position: absolute; inset: 0; background: center 30% / cover no-repeat; opacity: 0; animation: band-fade 30s infinite; }
#disc .band .slides i:nth-child(1) { background-image: url(shots/celebrate-carol.jpg); }
#disc .band .slides i:nth-child(2) { background-image: url(shots/celebrate-anya.jpg); animation-delay: 6s; }
#disc .band .slides i:nth-child(3) { background-image: url(shots/celebrate-sophie.jpg); animation-delay: 12s; }
#disc .band .slides i:nth-child(4) { background-image: url(shots/celebrate-will.jpg); animation-delay: 18s; }
#disc .band .slides i:nth-child(5) { background-image: url(shots/celebrate-cody.jpg); animation-delay: 24s; }
@keyframes band-fade { 0% { opacity: 0; } 4%, 20% { opacity: 1; } 24%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #disc .band .slides i { animation: none; } #disc .band .slides i:first-child { opacity: 1; } }
#disc .band .wrap { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(12px, 3vw, 40px); padding-block: clamp(18px, 4vw, 40px); }
#disc .band .logo { width: clamp(180px, 34vw, 380px); height: auto; flex: none; filter: drop-shadow(0 6px 10px #0008); }
#disc .band .title { flex: 1 1 300px; min-width: 0; }
#disc .band h1 { margin: 0 0 .3em; font-weight: 800; line-height: 1.08; font-size: clamp(30px, 5.2vw, 68px);
  -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); }
/* M107: the name and what it remasters, over the tagline (in the h1 for search engines) */
#disc .band h1 .kicker { display: block; margin-bottom: .45em; font-size: clamp(14px, 1.7vw, 18px); font-weight: 700; line-height: 1.2;
  letter-spacing: .04em; text-transform: uppercase; color: var(--gold); -webkit-text-stroke: 0; text-shadow: 0 1px 2px #000; }
#disc .band .lede { font-size: clamp(15px, 1.8vw, 19px); max-width: 34em; text-shadow: 0 1px 2px #000; }
#disc .band .row { display: flex; flex-wrap: wrap; gap: .6em; margin-top: 1em; }

/* pills */
#disc .pill { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: .55em 1.25em;
  border: 3px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-weight: 800;
  text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s; white-space: nowrap; }
#disc .pill:hover { background: #fffbe8; }
#disc .pill:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
#disc .pill.gold { background: var(--gold-hi); }
#disc .pill.gold:hover { background: #ffe57a; }
#disc .playnow { margin-top: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
/* the autoplay box as a pill with a switch; the ?site way back only shows once it's on */
#disc .autoplay { display: inline-flex; align-items: center; gap: .6em; border: 3px solid var(--ink); border-radius: 999px;
  background: #fff; padding: .25em .9em .25em .35em; font-weight: 800; font-size: 15px; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
#disc .autoplay input { position: absolute; opacity: 0; pointer-events: none; }
#disc .autoplay:focus-within { outline: 3px solid var(--sky); outline-offset: 3px; }
#disc :focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
#disc .sw { width: 2.4em; height: 1.4em; border: 3px solid var(--ink); border-radius: 999px; background: var(--line);
  position: relative; transition: background .15s; flex: none; }
#disc .sw::after { content: ""; position: absolute; top: 50%; left: .12em; width: .95em; height: .95em; border-radius: 50%;
  background: #fff; border: 2px solid var(--ink); transform: translateY(-50%); transition: left .15s; }
#disc .autoplay input:checked + .sw { background: var(--green); }
#disc .autoplay input:checked + .sw::after { left: calc(100% - 1.1em); }
#disc .playnow .hint { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
#disc .playnow .hint code { font-weight: 800; font-size: 13px; font-family: inherit; background: var(--line); border-radius: 6px; padding: 0 .35em; }
#disc .autoplay:not(:has(input:checked)) + .hint { display: none; }
@media (prefers-reduced-motion: reduce) { #disc .sw, #disc .sw::after { transition: none; } }
#disc .pill.huge { font-size: clamp(28px, 6vw, 56px); padding: .5em 2.4em; border-radius: 999px; }
#disc .pill.big { font-size: clamp(18px, 2.4vw, 24px); padding: .6em 1.6em; }
#disc .pill.small { font-size: 14px; padding: .3em .9em; box-shadow: 0 3px 0 var(--ink); }
#disc .pill.red { background: #ffd9d4; }
#disc .pill.red:hover { background: #ffc4bc; }
#disc .pill[disabled] { opacity: .45; cursor: default; transform: none; box-shadow: 0 4px 0 var(--ink); }
#disc .pill.discord-pill { background: #fff; color: #3b45c4; }
#disc .pill svg { width: 1.2em; height: 1.2em; flex: none; }

/* white panels with a green header box */
#disc .panel { background: #fff; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); padding: clamp(14px, 2.6vw, 24px); min-width: 0; }
#disc .head { display: inline-block; margin: 0 0 .7em; padding: .2em .8em; border: 3px solid var(--ink); border-radius: 12px;
  background: linear-gradient(var(--green-hi), var(--green)); color: #fff; font-weight: 800; font-size: 1.15em;
  -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill; }
#disc .head.gold { background: linear-gradient(var(--gold-hi), var(--gold)); }
#disc .head.sky { background: linear-gradient(#a6dcf5, var(--sky)); }
/* a section's title: white, outlined, on the wall */
#disc .h { font-size: clamp(26px, 4vw, 40px); color: #fff; -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill;
  text-shadow: 0 .09em 0 var(--ink); margin-bottom: .55em; }
#disc .sub { color: var(--muted); max-width: 46em; margin: -.4em 0 1em; }
#disc .grid { display: grid; gap: clamp(14px, 2.4vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* the hero's ISO box */
#disc .pick { margin-top: clamp(18px, 3vw, 28px); display: grid; gap: clamp(14px, 2.4vw, 24px); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 760px) { #disc .pick { grid-template-columns: minmax(0, 1fr); } }
#disc .pick .panel { text-align: left; }
#disc .needs { margin-top: 1em; padding: .7em .9em; border: 3px dashed var(--ink); border-radius: 14px; background: #fff7d6; font-size: 15px; }
#disc .needs b { font-weight: 800; }
#disc .needs .no { color: #b3261e; font-weight: 700; }
#disc #iso { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
#disc .progress { height: 18px; margin-top: .8em; border: 3px solid var(--ink); border-radius: 999px; background: #eee; overflow: hidden; }
#disc .progress[hidden] { display: none; }
#disc .progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(-45deg, var(--green-hi) 0 10px, var(--green) 10px 20px); transition: width .2s; }
#disc .progress.busy i { width: 30% !important; transition: none; animation: busy 1.2s ease-in-out infinite alternate; }
@keyframes busy { from { margin-left: 0; } to { margin-left: 70%; } }
@media (prefers-reduced-motion: reduce) { #disc .progress.busy i { animation: none; width: 100% !important; opacity: .4; } }
#disc #status { min-height: 1.5em; font-weight: 700; }
#disc #status.err { color: #b3261e; }
#disc ol.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: .8em; }
#disc ol.steps li { counter-increment: s; display: grid; grid-template-columns: 2.2em 1fr; gap: .6em; align-items: start; }
#disc ol.steps li::before { content: counter(s); display: grid; place-items: center; width: 2em; height: 2em; border: 3px solid var(--ink);
  border-radius: 50%; background: var(--gold-hi); font-weight: 800; }
#disc ol.steps b { display: block; font-weight: 800; }
/* M123: Add to Home Screen steps (iOS Safari only, site.js homeScreen), above the play section's panels */
#disc .a2hs { margin-top: clamp(18px, 3vw, 28px); }
#disc .newver { margin-top: clamp(18px, 3vw, 28px); }
#disc .newver > p { margin-top: 0; max-width: 46em; }
#disc .a2hs > p { margin-top: 0; max-width: 46em; }
#disc .a2hs ol.steps { margin: .8em 0 1em; }
#disc .a2hs svg.ios { width: 1.25em; height: 1.25em; vertical-align: -.25em; color: #0a84ff; }

/* about */
#disc .card h3 { font-size: 1.35em; margin-bottom: .3em; }
#disc .card .meta { font-size: 14px; color: var(--muted); }
/* B459: icon | name over note | download (play) glyph; the icons are currentColor, so they follow the tile's ink */
#disc .tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); margin-top: clamp(14px, 2.4vw, 24px); }
#disc .tile { display: grid; grid-template-columns: 30px minmax(0, 1fr) 20px; grid-template-rows: auto auto; column-gap: .65em; row-gap: .1em;
  align-items: center; padding: .7em .9em; border: 3px solid var(--ink); border-radius: 16px; background: #fff; color: var(--ink);
  box-shadow: 0 4px 0 var(--ink); text-decoration: none; }
#disc .tile .ico { grid-row: 1 / 3; width: 30px; height: 30px; }
#disc .tile .glyph { grid-column: 3; grid-row: 1 / 3; width: 20px; height: 20px; opacity: .8; }
#disc .tile b { grid-column: 2; font-weight: 800; font-size: 1.05em; line-height: 1.25; align-self: end; }
#disc .tile span { grid-column: 2; font-size: 13px; line-height: 1.3; color: var(--muted); align-self: start; }
#disc a.tile:hover { background: #fffbe8; }
#disc a.tile:hover .glyph { opacity: 1; }
#disc .tile.here { background: var(--gold-hi); }
#disc .chips { display: flex; flex-wrap: wrap; gap: .45em; margin-top: .8em; }
#disc .chip { padding: .15em .7em; border: 2px solid var(--ink); border-radius: 999px; background: #eaf7e6; font-size: 14px; font-weight: 700; }
#disc figure { margin: 0; }
#disc figure img { display: block; width: 100%; height: auto; border: 4px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 0 var(--ink); background: #233; }
#disc figure img[hidden] { display: none; }
#disc .shots { display: grid; gap: clamp(10px, 1.8vw, 18px); margin-top: clamp(14px, 2.4vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
#disc .shots img { aspect-ratio: 2 / 1; object-fit: cover; }
#disc figcaption { font-size: 13px; color: var(--muted); margin-top: .7em; }

/* settings & files */
#disc .rows { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); }
#disc .r { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3em .8em; padding: .5em 0; border-top: 2px solid #eceae2; }
#disc .r:first-child { border-top: 0; }
#disc .r > span:first-child { font-weight: 700; }
#disc .r .v { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
#disc .r .end { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; justify-content: flex-end; margin-left: auto; min-width: 0; max-width: 100%; }
#disc input[type=text], #disc input[type=password], #disc select { font: inherit; font-weight: 700; padding: .35em .7em; border: 3px solid var(--ink);
  border-radius: 12px; background: #fff; color: var(--ink); min-width: 0; max-width: 100%; }
#disc input[type=range] { accent-color: var(--green); width: 9em; max-width: 100%; }
#disc .toggle { position: relative; width: 3.4em; height: 1.8em; border: 3px solid var(--ink); border-radius: 999px; background: #ddd; cursor: pointer; padding: 0; flex: none; }
#disc .toggle::after { content: ''; position: absolute; top: .15em; left: .15em; width: 1.2em; height: 1.2em; border: 2px solid var(--ink); border-radius: 50%; background: #fff; transition: left .12s; }
#disc .toggle[aria-checked=true] { background: var(--green-hi); }
#disc .toggle[aria-checked=true]::after { left: 1.85em; }
#disc .toggle[disabled], #disc select[disabled], #disc input[disabled] { opacity: .5; cursor: default; }
#disc details.group { border-top: 2px solid #eceae2; }
#disc details.group:first-of-type { border-top: 0; }
#disc details.group > summary { cursor: pointer; font-weight: 800; padding: .55em 0; list-style-position: inside; }
#faq summary { cursor: pointer; list-style: none; }
#faq summary::-webkit-details-marker { display: none; }
#faq summary h2 { display: inline-flex; align-items: center; gap: .5em; }
#faq summary h2::before { content: "\203A"; display: inline-block; font-size: 1.5em; line-height: 1; transition: transform .15s; }
#faq details[open] summary h2::before { transform: rotate(90deg); }
#disc .note { font-size: 14px; color: var(--muted); }
#disc .ok { color: #1f7a33; font-weight: 700; }
#disc .bad { color: #b3261e; font-weight: 700; }
#disc .bar { display: flex; height: 22px; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: #eee; margin: .4em 0 .6em; }
#disc .bar i { display: block; height: 100%; min-width: 0; }
/* B458: the usage bar's legend wraps item by item (a swatch stays with its label), never past the card's edge */
#disc .legend { display: flex; flex-wrap: wrap; gap: .2em 1em; }
#disc .legend > span { white-space: nowrap; }
#disc .key { display: inline-block; width: .8em; height: .8em; border: 2px solid var(--ink); border-radius: 3px; vertical-align: -.05em; margin-right: .35em; }
#disc .mods { display: grid; gap: .5em; max-height: 26em; overflow-y: auto; }
/* a mod's name and source wrap, never cut off; on a narrow card they get a line of their own (B458) */
#disc .mod { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .6em; padding: .45em .6em; border: 2px solid var(--ink); border-radius: 12px; background: #fafaf6; }
#disc .mod div { flex: 1 1 10em; min-width: 0; }
#disc .mod .pill { margin-left: auto; }
#disc .mod b { display: block; font-weight: 800; overflow-wrap: anywhere; }
#disc .mod span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
#disc .kind { padding: 0 .55em; border: 2px solid var(--ink); border-radius: 999px; font-size: 12px; font-weight: 800; background: #e6f1fb; flex: none; }

/* donate */
#disc .stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); margin: .4em 0 1em; }
#disc .stat { border: 3px solid var(--ink); border-radius: 16px; padding: .5em .8em; background: #fffbe8; }
#disc .stat b { display: block; font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.1; }
#disc .stat span { font-size: 13px; color: var(--muted); }

/* footer */
#disc footer { margin-top: clamp(36px, 7vw, 64px); background: var(--ink); color: #dfe3ea; border-top: 6px solid var(--gold); font-size: 14px; }
#disc footer .wrap { display: flex; flex-wrap: wrap; gap: .6em 1.6em; align-items: center; justify-content: space-between; padding-block: 1.4em calc(1.4em + env(safe-area-inset-bottom, 0px)); }
#disc footer nav { display: flex; flex-wrap: wrap; gap: .3em 1.2em; }
#disc footer a { color: #fff; font-weight: 700; }
#disc footer p { margin: 0; max-width: 46em; color: #aab1bd; }
