/* Three Lane Mahjong — paper, lacquer, and a considered next move. */
:root{--paper:#f3eee3;--ink:#173b34;--muted:#5c6a62;--jade:#123c35;--table:#102e29;--accent:#d96140;--gold:#dbc594;--line:#d5d9ca;--serif:"Yu Mincho","Hiragino Mincho ProN",serif;--sans:"Yu Gothic","Hiragino Kaku Gothic ProN",system-ui,sans-serif;font-family:var(--sans);color:var(--ink);background:var(--paper);font-synthesis:none;font-size:15px}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{cursor:not-allowed}a{color:inherit}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:4px}[hidden]{display:none!important}::selection{background:#d9614033}.app-shell{max-width:1560px;margin:auto;padding:0 clamp(18px,4vw,64px)}
.skip-link{position:fixed;left:16px;top:-70px;z-index:100;padding:12px 20px;background:var(--paper);color:var(--ink);border:2px solid var(--accent);border-radius:8px}.skip-link:focus{top:12px}.masthead{height:100px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:16px}.brand{display:flex;align-items:center;gap:13px;text-decoration:none}.brand h1{font-family:var(--serif);font-size:25px;letter-spacing:.13em;margin:0;line-height:1.3}.brand>div>span{font-size:8px;letter-spacing:.22em;font-weight:700}.brand-mark{display:flex;align-items:center;gap:4px;width:37px;height:38px}.brand-mark i{display:block;width:9px;height:28px;background:var(--ink);border-radius:2px}.brand-mark i:nth-child(2){transform:translateY(5px)}.brand-mark i:last-child{position:relative}.brand-mark i:last-child:after{content:"";width:6px;height:6px;background:var(--accent);border-radius:50%;position:absolute;top:3px;left:1.5px}.header-edition{font-size:11px;letter-spacing:.1em;color:var(--muted);display:flex;gap:16px;align-items:center}.edition-dot{height:5px;width:5px;border-radius:50%;background:var(--accent)}.header-actions{display:flex;gap:8px;align-items:center}.eyebrow,.section-kicker,.mode-tag{font-size:10px;font-weight:800;letter-spacing:.18em}.eyebrow{display:flex;align-items:center;gap:10px;margin:0 0 26px}.eyebrow>span{width:20px;height:1px;background:var(--accent)}.section-kicker{margin:0;color:var(--muted)}
.hero{display:grid;grid-template-columns:1.05fr 1fr;gap:6%;align-items:center;padding:60px 0 45px}.hero h2{font-family:var(--serif);font-size:clamp(42px,5.6vw,83px);font-weight:600;line-height:1.4;letter-spacing:-.065em;margin:0 0 25px}.ink-accent{position:relative;white-space:nowrap}.ink-accent:after{content:"";position:absolute;bottom:3px;left:1px;right:0;height:3px;background:var(--accent);transform:rotate(-3deg)}.lead{font-size:14px;line-height:2.05;color:var(--muted);margin:0}.hero-facts{display:flex;gap:30px;margin-top:31px}.hero-facts>span{display:flex;gap:7px;align-items:baseline;color:var(--muted);font-size:11px}.hero-facts b{font-family:Georgia,serif;color:var(--ink);font-weight:400;font-size:29px}
.hero-art{position:relative;isolation:isolate;aspect-ratio:1.12;background:var(--jade);border-radius:2px 80px 2px 2px;overflow:hidden;box-shadow:18px 18px 0 #ddd9cd;display:grid;place-items:center}.hero-art:before{content:"";position:absolute;inset:0;opacity:.15;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.35' filter='url(%23n)'/%3E%3C/svg%3E");pointer-events:none}.art-orbit{position:absolute;width:75%;aspect-ratio:1;border:1px solid #aec5b233;border-radius:50%;top:10%;left:15%}.art-orbit:after{content:"";position:absolute;inset:26px;border:1px dashed #aec5b22b;border-radius:50%}.art-caption{position:absolute;left:24px;top:25px;color:#b9cbbd;font-size:8px;letter-spacing:.18em;writing-mode:vertical-rl}.art-coordinate{position:absolute;bottom:24px;right:28px;color:#b9cbbd;font-size:10px;letter-spacing:.25em}.art-seal{position:absolute;right:29px;top:35px;color:var(--paper);background:var(--accent);font-family:var(--serif);font-size:17px;padding:7px 10px;line-height:1.3;border-radius:2px;transform:rotate(4deg)}.tile-sculpture{display:flex;gap:12px;transform:rotate(-17deg);filter:drop-shadow(18px 25px 14px #041b2280);width:58%;justify-content:center}.sculpture-lane{display:flex;flex-direction:column;gap:9px;flex:1;max-width:84px}.sculpture-lane img{width:100%;height:auto;border-radius:6px;border-bottom:9px solid #9ca799;box-shadow:3px 4px 0 #d7dacc;transform:skewY(6deg)}.lane-a{transform:translateY(28px)}.lane-b{transform:translateY(-16px)}.lane-c{transform:translateY(10px)}
.play-heading{display:flex;align-items:baseline;justify-content:space-between;padding:25px 0 17px;border-top:1px solid var(--line)}.play-heading>span{font-family:var(--serif);font-size:22px}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:32px}.mode-card{display:grid;grid-template-columns:auto 1fr;column-gap:18px;padding:22px 0 26px;border-top:1px solid var(--ink);border-bottom:1px solid var(--line)}.mode-number{font-family:Georgia,serif;font-size:32px;font-style:italic;color:var(--accent);line-height:1}.mode-tag{color:var(--muted);font-size:8px}.mode-card h3{font-family:var(--serif);font-weight:600;font-size:24px;letter-spacing:-.03em;margin:7px 0 8px}.mode-card p{font-size:12px;color:var(--muted);line-height:1.8;margin:0 0 20px}.mode-card button{grid-column:2;justify-self:stretch;display:flex;justify-content:space-between;align-items:center}.mode-card button+button{margin-top:8px}.primary,.secondary,.subtle{min-height:48px;border-radius:7px;padding:12px 18px;border:1px solid transparent;font-weight:700;font-size:13px;transition:background .18s,box-shadow .18s,transform .18s}.primary{background:var(--jade);color:var(--paper);border-color:var(--jade)}.primary:hover{background:#20564a;box-shadow:0 4px 12px #102e2915}.primary>span,.secondary>span{font-size:21px;line-height:1}.secondary{color:var(--ink);background:transparent;border-color:#afbbae}.secondary:hover{background:#e8e7db;border-color:var(--ink)}.subtle{background:transparent;color:inherit;border-color:var(--line);min-height:44px;padding:9px 12px;font-size:12px}.subtle:hover{background:#ffffff0d}.primary:active,.secondary:active,.subtle:active{transform:translateY(1px)}
.how-to{display:grid;grid-template-columns:1fr 3fr;gap:30px;padding:45px 0;border-bottom:1px solid var(--line)}.how-to-title h3{font-family:var(--serif);font-size:25px;font-weight:500;margin:12px 0}.how-to ol{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin:0;padding:0;list-style:none}.how-to li{display:flex;gap:10px}.how-to li>span{font-family:Georgia,serif;color:#b4442a;font-size:12px;padding-top:2px}.how-to strong{font-size:12px}.how-to p{font-size:11px;color:var(--muted);line-height:1.9}.rules{border-bottom:1px solid var(--line);padding:20px 0;line-height:1.9;font-size:13px}.rules summary{cursor:pointer;list-style:none;font-size:12px;font-weight:700;display:flex;justify-content:space-between}.rules summary::-webkit-details-marker{display:none}.rules summary>span{font-size:18px;color:var(--accent)}.rules[open] summary>span{transform:rotate(45deg)}#rulesContent{max-width:950px;padding:12px 0}footer{display:flex;justify-content:space-between;gap:18px;align-items:center;padding:30px 0 40px;color:var(--muted);font-size:10px}.footer-brand{font-family:var(--serif);color:var(--ink);font-size:17px;letter-spacing:.15em}.notice{background:#faead7;border:1px solid #c99662;border-radius:8px;padding:15px;font-size:13px;line-height:1.7;margin:20px 0}.invite-box{padding:16px;display:flex;align-items:center;gap:16px;border:1px solid #9caf9e;border-radius:9px;flex-wrap:wrap;margin:16px 0;font-size:12px}.invite-box code{overflow-wrap:anywhere;flex:1;min-width:130px;line-height:1.7;font-size:12px}.invite-box .secondary{min-height:44px}.invite-box.card .secondary{color:var(--paper);background:#245446;border-color:#8da99a}.invite-box.card .secondary:hover{color:var(--paper);background:#316953;border-color:#c5d8c8}
body.playing{min-height:100vh;min-height:100dvh;color:#e8eee7;background:var(--table);background-image:radial-gradient(ellipse at 50% 0,#21483c55,transparent 75%)}.playing .app-shell{padding:0 clamp(12px,2vw,32px);max-width:1660px}.playing .masthead{height:64px;border-color:#66817338}.playing .brand-mark i{background:var(--paper)}.playing .brand h1{font-size:22px}.playing .header-edition,.playing footer{display:none}.playing .brand>div>span{font-size:7px;color:#a8bcad}.playing .subtle{border-color:#62827177;color:#e7eee6}.playing .subtle[aria-pressed=false]{color:#a7b9aa}.game{padding:18px 0 24px;display:grid;gap:14px}.card{border:1px solid #637e6b55;border-radius:12px;background:#173e34}.status-line{position:relative;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px 20px 17px;overflow:hidden}.turn-label{display:flex;align-items:center;gap:12px}.turn-dot{height:8px;width:8px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 5px #dbc59412}.status-line .section-kicker{color:#aabdac;font-size:8px;margin-bottom:4px}.status-line h2{font-size:16px;margin:0;font-weight:700;white-space:nowrap}.status-numbers{display:flex;gap:20px;align-items:center}.stat-pill{display:flex;align-items:baseline;gap:6px;white-space:nowrap;font-size:10px;color:#b2c5b5}.stat-pill b{font-family:Georgia,serif;font-weight:400;font-size:22px;color:#ececdf;font-variant-numeric:tabular-nums}.stat-pill small{font-size:9px}.round-track{position:absolute;bottom:0;left:0;right:0;height:2px;background:#58766233}.round-track span{display:block;height:100%;width:0;background:var(--gold);transition:width .5s}.game[data-your-turn=true] .turn-dot{background:#91d8b0;box-shadow:0 0 0 5px #91d8b012}.thinking{display:none!important}.board-section{min-width:0;display:flex;flex-direction:column}.section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 9px}.section-head h2{font-size:12px;margin:0;font-weight:600}.section-head>span{font-size:10px;color:#a8baaa}.player-tag{font-size:8px;letter-spacing:.12em;color:#a8baaa;border:1px solid #66817370;border-radius:4px;padding:3px 6px;margin-right:6px;display:inline-block;min-width:39px;text-align:center}.own .player-tag{color:var(--gold);border-color:#b9a77380}.column-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-width:0}.column{position:relative;isolation:isolate;min-width:0;border:1px solid #5b796766;background:linear-gradient(145deg,#234d3e85,#163d33);border-radius:10px;padding:11px 13px;display:flex;flex-direction:column;gap:8px}.opponent .column{background:linear-gradient(145deg,#23463970,#17362e);border-color:#59746250}.column:before{content:attr(data-lane);position:absolute;right:12px;bottom:24px;font-family:Georgia,serif;font-size:72px;font-style:italic;color:#afbd9a06;pointer-events:none;z-index:-1}.column.complete{border-color:#bba36d99}.column-head{display:flex;justify-content:space-between;gap:6px;align-items:center}.column-head strong{font-size:12px;font-weight:600}.lane-index{font-family:Georgia,serif;font-size:16px;font-style:italic;color:var(--gold);margin-right:6px}.count-badge{font-size:10px;color:#aec4b1;font-variant-numeric:tabular-nums}.column-track{height:2px;background:#8aa58615;border-radius:2px}.column-track>span{height:100%;display:block;width:var(--completion);background:#8aa58655}.complete .column-track>span{background:var(--gold)}.column-tiles{display:flex;flex-wrap:wrap;align-content:flex-start;gap:3px;min-height:91px}.column-meta{font-size:11px;color:#b9cbb9;line-height:1.65;margin-top:auto;min-height:35px}.column-meta.is-empty{font-size:10px;color:#9bb29e;min-height:35px;display:flex;align-items:flex-end}.score-line{font-family:Georgia,var(--serif);font-size:18px;color:var(--gold)}.discard-area{display:flex;align-items:center;gap:10px;min-height:34px;margin-top:6px}.discard-area strong{font-size:9px;font-weight:500;letter-spacing:.08em;color:#9fb29f;white-space:nowrap}.discard-tiles,.indicator-tiles{display:flex;gap:3px;flex-wrap:wrap}.discard-tiles:empty:after{content:"—";font-size:12px;color:#72948155}.center-strip{position:relative;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:8px 12px;border-top:1px solid #5b796750;border-bottom:1px solid #5b796750;min-height:47px}.dora-group{display:flex;align-items:center;gap:12px}.dora-group .section-kicker{color:#a7bca8;font-size:9px;letter-spacing:.08em}.table-emblem{position:absolute;left:50%;transform:translateX(-50%);font-family:var(--serif);letter-spacing:.3em;color:#b8c5a62e;font-size:18px;pointer-events:none}#wallStatus{font-size:10px;color:#a7bca8}.own .column{border-color:#7b95645e}
/* Only matching public tiles are highlighted; unmatched tiles never fade. */
.tile{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:34px;min-width:34px;height:46px;padding:0;border:1px solid #bbc4b4;border-bottom:3px solid #92a28c;border-radius:4px;background:#f4f3eb;color:#173b34;box-shadow:0 2px 2px #031d2250;user-select:none;touch-action:manipulation;line-height:1;transition:transform .16s,outline-color .16s}.tile-art{display:block;width:100%;height:100%;object-fit:fill;border-radius:3px;pointer-events:none}.tile-fallback{display:none;font-weight:700;text-align:center;font-size:10px;line-height:1.2;padding:2px;word-break:keep-all}.tile.image-failed .tile-art{display:none}.tile.image-failed .tile-fallback{display:block}.tile.red{box-shadow:0 0 0 1px #db5543,0 2px 3px #031d2250}.red-badge{position:absolute;left:-3px;top:-3px;background:#ba3931;color:white;border-radius:3px;padding:1px 2px;font-size:8px;z-index:4;pointer-events:none}.tile.selected{transform:translateY(-7px);outline:2px solid var(--accent);outline-offset:2px;z-index:2;box-shadow:0 5px 12px #031d2240}.tile.kan:after{content:"槓";position:absolute;top:-4px;right:-3px;background:#9c6825;color:#fff;font-size:8px;padding:1px 3px;border-radius:3px;z-index:2}.tile.kan{border-color:var(--gold)}.tile.small{width:24px;min-width:24px;height:33px;border-bottom-width:2px}.tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.game.is-highlighting .tile[data-highlight-target].matching{z-index:3;outline:2px solid #8ed2da;outline-offset:1px;box-shadow:0 0 8px #6ac7c54d}.game.is-highlighting .tile[data-highlight-target].matching:before{content:"";position:absolute;inset:0;background:#78c6cc32;border-radius:3px;z-index:1;pointer-events:none}
.hand-panel{background:var(--paper);color:var(--ink);border-color:#cdd4c4;box-shadow:0 9px 22px #071c271f;padding:13px 18px 14px}.hand-panel .section-head{margin-bottom:5px}.hand-panel .section-head h2{font-size:12px}.hand-panel .section-head>span{font-size:11px;color:var(--muted)}.hand-tiles{display:flex;align-items:flex-end;gap:0;padding:11px 2px 6px;min-height:82px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#99ae96 transparent}.hand-group{display:flex;gap:4px;align-items:flex-end;flex:0 0 auto}.hand-tiles .tile{width:44px;min-width:44px;height:60px}.hand-tiles button.tile:hover{transform:translateY(-4px)}.hand-tiles button.tile.selected:hover{transform:translateY(-7px)}.draw-group{display:flex;align-items:flex-end;gap:7px;margin-left:19px;padding-left:14px;border-left:1px solid #afbca5;flex:0 0 auto}.draw-label{font-size:9px;color:var(--muted);align-self:flex-start;line-height:1;margin-top:4px;writing-mode:vertical-rl}.action-bar{display:flex;align-items:center;gap:8px;padding-top:7px}.action-bar button{min-height:44px;min-width:112px}.action-bar .secondary{background:#e0e6d7;border-color:#bccbb8;color:var(--ink)}.action-bar .secondary:hover{background:#cedcc7;border-color:#759275}.action-bar button:disabled{color:#5c7063;background:#e9ecdf;border-color:#d3dacb;box-shadow:none;transform:none}.action-bar .danger{background:transparent;border-color:#cca290;color:#96442c;margin-left:8px;min-width:78px}.action-bar .danger:hover{background:#f2dbce;border-color:#c17051}.action-bar .danger:disabled{color:#8a7262;background:transparent;border-color:#d8c9ba}.action-note,.kan-note{font-size:10px;color:var(--muted);margin-left:4px}.kan-note{color:#96512e}.wait-label{display:block;font-size:10px;color:var(--gold)}.wait-list{display:flex;gap:9px;overflow-x:auto;padding:3px 0;scrollbar-width:thin}.wait-item{display:flex;align-items:center;gap:4px;flex:0 0 auto;white-space:nowrap;color:#d5e2d0}.wait-item .tile{width:19px;min-width:19px;height:26px;border-bottom-width:1px;pointer-events:none}.wait-item>span:last-child{font-size:10px}.wait-item.exhausted{text-decoration:line-through;color:#9aa88f}.result-panel{padding:25px;background:var(--paper);color:var(--ink)}.result-panel h2{font-family:var(--serif);font-size:34px;font-weight:500;margin:12px 0}.result-panel>p{font-size:13px;color:var(--muted)}.result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-top:24px}.result-col{border:1px solid #c7d0bd;border-radius:8px;padding:16px;line-height:1.8}.result-col h3{font-size:14px;margin:0 0 10px}.result-col p{font-size:12px}.result-col .win{color:#985134}.result-breakdown{margin-top:12px;border-top:1px solid #d2d7c6;padding-top:12px;font-size:12px}.result-breakdown strong{display:block;color:var(--ink)}.result-breakdown small{display:block;color:#617063;line-height:1.9;margin-top:4px}.game.is-finished .hand-panel{position:static}
.modal{position:fixed;inset:0;background:#082821c9;display:flex;align-items:center;justify-content:center;z-index:50;padding:20px;backdrop-filter:blur(5px)}.dialog{background:var(--paper);color:var(--ink);border:0;max-width:420px;width:100%;border-radius:14px;padding:30px;text-align:center;box-shadow:0 30px 60px #001a1845}.dialog h2{font-family:var(--serif);font-size:25px;font-weight:500;margin:18px 0 12px}.dialog p:not(.section-kicker){font-size:13px;line-height:1.9;color:#617065}.confirm-preview{display:flex;justify-content:center;gap:5px;padding:24px 0 0}.confirm-preview .tile{width:47px;min-width:47px;height:63px;transform:rotate(-5deg);box-shadow:3px 5px 0 #d9decd}.dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}.dialog small{display:block;font-size:10px;color:var(--muted);margin-top:17px}.toast{position:fixed;bottom:28px;left:50%;transform:translateX(-50%);padding:13px 22px;border-radius:8px;background:var(--ink);border:1px solid #9cb599;color:var(--paper);font-size:12px;max-width:calc(100vw - 32px);z-index:60;box-shadow:0 6px 25px #08282130;line-height:1.7}
@media(min-width:1100px) and (min-height:700px){.playing .game:not(.is-finished){min-height:calc(100dvh - 64px);grid-template-rows:auto auto 1fr auto 1fr auto;gap:12px}.column-grid{flex:1}.column-meta{max-height:64px;overflow:auto}.game.is-finished{min-height:0}}
@media(max-width:1099px){.app-shell{padding:0 28px}.hero{padding-top:42px;gap:5%}.hero h2{font-size:clamp(41px,6.4vw,68px)}.hero-art{border-top-right-radius:55px}.mode-card h3{font-size:21px}.how-to{grid-template-columns:1fr}.how-to-title{display:flex;align-items:baseline;gap:25px}.how-to-title h3{margin:0}.playing .game{gap:10px;padding-top:12px}.stat-pill{font-size:9px}.stat-pill b{font-size:20px}.status-numbers{gap:12px}.column{padding:10px}.column-tiles{min-height:97px}.column-tiles .tile{width:30px;min-width:30px;height:41px}.column-meta{font-size:10px}.hand-panel{position:sticky;bottom:8px;z-index:10}.hand-tiles .tile{width:42px;min-width:42px;height:57px}.action-note{margin-left:auto;font-size:9px}}
@media(max-width:650px){.app-shell{padding:0 22px}.masthead{height:79px}.brand h1{font-size:23px}.brand>div>span{font-size:7px}.header-edition{font-size:0;gap:0}.header-edition .edition-dot{display:block}.hero{padding:34px 0 35px;grid-template-columns:1fr;gap:32px}.eyebrow{font-size:8px;margin-bottom:19px}.hero h2{font-size:clamp(40px,10.9vw,65px);margin-bottom:18px}.lead{font-size:12px}.hero-facts{margin-top:20px;gap:27px}.hero-facts b{font-size:25px}.hero-art{aspect-ratio:1.46;box-shadow:9px 9px 0 #ddd9cd;border-top-right-radius:52px}.tile-sculpture{width:52%;gap:9px}.sculpture-lane{max-width:51px;gap:6px}.sculpture-lane img{border-bottom-width:5px;border-radius:4px}.art-caption{left:16px;top:19px;font-size:6px}.art-coordinate{bottom:18px;right:20px;font-size:8px}.art-seal{top:20px;right:23px;font-size:14px;padding:5px 8px}.art-orbit{width:61%;left:22%;top:4%}.mode-grid{grid-template-columns:1fr;gap:0}.play-heading{padding:21px 0 14px}.play-heading>span{font-size:20px}.mode-card{padding:23px 0;column-gap:14px}.mode-card:last-child{border-top:0}.mode-card h3{font-size:22px}.mode-card p{font-size:11px;margin-bottom:16px}.mode-number{font-size:27px}.mode-card button{min-height:50px}.how-to{padding:30px 0;gap:23px}.how-to-title{gap:15px}.how-to-title h3{font-size:22px}.how-to ol{grid-template-columns:1fr;gap:15px}.how-to li{gap:14px}.how-to strong{font-size:13px}.how-to p{font-size:12px;margin:7px 0 0}.how-to p br{display:none}footer{flex-wrap:wrap;padding:24px 0 30px;font-size:9px;gap:10px}footer>span:last-child{width:100%}.section-kicker{font-size:8px}.rules{padding:17px 0}
.playing .app-shell{padding:0 10px}.playing .masthead{height:57px;gap:5px}.playing .brand{gap:7px}.playing .brand h1{font-size:19px}.playing .brand>div>span{font-size:5px;letter-spacing:.12em}.playing .brand-mark{width:26px;gap:3px;height:29px}.playing .brand-mark i{width:6px;height:21px}.playing .brand-mark i:last-child:after{width:4px;height:4px;left:1px}.header-actions{gap:5px}.playing .subtle{min-height:44px;font-size:10px;padding:7px 9px}.playing .game{gap:10px;padding-top:10px}.status-line{display:block;padding:12px 12px 13px}.status-line .section-kicker{display:none}.status-line h2{font-size:14px}.turn-label{gap:10px}.turn-dot{width:6px;height:6px}.status-numbers{justify-content:space-between;gap:5px;margin-top:9px;flex-wrap:wrap}.stat-pill{flex-direction:column;gap:2px;font-size:8px;align-items:flex-start}.stat-pill b{font-size:18px}.stat-pill small{font-size:8px}.section-head{margin-bottom:7px}.section-head h2{font-size:10px}.section-head>span{font-size:8px}.player-tag{font-size:7px;min-width:31px;padding:2px 4px;margin-right:3px}.column-grid{gap:5px}.column{padding:7px 6px;gap:6px;border-radius:7px}.column-head{gap:2px;flex-wrap:wrap}.column-head strong{font-size:9px}.lane-index{font-size:13px;margin-right:3px}.count-badge{font-size:8px}.column:before{font-size:49px;right:5px;bottom:37px}.column-tiles{gap:2px;min-height:91px}.column-tiles .tile{width:20px;min-width:20px;height:28px;border-bottom-width:2px}.column-meta{font-size:9px;line-height:1.65;min-height:45px;overflow-wrap:anywhere}.column-meta.is-empty{min-height:45px;font-size:8px}.column-meta .score-line{font-size:15px}.column-track{height:1px}.discard-area{min-height:28px;gap:7px;margin-top:4px}.discard-area strong{font-size:8px}.discard-tiles .tile{width:19px;min-width:19px;height:26px}.center-strip{padding:6px 3px;gap:8px;min-height:45px}.dora-group{gap:7px}.dora-group .section-kicker{font-size:8px;max-width:30px;line-height:1.6}#wallStatus{font-size:8px;max-width:113px;line-height:1.6}.table-emblem{font-size:15px}.hand-panel{padding:10px 9px 11px;bottom:max(5px,env(safe-area-inset-bottom));border-radius:9px;box-shadow:0 -10px 25px #081f2999}.hand-panel .section-head h2{font-size:10px}.hand-panel .section-head>span{font-size:9px}.hand-tiles{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;min-height:0;padding:10px 0 4px;overflow:visible;align-items:end}.hand-group{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px 3px;min-width:0}.hand-tiles .tile{width:100%;min-width:0;height:auto;aspect-ratio:47/63;min-height:44px}.hand-tiles button.tile:hover{transform:none}.hand-tiles .tile.selected,.hand-tiles button.tile.selected:hover{transform:translateY(-4px);outline-offset:1px}.draw-group{margin-left:0;padding-left:7px;border-left:1px solid #afbca5;gap:0;display:flex;flex-direction:column;align-items:center;width:39px}.draw-label{writing-mode:horizontal-tb;align-self:center;font-size:7px;margin:0 0 5px}.draw-group .tile{width:30px;min-width:30px;min-height:44px}.action-bar{display:grid;grid-template-columns:repeat(3,1fr) .74fr;gap:4px;align-items:start;padding-top:7px}.action-bar button{font-size:9px;min-width:0;min-height:44px;padding:8px 3px;border-radius:5px;white-space:nowrap}.action-bar .danger{margin-left:0;min-width:0}.action-note{display:none}.kan-note{grid-column:1/-1;margin:1px 0 0;font-size:9px}.action-bar.is-kan{grid-template-columns:1fr 1fr}.action-bar.is-kan button{white-space:normal;font-size:10px}.action-bar.is-result{display:flex}.action-bar.is-result button{padding:9px 17px;font-size:12px}.wait-label{font-size:8px}.wait-list{gap:6px}.wait-item{display:block}.wait-item>span:last-child{font-size:8px;display:block;max-width:140px}.result-grid{grid-template-columns:1fr;gap:10px}.result-panel{padding:20px}.result-panel h2{font-size:28px}.result-panel>p{font-size:11px;line-height:1.9}.dialog{padding:24px}.dialog h2{font-size:23px}.dialog p:not(.section-kicker){font-size:12px}.dialog small{display:none}.toast{bottom:18px}.invite-box{padding:12px;gap:9px;font-size:10px}.invite-box .secondary{font-size:10px;padding:7px 12px}}
@media(max-width:370px) and (orientation:portrait){.hand-group{grid-template-columns:repeat(6,minmax(0,1fr))}.action-bar button{font-size:8px}.playing .subtle{font-size:9px;padding:7px}.column-tiles .tile{width:18px;min-width:18px;height:25px}.column-meta{font-size:8px}}
@media(max-height:560px) and (min-width:600px) and (orientation:landscape){
.playing .app-shell{padding:0 10px}.playing .masthead{height:42px}.playing .brand{gap:8px}.playing .brand h1{font-size:18px}.playing .brand>div>span{display:none}.playing .brand-mark{transform:scale(.7);width:25px}.playing .subtle{min-height:36px;padding:6px 10px;font-size:10px}.playing .game{gap:7px;padding:8px 0 12px}.status-line{padding:7px 12px 9px;gap:10px}.status-line .section-kicker{display:none}.status-line h2{font-size:12px}.status-numbers{gap:10px;margin:0}.stat-pill{flex-direction:row;gap:4px;font-size:8px}.stat-pill b{font-size:15px}.stat-pill small{font-size:8px}.column-grid{gap:6px}.column{padding:6px 8px;gap:4px}.column-head strong{font-size:10px}.lane-index{font-size:13px}.count-badge{font-size:8px}.column-tiles{min-height:39px;gap:2px}.column-tiles .tile{width:24px;min-width:24px;height:33px}.column-meta,.column-meta.is-empty{font-size:9px;min-height:19px}.column-meta{max-height:34px;overflow:auto}.section-head{margin-bottom:4px}.section-head h2{font-size:10px}.section-head>span{font-size:8px}.discard-area{min-height:25px;margin-top:3px}.discard-tiles .tile{width:17px;min-width:17px;height:23px}.center-strip{min-height:35px;padding:4px 6px}.dora-group .section-kicker,#wallStatus{font-size:9px}.indicator-tiles .tile{width:19px;min-width:19px;height:26px}.hand-panel{padding:7px 10px 8px;bottom:4px;position:sticky}.hand-panel .section-head{margin-bottom:2px}.hand-panel .section-head h2{font-size:10px}.hand-panel .section-head>span{font-size:9px}.hand-tiles{display:flex;padding:7px 0 3px;min-height:0;gap:0;overflow-x:auto}.hand-group{display:flex;gap:3px}.hand-tiles .tile{width:33px;min-width:33px;height:45px;aspect-ratio:auto}.draw-group{display:flex;flex-direction:row;width:auto;margin-left:14px;padding-left:10px;gap:5px}.draw-label{writing-mode:vertical-rl;font-size:8px;align-self:flex-start;margin:3px 0 0}.draw-group .tile{width:33px;min-width:33px}.action-bar{display:flex;padding-top:4px;gap:5px}.action-bar button{min-height:40px;min-width:105px;padding:7px 9px;font-size:10px}.action-bar .danger{min-width:66px;margin-left:6px}.action-note{display:none}.action-bar.is-kan{flex-wrap:wrap}.kan-note{font-size:9px}.dialog{padding:20px;max-width:480px}.confirm-preview{padding-top:10px}.dialog h2{margin:12px 0 6px;font-size:22px}.dialog-actions{margin-top:14px}.dialog small{display:none}}
@media(prefers-reduced-motion:no-preference){.hero-copy{animation:arrive .6s both}.hero-art{animation:arrive .8s .08s both}.mode-card{animation:arrive .65s .1s both}.modal .dialog{animation:dialog-in .18s both}@keyframes arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes dialog-in{from{opacity:0;transform:translateY(7px) scale(.98)}to{opacity:1;transform:none}}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:1100px) and (min-height:700px){.game:not(.is-finished)>.status-line{grid-row:1}.game:not(.is-finished)>#onlineInvite{grid-row:2}.game:not(.is-finished)>.opponent{grid-row:3}.game:not(.is-finished)>.center-strip{grid-row:4}.game:not(.is-finished)>.own{grid-row:5}.game:not(.is-finished)>.hand-panel{grid-row:6}}
body:not(.playing) .header-actions{display:none}.board-switch{display:none}.hero-link{display:inline-flex;gap:28px;align-items:center;text-decoration:none;border-bottom:1px solid var(--ink);font-size:12px;padding:12px 0 9px;margin-top:20px}.hero-link span{color:var(--accent);font-size:17px}.hero-link:hover{border-color:var(--accent)}
@media(min-width:1100px) and (min-height:800px){.playing .game:not(.is-finished){height:calc(100dvh - 64px);min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto minmax(0,1fr) auto;gap:10px;padding:12px 0 14px}.column{min-height:0;padding:8px 10px;gap:6px}.column-meta{min-height:29px;line-height:1.45}.column-tiles{min-height:76px}.hand-panel{padding:9px 15px 10px}.hand-tiles{min-height:0;padding:9px 2px 4px}.hand-tiles .tile{width:42px;min-width:42px;height:57px}.status-line{padding:10px 18px 13px}.center-strip{padding:5px 10px}}
@media(max-width:650px) and (orientation:portrait), (max-width:1099px) and (max-height:560px) and (orientation:landscape){
 .playing .game{display:flex;flex-direction:column}.status-line{order:0}#onlineInvite{order:1}.board-switch{display:grid;grid-template-columns:1fr 1fr;gap:6px;order:2;background:#0c262150;border:1px solid #5b796740;padding:4px;border-radius:8px}.board-switch button{display:flex;justify-content:center;align-items:center;gap:10px;min-height:44px;border:0;border-radius:5px;color:#b3c6b5;background:transparent;font-size:12px}.board-switch button span{font-size:8px;letter-spacing:.12em}.board-switch button[aria-selected=true]{background:#315b47;color:#f5eee0;box-shadow:inset 0 0 0 1px #7c956659}.board-section{order:3}.center-strip{order:4}.hand-panel{order:5;position:static;box-shadow:0 4px 16px #071c2729}.result-panel{order:6}.game[data-mobile-view=own] .opponent,.game[data-mobile-view=opponent] .own{display:none}.column-tiles .tile{width:clamp(20px,6vw,25px);min-width:clamp(20px,6vw,25px);height:auto;aspect-ratio:47/63}.column-tiles{min-height:115px}.column-head strong{font-size:11px}.count-badge{font-size:10px}.column-meta,.column-meta.is-empty{font-size:11px;line-height:1.65;min-height:55px}.column:before{font-size:68px}.section-head h2{font-size:12px}.section-head>span{font-size:9px}.discard-area{min-height:30px}.discard-area strong{font-size:10px}.discard-tiles .tile{width:23px;min-width:23px;height:32px}.hand-panel .section-head h2{font-size:12px}.hand-panel .section-head>span{font-size:11px}.action-bar button{font-size:11px}.kan-note{font-size:11px}.dora-group .section-kicker,#wallStatus{font-size:10px}.dora-group .section-kicker{max-width:none}.wait-label{font-size:10px}.wait-item>span:last-child{font-size:10px}.stat-pill{font-size:10px}.stat-pill small{font-size:9px}.stat-pill b{font-size:21px}.playing .brand>div>span{display:none}.playing .brand h1{font-size:20px}.playing .brand-mark{height:25px}.hero-link{min-height:44px}.lobby .lead{font-size:13px}.mode-card p{font-size:12px}
}
/* Review 3: readable score details and unobstructed controls on compact screens. */
.result-breakdown small{font-size:12px;color:#54665b}.result-col p{font-size:13px}
@media(max-width:1099px){.hand-panel{position:static}}
@media(max-width:650px){.header-edition{display:none}.result-panel>p{font-size:12px}}
@media(max-width:1099px) and (max-height:560px) and (orientation:landscape){.board-switch button{min-height:44px}.column-tiles{min-height:74px}.column-meta,.column-meta.is-empty{min-height:33px}.action-bar button{min-height:44px}.hand-panel{margin-bottom:0}.game{padding-bottom:14px}}
@media(min-width:1100px) and (max-height:799px){.playing .masthead{height:54px}.playing .game:not(.is-finished){min-height:0;grid-template-rows:repeat(6,auto);gap:7px;padding:10px 0 12px}.status-line{padding:8px 14px 11px}.stat-pill b{font-size:20px}.section-head{margin-bottom:5px}.column{padding:7px 9px;gap:5px}.column-tiles{min-height:38px}.column-tiles .tile{width:26px;min-width:26px;height:35px}.column-meta,.column-meta.is-empty{min-height:29px;max-height:34px;font-size:11px;line-height:1.5}.column-grid{flex:none}.discard-area{min-height:28px;margin-top:4px}.discard-tiles .tile{width:21px;min-width:21px;height:29px}.center-strip{min-height:37px;padding:4px 8px}.hand-panel{padding:9px 14px}.hand-tiles{min-height:0;padding:9px 2px 4px}.hand-tiles .tile{width:38px;min-width:38px;height:51px}.action-bar{padding-top:5px}.action-bar button{min-height:44px}.indicator-tiles .tile{width:21px;min-width:21px;height:29px}}

/* Waiting rooms show the invitation before a game is dealt. */
.playing .game.is-waiting{height:auto;min-height:0;grid-template-rows:auto auto}.game.is-waiting .board-switch,.game.is-waiting .board-section,.game.is-waiting .center-strip,.game.is-waiting .hand-panel{display:none}
@media(max-width:650px){.invite-box{align-items:flex-start;gap:10px}.invite-box>span{flex-basis:100%;font-size:12px}.invite-box code{flex-basis:100%;min-width:0;font-size:12px}.invite-box .secondary{width:100%;font-size:12px}}
