:root {
  color-scheme: light;
  --paper: #f8f6ef;
  --ink: #24241e;
  --muted: #625e51;
  --line: #ded9ca;
  --card: #fffdf6;
  --lime: #e2ed80;
  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font: 16px/1.45 "DM Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #405ac8; outline-offset: 3px; }
.wrap { width: min(1224px, calc(100% - 96px)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: #fcfbf4; }
.header-inner { display: flex; justify-content: space-between; align-items: center; min-height: 53px; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 800 29px/.95 var(--display); letter-spacing: -.065em; }
.brand-mark { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); gap: 3px; padding: 5px; width: 26px; height: 26px; border-radius: 7px; background: var(--lime); border: 1px solid var(--ink); transform: rotate(-6deg); }
.brand-mark i { background: var(--ink); border-radius: 2px; }
.brand-mark i:last-child { border-radius: 50%; }
.nav { display: flex; align-items: center; align-self: stretch; gap: 28px; }
.nav a { display: inline-flex; align-items: center; padding: 0 1px; font-size: 14px; font-weight: 700; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav a[aria-current] { box-shadow: inset 0 -2px var(--ink); }

h1, h2, h3 { font-family: var(--display); line-height: 1.06; letter-spacing: -.045em; }
.page-title { margin: 7px 0 9px; font-size: clamp(39px, 3.65vw, 51px); font-weight: 800; }
.play-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: clamp(16px, 2.2vw, 30px); align-items: start; }
.player { min-width: 0; border: 1px solid var(--ink); border-radius: 17px; background: #24251f; overflow: clip; box-shadow: 0 4px 0 #ddd8c8; }
.player-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 12px 3px 14px; height: 42px; color: #fffcf2; }
.player-title { display: flex; align-items: center; min-width: 0; gap: 9px; font-size: 16px; font-weight: 700; }
.player-marker { width: 8px; height: 8px; border-radius: 2px; background: var(--lime); transform: rotate(12deg); }
.fullscreen { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 11px; border: 0; border-radius: 7px; color: var(--ink); background: var(--lime); font-size: 13px; font-weight: 700; white-space: nowrap; }
.fullscreen:hover { background: #f3fbab; }
.fullscreen:focus-visible { outline-color: #f8f6ef; }
.screen-icon { width: 13px; height: 13px; display: inline-block; background:
  linear-gradient(currentColor,currentColor) top left / 5px 2px,
  linear-gradient(currentColor,currentColor) top left / 2px 5px,
  linear-gradient(currentColor,currentColor) top right / 5px 2px,
  linear-gradient(currentColor,currentColor) top right / 2px 5px,
  linear-gradient(currentColor,currentColor) bottom left / 5px 2px,
  linear-gradient(currentColor,currentColor) bottom left / 2px 5px,
  linear-gradient(currentColor,currentColor) bottom right / 5px 2px,
  linear-gradient(currentColor,currentColor) bottom right / 2px 5px;
  background-repeat: no-repeat;
}
.stage { --frame-height: 640px; position: relative; height: var(--frame-height); display: grid; justify-items: center; align-items: center; padding: 0; background-color: #f4e2c7; background-image: repeating-linear-gradient(0deg,#d9965c0e 0 21px,transparent 21px 42px),repeating-linear-gradient(90deg,#cb98541a 0 21px,transparent 21px 42px); }
.stage iframe { display: block; width: min(100%,425px) !important; height: var(--frame-height) !important; margin-inline: auto; border: 0; background: #f5e3c9; }
.stage[data-current-game="picnic-sudoku"] { --frame-height: 548px; }
.stage[data-current-game^="funzzle-"] { --frame-height: 900px; background: #f3f0e6; }
.stage[data-current-game^="funzzle-"] iframe { width: min(100%,560px) !important; }
.stage[data-current-game="chaosword-mini"] { --frame-height: 1640px; background: #f3f0e6; }
.stage[data-current-game="wordloom-quartets"] { --frame-height: 650px; background: #f3f0e6; }
.play-cover, .loader { position: absolute; inset: 0; place-content: center; place-items: center; gap: 10px; }
.play-cover { display: grid; }
.primary { border: 1px solid var(--ink); border-radius: 7px; font-weight: 700; padding: 8px 13px; background: var(--lime); }
.loader, .stage[data-gf-state] .play-cover { display: none; }
.stage[data-gf-state="loading"] .loader { display: grid; }
.stage[data-gf-state="loading"] iframe { opacity: 0; }
.loader span { width: 24px; height: 24px; border: 3px solid #b2a889; border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .loader span { animation: none; } }
.player-footer { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 6px 14px; min-height: 29px; font-size: 11px; color: #e3e0d1; }
.player-footer a:hover { text-decoration: underline; }
.player-actions { display: flex; align-items: center; gap: 7px; }
.player-actions button { padding: 0 5px; border: 1px solid #605e50; border-radius: 4px; background: transparent; color: inherit; }
.player-actions button:hover, .player-actions button[aria-pressed="true"] { background: var(--lime); color: var(--ink); }
.stage-tools { display: none; }
.stage:fullscreen, .stage.fullscreen-fallback { display: block; overflow: auto; background: #292820; }
.stage:-webkit-full-screen { display: block; overflow: auto; background: #292820; }
.stage.fullscreen-fallback { position: fixed; z-index: 10; inset: 0; height: 100dvh; }
.stage:fullscreen .stage-tools, .stage.fullscreen-fallback .stage-tools { display: flex; }
.stage:-webkit-full-screen .stage-tools { display: flex; }
.stage-tools { position: sticky; top: 0; z-index: 2; justify-content: flex-end; align-items: center; min-height: 44px; padding: 4px 12px; background: #24251f; }
.stage:fullscreen iframe, .stage.fullscreen-fallback iframe { position: static !important; }
.stage:-webkit-full-screen iframe { position: static !important; }

.rail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 13px; }
.rail-heading h2 { margin: 0; font-size: 25px; }
.small-link { font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #aaa392; }
.small-link:hover { text-decoration-color: currentColor; }
.suggestions { display: grid; gap: 11px; }
.suggestion { display: grid; width: 100%; grid-template-columns: 100px minmax(0,1fr) 24px; gap: 13px; align-items: center; padding: 7px 12px 7px 7px; text-align: left; border-radius: 13px; border: 1px solid var(--line); background: var(--card); }
.suggestion:hover { border-color: #5e5b46; background: #fffef9; }
.suggestion strong { display: block; font: 750 20px/1.12 var(--display); letter-spacing: -.035em; }
.suggestion small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.arrow { color: #514f43; justify-self: end; font-size: 22px; }
.art { position: relative; display: grid; place-items: center; overflow: hidden; width: 100%; min-height: 84px; border-radius: 7px; isolation: isolate; }
.art::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(#24241e1b 1px, transparent 1.5px) 0 0 / 10px 10px; }
.art-bridges { background: #abc4fe; color: #222e57; }
.little-bridges { display: grid; position: relative; grid-template-columns: repeat(2, 23px); gap: 11px 19px; transform: rotate(-9deg); }
.little-bridges::before { content: ""; position: absolute; left: 10px; top: 10px; right: 10px; bottom: 10px; border: 2px solid #283b73; border-left-width: 4px; }
.little-bridges i { display: grid; place-items: center; position: relative; width: 23px; height: 23px; border-radius: 50%; background: #f9f7e9; border: 1.5px solid; font: 800 12px var(--display); font-style: normal; box-shadow: 0 2px 0 #293c71; }
.art-stars { color: #3b4b20; background: #dce88b; }
.little-stars, .little-ships { display: grid; grid-template-columns: repeat(3, 17px); grid-auto-rows: 16px; transform: rotate(9deg); border: 1.5px solid currentColor; border-radius: 4px; box-shadow: 2px 3px 0 currentColor; overflow: hidden; }
.little-stars i, .little-ships i i { display: grid; place-items: center; border: 1px solid #3c382c31; background: #fcf6df; font: normal 12px/1 var(--display); }
.little-stars i:nth-child(3n+1) { background: #b1c769; }
.little-stars i:nth-child(4n+3) { background: #e9ad77; }
.art-ships { color: #452b3c; background: #efb0be; }
.little-ships { transform: rotate(-10deg); }
.little-ships i { background: #f9d8db; }
.little-ships i:nth-child(4), .little-ships i:nth-child(5), .little-ships i:nth-child(9) { background: #9d5c78; }
.browse-rail { display: grid; gap: 12px; margin-top: 17px; padding: 16px; border-radius: 13px; background: #ebe8db; }
.browse-rail h2 { margin: 0; font-size: 20px; }
.rail-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.rail-filters a { padding: 4px 9px; border: 1px solid #c8c2b1; border-radius: 6px; background: #f9f7ee; font-size: 12px; font-weight: 700; }
.rail-filters a:hover { border-color: var(--ink); }

.shelf { margin-block: 35px 25px; scroll-margin-top: 17px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.shelf h2 { margin: 0; font-size: 32px; }
.site-footer { padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .play-layout { grid-template-columns: minmax(0,1.7fr) minmax(238px,1fr); }
  .suggestion { grid-template-columns: 76px minmax(0,1fr) 16px; gap: 9px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { min-height: 51px; }
  .brand { font-size: 25px; gap: 7px; }
  .brand-mark { width: 23px; height: 23px; padding: 4px; }
  .nav { gap: 12px; }
  .nav a { font-size: 12px; }
  .page-title { margin: 11px 0 10px; font-size: 37px; }
  .play-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .player { border-radius: 13px; }
  .player-header { height: 44px; padding: 1px 8px 1px 10px; }
  .fullscreen { min-height: 40px; padding-inline: 9px; }
  .rail-heading h2 { font-size: 23px; }
  .suggestion { grid-template-columns: 84px minmax(0,1fr) 20px; }
  .art { min-height: 64px; }
  .shelf { margin-block: 27px 22px; }
}
@media (max-width: 380px) {
  .wrap { width: calc(100% - 16px); }
  .stage[data-current-game="picnic-sudoku"] { --frame-height: 590px; }
  .stage[data-current-game="chaosword-mini"] { --frame-height: 1780px; }
}
input, textarea { font: inherit; color: inherit; }
.skip { position: fixed; z-index: 6; top: 8px; left: 8px; padding: 8px 12px; background: var(--card); transform: translateY(-200%); }
.skip:focus { transform: none; }
.site-footer > div, .site-footer nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 13px; }
.site-footer a:hover, .prose a, .breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.footer-brand { font-size: 21px; }
.muted, .lead { color: var(--muted); }
.breadcrumb { display: flex; gap: 10px; margin-top: 15px; font-size: 13px; }
.guide-links, .directory-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.directory-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.directory-card, .guide-links a { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.directory-card { display: flex; justify-content: space-between; align-items: center; gap: 7px; }
.directory-card:hover, .guide-links a:hover { border-color: #5e5b46; }
.directory-card small, .guide-links span { display: block; color: var(--muted); margin-top: 2px; }
.guide-links span { font-size: 14px; }
.directory-filters { margin-block: 15px; }
.directory-section { margin-top: 25px; }
.directory-section h2 { margin: 0 0 9px; font-size: 23px; }
.directory-filters a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--card); }
.recent-list { margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.recent-list a { display: block; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); font-size: 13px; }
.recent-list a:hover { border-color: var(--ink); }
.section { margin-block: 28px; }
.prose, .comments { max-width: 780px; }
.prose h2 { margin-top: 1.4em; }
.prose table { display: block; overflow-x: auto; max-width: 100%; border-collapse: collapse; background: var(--card); }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px; text-align: left; }
.comments form { display: grid; gap: 9px; justify-items: start; }
.comments label, .comments input, .comments textarea { display: block; max-width: 100%; }
.comments input, .comments textarea { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.comments textarea { width: min(65vw,450px); }
.comments button { border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; background: var(--card); }
.comment { border-top: 1px solid var(--line); padding-block: 10px; }
@media (max-width: 700px) {
  .directory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .guide-links { grid-template-columns: 1fr; }
}
@media (max-width: 390px) {
  .directory-grid { grid-template-columns: 1fr; }
}
