@font-face {
 font-family:'MaruBuri';src:url('/assets/type/maru-buri-semibold.woff2') format('woff2');font-style:normal;font-weight:600;font-display:swap;
}
@font-face {
 font-family:'SUIT';src:url('/assets/type/suit-variable.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap;
}
:root {
  color-scheme:dark;
  --print-stock:#f2e7c9;--print-rule:#53574d;
  --print-grain:url('/assets/edition/grain.svg');
  --edition-spot:#e2bf89;--edition-ink:#474b3e;
  --ink:#f6f3e8; --muted:#c2c4ba; --paper:#1c201e; --panel:#252926;
  --stroke:#464a42; --accent:#e2bf89;
  font-family:"SUIT","Apple SD Gothic Neo","Malgun Gothic","Inter",system-ui,sans-serif;
  color:var(--ink); background:var(--paper); -webkit-font-smoothing:antialiased;
}
:where([data-game="code"]) {--edition-spot:#9ac9b9;--edition-ink:#12544e}
:where([data-game="rect"]) {--edition-spot:#efbe60;--edition-ink:#795016}
:where([data-game="janggi"]) {--edition-spot:#b4c9ed;--edition-ink:#284575}
:where([data-game="loop"]) {--edition-spot:#f1a285;--edition-ink:#a23627}
* {box-sizing:border-box}
body {margin:0;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
#main {flex:1 0 auto}
button,input,select {font:inherit}
a {color:inherit}
button,select {cursor:pointer}
button:disabled {cursor:default}
:where(button,a,input,summary,select):focus-visible {outline:3px solid var(--accent);outline-offset:3px}
.wrap {width:min(1140px,calc(100% - 72px));margin-inline:auto}
.topbar {border-bottom:1px solid var(--stroke)}
.topinner,.brandlock,.topinner nav,.sectiontop,.actions,.dialog-head,.pickhead {display:flex;align-items:center}
.topinner,.sectiontop,.dialog-head {justify-content:space-between}
.topinner {min-height:70px}
.brandlock {min-height:44px;text-decoration:none;gap:9px;font-size:23px;letter-spacing:-.06em}
.brandmark {display:block;flex:none;width:36px;height:36px;background:#e2bf89;-webkit-mask:url('/assets/cube-eye.svg') center/contain no-repeat;mask:url('/assets/cube-eye.svg') center/contain no-repeat}
.topinner nav {align-self:stretch;gap:22px}
.topinner nav a {display:grid;place-items:center;padding-inline:3px;border-bottom:2px solid transparent;text-decoration:none;color:var(--muted);font-size:14px;font-weight:600}
.topinner nav a[aria-current] {border-color:var(--ink);color:var(--ink)}
.topinner nav a:hover,.sectiontop a:hover,.customize:hover {color:var(--accent)}
.skipnav {position:absolute;left:-500px;z-index:10}
.skipnav:focus {left:5px;color:#1c201e;background:white;padding:12px}
.actionlink,.accentbtn,.subbtn {border-radius:5px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:16px;padding:10px 17px;border:1px solid var(--ink);font-size:15px;font-weight:650;text-decoration:none;background:var(--ink);color:white}
.actionlink {background:var(--print-stock);color:#20241f}
.actionlink:hover,.accentbtn:hover {background:#354450;color:white}
.subbtn {background:white;color:var(--ink);border-color:#c8cfcb}
.subbtn:hover {background:#f1f3ef}
.guide-link,.back {border:0;background:transparent;text-decoration:underline;text-underline-offset:4px;color:var(--muted);font-size:14px;font-weight:600;min-height:44px;display:inline-flex;align-items:center}
/* The three editions share a layout; their cover and ink supply the identity. */
.library {margin-top:38px}
.sectiontop {gap:16px;margin:0 0 20px;border-bottom:1px solid #8e9086;padding-bottom:14px}
.sectiontop h1,.cardtext h2,.foyer h1,.brandlock b,.innerpage>h1 {
 font-family:"MaruBuri","AppleMyungjo","Batang",serif;font-weight:600;
}
.sectiontop h1 {font-size:clamp(36px,4.3vw,54px);line-height:1.12;letter-spacing:-.085em;margin:0}
.sectiontop a {min-height:44px;display:inline-flex;align-items:center;gap:7px;text-decoration:none;color:var(--ink);font-size:14px;font-weight:650}
.cards {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(14px,2vw,26px)}
.theme-loop {--edition-ink:#8d382e;--tint:#efe3da}
.theme-code {--edition-ink:#27564f;--tint:#d9e3da}
.theme-janggi {--edition-ink:#adc8f1;--tint:#1d3261}
.theme-rect {--edition-ink:#7b5a22;--tint:#efe4cd}
.gamecard {min-width:0}
.quickstart {display:flex;flex-direction:column;height:100%;text-decoration:none}
.jacket {overflow:hidden;background:var(--tint);aspect-ratio:1.45}
.edition-cover {display:block;width:100%;height:100%;object-fit:cover}
.jacket img {transition:transform .28s ease-out}
.quickstart:hover .jacket img,.quickstart:focus-visible .jacket img {transform:scale(1.035)}
.quickstart:hover .go,.quickstart:focus-visible .go {background:#f1e6c9;color:#21261f;border-color:#f1e6c9}
.cardtext {position:relative;flex:1;padding:18px 33px 13px 0;border-bottom:1px solid #c5c5b9}
.card-meta {display:flex;align-items:center;flex-wrap:wrap;gap:4px 9px;padding-right:30px}
.game-source {color:#e4caa1;font-size:11px;font-weight:700}
.card-meta .genre::before {content:'·';margin-right:9px;color:var(--muted)}
.genre {font-size:12px;color:var(--edition-ink,var(--muted));font-weight:700}
.cardtext h2 {margin:5px 0 9px;font-size:clamp(24px,2.65vw,35px);line-height:1.12;letter-spacing:-.075em}
.cardtext p,.subtitle {color:var(--muted);line-height:1.55;word-break:keep-all}
.cardtext p {margin:0;font-size:14px}
.go {display:grid;place-items:center;position:absolute;right:0;top:25px;padding:6px 12px;border:1px solid #b7b8af;border-radius:4px;font:650 14px/1.25 SUIT,sans-serif}
.foyer {padding-top:15px}
.edition-detail {display:grid;grid-template-columns:1.08fr 1fr;margin-top:12px;border-block:1px solid #b7b9ad;background:#fcfbf7}
.frontispiece {background:var(--tint);min-width:0;display:grid;place-items:center;overflow:hidden}
.frontispiece img {height:auto}
.entry-settings {padding:32px clamp(24px,3.8vw,50px);min-width:0;align-self:center}
.foyer h1 {font-size:clamp(34px,4.2vw,53px);line-height:1.1;letter-spacing:-.08em;margin:7px 0 10px}
.entry-settings .subtitle {margin:0 0 25px}
.innerpage {padding-top:22px;min-height:50vh}
.innerpage>h1 {font-weight:750;font-size:clamp(30px,4vw,40px);line-height:1.17;letter-spacing:-.075em;margin:12px 0 8px}
.subtitle {margin:0 0 18px;font-size:15px}
.subtitle:empty {display:none}
.actions {gap:10px;flex-wrap:wrap}
.records article,.empty,.finishbox {background:var(--panel);border:1px solid var(--stroke);border-radius:5px;padding:20px;margin:12px 0}
.records article {display:flex;align-items:center;justify-content:space-between;gap:8px}
.records time,.notice {color:var(--muted);font-size:13px}
.notice:not(:empty) {margin-top:10px}
.finishbox h2 {margin:0}
.shareinput {width:100%;padding:8px}
.playing .innerpage {max-width:880px;margin:auto}
.playing .innerpage>.back {display:none}
.playing .topinner nav {display:none}
.play-exit {display:inline-flex;align-items:center;min-height:44px;color:var(--muted);font-size:14px;text-decoration:none}
.play-exit:hover {text-decoration:underline}
.solo-mini .mini-intro h2 {display:none}
.choicefield {border:0;margin:16px 0;padding:0}
.choicefield legend {font-size:14px;font-weight:650;margin-bottom:7px}
.choices {display:flex;gap:5px}
.choices label {flex:1;position:relative;cursor:pointer}
.choices input {opacity:0;position:absolute;width:1px;height:1px}
.choices span {display:grid;place-items:center;min-height:44px;border:1px solid var(--stroke);border-radius:4px;font-size:14px}
.choices input:checked+span {background:var(--tint);color:var(--edition-ink);border-color:var(--edition-ink);font-weight:700}
.choices input:focus-visible+span {outline:2px solid var(--accent);outline-offset:2px}
.pickactions {margin-top:22px}
.pickactions>* {flex:1}
.guide-link {display:flex;margin:5px 0 0;padding:0}
body:is(.catalog,.selecting,.playing) {min-height:100vh;background:#1c201e;color:#f6f3e8;--ink:#f6f3e8;--muted:#c2c4ba;--stroke:#464a42;--accent:#e2bf89}
:is(.catalog,.selecting,.playing) .brandmark {background:#e2bf89}
.selecting .edition-detail {background:transparent;border-color:var(--print-rule)}
.selecting .genre {color:var(--edition-spot)}
.selecting .choices input:checked+span {background:var(--edition-spot);border-color:var(--edition-spot);color:#17221d}
.selecting .subbtn {color:var(--ink);border-color:#73786b;background:transparent}
.selecting .accentbtn {background:var(--print-stock);border-color:var(--print-stock);color:#20241f}
.selecting .accentbtn:hover {background:#fff3d4}
.selecting .subbtn:hover {background:#30352e}
.catalog .sectiontop {border-color:#5a5f53}
.catalog .sectiontop a:hover,.catalog .topinner nav a:hover {color:#edcf9f}
.catalog .cardtext {border-color:#505348}
.catalog .theme-loop {--edition-ink:#e6ab89}
.catalog .theme-code {--edition-ink:#98c4b5}
.catalog .theme-rect {--edition-ink:#e9c37c}
.catalog .go {border-color:#71766b}
.catalog .skipnav:focus {color:#1e2528}
@media(min-width:721px) and (max-width:1060px) { .cards {grid-template-columns:repeat(2,minmax(0,1fr))} }
@media(max-width:720px) {
 .wrap {width:calc(100% - 32px)}
 .topinner {min-height:56px}
 .topinner nav {gap:11px}
 .brandlock {font-size:20px;gap:6px}
 .brandmark {width:31px;height:31px}
 .topinner nav a {font-size:13px}
 .library {margin-top:25px}
 .sectiontop {padding-bottom:8px;margin-bottom:12px}
 .sectiontop h1 {font-size:33px}
 .cards {grid-template-columns:1fr;gap:12px}
 .quickstart {display:grid;grid-template-columns:39% 1fr;min-height:115px;border-bottom:1px solid #505348;padding-bottom:12px}
 .jacket {height:100%;min-height:104px;aspect-ratio:auto}
 .cardtext {padding:9px 20px 7px 14px;border:0;align-self:center}
 .cardtext h2 {font-size:24px;margin:5px 0 6px}
 .cardtext p {font-size:13px}
 .go {position:static;display:inline-grid;margin-top:7px;padding:4px 10px;font-size:13px}
 .actionlink {font-size:14px}
 .foyer {padding-top:4px}
 .edition-detail {grid-template-columns:1fr;margin-top:0}
 .frontispiece {height:clamp(146px,43vw,208px);grid-template-rows:minmax(0,1fr)}
 .frontispiece img {min-height:0;height:100%;object-position:50% 54%}
 .entry-settings {padding:19px 15px 8px}
 .entry-settings .subtitle {margin:0 0 16px}
 .entry-settings .choicefield {margin:12px 0}
 .foyer h1 {font-size:32px}
 .playing .innerpage {padding-top:12px}
 .playing .innerpage>h1 {font-size:28px;margin:4px 0}
 .subtitle {font-size:14px;margin-bottom:10px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.jacket img{transition:none}.quickstart:hover .jacket img,.quickstart:focus-visible .jacket img{transform:none}}

/* The table and the result slip use the same stock and ink as the game jackets. */
.playing .play-exit {color:#c8c9bb}
.playing .innerpage {padding:clamp(18px,3vw,36px) 0 36px}
.playing .innerpage>h1 {margin:0 0 14px;font-weight:600}
.round-heading {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:clamp(14px,2vw,25px);padding-bottom:16px;border-bottom:1px solid var(--print-rule)}
.round-heading .edition-cover {width:clamp(92px,12vw,160px);height:clamp(64px,7.8vw,98px);object-fit:cover}
.round-name .genre {color:var(--edition-spot);font-size:13px}
.round-heading h1 {margin:4px 0 0;font:600 clamp(30px,4.1vw,52px)/1.12 MaruBuri,serif;letter-spacing:-.075em;word-break:keep-all}
.new-deal {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:8px 17px;border:1px solid #878879;border-radius:3px;background:transparent;color:var(--ink);font:650 15px/1.25 SUIT,sans-serif;text-decoration:none;touch-action:manipulation}
.round-actions {display:flex;align-items:center;justify-content:flex-end;gap:8px;max-width:var(--play-width,850px);margin:16px auto 0;padding-top:10px;border-top:1px solid var(--print-rule)}
.playing[data-game=rect] .round-actions {max-width:390px}
.round-actions + .notice {max-width:var(--play-width,850px);margin-inline:auto;text-align:right}
.playing[data-game=rect] .round-actions + .notice {max-width:390px}
.share-puzzle {display:grid;place-items:center;width:44px;min-height:48px;background:transparent;color:var(--ink);border:0;cursor:pointer}
.share-time {display:flex;align-items:center;gap:6px;min-height:44px;color:var(--muted);font-size:14px}
.new-deal:hover,.new-deal:active {background:var(--print-stock);border-color:var(--print-stock);color:#20251f}
.record-target {display:flex;align-items:center;gap:9px;margin:4px 0 10px;color:#e2c792;font-size:14px}
.record-target b {color:#f8efd9;font-variant-numeric:tabular-nums}
.playing .innerpage.round-complete {max-width:var(--play-width,540px);padding-top:18px;min-height:0}
.round-complete>h1,.round-complete>.subtitle,.round-complete>.round-heading {display:none}
.playing .finishbox {
 display:block;background:transparent;color:var(--ink);
 padding:0;margin:0;border:0;border-radius:0;
}
.finishbox:focus {outline:0}
.finishbox .result-board {width:100%;margin:0 0 16px}
.result-board .puzzle-board,.result-board .rect-notes-grid {touch-action:auto;cursor:default}
.result-board .mini-clues,.result-board .mini-mission {margin:0 0 12px}
.result-board .mini-grid {margin-inline:auto}
.result-board button:disabled {opacity:1;-webkit-text-fill-color:currentColor}
.result-slip {min-width:0}
.result-game {font-size:13px;font-weight:700;color:var(--edition-spot)}
.result-game span {margin:0 2px}
.result-slip h1 {margin:12px 0 19px;font:600 clamp(30px,3vw,45px)/1.16 MaruBuri,serif;letter-spacing:-.075em}
.result-answer {display:flex;gap:5px;align-items:center;color:var(--edition-spot);font-weight:700}
.result-answer:empty {display:none}
.result-answer b {font:600 18px/1 MaruBuri,serif;display:grid;place-items:center;width:29px;height:38px;border:1px solid #768c75;background:#f9f6e9;color:#285347;border-radius:3px}
.result-time {display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:14px;margin:12px 0;padding:9px 0;border-block:1px solid var(--print-rule)}
.result-time>div {display:flex;align-items:center;justify-content:space-between;gap:5px}
.result-time:has(>div+div)>div {display:grid;gap:5px}
.result-time>div+div {border-left:1px solid #c4bda9;padding-left:15px}
.result-time dt {font-size:13px;color:#c6c7ba}
.result-time dd {font:600 23px/1 SUIT,sans-serif;font-variant-numeric:tabular-nums;margin:0}
.result-actions {display:grid;grid-template-columns:minmax(0,1fr) 54px;gap:8px}
.result-actions>* {display:grid;place-items:center;min-height:48px;padding:6px;border:1px solid #939584;border-radius:5px;background:var(--print-stock);color:#243529;font:650 14px/1.3 SUIT,sans-serif;text-decoration:none;text-align:center;touch-action:manipulation}
.result-actions>*:hover {background:#e7e3d3}
.result-actions>.share-result {background:transparent;color:var(--ink);border-color:var(--print-rule)}
.result-actions>.share-result:hover {background:#343a34}
.result-actions>.next-round {display:flex;align-items:center;justify-content:space-between;min-height:54px;padding:12px 19px;background:var(--edition-ink);color:#fff7e5;border-color:var(--edition-ink);font-size:17px}
.result-actions>.next-round:hover {background:#242a24}
.next-round span {color:#e7cd9d;font-size:22px}
.record-delta {margin:-7px 0 17px;color:var(--edition-spot);font-weight:700}
.result-slip .notice {color:var(--ink)}
@media(max-width:620px) {
 .playing .innerpage {padding-top:13px}
 .round-heading {gap:10px;padding-bottom:11px}
 .round-heading .edition-cover {width:clamp(48px,15vw,75px);height:clamp(48px,13vw,60px)}
 .round-name .genre {font-size:11px}
 .round-heading h1 {margin-top:2px;font-size:clamp(24px,6vw,32px)}
 .new-deal {padding-inline:11px;gap:5px;font-size:14px}
 .playing .innerpage>h1 {margin:0 0 9px}
 .playing .innerpage.round-complete {max-width:440px;padding-top:17px}
 .result-slip h1 {margin:9px 0 14px}
 .result-time {margin:16px 0}
}

.puzzle-ranking {max-width:540px;margin:18px auto 0;border-block:1px solid var(--print-rule);color:#f1ecdd;font:500 14px/1.5 SUIT,sans-serif}
.puzzle-ranking summary {padding:12px 2px;cursor:pointer;font-size:16px;font-weight:700}
.puzzle-ranking h2 {margin:0;padding:12px 2px;font:700 16px/1.5 SUIT,sans-serif}
.puzzle-ranking small {margin-left:8px;color:#c6c6ba;font:500 12px/1.4 SUIT,sans-serif;overflow-wrap:anywhere}
.rank-body {padding:3px 2px 15px}
.rank-register:empty,.rank-status:empty {display:none}
.rank-register {margin:2px 0 16px}
.rank-time,.rank-status {margin:0 0 9px}
.rank-register form {display:flex;align-items:end;gap:8px}
.rank-register label {flex:1;min-width:0}
.rank-register input {display:block;width:100%;min-height:44px;margin-top:4px;background:var(--print-stock);color:#252621;border:0;padding:6px 10px;font-size:16px}
.puzzle-ranking button {min-height:44px;border:1px solid #a38b6a;padding:5px 12px;border-radius:3px;background:var(--print-stock);color:#222820;font:650 14px SUIT,sans-serif}
.rank-list {max-height:18rem;overflow:auto}
.rank-list table {width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}
.rank-list th,.rank-list td {padding:7px 4px;border-bottom:1px solid var(--print-rule);overflow-wrap:anywhere}
.rank-list th:last-child,.rank-list td:last-child {text-align:right}

.service-links {display:flex;gap:20px;align-items:center;margin-top:48px;border-top:1px solid #50564d;padding-block:12px 24px;color:#c3c6ba;font-size:13px}
.service-links a {display:inline-flex;align-items:center;min-height:44px;color:inherit}
.service-info {max-width:640px;margin:0 auto;padding:24px 0 48px;color:#f6f3e8}
.service-info h1,.service-info h2 {font-family:MaruBuri,serif}
.service-info section {border-top:1px solid #535a51;margin-top:28px;padding-top:12px}
.service-info form:not([hidden]),.service-info label {display:grid;gap:8px}
.service-info form {gap:14px!important}
.service-info select,.service-info textarea,.service-info input:not([type=checkbox]) {box-sizing:border-box;width:100%;padding:10px;background:#242923;color:#f5f1e4;border:1px solid #888c80;border-radius:4px;font:inherit;font-size:16px}
.service-info .agree {display:flex;align-items:baseline;font-size:14px;line-height:1.6}
.service-info button {justify-self:start;min-height:44px;padding:9px 20px;background:#ead6aa;color:#20241f;border:0;border-radius:4px;font:inherit;cursor:pointer}
.service-info dt {font-weight:700;margin-top:16px}
.service-info dd,.service-info p {margin:6px 0 15px;line-height:1.65}
.service-info [data-answer] {white-space:pre-wrap;overflow-wrap:anywhere}
.service-info a {color:inherit}

.foyer h1[data-pointer-entry]:focus {outline:none}

.registered-ranks {margin-bottom:32px}
.registered-ranks h2 {font:600 22px/1.35 MaruBuri,serif}
.registered-ranks a {display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:10px 2px;border-bottom:1px solid var(--stroke);color:inherit;text-decoration:none}
.registered-ranks a:hover span {text-decoration:underline}
.registered-ranks small {display:block;margin-top:4px;color:var(--muted);font-size:13px;font-variant-numeric:tabular-nums}
.registered-ranks strong {color:var(--accent);white-space:nowrap}
.registered-ranks strong::after {content:' ›';color:var(--muted)}

.catalog-tools {display:flex;align-items:center;gap:clamp(12px,2vw,24px)}
.language-control {position:relative;display:grid;place-items:center;width:44px;height:44px;border:1px solid #666b61;border-radius:50%;cursor:pointer}
.language-control:focus-within {outline:3px solid var(--accent);outline-offset:3px}
.language-icon {font-size:20px;line-height:1;filter:grayscale(1)}
#site-language {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.catalog-filters {display:flex;align-items:center;flex-wrap:wrap;gap:6px 22px;margin:-2px 0 18px}
.catalog-filters button {min-height:40px;padding:4px 0;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font-size:13px;font-weight:700}
.catalog-filters button[aria-pressed="true"] {border-color:var(--accent);color:var(--ink)}
.catalog-filters button:hover {color:var(--ink)}
:lang(en):is(h1,h2,.brandlock) {letter-spacing:-.035em}
html:lang(en) .cardtext {padding-right:64px}
html:lang(en) .card-meta {padding-right:0}
@media(max-width:720px) {
 html:lang(en) .cardtext {padding-right:0}
 html:lang(en) .choices {flex-wrap:wrap}
 html:lang(en) .choices label {flex-basis:auto}
 .sectiontop {flex-wrap:wrap}
 .catalog-tools {margin-left:auto}
}
@media(max-width:420px) {
 html:lang(en) .topinner {flex-wrap:wrap;column-gap:6px}
 html:lang(en) .brandlock {font-size:18px}
 html:lang(en) .topinner nav a {min-height:44px;padding-inline:1px}
 html:lang(en) .topinner nav {gap:8px}
 html:lang(en) .catalog-tools {justify-content:space-between;width:100%}
 html:lang(en) .sectiontop {gap:0}
}
