/* Reversi: the same board-game layout rhythm as Omok, with a green playing surface. */
body.reversi-page,.native-game[data-game=reversi]{--rv-bg:#e9e0d1;--rv-surface:#f7efdf;--rv-ink:#332a21;--rv-muted:#665748;--rv-line:#bda98d;--rv-accent:#345947;--rv-accent-text:#fff8e9;--rv-control:#fff9ee;--rv-frame:#503725;--rv-frame-text:#f5e8cc;--rv-frame-line:#826343;--rv-gold:#9d7643;color:var(--rv-ink)}
html[data-theme=dark] :is(body.reversi-page,.native-game[data-game=reversi]){--rv-bg:#1a1714;--rv-surface:#302821;--rv-ink:#f3e7d3;--rv-muted:#cfbaa0;--rv-line:#705742;--rv-accent:#d6b681;--rv-accent-text:#2f251b;--rv-control:#393029;--rv-frame:#30241d;--rv-frame-text:#f1dfc3;--rv-frame-line:#876545;--rv-gold:#d6b681}
body.reversi-page{margin:0;background:var(--rv-bg);color:var(--rv-ink);font-family:system-ui,-apple-system,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;min-height:100vh}
.rv-page,.native-game[data-game=reversi]{box-sizing:border-box;max-width:1220px;margin:auto;padding:0 25px 48px;line-height:1.6}
.rv-page *,.rv-panel *{box-sizing:border-box}
.rv-header{display:flex;justify-content:space-between;align-items:center;padding:16px 24px}
.rv-hero,.native-game[data-game=reversi] .native-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:211px;padding:32px 6px 26px;margin:0 0 24px;border:0;border-bottom:1px solid var(--rv-line);border-radius:0;background:none;color:var(--rv-ink)}
.rv-hero h1,.native-game[data-game=reversi] .native-hero h1{font-size:clamp(32px,5vw,66px);line-height:1.2;margin:6px 0 12px;letter-spacing:-.04em;text-wrap:balance}
.rv-hero p,.native-game[data-game=reversi] .native-hero p{margin:0 0 8px;color:var(--rv-muted);font-size:14px;word-break:keep-all}
.rv-hero .rv-eyebrow,.native-game[data-game=reversi] .eyebrow{color:var(--rv-gold);font-size:12px;font-weight:750}
.rv-facts{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;color:var(--rv-muted);font-size:11px}.rv-facts span{border:1px solid var(--rv-line);border-radius:6px;padding:3px 8px}
.rv-mini-board{width:128px;height:128px;flex:0 0 128px;display:grid;grid-template-columns:repeat(2,24px);grid-template-rows:repeat(2,24px);place-content:center;gap:3px;border:7px solid var(--rv-frame);border-radius:7px;background:repeating-linear-gradient(90deg,transparent 0 25%,#173f32 25% calc(25% + 1px)),repeating-linear-gradient(0deg,transparent 0 25%,#173f32 25% calc(25% + 1px)),#31835d;transform:rotate(8deg);box-shadow:0 6px 12px #0003;margin-right:24px}.rv-mini-board i,.rv-score-stone{display:block;border-radius:50%;background:#171e22;box-shadow:0 2px 3px #0005}.rv-mini-board i:nth-child(1),.rv-mini-board i:nth-child(4),.rv-score-stone.white{background:#fff9e8;border:1px solid #b7b0a0}
.rv-panel,.native-game[data-game=reversi] .rv-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,325px);grid-template-areas:'board settings' 'board status' 'board controls';grid-template-rows:auto auto 1fr;gap:15px 23px;align-items:start;margin:0;padding:0;border:0;background:transparent;overflow:visible;color:var(--rv-ink)}
.rv-card,.native-game[data-game=reversi] .native-guide{border:1px solid var(--rv-line);border-radius:11px;background:var(--rv-surface);padding:18px;color:var(--rv-ink);box-shadow:0 2px 6px #0000000d;min-width:0}
.rv-card h2{display:flex;align-items:center;gap:9px;margin:0 0 14px;font-size:15px;color:var(--rv-ink)}.rv-index{display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--rv-line);border-radius:5px;font-size:11px;color:var(--rv-gold)}
.rv-settings{grid-area:settings;display:grid;gap:12px}.rv-settings h2{margin:0}.rv-settings label{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;color:var(--rv-muted)}.rv-settings label[hidden]{display:none}.rv-settings select{min-width:118px;max-width:100%;font:inherit}
.rv-card button,.rv-card select{border:1px solid var(--rv-line);background:var(--rv-control);color:var(--rv-ink);border-radius:7px;padding:9px 10px;font:inherit;min-height:43px;cursor:pointer;margin:0}.rv-card button{font-weight:650;font-size:13px}.rv-card button:disabled{opacity:.5;cursor:default}.rv-card button[aria-pressed=true],.rv-card .rv-primary{background:var(--rv-accent);border-color:var(--rv-accent);color:var(--rv-accent-text)}.rv-card button:not(:disabled):hover{filter:brightness(.96)}
.rv-status{grid-area:status;display:grid;gap:10px}.rv-status h2{margin:0}.rv-score-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rv-score-cards>div{display:flex;align-items:center;gap:10px;border:1px solid var(--rv-line);border-radius:7px;padding:10px;background:var(--rv-control)}.rv-score-stone{width:24px;height:24px;flex:0 0 24px}.rv-score-cards small{display:block;color:var(--rv-muted);font-size:11px}.rv-score-cards b{display:block;font-size:20px;font-variant-numeric:tabular-nums;line-height:1.15}.rv-status>strong{display:block;border:1px solid var(--rv-line);border-radius:7px;padding:12px;font-size:14px;background:var(--rv-control)}.rv-score{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.rv-board-frame{grid-area:board;min-width:0;padding:16px;border:1px solid var(--rv-frame-line);border-radius:14px;background:var(--rv-frame);color:var(--rv-frame-text);box-shadow:0 5px 12px #0002}.rv-board-top,.rv-board-bottom{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:11px}.rv-board-top{margin-bottom:12px}.rv-board-bottom{margin-top:12px}.rv-board-bottom span:first-child{display:flex;align-items:center;gap:6px}.rv-board-bottom i{width:10px;height:10px;background:#d6f1bd;border-radius:50%;display:inline-block}
.rv-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));gap:2px;background:#183e32;border:6px solid #183e32;border-radius:8px;width:min(100%,640px);aspect-ratio:1;box-sizing:border-box;margin:0 auto;touch-action:manipulation}
.rv-board button{border:0;border-radius:2px;background:#31835d;display:grid;place-items:center;min-width:0;min-height:0;width:100%;height:100%;box-sizing:border-box;padding:0;cursor:pointer;position:relative}.rv-board button:disabled{cursor:default;opacity:1;filter:none}.rv-board button:focus-visible{outline:3px solid #f3c86c;outline-offset:-3px;z-index:1}.rv-disc{display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:76%;max-height:76%;box-sizing:border-box;aspect-ratio:1;border-radius:50%;box-shadow:0 3px 3px #102a1f88}.rv-disc.black{background:radial-gradient(circle at 35% 25%,#555e60,#141b20 70%);border:1px solid #0b1013}.rv-disc.white{background:radial-gradient(circle at 35% 25%,#fff,#e5e3d8 75%);border:1px solid #c7c5bc}.rv-board .legal:after{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:22%;aspect-ratio:1;border-radius:50%;background:#d6f1bd;opacity:.8}.rv-board .last{box-shadow:inset 0 0 0 3px #f3c86c}.rv-board .hint{box-shadow:inset 0 0 0 4px #fff6aa}
.rv-controls{grid-area:controls}.rv-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.rv-actions .rv-primary{grid-column:1/-1}.rv-rules{margin-top:32px;border-top:1px solid var(--rv-line);padding-top:18px}.rv-rules h2{font-size:19px;margin:0 0 14px}.rv-rule-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rv-rule-grid h3{margin:0 0 8px;font-size:14px;color:var(--rv-accent)}.rv-rule-grid p{margin:0;color:var(--rv-muted);font-size:13px;line-height:1.75;word-break:keep-all}.rv-footer{display:flex;justify-content:space-between;gap:14px;max-width:1170px;margin:auto;border-top:1px solid var(--rv-line);padding:20px 16px;color:var(--rv-muted);font-size:12px}.rv-footer a{color:inherit}
@media(max-width:820px){.rv-page,.native-game[data-game=reversi]{padding:0 13px 36px}.rv-hero,.native-game[data-game=reversi] .native-hero{min-height:0;padding:22px 5px 20px;margin-bottom:16px}.rv-hero h1,.native-game[data-game=reversi] .native-hero h1{font-size:clamp(25px,6.4vw,40px)}.rv-mini-board{width:85px;height:85px;flex-basis:85px;margin-right:6px;border-width:5px;grid-template-columns:repeat(2,16px);grid-template-rows:repeat(2,16px)}.rv-panel,.native-game[data-game=reversi] .rv-panel{grid-template-columns:1fr 1fr;grid-template-areas:'settings status' 'board board' 'controls controls';grid-template-rows:auto auto auto;gap:10px}.rv-card{padding:13px}.rv-board-frame{padding:12px}.rv-rule-grid{grid-template-columns:1fr}.rv-actions{grid-template-columns:repeat(3,minmax(0,1fr))}.rv-actions .rv-primary{grid-column:auto}}
@media(max-width:480px){.rv-page,.native-game[data-game=reversi]{padding-inline:10px}.rv-mini-board{display:none}.rv-facts{gap:5px}.rv-facts span{padding:3px 5px}.rv-panel,.native-game[data-game=reversi] .rv-panel{grid-template-columns:1fr;grid-template-areas:'settings' 'status' 'board' 'controls';grid-template-rows:auto auto auto auto}.rv-settings{grid-template-columns:1fr 1fr;gap:8px}.rv-settings h2{grid-column:1/-1}.rv-settings label{display:grid;gap:3px;font-size:11px}.rv-settings select{min-width:0;width:100%;min-height:38px;padding:6px}.rv-settings>button{grid-column:1/-1;min-height:38px}.rv-card h2{font-size:13px;margin-bottom:3px}.rv-status{gap:7px}.rv-score-cards>div{padding:6px}.rv-status>strong{padding:8px;font-size:12px}.rv-board{border-width:4px;gap:1px}.rv-board-frame{padding:9px}.rv-board-bottom{font-size:10px}.rv-footer{font-size:10px;flex-wrap:wrap}}

.rv-mode-buttons{display:grid;grid-template-columns:1fr 1fr;gap:6px}.rv-mode-buttons button{min-width:0;overflow-wrap:anywhere}.rv-settings .rv-mode-buttons{grid-column:1/-1}.native-game[data-game=reversi] .rv-settings>button{grid-column:1/-1}.native-game[data-game=reversi] .native-hero-icon{order:2;background:var(--rv-surface);color:var(--rv-accent);border-color:var(--rv-line)}

/* Beat the generic site-theme body reset without affecting other games. */
html[data-theme] body.reversi-page{background:var(--rv-bg);color:var(--rv-ink)}
html[data-theme] body:has(.native-game[data-game=reversi]){background:#e9e0d1}html[data-theme=dark] body:has(.native-game[data-game=reversi]){background:#1a1714}
html[data-theme] body.reversi-page .seo-related-games{background:var(--rv-surface);color:var(--rv-ink);border-color:var(--rv-line);box-shadow:none}
html[data-theme] body.reversi-page .seo-related-copy h2,html[data-theme] body.reversi-page .seo-related-links strong{color:var(--rv-ink)}
html[data-theme] body.reversi-page .seo-related-copy p,html[data-theme] body.reversi-page .seo-related-links small{color:var(--rv-muted)}
html[data-theme] body.reversi-page .seo-related-links a{background:var(--rv-control);color:var(--rv-ink);border-color:var(--rv-line)}
html[data-theme] body.reversi-page .seo-related-icon{background:var(--rv-surface);color:var(--rv-accent)}
