/*
 * erogebrasil.com — RPG Maker MV/MZ's default windows (owner decision, 2026-11-15).
 *
 * Every block is a game window laid over a tiled map: a thin light frame around a
 * blue-black gradient, white text outlined in black, labels in the system blue and
 * values in gold. The command under the cursor breathes. Dark only, and nothing is
 * separated by a rule. yobaki.com's pages never load this file.
 */

:root {
    color-scheme: dark;

    --eb-map-light: #2f4f31;
    --eb-map-dark: #2b4a2d;
    --eb-window-top: rgb(44 56 112 / .93);
    --eb-window-bottom: rgb(14 18 48 / .93);
    --eb-frame: rgb(235 240 255 / .9);
    --eb-frame-shade: rgb(0 0 0 / .45);
    --eb-text: #fff;
    --eb-text-soft: #d5ddff;
    --eb-system: #84a9ff;
    --eb-gold: #ffe066;
    --eb-gauge-start: #e0802a;
    --eb-gauge-end: #f7c84a;
    --eb-gauge-ink: #2a1600;
    --eb-mp-start: #2f5fbf;
    --eb-mp-end: #5fb4f2;
    --eb-cursor: rgb(150 180 255 / .28);
    --eb-cursor-faint: rgb(150 180 255 / .12);
    --eb-cursor-edge: rgb(210 225 255 / .95);
    --eb-well: rgb(0 0 0 / .35);
    --eb-placeholder: #9aa6d8;
    --eb-corner: 7px;
    --eb-corner-small: 4px;
    --eb-font: "M PLUS 1m", "M PLUS Rounded 1c", ui-rounded, "Segoe UI", system-ui, sans-serif;
    --eb-outline: 1px 1px 0 #000, -1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000;
    --eb-lift: 0 3px 8px rgb(0 0 0 / .45);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background:
        linear-gradient(rgb(0 0 0 / .4), rgb(0 0 0 / .6)),
        repeating-conic-gradient(var(--eb-map-light) 0 25%, var(--eb-map-dark) 0 50%) 0 0 / 48px 48px;
    background-attachment: fixed;
    color: var(--eb-text);
    font-family: var(--eb-font);
    line-height: 1.5;
    margin: 0;
    overflow-wrap: break-word;
    text-shadow: var(--eb-outline);
}

a {
    color: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

button,
input,
select {
    font: inherit;
    text-shadow: inherit;
}

:focus-visible {
    outline: 2px solid var(--eb-gold);
    outline-offset: 2px;
}

svg {
    display: block;
}

.icon {
    fill: currentColor;
    filter: drop-shadow(1px 1px 0 #000);
    flex: none;
    height: 1.1em;
    width: 1.1em;
}

/* An element the page hides stays hidden whatever display its class gives it. */
[hidden] {
    display: none !important;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.wrap {
    margin: 0 auto;
    max-width: 72rem;
    padding: 0 1rem;
}

@media (min-width: 48rem) {
    .wrap {
        padding: 0 2rem;
    }
}

/* After the wrap's padding, so a wrapped section keeps its own. */
.section {
    padding: 1.25rem 0;
}

/* Windows ---------------------------------------------------------------- */

.window {
    background:
        radial-gradient(circle at 30% 20%, rgb(255 255 255 / .05) 1px, transparent 1.5px) 0 0 / 5px 5px,
        linear-gradient(180deg, var(--eb-window-top), var(--eb-window-bottom));
    border-radius: var(--eb-corner);
    box-shadow: inset 0 0 0 2px var(--eb-frame), inset 0 0 0 3px var(--eb-frame-shade), var(--eb-lift);
    padding: 1.1rem 1.15rem;
    position: relative;
}

@media (min-width: 48rem) {
    .window {
        padding: 1.25rem 1.4rem;
    }
}

/* A heading drawn as a small window of its own. */
.title-window {
    color: var(--eb-system);
    display: inline-block;
    font-size: 1.05rem;
    font-weight: 800;
    padding: .45rem 1.1rem;
}

.head-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* The name box rides on the top edge of the window it names. */
.has-name {
    margin-top: 1.6rem;
    padding-top: 1.5rem;
}

.name-box {
    font-size: .9rem;
    font-weight: 800;
    left: .3rem;
    padding: .35rem 1rem;
    position: absolute;
    top: -2.2rem;
}

/* The blinking arrow that ends a message. */
.pause::after {
    animation: eb-blink 1s steps(2) infinite;
    content: "▼";
    display: block;
    font-size: .7rem;
    text-align: center;
}

@keyframes eb-blink {
    50% {
        opacity: 0;
    }
}

.inset {
    background: var(--eb-well);
    border-radius: var(--eb-corner-small);
}

/* Commands --------------------------------------------------------------- */

.command {
    align-items: center;
    background: none;
    border: 0;
    border-radius: var(--eb-corner-small);
    color: var(--eb-text);
    cursor: pointer;
    display: flex;
    font-weight: 700;
    gap: .5rem;
    min-height: 2.75rem;
    padding: 0 .85rem;
    text-decoration: none;
}

.command-row {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

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

/* The selection rectangle: on the command pointed at, the page being read, and
   the command a window offers first. */
.command:hover,
.command.is-cursor,
.command[aria-current="page"],
.command[aria-current="true"] {
    animation: eb-breathe 1.2s ease-in-out infinite;
    background: var(--eb-cursor);
    box-shadow: inset 0 0 0 1px var(--eb-cursor-edge);
}

@keyframes eb-breathe {
    50% {
        background: var(--eb-cursor-faint);
    }
}

@media (prefers-reduced-motion: reduce) {
    .command,
    .pause::after {
        animation: none !important;
    }
}

/* A command that cannot be used yet, such as a download still counting down. */
.command:disabled {
    animation: none;
    background: none;
    box-shadow: none;
    cursor: default;
    opacity: .55;
}

/* A window that holds a list of commands, close to its frame. */
.list-window {
    padding: .5rem;
}

.command-grid {
    display: grid;
    gap: .25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.label {
    color: var(--eb-system);
    font-size: .8rem;
    font-weight: 800;
}

.gold {
    color: var(--eb-gold);
}

/* Header ----------------------------------------------------------------- */

.topbar {
    padding-top: .5rem;
}

.topbar .window {
    align-items: center;
    display: flex;
    gap: .5rem;
    padding: .4rem .5rem .4rem 1rem;
}

.topbar .command {
    min-height: 2.6rem;
    padding: 0 .7rem;
}

.brand {
    align-items: center;
    display: flex;
    font-size: 1.2rem;
    font-weight: 800;
    gap: .5rem;
    margin-right: auto;
    text-decoration: none;
    white-space: nowrap;
}

/* Pixel art: scaled by a screen's density without smoothing. */
.brand-mark {
    flex: none;
    image-rendering: pixelated;
}

.brand b {
    color: var(--eb-gold);
}

@media (max-width: 26rem) {
    .topbar .command-label {
        display: none;
    }

    .brand {
        font-size: 1.05rem;
    }
}

/* The narrowest phones: the commands give room to the mark, so the row stays one line. */
@media (max-width: 22rem) {
    .topbar .command {
        padding: 0 .45rem;
    }
}

/* Search ----------------------------------------------------------------- */

.search {
    align-items: center;
    display: flex;
    gap: .5rem;
    padding: .45rem .45rem .45rem 1rem;
}

.search .icon {
    color: var(--eb-system);
}

.search input {
    background: none;
    border: 0;
    color: var(--eb-text);
    flex: 1;
    min-height: 2.6rem;
    min-width: 0;
    outline: 0;
}

.search input::placeholder {
    color: var(--eb-placeholder);
}

.search:focus-within {
    box-shadow: inset 0 0 0 2px var(--eb-gold), inset 0 0 0 3px var(--eb-frame-shade);
}

/* Games ------------------------------------------------------------------ */

/* A cover sits in its window as a picture in a frame; without one, the frame is
   drawn empty. */
.cover {
    aspect-ratio: 3 / 4;
    background: linear-gradient(180deg, var(--eb-window-top), var(--eb-window-bottom));
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgb(0 0 0 / .5);
    display: block;
    object-fit: cover;
    width: 100%;
}

.cover-wide {
    aspect-ratio: 16 / 9;
}

/* A game in a list is an item window: its cover, its title, and its platforms
   and kind in the system blue. The title's link covers the window. */
.items {
    display: grid;
    gap: 1rem .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 40rem) {
    .items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .items {
        gap: 1.25rem 1rem;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.item {
    padding: .55rem .55rem .75rem;
}

.item h3 {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    margin: .55rem .2rem .2rem;
}

.item h3 a {
    text-decoration: none;
}

.item h3 a::after {
    border-radius: var(--eb-corner);
    content: "";
    inset: 0;
    position: absolute;
}

.item:hover,
.item:focus-within {
    box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px var(--eb-frame-shade), 0 0 0 3px rgb(150 180 255 / .5);
}

.item .sub {
    align-items: center;
    color: var(--eb-system);
    display: flex;
    flex-wrap: wrap;
    font-size: .8rem;
    gap: .35rem;
    margin: 0 .2rem;
}

.item .sub .icon {
    height: .95rem;
    width: .95rem;
}

/* The recently updated games: an item list with the version in the quantity
   column, as a shop window lists its goods. */
.rows {
    display: grid;
    gap: .15rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.rows .command {
    display: grid;
    gap: .1rem .75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 3.2rem;
    padding: .35rem .85rem;
}

.rows strong {
    font-weight: 700;
}

.rows .when {
    color: var(--eb-system);
    font-size: .8rem;
    font-weight: 400;
    grid-column: 1;
}

.rows .gold {
    grid-column: 2;
    grid-row: 1 / span 2;
}

/* Home ------------------------------------------------------------------- */

.feature {
    align-items: center;
    display: grid;
    gap: 1rem;
}

@media (min-width: 56rem) {
    .feature {
        gap: 2rem;
        grid-template-columns: 1.2fr 1fr;
    }
}

.feature .big {
    font-size: clamp(1.6rem, 6.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: .5rem;
}

.feature .lede {
    color: var(--eb-text-soft);
    font-size: 1.02rem;
}

.feature .command {
    margin: .75rem 0 0 -.5rem;
    width: fit-content;
}

.front {
    display: grid;
    gap: 1.5rem;
}

.front > * {
    min-width: 0;
}

.front aside > * + * {
    margin-top: 1.5rem;
}

@media (min-width: 40rem) {
    .front .items {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .front {
        grid-template-columns: minmax(0, 1fr) 20rem;
    }

    .front > aside {
        align-self: start;
    }
}

/* Catalog ---------------------------------------------------------------- */

.narrow {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

@media (min-width: 56rem) {
    .narrow {
        grid-template-columns: auto auto 1fr;
    }
}

.narrow .window {
    padding: .6rem .75rem;
}

.narrow .label {
    display: block;
    margin: 0 .2rem .3rem;
}

.order {
    display: flex;
    gap: .25rem;
}

.order select {
    background: var(--eb-well);
    border: 0;
    border-radius: var(--eb-corner-small);
    color: var(--eb-text);
    flex: 1;
    min-height: 2.6rem;
    min-width: 0;
    padding: 0 .8rem;
}

.pager {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pager .window {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    justify-content: center;
    padding: .35rem;
}

/* Where pages are skipped: as tall as a command, so the bar keeps one line height. */
.pager .gap {
    align-items: center;
    color: var(--eb-text-soft);
    display: flex;
    min-height: 2.75rem;
    padding: 0 .35rem;
}

/* Text pages ------------------------------------------------------------- */

.prose h2 {
    color: var(--eb-system);
    font-size: 1.1rem;
    font-weight: 800;
    margin: 1.5rem 0 .4rem;
}

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

.prose p {
    font-size: 1.04rem;
    line-height: 1.75;
    max-width: 42rem;
    text-shadow: 1px 1px 0 #000;
}

.prose :is(h3, h4, h5, h6) {
    color: var(--eb-system);
    font-size: 1rem;
    font-weight: 800;
    margin: 1.2rem 0 .3rem;
}

.prose :is(ul, ol, blockquote, pre) {
    font-size: 1.04rem;
    margin: 0;
    line-height: 1.75;
    max-width: 42rem;
    text-shadow: 1px 1px 0 #000;
}

.prose :is(ul, ol) {
    padding-left: 1.4rem;
}

.prose li::marker {
    color: var(--eb-gold);
}

.prose :is(p, ul, ol, blockquote, pre) + :is(p, ul, ol, blockquote, pre) {
    margin-top: .8rem;
}

.prose strong {
    color: var(--eb-gold);
}

.prose a {
    color: var(--eb-system);
}

/* Set apart by its indent and softer text, never by a rule; a thematic break is space alone. */
.prose blockquote {
    color: var(--eb-text-soft);
    padding-left: 1.4rem;
}

.prose hr {
    border: 0;
    margin: 1.2rem 0;
}

.prose pre {
    overflow-x: auto;
}

/* A picture of the game's own, between paragraphs, framed like the window it sits in. */
.prose .text-image {
    margin: .8rem 0;
    max-width: 42rem;
}

.prose .text-image img {
    border: 2px solid var(--eb-frame);
    border-radius: var(--eb-corner-small);
    display: block;
    height: auto;
    max-width: 100%;
}

.prose .text-image figcaption {
    color: var(--eb-text-soft);
    font-size: .92rem;
    margin-top: .35rem;
    text-shadow: 1px 1px 0 #000;
}

.legal {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem 0 2rem;
}

.legal > * {
    min-width: 0;
}

.legal-menu {
    padding: .5rem;
}

.legal-menu .command-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal h1 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 1.25rem;
}

/* A dated page: the date takes the place of the heading's own space. */
.legal h1:has(+ .updated) {
    margin-bottom: 0;
}

.legal .updated {
    color: var(--eb-system);
    font-size: .85rem;
    margin: .35rem 0 1.25rem;
}

@media (min-width: 56rem) {
    .legal {
        align-items: start;
        grid-template-columns: 14rem minmax(0, 1fr);
    }

    .legal-menu .command-list {
        grid-template-columns: 1fr;
    }
}

.mail {
    margin-top: 1.25rem;
    padding: .7rem .9rem;
}

.mail a {
    color: var(--eb-gold);
    font-weight: 800;
}

/* Game page -------------------------------------------------------------- */

.game-head {
    display: grid;
    gap: .35rem;
    margin-top: 1.25rem;
}

.game-head h1 {
    font-size: clamp(1.4rem, 4.5vw, 1.9rem);
    font-weight: 800;
    line-height: 1.2;
    text-wrap: balance;
}

.original-title {
    color: var(--eb-text-soft);
    font-size: .95rem;
}

.game-meta {
    align-items: center;
    color: var(--eb-system);
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    font-weight: 800;
    gap: .2rem .9rem;
    margin-top: .35rem;
}

.game-meta a {
    text-decoration: none;
}

.game-meta a:hover {
    text-decoration: underline;
}

/* On a phone the downloads come first; from a wide screen they sit beside the
   pictures, with the record sheet beside the text. */
.game {
    display: grid;
    gap: 1.5rem;
    grid-template-areas: "downloads" "facts" "gallery" "text" "after";
    padding: 1.5rem 0 2rem;
}

.game > * {
    min-width: 0;
}

.game-downloads {
    grid-area: downloads;
}

.game-facts {
    grid-area: facts;
}

.gallery {
    grid-area: gallery;
}

.game-text {
    grid-area: text;
}

.game-after {
    grid-area: after;
}

@media (min-width: 64rem) {
    .game {
        grid-template-areas: "gallery downloads" "text facts" "after after";
        grid-template-columns: minmax(0, 1fr) 23rem;
    }

    .game-downloads,
    .game-facts,
    .game-text {
        align-self: start;
    }
}

/* With no picture, the text takes the pictures' place beside the downloads. */
@media (min-width: 64rem) {
    .game:not(:has(> .gallery)) {
        grid-template-areas: "text downloads" "text facts" "after after";
    }
}

.section-title {
    font-size: 1.05rem;
}

/* Pictures --------------------------------------------------------------- */

/* The pictures are a window of their own: one picture on a stage, and a strip
   of all of them under it that chooses which. */
.gallery {
    align-self: start;
    padding: .6rem;
}

/* A control only script can answer is not drawn without it. */
@media (scripting: none) {
    .scripted-only {
        display: none !important;
    }
}

.stage {
    counter-reset: gallery-frame;
    position: relative;
}

/* The stage has RPG Maker's shape, 816 by 624, the shape of most of these
   games' pictures; one of another shape is shown whole inside it, never cut. */
.stage-frame {
    aspect-ratio: 816 / 624;
    background: #000;
    border-radius: var(--eb-corner-small);
    display: none;
    margin: 0;
    overflow: hidden;
    position: relative;
}

.is-single .stage-frame,
:checked + .stage-frame {
    display: block;
}

.stage-image {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

@media (scripting: enabled) {
    .stage-image {
        cursor: zoom-in;
    }
}

/* Each edge steps to the neighbouring picture: unseen until a pointer comes
   over the stage, then darkening toward its side under an arrow. A touch
   screen has no hover, so there it is always faintly drawn. */
.edge {
    align-items: center;
    background: linear-gradient(to right, rgb(0 0 0 / .6), transparent);
    bottom: 0;
    cursor: pointer;
    display: flex;
    left: 0;
    opacity: 0;
    padding: 0 .9rem;
    position: absolute;
    top: 0;
    transition: opacity .2s ease;
    width: 20%;
}

.edge-next {
    background: linear-gradient(to left, rgb(0 0 0 / .6), transparent);
    justify-content: flex-end;
    left: auto;
    right: 0;
}

.edge .icon {
    height: 1.8rem;
    width: 1.8rem;
}

.stage:hover .edge {
    opacity: .4;
}

.stage:hover .edge:hover {
    opacity: 1;
}

/* The picture's place among them, in gold in the stage's lower corner. The
   radios up to the checked one are counted, so the count is drawn, not
   written. */
.stage > input {
    counter-increment: gallery-frame;
}

.stage > :checked ~ input {
    counter-increment: none;
}

.stage-count::before {
    content: counter(gallery-frame) "/" attr(data-total);
}

.stage-count {
    background: rgb(0 0 0 / .6);
    border-radius: var(--eb-corner-small);
    bottom: .6rem;
    color: var(--eb-gold);
    font-size: .8rem;
    font-weight: 800;
    padding: .15rem .55rem;
    pointer-events: none;
    position: absolute;
    right: .6rem;
}

.stage-zoom {
    background: rgb(0 0 0 / .6);
    min-height: 2.4rem;
    padding: 0 .65rem;
    position: absolute;
    right: .5rem;
    top: .5rem;
}

/* The strip: one row however many pictures there are, five and a part of the
   sixth in view, so a cut picture says the row goes on. The padding leaves
   room for the selection rectangle, which the scrolling box would clip. */
.strip-wrap {
    margin-top: .5rem;
    position: relative;
}

.strip {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 3px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.strip::-webkit-scrollbar {
    display: none;
}

/* The end the row goes on past fades out, as game-gallery.js marks it. */
.strip[data-more="end"] {
    mask-image: linear-gradient(to right, #000 82%, transparent);
}

.strip[data-more="start"] {
    mask-image: linear-gradient(to left, #000 82%, transparent);
}

.strip[data-more="both"] {
    mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent);
}

.strip-step {
    background: rgb(0 0 0 / .7);
    min-height: 2.2rem;
    opacity: 0;
    padding: 0 .5rem;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.strip-on {
    left: auto;
    right: 0;
}

.strip-wrap:hover .strip-step:not([disabled]) {
    opacity: 1;
}

/* A step toward an end already reached is not drawn at all, not dimmed as a
   disabled command is. */
.strip-step[disabled] {
    opacity: 0;
    pointer-events: none;
}

.thumb {
    aspect-ratio: 816 / 624;
    background: #000;
    border: 0;
    border-radius: var(--eb-corner-small);
    cursor: pointer;
    flex: 0 0 calc((100% - 2rem) / 5.4);
    opacity: .55;
    overflow: hidden;
    padding: 0;
    scroll-snap-align: start;
    transition: opacity .18s ease;
}

.thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.thumb:hover {
    box-shadow: 0 0 0 2px var(--eb-cursor-edge);
    opacity: 1;
}

/* The selection rectangle on the thumbnail of the picture shown, and a ring
   on the one the keyboard is at. The radios sit on the stage and the
   thumbnails in the strip, so each place is named: the cover's and one for
   every screenshot a game may hold (Game.MaxScreenshots). */
.pictures:has(> .stage > input:nth-of-type(1):checked) .thumb:nth-child(1),
.pictures:has(> .stage > input:nth-of-type(2):checked) .thumb:nth-child(2),
.pictures:has(> .stage > input:nth-of-type(3):checked) .thumb:nth-child(3),
.pictures:has(> .stage > input:nth-of-type(4):checked) .thumb:nth-child(4),
.pictures:has(> .stage > input:nth-of-type(5):checked) .thumb:nth-child(5),
.pictures:has(> .stage > input:nth-of-type(6):checked) .thumb:nth-child(6),
.pictures:has(> .stage > input:nth-of-type(7):checked) .thumb:nth-child(7),
.pictures:has(> .stage > input:nth-of-type(8):checked) .thumb:nth-child(8),
.pictures:has(> .stage > input:nth-of-type(9):checked) .thumb:nth-child(9),
.pictures:has(> .stage > input:nth-of-type(10):checked) .thumb:nth-child(10),
.pictures:has(> .stage > input:nth-of-type(11):checked) .thumb:nth-child(11),
.viewer-strip .thumb[aria-current="true"] {
    animation: eb-thumb-cursor 1.2s ease-in-out infinite;
    box-shadow: 0 0 0 2px var(--eb-cursor-edge);
    opacity: 1;
}

@keyframes eb-thumb-cursor {
    50% {
        box-shadow: 0 0 0 2px rgb(210 225 255 / .35);
    }
}

.pictures:has(> .stage > input:nth-of-type(1):focus-visible) .thumb:nth-child(1),
.pictures:has(> .stage > input:nth-of-type(2):focus-visible) .thumb:nth-child(2),
.pictures:has(> .stage > input:nth-of-type(3):focus-visible) .thumb:nth-child(3),
.pictures:has(> .stage > input:nth-of-type(4):focus-visible) .thumb:nth-child(4),
.pictures:has(> .stage > input:nth-of-type(5):focus-visible) .thumb:nth-child(5),
.pictures:has(> .stage > input:nth-of-type(6):focus-visible) .thumb:nth-child(6),
.pictures:has(> .stage > input:nth-of-type(7):focus-visible) .thumb:nth-child(7),
.pictures:has(> .stage > input:nth-of-type(8):focus-visible) .thumb:nth-child(8),
.pictures:has(> .stage > input:nth-of-type(9):focus-visible) .thumb:nth-child(9),
.pictures:has(> .stage > input:nth-of-type(10):focus-visible) .thumb:nth-child(10),
.pictures:has(> .stage > input:nth-of-type(11):focus-visible) .thumb:nth-child(11) {
    outline: 2px solid var(--eb-gold);
    outline-offset: 2px;
}

@media (max-width: 40rem) {
    .thumb {
        flex-basis: calc((100% - 1.2rem) / 3.4);
    }
}

@media (hover: none) {
    .edge {
        opacity: .7;
    }
}

/* The full-screen view: the picture whole, and a command window under it with
   the steps, the thumbnails and the close command. While it is open the page
   behind it does not scroll. */
html:has(dialog.viewer:modal) {
    overflow: hidden;
}

.viewer {
    background: rgb(0 0 0 / .92);
    border: 0;
    color: var(--eb-text);
    height: 100%;
    margin: 0;
    max-height: none;
    max-width: none;
    padding: 1rem;
    width: 100%;
}

.viewer::backdrop {
    background: transparent;
}

.viewer[open] {
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
}

.viewer-main {
    min-height: 0;
}

.viewer-stage {
    height: 100%;
    width: 100%;
}

.viewer-stage img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.viewer-bar {
    align-items: center;
    display: flex;
    gap: .25rem;
    justify-self: center;
    max-width: 100%;
    padding: .4rem;
}

.viewer-bar .command {
    flex: none;
    padding: 0 .7rem;
}

.viewer-strip {
    flex: 1;
    min-width: 0;
}

.viewer-strip .thumb {
    flex: 0 0 4.6rem;
}

@media (max-width: 40rem) {
    .viewer {
        padding: .5rem;
    }

    .viewer-strip .thumb {
        flex-basis: 3.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .edge,
    .thumb {
        animation: none !important;
        transition: none;
    }
}

/* The facts read as a status screen: the label in the system blue, the value white. */
.facts {
    display: grid;
    gap: .55rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: .75rem 0 0;
}

.facts dt {
    color: var(--eb-system);
    font-size: .8rem;
    font-weight: 800;
}

.facts dd {
    font-weight: 700;
    margin: 0;
}

.facts .wide {
    grid-column: 1 / -1;
}

/* The game's pages on stores, the sheet's last row: commands on a well, each
   the store's initial in a square, its name, its code in gold and the arrow
   saying the link leaves the site. */
.store-list {
    display: grid;
    gap: .25rem;
    padding: .2rem;
}

.store {
    gap: .6rem;
    min-height: 2.5rem;
}

.store-mark {
    align-items: center;
    background: linear-gradient(180deg, var(--eb-mp-start), var(--eb-window-bottom));
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px var(--eb-frame);
    display: inline-flex;
    flex: none;
    font-size: .7rem;
    font-weight: 800;
    height: 1.5rem;
    justify-content: center;
    width: 1.5rem;
}

.store-name {
    margin-right: auto;
    min-width: 0;
}

.store-code {
    color: var(--eb-gold);
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.store-out {
    color: var(--eb-system);
    flex: none;
}

.platform-list {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .8rem;
}

.platform-list span {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
}

/* The Portuguese downloads, open when the page loads. */
.release {
    color: var(--eb-text-soft);
    font-size: .85rem;
    margin: .2rem 0 .9rem;
}

.password {
    align-items: center;
    display: flex;
    gap: .6rem;
    margin-bottom: 1rem;
    padding: .45rem .45rem .45rem .85rem;
}

.password .label {
    flex: none;
}

.password code {
    color: var(--eb-gold);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    margin-right: auto;
}

.password .command {
    min-height: 2.4rem;
}

/* The copy command keeps both labels in one cell, so "Copiada" never moves the row. */
.archive-password-copy:not([hidden]) {
    display: grid;
}

.archive-password-copy > span {
    grid-area: 1 / 1;
}

.archive-password-copied-label,
.archive-password-copy.is-copied .archive-password-copy-label {
    visibility: hidden;
}

.archive-password-copy.is-copied .archive-password-copied-label {
    visibility: visible;
}

.platform + .platform {
    margin-top: .9rem;
}

.platform-name {
    align-items: center;
    display: flex;
    font-weight: 800;
    gap: .45rem;
    margin: 0 .2rem .3rem;
}

.platform-name .gold {
    font-weight: 600;
    margin-left: auto;
}

/* Each platform's first mirror is a blue gauge bar; the other mirrors stay plain
   commands beside it. The bar keeps its color under the pointer instead of the
   breathing cursor. */
.command.download,
.command.download:hover {
    animation: none;
    background: linear-gradient(180deg, var(--eb-mp-end), var(--eb-mp-start));
    box-shadow: inset 0 0 0 1px rgb(220 235 255 / .9), inset 0 -3px 0 rgb(0 0 0 / .25), 0 2px 0 rgb(0 0 0 / .4);
}

.command.download:hover,
.command.play-start:hover {
    filter: brightness(1.1);
}

.report {
    color: var(--eb-text-soft);
    font-size: .85rem;
    font-weight: 600;
    justify-content: center;
    margin-top: .75rem;
}

.report .icon {
    height: 1rem;
    width: 1rem;
}

/* Browser play ------------------------------------------------------------ */

/* Play heads the download window as a gold gauge bar; game-player.js shows it. */
.play-start {
    justify-content: center;
    margin-bottom: .9rem;
    width: 100%;
}

.command.play-start,
.command.play-start:hover {
    animation: none;
    background: linear-gradient(180deg, var(--eb-gauge-end), var(--eb-gauge-start));
    box-shadow: inset 0 0 0 1px rgb(255 244 210 / .9), 0 2px 0 rgb(0 0 0 / .4);
    color: var(--eb-gauge-ink);
    font-size: 1.05rem;
    font-weight: 800;
    min-height: 3.1rem;
    text-shadow: none;
}

/* While a game is open its window takes the pictures' place, which the script
   hides, and with no picture the text's place beside the downloads. */
.game-player {
    grid-area: gallery;
    padding: .6rem;
    scroll-margin-top: .75rem;
}

@media (min-width: 64rem) {
    .game.is-playing:not(:has(> .gallery)) {
        grid-template-areas: "gallery downloads" "text facts" "after after";
    }

    .game.is-playing .game-player {
        align-self: start;
    }
}

/* The stage keeps the shape RPG Maker draws by default, 816 by 624, and is
   never taller than the window leaves room for. */
.player-stage {
    background: #000;
    border-radius: var(--eb-corner-small);
    display: grid;
    overflow: hidden;
    place-items: center;
    position: relative;
}

.game-frame {
    aspect-ratio: 816 / 624;
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
    position: relative;
    width: min(100%, calc((100dvh - 8rem) * 816 / 624));
}

.game-frame > *,
.game-frame iframe {
    grid-area: 1 / 1;
}

.game-frame iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

/* The frame is there from Play on, but shown only once the game said it is ready. */
.game-frame:not(.is-ready) iframe {
    visibility: hidden;
}

.stage-msg {
    display: grid;
    font-weight: 700;
    gap: .9rem;
    justify-items: center;
    padding: 1rem;
    text-align: center;
    z-index: 1;
}

.game-frame.is-ready .stage-msg {
    display: none;
}

.stage-msg .icon {
    color: var(--eb-gold);
    height: 2.2rem;
    width: 2.2rem;
}

/* The gauge of a loading bar, turned into a ring. */
.spinner {
    border: 4px solid var(--eb-well);
    border-radius: 50%;
    border-top-color: var(--eb-gauge-end);
    box-shadow: 0 0 0 2px var(--eb-frame-shade);
    height: 2.6rem;
    width: 2.6rem;
}

@media (prefers-reduced-motion: no-preference) {
    .spinner {
        animation: eb-spin .9s linear infinite;
    }
}

@keyframes eb-spin {
    to {
        transform: rotate(360deg);
    }
}

.turn {
    display: none;
}

/* Under the stage, a row of commands: the saves, and at the far end full
   screen and the way out. */
.player-bar {
    align-items: center;
    display: flex;
    gap: .25rem;
    margin-top: .5rem;
}

.spacer {
    flex: 1;
}

.pb {
    justify-content: center;
    padding: 0;
    width: 2.75rem;
}

.pb-saves {
    position: relative;
}

/* The browser said it will not keep the storage: a gold mark on the way to the saves. */
.pb-dot {
    background: var(--eb-gold);
    border-radius: 50%;
    box-shadow: 0 0 0 2px #000;
    height: .6rem;
    position: absolute;
    right: .35rem;
    top: .4rem;
    width: .6rem;
}

/* The saves: RPG Maker's save screen, a window over the stage's far side,
   inside the player so it is there in full screen and over the viewport too. */
.saves {
    border-radius: 0 var(--eb-corner-small) var(--eb-corner-small) 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    max-width: 100%;
    overflow-y: auto;
    padding: .9rem;
    position: absolute;
    right: 0;
    top: 0;
    width: 22rem;
    z-index: 2;
}

.saves-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.saves-head .pb {
    min-height: 2.4rem;
    width: 2.4rem;
}

.callout {
    color: var(--eb-gold);
    font-size: .85rem;
    font-weight: 700;
}

.callout.is-danger {
    color: #ff9a8a;
}

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

.slots:empty {
    display: none;
}

/* A file is a row of the list, the cursor on the one pointed at. */
.slot {
    align-items: center;
    border-radius: var(--eb-corner-small);
    display: flex;
    gap: .5rem;
    padding: .35rem .35rem .35rem .7rem;
}

.slot:hover,
.slot:focus-within {
    background: var(--eb-cursor);
    box-shadow: inset 0 0 0 1px var(--eb-cursor-edge);
}

.slot-text {
    display: grid;
    flex: 1;
    min-width: 0;
}

.slot-name {
    font-weight: 800;
}

.slot-meta {
    color: var(--eb-gold);
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
}

.slot-done {
    align-items: center;
    display: inline-flex;
    font-size: .8rem;
    gap: .35rem;
    overflow-wrap: anywhere;
}

.slot .pb:hover {
    animation: none;
    background: none;
    box-shadow: none;
    color: var(--eb-gold);
}

.saves-none {
    color: var(--eb-text-soft);
    font-size: .9rem;
    text-align: center;
}

.add-area {
    justify-content: center;
    position: relative;
}

/* The focus is on the file input clipped out of view inside it, so the ring
   is drawn by the command, and only for a keyboard's focus. */
.add-area:has(:focus-visible) {
    outline: 2px solid var(--eb-gold);
    outline-offset: 2px;
}

.import {
    display: grid;
    gap: .5rem;
    padding: .75rem;
}

.import-file {
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.import .field-label {
    margin: 0 0 .3rem;
}

.import .field {
    min-height: 2.75rem;
}

.import-actions {
    justify-content: flex-end;
}

.note {
    color: var(--eb-text-soft);
    font-size: .8rem;
}

/* Over the viewport: in full screen, and on a phone from Play on, because a
   frame cannot go to real full screen on an iPhone. One narrow rail of
   commands at the left and the frame has everything else. game-player.js sets
   is-cover, and is-phone where the screen is a phone's. */
.game-player.is-cover {
    background: #000;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 50;
}

.is-cover .player-stage {
    border-radius: 0;
    height: 100%;
}

.is-cover .game-frame {
    aspect-ratio: auto;
    height: 100%;
    width: 100%;
}

.is-cover .player-bar {
    flex-direction: column;
    gap: .35rem;
    margin: 0;
    order: -1;
    padding: .5rem .3rem .5rem max(.3rem, env(safe-area-inset-left));
}

.is-cover .player-bar .spacer {
    display: none;
}

.is-cover .pb-saves {
    justify-content: center;
    padding: 0;
    width: 2.75rem;
}

.is-cover .pb-word {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.is-cover .saves {
    border-radius: 0;
}

/* The way out comes first on a phone, which has no full screen to offer; in
   full screen the first command leaves full screen, and the game stays. */
.is-cover .pb-close {
    order: -1;
}

.is-phone .pb-full {
    display: none;
}

.is-cover:not(.is-phone) .pb-full {
    order: -1;
}

.is-cover:not(.is-phone) .pb-close {
    display: none;
}

/* Held upright: the game is a landscape picture and its pad needs the room
   beside it, so the page asks for the turn. The rail becomes a bar across the
   top, and the saves take the whole width. The game keeps running behind. */
@media (orientation: portrait) {
    .is-cover.is-phone {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
    }

    .is-cover.is-phone .player-bar {
        flex-direction: row;
        justify-content: space-between;
        padding: max(.5rem, env(safe-area-inset-top)) .6rem .5rem;
    }

    .is-cover.is-phone .game-frame > *,
    .is-cover.is-phone .game-frame iframe {
        visibility: hidden;
    }

    .is-cover.is-phone .game-frame > .turn {
        display: grid;
        font-weight: 800;
        gap: 1rem;
        justify-items: center;
        text-align: center;
        visibility: visible;
    }

    .is-cover.is-phone .turn .icon {
        color: var(--eb-gold);
        height: 3.4rem;
        width: 3.4rem;
    }

    .is-cover.is-phone .game-frame.is-failed > .stage-msg.is-failure {
        visibility: visible;
    }

    .is-cover.is-phone .game-frame.is-failed > .turn {
        display: none;
    }

    .is-cover.is-phone .saves {
        width: 100%;
    }
}

/* Notices ---------------------------------------------------------------- */

.notice {
    margin: 0 auto;
    max-width: 34rem;
    padding: 2.5rem 0 1rem;
}

.notice h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: .4rem;
}

.notice p {
    color: var(--eb-text-soft);
    font-size: 1.04rem;
}

.notice p + p {
    margin-top: .6rem;
}

.lost .search {
    margin-top: 1rem;
}

.notice .actions {
    display: grid;
    gap: .25rem;
    margin-top: 1rem;
}

.notice .facts {
    margin-bottom: 1rem;
}

/* The report form: its choices are commands, the one chosen under the cursor. */
.choices {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.choice input {
    accent-color: var(--eb-gold);
    flex: none;
    height: 1.05rem;
    margin: 0;
    width: 1.05rem;
}

.choice:has(input:checked) {
    animation: eb-breathe 1.2s ease-in-out infinite;
    background: var(--eb-cursor);
    box-shadow: inset 0 0 0 1px var(--eb-cursor-edge);
}

.field-label {
    color: var(--eb-system);
    display: block;
    font-size: .85rem;
    font-weight: 800;
    margin: 1rem .2rem .35rem;
    padding: 0;
}

.choices:first-of-type .field-label {
    margin-top: 0;
}

.field {
    background: var(--eb-well);
    border: 0;
    border-radius: var(--eb-corner-small);
    color: var(--eb-text);
    font: inherit;
    min-height: 6.5rem;
    padding: .7rem .85rem;
    resize: vertical;
    text-shadow: inherit;
    width: 100%;
}

.notice .hint,
.notice .refusal {
    font-size: .82rem;
    margin: .35rem .2rem 0;
}

.notice .refusal {
    color: var(--eb-gold);
    font-weight: 700;
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
    padding: 2rem 0 1.5rem;
}

.site-footer .window {
    display: grid;
    gap: .75rem;
}

.site-footer p {
    color: var(--eb-text-soft);
    font-size: .85rem;
}

.site-footer .command {
    min-height: 2.5rem;
    padding: 0 .6rem;
}

.age {
    background: linear-gradient(90deg, var(--eb-gauge-start), var(--eb-gauge-end));
    border-radius: 3px;
    font-weight: 800;
    margin-right: .35rem;
    padding: 0 .35rem;
}

@media (min-width: 56rem) {
    .site-footer .window {
        align-items: center;
        grid-template-columns: 1fr auto;
    }
}
