/* Shared site chrome and the open, landscape homepage. */
:root { --paper: #f5f3ea; --ink: #171421; --muted: #686473; --lavender: #e5d9f6; --link: #5314c5; }
body::before { background-image: radial-gradient(#786f5910 .6px, transparent .6px); background-size: 4px 4px; }
.site-shell { width: min(1100px, calc(100% - 96px)); margin: auto; }
.site-header { border: 0; padding: 26px 0; gap: 24px; }
.brand { flex-shrink: 0; letter-spacing: 0; }
.brand-logo { display: block; width: 292px; height: auto; max-width: 100%; color: var(--ink); }
.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav a { padding: 6px 15px; border: 1px solid transparent; text-decoration: none; font-size: 12px; color: var(--muted); }
.main-nav a:hover, .main-nav a.is-active { border-color: #aab699; background: #e9edde; color: #351073; }
.main-nav a.is-active { font-weight: 700; }
.guest-badge { padding: 7px 15px; border-color: #aab699; background: #e4ead8; letter-spacing: 0; }
.home-page { overflow-x: clip; }
.home-hero { position: relative; width: 100vw; margin-left: calc(50% - 50vw); height: 230px; background: url('../images/hero-landscape.svg') center bottom 28px / 100% 220px no-repeat; }
.hero-inner { position: relative; width: min(1100px, calc(100% - 96px)); height: calc(100% - 28px); margin: auto; }
.hero-welcome { display: flex; align-items: center; gap: 27px; padding-top: 69px; margin-left: 19%; }
.hero-welcome h1 { margin: 0; flex: 0 0 275px; }
.hero-welcome h1 img { width: 100%; }
.hero-welcome h2 { margin: 0 0 3px; font-size: 14px; }
.hero-welcome p { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pixel-pals { width: 144px; height: auto; flex-shrink: 0; image-rendering: pixelated; }
.hero-friends { position: absolute; right: -20px; bottom: 0; display: flex; gap: 24px; align-items: flex-end; }
.hero-pals { width: 160px; transform: translateY(8px); }
.pets-animated .hero-pals { opacity: 0; }
.hero-pet-stage { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pets-animated .hero-pet-stage { display: block; }
.hero-pet { position: absolute; left: 0; top: 0; transform-origin: center bottom; will-change: transform; }
.hero-pet-piece { position: absolute; inset: 0; background: url('../images/pixel-pals.png?v=3') no-repeat; background-size: var(--pet-atlas-width) var(--pet-atlas-height); background-position: var(--pet-atlas-x) var(--pet-atlas-y); image-rendering: pixelated; transform-origin: center bottom; }
.hero-pet-body { clip-path: inset(0 0 8% 0); }
.hero-pet-foot-left { clip-path: inset(90% 50% 0 0); }
.hero-pet-foot-right { clip-path: inset(90% 0 0 50%); }
.pet-motion-toggle { position: absolute; top: 8px; right: max(18px, calc((100% - 1100px) / 2)); z-index: 4; border: 1px solid #b4bda5; padding: 4px 8px; background: #f5f3ea; color: #686473; font: 10px/1.5 'Courier New', monospace; cursor: pointer; }
.pet-motion-toggle:hover { border-color: #71549f; color: #5314c5; background: #ebe1f7; }
.pet-motion-toggle[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
    .hero-pet-stage, .pet-motion-toggle { display: none !important; }
    .pets-animated .hero-pals { opacity: 1; }
}
.hero-play-sign { position: relative; margin-bottom: 32px; padding: 8px 12px; border: 3px solid #171d17; background: #e5eddc; box-shadow: inset 3px 3px 0 #c5d6b7, 3px 3px 0 #7c986c; text-decoration: none; font-weight: 700; font-size: 14px; z-index: 1; }
.hero-play-sign::after { content: ''; position: absolute; width: 9px; height: 32px; border: 2px solid #171d17; background: #87a66e; top: calc(100% + 3px); left: calc(50% - 4px); }
.hero-play-sign:hover { background: #d4e5bf; }
.hero-floor { position: absolute; bottom: 0; width: 100%; height: 28px; border-top: 2px solid #829b6e; border-bottom: 3px solid #26321e; background: #e2e8d1; }
.hero-floor::after { content: ''; display: block; margin-top: 8px; height: 3px; background: repeating-linear-gradient(90deg, transparent 0 48px, #91ab78 48px 55px, transparent 55px 94px); }
.genre-section { margin-top: 39px; scroll-margin-top: 20px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.9px; line-height: 1.3; }
.section-eyebrow { font-size: 11px; letter-spacing: 0; color: #9271c9; margin: 0 0 3px; }
.section-caption { font-size: 11px; color: var(--muted); margin: 18px 0 0; }
.genre-menu { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 16px; padding: 0; }
.genre-link { min-height: 60px; gap: 13px; padding: 10px 18px; border: 1px solid #aab599; background: #f8f7f0; box-shadow: inset 0 0 0 1px #ffffff80; font-size: 12px; }
.genre-link-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.35; }
.genre-link .genre-count { font-size: 10px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.genre-link.is-active { background: #e4d6f4; border: 2px solid var(--ink); padding: 9px 17px; box-shadow: inset 0 0 0 2px #f2eafa; }
.pixel-icon { width: 24px; height: 24px; flex: 0 0 24px; overflow: visible; }
.genre-more-trigger { cursor: pointer; color: inherit; font-family: inherit; text-align: left; }
.more-chevron { margin-left: auto; font-size: 19px; line-height: 1; }
.genres-popup-open { overflow: hidden; }
.genre-popup { width: min(760px, calc(100% - 36px)); max-height: calc(100dvh - 48px); padding: 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); box-shadow: 7px 7px 0 #17142155; overflow-y: auto; overscroll-behavior: contain; }
.genre-popup::backdrop { background: #17142188; backdrop-filter: blur(3px); }
.genre-popup[open] { animation: genre-popup-enter .16s ease-out; }
.genre-popup-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border-bottom: 2px solid var(--ink); background: #e4d6f4; }
.genre-popup-bar > span { display: flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 700; }
.genre-popup-bar .pixel-icon { width: 18px; height: 18px; flex-basis: 18px; }
.genre-popup-close { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; padding: 0; border: 2px solid var(--ink); background: #f8f7f0; color: var(--ink); font: 700 24px/1 'Courier New', monospace; cursor: pointer; }
.genre-popup-close:hover { background: #cab1ed; }
.genre-popup-content { padding: 25px; }
.genre-popup-content h2 { margin: 2px 0 5px; font-size: 25px; line-height: 1.3; letter-spacing: -.8px; }
.genre-popup-content > p:not(.section-eyebrow) { color: var(--muted); font-size: 12px; margin: 0 0 20px; }
.more-genres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.genre-popup-link { display: flex; align-items: center; gap: 10px; padding: 11px 10px; min-height: 72px; border: 1px solid #aab599; background: #f9f7f0; text-decoration: none; }
.genre-popup-link:hover, .genre-popup-link.is-active { border-color: #71549f; background: #ebe1f7; box-shadow: inset 0 0 0 1px #b89bd8; }
.genre-popup-icon { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; background: #e4ead8; border: 1px solid #b4bda5; }
.genre-popup-link:nth-child(3n + 2) .genre-popup-icon { background: #e5d9f6; border-color: #c7b5df; }
.genre-popup-link:nth-child(3n) .genre-popup-icon { background: #f2e5bb; border-color: #d6c896; }
.genre-popup-label { display: flex; flex-direction: column; gap: 4px; }
.genre-popup-label strong { font-size: 13px; line-height: 1.3; }
.genre-popup-label > span { color: var(--muted); font-size: 10px; }
.genre-popup-arrow { margin-left: auto; color: #71549f; }
.genre-popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #c5c9ba; padding-top: 17px; margin-top: 23px; font-size: 10px; color: var(--muted); }
.genre-popup-footer a { color: var(--link); font-weight: 700; text-underline-offset: 3px; }
@keyframes genre-popup-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .genre-popup[open] { animation: none; } }
.featured-section { border-top: 1px solid #8d9185; padding-top: 25px; margin-top: 31px; scroll-margin-top: 24px; }
.soft-button { display: inline-block; padding: 9px 18px; border: 1px solid #aab699; background: #e4ead8; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: inset 0 0 0 1px #ffffff60; }
.soft-button:hover { background: #d4dfc2; border-color: #81906d; }
.section-description { margin: 3px 0 18px; font-size: 12px; color: var(--muted); }
.home-page .game-grid { margin-top: 0; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-page .game-card { border: 2px solid var(--ink); box-shadow: 2px 3px 0 #c6c9bb; background: #f9f7f0; }
.home-page .game-card:hover { border-color: var(--link); box-shadow: 2px 3px 0 #bda5dc; }
.home-page .game-card-art { padding: 0; height: auto; aspect-ratio: 16 / 9; background-image: none; background-color: #e0e7d5; border-bottom-width: 1px; overflow: hidden; }
.home-page .game-card:nth-child(3n + 2) .game-card-art { background-color: #e3d7f5; }
.home-page .game-card:nth-child(3n) .game-card-art { background-color: #f2e5bb; }
.home-page .game-card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-page .card-play { right: 12px; bottom: 7px; width: 31px; height: 31px; font-size: 14px; border: 2px solid var(--ink); background: #fcfbf7; }
.home-page .game-card-copy { padding: 9px 16px 13px; }
.home-page .card-genre { font-size: 11px; color: var(--link); letter-spacing: 0; text-decoration: underline; }
.home-page .game-card h3 { font-size: 17px; margin: 1px 0 3px; line-height: 1.4; letter-spacing: -.4px; }
.home-page .game-card p { font-size: 13px; line-height: 1.5; margin-bottom: 11px; }
.home-page .card-play-label { font-size: 14px; color: var(--link); }
.coming-card { position: relative; border: 1px dashed #bdc5b0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; }
.coming-card.span-two { grid-column: span 2; }
.coming-card.span-three { grid-column: span 3; }
.coming-card h3 { font-size: 16px; margin: 10px 0 0; }
.coming-card p { color: var(--muted); font-size: 12px; margin: 1px 0 18px; }
.coming-spark { position: absolute; color: #b095d0; }
.spark-a { left: 14%; top: 25%; }
.spark-b { right: 17%; bottom: 28%; color: #bda75e; }
.empty-genre { border: 1px dashed #bdc5b0; padding: 40px 20px; text-align: center; }
.empty-genre img { margin: auto; }
.empty-genre h3 { font-size: 18px; }
.empty-genre p { color: var(--muted); }
.site-footer { display: block; border-top: 2px solid var(--ink); margin-top: 44px; padding: 23px 0 25px; letter-spacing: 0; }
.footer-content { display: flex; align-items: center; gap: 24px; }
.footer-brand { flex-shrink: 0; text-decoration: none; }
.footer-brand .brand-logo { width: 220px; }
.footer-nav { display: flex; align-items: center; gap: 0; }
.footer-nav a { padding: 0 14px; border-left: 1px solid #92918d; text-decoration: none; }
.footer-nav a:hover { color: var(--link); text-decoration: underline; }
.footer-note { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 11px; }
.footer-note .pixel-icon { width: 21px; height: 21px; flex-basis: 21px; }
.footer-support { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 17px; border-top: 1px dashed #c5c9ba; }
.footer-support p { margin: 0; font-size: 11px; color: var(--muted); }
.donate-button { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 2px solid var(--ink); background: #e5d9f6; box-shadow: 3px 3px 0 #c6b2df; color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.donate-button .pixel-icon { width: 19px; height: 19px; flex-basis: 19px; }
.donate-button:hover { background: #d5c0ee; box-shadow: 3px 3px 0 #a58ac6; }
.donate-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #a58ac6; }
.footer-meta { display: flex; justify-content: space-between; margin-top: 18px; font-size: 9px; opacity: .8; }
.about-page { padding: 42px 0 0; }
.about-page h1 { font-size: clamp(25px, 4vw, 36px); margin: 5px 0; }
.about-page > p:not(.section-eyebrow) { color: var(--muted); max-width: 650px; }
.about-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin: 30px 0; }
.about-notes article { padding: 24px; border: 1px solid #aab599; background: #f8f7f0; }
.about-notes h2 { font-size: 18px; margin: 0 0 8px; }
.about-notes p { color: var(--muted); font-size: 13px; margin: 0; }
.about-page .coming-card { min-height: 260px; scroll-margin-top: 20px; }
/* Keep the game at the top of its page, with secondary information below. */
.play-page .site-header { min-height: 68px; padding: 14px 0; gap: 18px; flex-wrap: nowrap; }
.play-page .brand-logo { width: 248px; }
.play-page .main-nav { width: auto; order: initial; margin-left: auto; }
.play-page .main-nav .play-back-link { padding: 5px 12px; border-color: #aab699; background: #e4ead8; color: var(--ink); font-weight: 700; }
.play-page .guest-badge { font-size: 10px; padding: 6px 10px; margin-left: 0; }
.play-page .player-shell { box-shadow: 3px 4px 0 #c6c9bb; border-width: 2px; }
.play-page .player-toolbar { min-height: 48px; border-bottom-width: 2px; }
.player-toolbar h1 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.4px; }
.play-details { margin-top: 16px; color: var(--muted); border-bottom: 1px solid #c5c9ba; }
.play-details summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0 12px; font-size: 12px; list-style: none; }
.play-details summary::-webkit-details-marker { display: none; }
.play-details summary > span { font-size: 20px; line-height: 1; }
.play-details[open] summary > span { transform: rotate(45deg); }
.play-details-content { padding: 0 0 16px; font-size: 12px; }
.play-details-content > p { margin: 0; }
.play-details-content .game-tags { margin: 12px 0; }
.play-details-content .guest-play-note { margin: 12px 0 0; font-size: 11px; }
.play-page .site-footer { margin-top: 22px; }
@media (min-width: 1024px) {
    .play-page .player-shell { height: clamp(420px, calc(100dvh - 84px), 1100px); }
}
@media (max-width: 700px) {
    .play-page .site-header { min-height: 60px; gap: 10px; padding: 12px 0; }
    .play-page .brand { gap: 7px; }

    .play-page .main-nav .play-back-link { font-size: 10px; padding: 6px 8px; white-space: nowrap; }
    .play-page .guest-badge { display: none; }
    .player-toolbar h1 { font-size: 13px; }
    .play-page .player-toolbar { padding: 6px 9px; gap: 8px; }
}
@media (max-width: 1100px) and (min-width: 701px) {
    .main-nav a { padding: 6px 10px; }
    .brand-logo { width: 260px; }
    .site-header { gap: 14px; }
    .hero-welcome { gap: 23px; }
    .hero-welcome h1 { flex-basis: 275px; }
    .hero-welcome p { font-size: 11px; }
    .genre-link { padding: 10px 12px; gap: 10px; font-size: 11px; }
    .genre-link.is-active { padding: 9px 11px; }
    .footer-content { gap: 14px; }
    .footer-nav a { padding: 0 10px; }
    .footer-note { font-size: 10px; }
}
@media (max-width: 900px) and (min-width: 701px) {
    .site-shell, .hero-inner { width: calc(100% - 48px); }
    .hero-welcome { margin-left: 13%; }
    .hero-welcome h1 { flex-basis: 240px; }
    .brand-logo { width: 232px; }
    .guest-badge { padding: 7px 9px; font-size: 10px; }
    .genre-link { padding: 10px 9px; gap: 7px; }
    .genre-link.is-active { padding: 9px 8px; }
    .footer-content { flex-wrap: wrap; }
    .footer-note { margin-left: 0; }
}
@media (max-width: 760px) and (min-width: 701px) {
    .site-header .brand-logo { width: 212px; }
}
@media (max-width: 700px) {
    .site-shell, .hero-inner { width: calc(100% - 36px); }
    .site-header { flex-wrap: wrap; gap: 16px 8px; padding: 21px 0 16px; }
    .brand { gap: 8px; }
    .brand-logo { width: 200px; }
    .guest-badge { margin-left: auto; padding: 5px 7px; font-size: 9px; }
    .main-nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: 8px; }
    .main-nav a { text-align: center; flex: 1; padding: 5px 8px; font-size: 11px; }
    .home-hero { height: 287px; background-size: 100% 165px; }
    .hero-welcome { margin: 0; padding-top: 52px; flex-direction: column; gap: 12px; text-align: center; }
    .hero-welcome h1 { flex: none; width: 250px; }
    .hero-welcome h2 { font-size: 12px; }
    .hero-welcome p { font-size: 10px; white-space: normal; }
    .hero-friends { right: 0; gap: 24px; }
    .hero-pals { width: 136px; transform: translateY(7px); }
    .hero-play-sign { font-size: 11px; padding: 5px 10px; margin-bottom: 26px; }
    .hero-play-sign::after { height: 26px; }
    .genre-section { margin-top: 28px; }
    .section-heading { gap: 12px; }
    .section-heading h2 { font-size: 22px; }
    .section-eyebrow { font-size: 10px; }
    .section-caption { font-size: 9px; max-width: 90px; text-align: right; }
    .genre-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .genre-link { min-height: 56px; padding: 8px; gap: 7px; font-size: 10px; }
    .genre-link .genre-count { font-size: 9px; }
    .genre-link.is-active { padding: 7px; }
    .pixel-icon { width: 20px; height: 20px; flex-basis: 20px; }
    .genre-popup { max-height: calc(100dvh - 32px); }
    .genre-popup-bar { padding: 9px 11px; }
    .genre-popup-bar > span { font-size: 9px; }
    .genre-popup-content { padding: 20px 14px; }
    .genre-popup-content h2 { font-size: 22px; }
    .genre-popup-content > p:not(.section-eyebrow) { font-size: 11px; }
    .more-genres { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .genre-popup-link { flex-wrap: wrap; padding: 12px 10px; gap: 10px; }
    .genre-popup-icon { width: 35px; height: 35px; }
    .genre-popup-label { flex: 1 0 100%; }
    .genre-popup-label strong { font-size: 12px; }
    .genre-popup-arrow { display: none; }
    .genre-popup-footer { flex-direction: column; align-items: flex-start; }
    .featured-section { margin-top: 25px; padding-top: 22px; }
    .soft-button { padding: 7px 11px; font-size: 10px; }
    .section-description { font-size: 11px; margin: 8px 0 16px; }
    .home-page .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .home-page .card-play { width: 24px; height: 24px; right: 6px; bottom: 6px; font-size: 11px; }
    .home-page .game-card-copy { padding: 9px 10px 12px; }
    .home-page .card-genre { font-size: 9px; }
    .home-page .game-card h3 { font-size: 15px; }
    .home-page .game-card p { font-size: 11px; }
    .home-page .card-play-label { font-size: 12px; }
    .coming-card.span-one, .coming-card.span-two, .coming-card.span-three { grid-column: 1 / -1; min-height: 235px; }
    .coming-card { padding: 24px 12px; }
    .coming-card h3 { font-size: 15px; }
    .coming-card p { font-size: 11px; }
    .site-footer { margin-top: 33px; }
    .footer-content { flex-wrap: wrap; justify-content: space-between; gap: 18px 8px; }
    .footer-brand .brand-logo { width: 180px; }
    .footer-nav a { padding: 0 7px; font-size: 9px; }
    .footer-note { margin-left: 0; font-size: 10px; width: 100%; }
    .footer-support { flex-wrap: wrap; gap: 12px; }
    .footer-support p { font-size: 10px; }
    .donate-button { font-size: 11px; }
    .about-page { padding-top: 25px; }
    .about-notes { grid-template-columns: 1fr; gap: 15px; }
}

/* Keep focused controls readable without triggering iOS form-field auto zoom. */
@media (max-width: 900px), (pointer: coarse) {
    input, select, textarea { font-size: 16px !important; }
}
@media (max-width: 370px) {
    .genre-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-page .game-grid { grid-template-columns: 1fr; }
}

.header-donate { flex-shrink: 0; padding: 6px 10px; font-size: 11px; gap: 7px; }
@media (max-width: 1100px) and (min-width: 701px) {
    .site-header { gap: 12px; }
    .main-nav a { padding: 6px 8px; }
    .header-donate { padding: 6px 8px; font-size: 10px; }
}
@media (max-width: 700px) {
    .site-header .guest-badge { display: none; }
    .header-donate { margin-left: auto; padding: 6px 9px; font-size: 10px; }
    .play-page .header-donate { margin-left: 0; padding: 6px; }
    .play-page .header-donate > span { display: none; }
}

/* Player accounts share the same public navigation for every role. */
.auth-links { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.header-account { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; background: #e4ead8; border: 1px solid #aab699; text-decoration: none; font-size: 11px; font-weight: 700; white-space: nowrap; }
.header-account:hover { background: #d4dfc2; }
.account-avatar { color: #638451; font-size: 17px; line-height: 1; }
.header-account > .player-pixel-avatar { display: block; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid #aaa18e; }
.account-avatar.pixel-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.account-name { max-width: 82px; overflow: hidden; text-overflow: ellipsis; }
.header-register { font-size: 11px; color: var(--link); white-space: nowrap; }
.account-screen { margin: 35px 0 45px; }
.account-screen h1 { margin: 5px 0 10px; font-size: clamp(24px, 3vw, 34px); line-height: 1.3; letter-spacing: -.8px; }
.account-heading h1 { overflow-wrap: anywhere; min-width: 0; }
.account-screen h2 { font-size: 20px; }
.account-intro, .ranking-note { color: var(--muted); max-width: 760px; }
.ranking-note { font-size: 11px; }
.auth-screen { max-width: 470px; margin: 36px auto 50px; }
.account-form { display: flex; flex-direction: column; gap: 9px; padding: 24px; margin-top: 20px; border: 1px solid #aab599; background: #f8f7f0; }
.account-form label { font-size: 12px; font-weight: 700; margin-top: 6px; }
.account-form input { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #aab599; background: #fffdf7; color: var(--ink); font: 14px 'Courier New', monospace; }
.account-form small { font-size: 10px; color: var(--muted); }
.account-form button { font: 700 12px 'Courier New', monospace; cursor: pointer; margin-top: 15px; min-height: 42px; }
.form-error, .account-notice { border: 1px solid #b56a70; background: #f9e7e4; padding: 12px 15px; font-size: 12px; }
.account-notice { border-color: #aab599; background: #e4ead8; }
.auth-switch { text-align: center; font-size: 12px; }
.auth-switch a, .account-empty a { color: var(--link); }
.account-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.account-heading button { font: 700 12px 'Courier New', monospace; cursor: pointer; }
.account-stats { display: flex; gap: 16px; margin: 25px 0; }
.account-stats > * { display: flex; flex-direction: column; gap: 5px; padding: 18px 24px; background: #e4ead8; border: 1px solid #aab599; text-decoration: none; }
.account-stats strong { font-size: 26px; color: var(--link); }
.account-stats span { font-size: 11px; }
.account-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 35px; }
.account-columns > section { min-width: 0; }
.account-empty { border: 1px dashed #aab599; padding: 24px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.pixel-table { border-collapse: collapse; width: 100%; font-size: 12px; background: #f8f7f0; }
.pixel-table th, .pixel-table td { text-align: left; padding: 14px; border-bottom: 1px solid #c5c9ba; }
.pixel-table th { background: #e5d9f6; font-size: 11px; }
.pixel-table a { color: var(--link); }
.pixel-table tr.is-you { background: #e4ead8; }
.favorite-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.favorite-card { border: 2px solid var(--ink); background: #f8f7f0; padding: 0 20px 20px; overflow: hidden; }
.favorite-card > a { text-decoration: none; }
.favorite-card .favorite-thumbnail { display: block; width: calc(100% + 40px); max-width: none; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin: 0 -20px 15px; }
.favorite-card h2 { font-size: 18px; }
.favorite-card p { font-size: 12px; color: var(--muted); }
.favorite-card a > span { color: var(--link); font-weight: 700; }
.text-button { border: 0; padding: 0; margin-top: 18px; background: none; color: var(--muted); text-decoration: underline; font: 11px 'Courier New', monospace; cursor: pointer; }
.role-form { display: flex; gap: 8px; }
.role-form select { font: inherit; background: #fffdf7; border: 1px solid #aab599; }
.role-form button { font: inherit; cursor: pointer; }
.player-toolbar-actions { gap: 12px; }
.player-ranking { font-size: 11px; text-underline-offset: 3px; }
.favorite-toggle { display: grid; place-items: center; min-width: 34px; height: 34px; border: 2px solid var(--ink); background: #f8f7f0; color: #71549f; font: 22px/1 'Courier New', monospace; text-decoration: none; cursor: pointer; }
.favorite-toggle.is-favorite { background: #f5dfe6; color: #b84967; }
.player-save-info { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.player-save-info a { color: var(--link); }
@media (max-width: 1100px) { .header-register { display: none; } }
@media (max-width: 900px) and (min-width: 701px) { .account-name { max-width: 65px; } .header-account { font-size: 10px; padding: 6px; } }
@media (max-width: 700px) {
    .account-name { display: none; }
    .header-account { padding: 6px; margin-left: auto; }
    .auth-links { margin-left: auto; }
    .header-donate { margin-left: 0; }
    .site-header { column-gap: 9px; }
    .play-page .site-header { gap: 8px; }
    .play-page .brand-logo { width: 168px; }
    .account-columns, .favorite-grid { grid-template-columns: 1fr; }
    .account-stats { gap: 10px; }
    .account-stats > * { padding: 14px; flex: 1; }
    .account-form { padding: 18px; }
    .account-heading { flex-wrap: wrap; }
    .pixel-table th, .pixel-table td { padding: 10px; font-size: 11px; }
    .player-toolbar-actions { gap: 7px; }
    .player-ranking { font-size: 9px; }
    .favorite-toggle { min-width: 30px; height: 30px; }
    .player-save-info { flex-direction: column; }
}
@media (max-width: 370px) { .player-toolbar h1 { font-size: 11px; } .player-ranking { font-size: 8px; } .fullscreen-button { font-size: 9px; } }
@media (max-width: 370px) {
    .site-header .brand-logo { width: 180px; }
    .play-page .site-header .brand-logo { width: 132px; }
    .header-donate > span { display: none; }
    .play-page .site-header { gap: 4px; }
    .play-page .main-nav .play-back-link { padding: 6px; font-size: 9px; }
}

/* A single navigation bar, shared by public and manager lists. */
.pagination-block { container: pagination / inline-size; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px; margin: 30px 0 6px; padding: 22px 0 0; border-top: 1px solid #d8d5dc; }
.pagination-block--no-jump { grid-template-columns: minmax(0, 1fr) auto; }
.pagination-meta { min-width: 0; }
.pagination-summary { margin: 0; color: #746b7b; font-size: 12px; line-height: 1.7; }
.pagination-summary strong { color: #453a50; font-weight: 700; }
.pagination-page-status { display: block; margin-top: 3px; color: #8b7e98; font-size: 11px; line-height: 1.5; }
.pagination-nav { display: flex; align-items: center; justify-content: center; gap: 9px; min-width: 0; }
.pagination-list { display: flex; align-items: center; justify-content: center; gap: 2px; list-style: none; padding: 4px; margin: 0; background: #eeece6; border: 1px solid #dfdbe4; border-radius: 5px; }
.pagination-number, .pagination-direction { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1; transition: background-color .12s, color .12s, border-color .12s; }
.pagination-number { min-width: 32px; min-height: 32px; padding: 7px; border: 0; border-radius: 3px; background: transparent; color: #635a6d; }
.pagination-number:hover { background: #fffdf8; color: #5b328f; }
.pagination-number.is-current { background: #604092; color: #fff; box-shadow: 0 1px 3px #33224622; }
.pagination-direction { gap: 6px; min-height: 42px; padding: 9px 12px; border: 1px solid #d6d0dd; border-radius: 5px; background: #fcfbf7; color: #50425e; }
.pagination-direction svg, .pagination-jump button svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; }
.pagination-direction:not(.is-disabled):hover { background: #eee7f6; border-color: #a08bb9; color: #5b328f; }
.pagination-direction.is-disabled { background: transparent; color: #b0aab5; border-color: #e2dee5; }
.pagination-number:focus-visible, .pagination-direction:focus-visible, .pagination-jump button:focus-visible { outline: 2px solid #76539f; outline-offset: 3px; }
.pagination-ellipsis { display: grid; place-items: center; min-width: 22px; min-height: 32px; color: #938a9c; font-size: 12px; }
.pagination-compact { display: none; }
.pagination-jump { display: flex; align-items: center; justify-self: end; gap: 9px; margin: 0; color: #776782; font-size: 11px; white-space: nowrap; }
.pagination-jump-control { display: flex; align-items: stretch; height: 40px; border: 1px solid #d4cddd; border-radius: 5px; overflow: hidden; background: #fcfbf7; }
.pagination-jump-control:focus-within { border-color: #8c70ac; box-shadow: 0 0 0 2px #76539f16; }
.pagination-jump input { width: 43px; min-width: 0; height: 100%; padding: 5px; border: 0; outline: none; background: transparent; color: #4c3e5c; font: 700 13px 'Courier New', monospace; text-align: center; appearance: textfield; -moz-appearance: textfield; }
.pagination-jump input::-webkit-inner-spin-button, .pagination-jump input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.pagination-jump button { display: grid; place-items: center; width: 35px; padding: 0; border: 0; border-left: 1px solid #ddd4e7; background: #eee7f6; color: #67438f; cursor: pointer; }
.pagination-jump button:hover { background: #dfd1ef; }
@container pagination (max-width: 940px) {
    .pagination-meta { grid-column: 1; grid-row: 1; }
    .pagination-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
    .pagination-jump { grid-column: 2 / -1; grid-row: 1; }
}
@container pagination (max-width: 560px) {
    .pagination-page-status { display: none; }
    .pagination-nav { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; justify-self: stretch; width: 100%; }
    .pagination-list { display: none; }
    .pagination-previous { grid-column: 1; justify-self: start; }
    .pagination-next { grid-column: 3; justify-self: end; }
    .pagination-compact { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; grid-column: 2; grid-row: 1; font-size: 12px; }
    .pagination-compact strong { color: #604092; font-size: 16px; }
    .pagination-compact > span { color: #968b9f; font-size: 11px; }
    .pagination-direction { min-height: 42px; font-size: 12px; padding: 9px 11px; }
    .pagination-summary { font-size: 11px; }
    .pagination-jump { gap: 6px; font-size: 11px; }
}
@container pagination (max-width: 340px) {
    .pagination-jump label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .pagination-direction { padding: 9px 8px; }
}
@media (max-width: 600px) { .pagination-block, .pagination-block--no-jump { grid-template-columns: minmax(0, 1fr) auto; gap: 16px 12px; } }
@media (prefers-reduced-motion: reduce) { .pagination-number, .pagination-direction { transition: none; } }
.settings-panel { margin: 28px 0; border: 2px solid var(--ink); background: #f8f7f0; padding: 24px; scroll-margin-top: 20px; }
.settings-panel h2 { margin: 2px 0 7px; }
.settings-panel > p:not(.section-eyebrow) { color: var(--muted); font-size: 12px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 28px; margin: 23px 0; }
.settings-grid label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
.settings-number { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.settings-number input { width: 82px; height: 42px; border: 1px solid #aab599; background: #fffdf7; color: var(--ink); font: 14px 'Courier New', monospace; padding: 9px; }
.settings-panel button { font: 700 12px 'Courier New', monospace; cursor: pointer; min-height: 40px; }
#installed-games, #player-accounts, #personal-bests { scroll-margin-top: 20px; }
@media (max-width: 700px) {
    .settings-panel { padding: 18px; }
    .settings-grid { grid-template-columns: 1fr; }
}

/* Catalog ordering stays with genre filters and pagination. */
.catalog-heading { flex-wrap: wrap; }
.catalog-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0; }
.catalog-search { display: flex; flex: 1; max-width: 540px; min-width: 0; margin: 0; gap: 8px; }
.catalog-search-field { display: flex; flex: 1; min-width: 0; align-items: center; gap: 10px; padding-left: 12px; border: 1px solid #aab599; border-radius: 4px; background: #fcfbf7; color: var(--muted); }
.catalog-search-field:focus-within { border-color: var(--link); outline: 2px solid #5314c522; outline-offset: 2px; }
.catalog-search-field > svg { flex-shrink: 0; }
.catalog-search input[type="search"] { width: 100%; min-width: 0; min-height: 42px; padding: 10px 8px 10px 0; border: 0; outline: none; background: transparent; color: var(--ink); font: 12px 'Courier New', monospace; border-radius: 4px; }
.catalog-search input::placeholder { color: #7b7585; opacity: 1; }
.catalog-search input::-webkit-search-cancel-button { appearance: none; }
.catalog-search-clear { display: grid; place-items: center; flex: 0 0 34px; min-height: 40px; color: var(--muted); border-radius: 3px; }
.catalog-search-clear:hover { background: #eee5f6; color: var(--link); }
.catalog-search button { min-height: 42px; padding: 10px 16px; border: 1px solid #aab599; border-radius: 4px; background: #e4ead8; color: var(--ink); font: 700 12px 'Courier New', monospace; cursor: pointer; }
.catalog-search button:hover { background: #d4dfc2; border-color: #81906d; }
.catalog-search button:focus-visible, .catalog-search-clear:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.catalog-search-summary { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.catalog-search-summary strong { color: var(--ink); }
.catalog-sort { display: flex; align-items: center; gap: 8px; margin: 0; }
.catalog-sort label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.catalog-sort select { appearance: none; min-height: 40px; max-width: 300px; border: 1px solid #ac98c4; border-radius: 4px; padding: 10px 36px 10px 12px; background: var(--lavender) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%235314c5' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 14px no-repeat; color: var(--ink); font: inherit; font-size: 11px; cursor: pointer; }
.catalog-sort select:hover { border-color: #71549f; background-color: #ddcef0; }
.catalog-sort select option { background: #fcfbf7; color: var(--ink); }
.catalog-sort button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--ink); background: var(--lavender); color: var(--ink); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; box-shadow: 2px 2px 0 #c6bbd3; }
.catalog-sort button:hover { background: #d5c0ef; }
.catalog-sort select:focus-visible, .catalog-sort button:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.catalog-sort-note { margin: -5px 0 18px; font-size: 11px; line-height: 1.6; color: var(--muted); }
.home-page .card-sort-fact { display: block; margin: -2px 0 10px; color: #62546e; font-size: 11px; line-height: 1.5; }
@media (max-width: 960px) {
    .catalog-toolbar { flex-wrap: wrap; gap: 14px; }
    .catalog-search { flex-basis: 100%; max-width: none; }
}
@media (max-width: 600px) {
    .catalog-sort { width: 100%; flex-wrap: wrap; gap: 7px; }
    .catalog-sort label { flex: 0 0 100%; }
    .catalog-sort select { flex: 1; width: 0; max-width: none; min-width: 0; font-size: 10px; min-height: 43px; }
    .catalog-sort button { min-height: 43px; }
    .catalog-sort-note { font-size: 10px; }
    .catalog-actions > .soft-button { margin-left: auto; }
}

/* Account ratings live outside portable game packages. */
.game-rating { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 18px 0 25px; padding: 20px 24px; border: 1px solid #bba8d0; background: #f4eff9; box-shadow: 3px 3px 0 #e1d7eb; scroll-margin-top: 22px; }
.rating-intro h2 { margin: 2px 0 7px; font-size: 19px; letter-spacing: -.5px; }
.rating-intro > p:last-child { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.rating-summary { display: flex; flex-direction: column; gap: 5px; min-width: 85px; text-align: center; white-space: nowrap; }
.rating-summary strong { color: #694199; font-size: 29px; }
.rating-summary > span:last-child, .rating-out-of { color: var(--muted); font-size: 11px; }
.rating-actions { width: 260px; flex-shrink: 0; }
.rating-actions form, .rating-actions fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.rating-stars { display: flex; align-items: center; gap: 6px; }
.rating-star { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 7px; border: 1px solid #c6b6d6; background: #fcfaf5; color: #c6bccf; box-shadow: 2px 2px 0 #ded3e7; cursor: pointer; }
.rating-star .rating-icon { width: 27px; height: 27px; filter: drop-shadow(1px 1px 0 #9685a0); }
.rating-star.is-filled { color: #e2ac41; background: #fff3d2; border-color: #c49e53; }
.rating-star[aria-pressed="true"] { outline: 2px solid #76539f; outline-offset: 2px; }
.rating-star:hover { border-color: #76539f; }
.rating-star:focus-visible { outline: 3px solid #694199; outline-offset: 3px; }
.rating-star:disabled { cursor: wait; opacity: .6; }
.rating-help { margin: 10px 0 0; font-size: 10px; line-height: 1.7; color: var(--muted); }
.rating-status { margin: 4px 0 0; font-size: 10px; line-height: 1.7; color: #4e6b3c; }
.rating-status:empty { display: none; }
.rating-status.is-error { color: #a03c46; }
.rating-login { display: inline-block; color: var(--link); font-size: 11px; line-height: 1.6; margin-top: 11px; text-underline-offset: 3px; }
.rating-stars-guest .rating-star { cursor: default; box-shadow: none; }
.card-rating { display: inline-flex; align-items: center; gap: 6px; color: #6e4c8c; font-size: 11px; line-height: 1.5; margin: 1px 0 10px; }
.card-rating .rating-icon { width: 15px; height: 15px; color: #bb8a2e; flex-shrink: 0; }
.card-rating-count, .card-rating.is-unrated { color: var(--muted); }
.card-rating.is-unrated .rating-icon { color: #bcb2c4; }
@media (max-width: 760px) {
 .game-rating { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 18px; gap: 18px 12px; }
 .rating-intro h2 { font-size: 17px; }.rating-intro > p:last-child { font-size: 10px; }
 .rating-summary { min-width: 64px; }.rating-summary strong { font-size: 25px; }
 .rating-actions { grid-column: 1 / -1; width: 100%; }.rating-stars { gap: 8px; }
 .rating-help, .rating-status { font-size: 10px; }
}

/* Menus authored in Manager > Content; details remain keyboard/touch accessible. */
.content-nav-item{position:relative;display:inline-flex;align-items:center}.content-nav-item>a,.content-nav-item summary{display:flex;align-items:center;gap:8px}.content-nav-item img{width:22px;height:22px;object-fit:contain;image-rendering:pixelated}.content-nav-item summary{padding:10px;cursor:pointer;list-style:none;font-size:inherit}.content-nav-item summary::-webkit-details-marker{display:none}.content-nav-item summary>span{margin-left:5px}.content-nav-children{position:absolute;z-index:30;top:100%;left:0;display:grid;gap:4px;min-width:190px;max-width:min(300px,80vw);padding:10px;background:#faf8ef;border:2px solid #362a48;box-shadow:4px 4px 0 #cec2dc}.content-nav-children>a,.content-nav-children>.content-nav-item{display:block;width:100%;white-space:normal}.content-nav-children .content-nav-children{position:static;border:0;border-left:2px solid #d5c6e7;box-shadow:none;padding:4px 0 4px 12px;min-width:0}.footer-nav .content-nav-children{top:auto;bottom:100%}.footer-nav .content-nav-children .content-nav-children{position:static}.main-nav:has(.content-nav-item){flex-wrap:wrap}.main-nav .content-nav-children a,.footer-nav .content-nav-children a{display:flex;border:0!important;padding:9px;text-decoration:none}.content-nav-children a:hover{background:#e4d7f1}.content-nav-item details:not([open])>.content-nav-children{display:none}

/* Published CMS footer links remain visible on every screen size. */
.has-content-menu .footer-content{display:grid;grid-template-columns:minmax(210px,.9fr) minmax(0,2fr);align-items:start;gap:26px 40px}
.has-content-menu .footer-brand{max-width:260px}
.has-content-menu .footer-brand .brand-logo{max-width:100%;height:auto}
.has-content-menu .footer-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:22px 28px}
.footer-menu-group{min-width:0}.footer-menu-group h2{font-size:13px;line-height:1.8;margin:0 0 14px}.footer-menu-group ul{list-style:none;margin:0;padding:0;display:grid;gap:12px}.footer-menu-group ul ul{margin:12px 0 0 10px;padding-left:10px;border-left:1px solid #c2b9ca}
.has-content-menu .footer-nav a{border:0;padding:0;display:inline-block;line-height:1.8;font-size:11px;overflow-wrap:anywhere}.has-content-menu .footer-menu-group h2 a{font-size:13px;color:var(--ink);font-weight:bold}.has-content-menu .footer-note{grid-column:1/-1;margin:0}.registration-policy-note{font-size:12px;line-height:1.9}
@media(max-width:900px){.has-content-menu .footer-content{grid-template-columns:1fr}.has-content-menu .footer-nav{width:100%}}
@media(max-width:540px){.has-content-menu .footer-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 18px}.has-content-menu .footer-nav a{font-size:11px}}
.main-nav>.content-nav-item:last-child>details>.content-nav-children{left:auto;right:0}
@media(max-width:560px){.main-nav:has(.content-nav-item){position:relative}.main-nav>.content-nav-item{position:static}.main-nav>.content-nav-item>details>.content-nav-children{left:0;right:0;min-width:0;max-width:none;width:100%;box-sizing:border-box}}

.game-preview-label { display: inline-block; margin: 0 0 8px; padding: 5px 7px; background: #eee7f6; border: 1px solid #b6a5cb; color: #614579; font-size: 9px; }
.site-mode-notice { margin: 12px 0 20px; padding: 16px; border: 2px solid #8a659c; background: #f4edf8; color: #422950; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.site-mode-notice[hidden] { display: none; }
.site-mode-notice p { margin: 8px 0 0; white-space: pre-wrap; }
.game-preview-notice { padding: 10px 12px; border: 1px solid #b6a5cb; background: #eee7f6; color: #614579; font-size: 11px; line-height: 1.8; }
