/* Extend the original red / yellow / ink palette to the new player pages. */
:root { --paper:#fffcef; --ink:#161616; --muted:#66665b; --line:#d4d4c4; --orange:#dc4544; --green:#254de0; }
body { font-family:'Helvetica Neue','Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif; }
.header { border-bottom:3px solid var(--ink); }
.brand { font-size:22px; font-weight:950; letter-spacing:-1px; }
.brand-mark { background:var(--ink); border-radius:0; transform:skew(-8deg); font:950 32px/48px 'Helvetica Neue',sans-serif; }
.brand small,.brand-mark>span { display:none; }
.brand .brand-sub { display:block; font-size:9px; letter-spacing:1px; margin-top:8px; font-weight:500; }
.detail-heading h1 { font-size:clamp(28px,4vw,48px); font-weight:950; letter-spacing:-1.7px; }
.button { border:2px solid var(--ink); border-radius:0; box-shadow:4px 4px 0 var(--ink); }
.dark { background:#ffe545; color:var(--ink); }
.dark:hover { background:#fffcef; color:var(--ink); }
.player { border:3px solid var(--ink); border-radius:0; box-shadow:5px 6px 0 var(--ink); }
.howto { background:#ffe545; border:2px solid var(--ink); border-radius:0; }
.howto p,.howto li,.device-note { color:var(--ink); }
.howto>a { color:var(--ink); text-decoration:underline; }
.player-tools { margin-top:5px; }
.detail-count { color:var(--ink); }
.detail-count strong { font:950 40px/1.1 'Helvetica Neue',sans-serif; }
.story h2,.comments h2,.section-title h2 { font-weight:950; }
.detail-nav { border-color:var(--ink); border-width:2px; }
.comments input,.comments textarea { border:2px solid var(--ink); border-radius:0; }
.game-card { border:2px solid var(--ink); border-radius:0; box-shadow:4px 4px 0 var(--ink); }
.card-go,.card-index { border:2px solid var(--ink); border-radius:0; }
.footer { border-top:3px solid var(--ink); background:#ffe545; padding:28px 24px; margin-top:20px; }
.document .button,.admin-actions button { border:2px solid var(--ink); border-radius:0; background:#ffe545; }
@media(max-width:720px) { .brand{font-size:16px;letter-spacing:-.6px}.brand-mark{font-size:26px;line-height:36px}.detail-heading h1{letter-spacing:-1px}.header nav{gap:16px}.footer{padding:24px 18px}.player{box-shadow:3px 4px 0 var(--ink)} }

.making-article-link{font-size:11px;margin-top:20px;padding:12px 14px;gap:10px}

@media(max-width:720px){.header{height:auto;min-height:86px;flex-wrap:wrap;gap:8px;padding-block:15px}.header nav{margin-left:auto}}

/* Put playing and a short note ahead of the longer making story. */
.detail{padding-top:18px}.back{margin-bottom:10px}.detail-heading{margin-bottom:20px;gap:20px}.detail-heading h1{font-size:clamp(25px,3.2vw,40px)}.detail-heading p{margin-top:4px}.detail-metrics{display:flex;align-items:center;gap:24px;flex-shrink:0}.detail-count strong{font-size:32px}.detail-count span{font-size:11px}.personal-best{border-left:2px solid var(--ink);padding-left:20px;max-width:290px}.personal-best>span{display:block;font-size:11px;font-weight:800}.personal-best small{font-size:10px;font-weight:400;color:var(--muted);margin-left:6px}.personal-best strong{display:block;font-size:16px;font-weight:900;overflow-wrap:anywhere}.play-layout{align-items:start;grid-template-columns:minmax(0,1fr) 270px;gap:28px}.player-column{min-width:0}.player{max-height:72vh}.player-tools{flex-wrap:wrap;gap:10px}.player-tools>span{flex-basis:100%;font-size:11px}.player-tools button{min-height:38px;padding:6px 12px;border:1px solid var(--line);background:transparent}.count-note{font-size:10px;margin-top:12px}.howto{padding:22px}.howto .making-article-link{display:block;font-size:12px;margin-top:20px}.quick-comments{display:block;margin-top:28px;padding-top:24px;border-top:3px solid var(--ink)}.comment-heading{display:flex;justify-content:space-between;align-items:end;gap:16px;margin-bottom:20px}.comment-heading h2{font-size:clamp(23px,3vw,32px);line-height:1.4;margin-top:4px;letter-spacing:-1px}.comment-heading>span{font-size:11px;white-space:nowrap}.comment-room{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}.comment-feed{background:#f0eddc;border:2px solid var(--ink);padding:18px;max-height:390px;overflow:auto}.comment-feed .no-comments{padding:24px 12px;color:#5c5c50;font-size:13px}.comment-feed .comment{margin:0 0 14px;padding:12px 14px;background:#fffcef;border:1px solid #c9c6b6;box-shadow:3px 3px 0 #d5d0b9;border-radius:0 14px 14px 14px}.comment-feed .comment:last-child{margin-bottom:0}.comment p{overflow-wrap:anywhere;white-space:pre-wrap}.comment-feed .comment>div{gap:10px;flex-wrap:wrap}.comment-feed .comment b{font-size:11px}.comment-feed time,.pending-note span{font-size:10px;color:#65655a}.comment-feed .pending-note{border-style:dashed;background:#fff5b4}.quick-reactions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.quick-reactions button{background:#fffcef;border:2px solid var(--ink);padding:6px 12px;border-radius:24px;font-size:12px;font-weight:800;min-height:38px}.quick-reactions button:hover{background:#ffe545;transform:translateY(-2px)}.quick-comments form{min-width:0}.comment-body-label{font-size:11px!important;margin-bottom:6px!important}.quick-comments textarea{width:100%;min-height:92px;padding:12px 14px;resize:vertical;background:#fffef8;font-size:14px;line-height:1.6}.composer-tools{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-top:12px}.nickname{min-width:0;flex:1}.nickname summary{font-size:11px;cursor:pointer;padding:10px 0}.nickname summary span{color:var(--muted);margin-left:5px}.nickname label{font-size:11px;margin-top:8px}.nickname input{width:100%;padding:8px;min-width:0;background:#fffef8}.composer-tools .button{white-space:nowrap;min-height:42px;font-size:12px;padding:10px 16px;box-shadow:3px 3px 0 var(--ink)}.quick-comments .form-note{font-size:10px;line-height:1.8;margin-top:16px}.quick-comments #comment-status{display:block;font-size:12px;margin-top:8px;overflow-wrap:anywhere}.story-disclosure{margin-top:32px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.story-disclosure>summary{padding:20px 0;font-weight:800;font-size:13px;cursor:pointer}.story-disclosure .story{border:0;margin-top:0;padding-top:12px}.more{margin-top:44px}
@media(max-width:900px){.play-layout{grid-template-columns:minmax(0,1fr)}.howto{padding:14px 18px}.howto h2{font-size:18px}.howto ul{margin-block:8px}.howto .device-note{margin-top:8px}.howto>a{display:inline-block;margin:10px 20px 0 0}.howto .making-article-link{display:inline-block;margin-top:10px}.detail-metrics{gap:16px}.personal-best{padding-left:14px;max-width:230px}}
@media(max-width:720px){.detail-heading{display:block}.detail-metrics{margin-top:14px;justify-content:start}.detail-count{display:flex;align-items:baseline;gap:8px}.personal-best strong{font-size:13px}.detail-metrics .detail-count strong{font-size:26px}.play-layout{gap:18px}.player{max-height:70vh}.comment-room{grid-template-columns:minmax(0,1fr);gap:18px}.comment-room form{grid-row:1}.comment-heading{align-items:start}.comment-heading>span{font-size:10px;margin-top:6px}.quick-comments{margin-top:22px;padding-top:20px}.quick-comments .comment-heading h2{font-size:25px}.comment-feed{max-height:320px;padding:12px}.story-disclosure .story{display:block}.story-entries{margin-top:24px}}

.howto summary{cursor:pointer;font-size:16px;font-weight:900}.howto details[open] summary{margin-bottom:14px}.howto>a{display:block;margin-top:18px;font-size:12px;font-weight:800}
@media(max-width:720px){.comment-heading{display:block}.comment-heading>span{display:block;margin-top:4px}.howto>a,.howto .making-article-link{display:inline-block;margin:12px 18px 0 0}.howto summary{font-size:14px}}

/* Keep the article navigation reachable on small game screens. */
@media(max-width:720px){.header nav a:nth-child(2){display:inline-flex}.header nav a{min-height:44px;align-items:center}.header nav{gap:16px;flex-wrap:wrap}.quick-reactions button,.player-tools button{min-height:44px}.nickname summary{min-height:44px}.howto summary{min-height:44px;align-content:center}}

/* Keep keyboard focus distinct on yellow panels without changing game controls. */
.howto a:focus-visible,.footer a:focus-visible{outline-color:#254de0}
.howto>a:not(.making-article-link){min-height:44px;align-content:center}

#player-status[data-load-state="error"]{color:#a62626;font-size:12px;font-weight:700}

/* Readable note fields and the public review notice. */
.quick-comments textarea,.quick-comments .nickname input{font-size:16px}
.quick-comments .form-note{font-size:12px}
@media(max-width:720px){.quick-comments .composer-tools{flex-wrap:wrap}.quick-comments .nickname[open]{flex-basis:100%}.quick-comments .composer-tools .button{margin-left:auto}}

/* Keep desktop start buttons within the first view without shrinking the game. */
@media(min-width:721px){
  .header{height:72px}
  .detail{padding-top:8px}
  .detail-heading{margin:6px 0}
  .detail-heading h1{line-height:1.25;margin-block:0}
}

/* Score board uses the same ink, paper and yellow as the play page. */
.ranking{margin-top:32px;padding:22px;border:3px solid var(--ink);background:#fffcef;box-shadow:5px 5px 0 var(--ink)}
.ranking-heading{display:flex;align-items:start;justify-content:space-between;gap:16px}
.ranking-heading h2{font-size:clamp(23px,3vw,32px);font-weight:950;line-height:1.3;letter-spacing:-1px;margin:4px 0}
.ranking-heading p{font-size:12px;line-height:1.7;color:#44443d;max-width:54em}
.ranking-refresh,.ranking-modes button{min-height:44px;border:2px solid var(--ink);background:#fffcef;color:var(--ink);padding:8px 16px;font-size:13px;font-weight:800;cursor:pointer}
.ranking-refresh{white-space:nowrap;flex-shrink:0}
.ranking-refresh:hover,.ranking-modes button:hover,.ranking-modes button[aria-pressed="true"]{background:#ffe545}
.ranking-refresh:focus-visible,.ranking-modes button:focus-visible{outline:3px solid #254de0;outline-offset:3px}
.ranking-modes:not([hidden]){display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}
.ranking-status,.ranking-message{font-size:12px;line-height:1.6;margin-top:16px;color:#4d4d43}
.ranking-message:empty{display:none}
.ranking-list{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 14px;padding:0;margin:10px 0 0;max-height:320px;overflow:auto}
.ranking-list li{display:flex;align-items:baseline;gap:12px;min-width:0;padding:10px 12px;border-bottom:1px solid #d4d4c4}
.ranking-list li:nth-child(-n+3){background:#ffe545;border-bottom-color:var(--ink)}
.ranking-number{min-width:3.5em;font-size:12px;font-weight:900}
.ranking-list strong{font-size:18px;line-height:1.2;font-weight:950;overflow-wrap:anywhere}
@media(max-width:720px){.ranking{padding:18px;margin-top:26px;box-shadow:3px 3px 0 var(--ink)}.ranking-heading{gap:10px}.ranking-heading p{font-size:12px}.ranking-refresh{padding-inline:11px}.ranking-list{grid-template-columns:minmax(0,1fr);max-height:280px}.ranking-list strong{font-size:16px}}

#ranking-name-form{margin-top:18px;font-size:13px}#ranking-name-form label{font-weight:800}#ranking-name-form input{border:2px solid var(--ink);padding:9px;font-size:16px;max-width:100%}#ranking-name-form button{border:2px solid var(--ink);background:#ffe545;padding:9px;min-height:44px;font-weight:800}#ranking-name-form p{font-size:12px;margin-top:8px}#ranking-name-status{font-size:12px}.ranking-player{flex:1;min-width:0;overflow-wrap:anywhere}

.ranking-result-dialog{width:min(480px,calc(100% - 32px));border:3px solid var(--ink);background:#fffcef;color:var(--ink);padding:24px;box-shadow:6px 6px 0 var(--ink)}.ranking-result-dialog::backdrop{background:rgba(0,0,0,.65)}.ranking-result-form h2{font-size:26px;font-weight:950;margin:0 0 10px}.ranking-result-form p{font-size:13px;line-height:1.6;margin:10px 0}.ranking-result-form label{display:block;font-size:13px;font-weight:800;margin:16px 0 6px}.ranking-result-form input{width:100%;font-size:16px;padding:10px;border:2px solid var(--ink);background:#fff}.ranking-result-form div{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.ranking-result-form button{min-height:44px;padding:10px 14px;border:2px solid var(--ink);background:#ffe545;font-weight:800;cursor:pointer}.ranking-result-form .ranking-result-skip{background:#fffcef}

.heart-wrap{display:inline-flex;align-items:center;gap:6px}.heart-button{display:inline-flex;align-items:center;gap:5px;min-height:44px;padding:7px 12px;border:2px solid #161616;background:#fffcef;color:#161616;font-weight:900;cursor:pointer}.heart-button[aria-pressed="true"]{background:#ffe5e3;color:#bf3036}.heart-symbol{font-size:24px;line-height:1}.heart-count{font-size:14px}.heart-wrap [role="status"]{font-size:11px;color:#a22}.heart-button:focus-visible{outline:3px solid #254de0;outline-offset:3px}
