/* 세로 화면 (2026-11, B안) — html.layout-tall. The stage is 390 wide and 700–900 tall (device.js). Every rule here is
   scoped to .layout-tall, so the sideways layout above is untouched when the setting is 가로. */

/* ── The table (2026-11, 긴 테이블): the room from above. The floor (art/tall-floor.webp) fills the stage under the
   window wall; the arena is drawn for 390×560 — cushions, the long kotatsu and its navy mat (art/tall-table-N.svg) — and
   scales down as one piece on a short stage (--ak, app.js). The players are whole cats on their cushions: two down each
   side, one at the head, me from behind at the near edge. The hand lies on the floor in front of me, under a soft shade. */
.layout-tall .table-screen{grid-template-rows:calc(560px * var(--ak,1)) minmax(0,1fr);padding:0;background:url(art/tall-floor.webp) 50% 0/390px auto no-repeat,url(art/room-game.webp) 50% -11px/auto 270px no-repeat,#d6cb90}
.layout-tall .table-top{position:absolute;z-index:9;left:0;right:0;top:calc(var(--sa-t) + 8px);height:36px;padding:0 calc(10px + var(--sa-r)) 0 calc(10px + var(--sa-l))}
.layout-tall .round-no{padding:5px 11px;background:#1f2a44eb;box-shadow:0 0 0 1px #fff8e92e,0 3px 6px #0006;font-size:12px}
.layout-tall .topline-status .pill{border:0;padding:4px 10px;background:#1f2a44eb;color:var(--cream);box-shadow:0 0 0 1px #fff8e92e,0 3px 6px #0006;font-size:12px}
.layout-tall .topline-status .pill.your-turn{background:var(--yellow);color:var(--ink);box-shadow:0 3px 6px #0006}
.layout-tall .topline-status .turn-seconds{background:#1f2a44eb;color:#ffd866}.layout-tall .topline-status .turn-seconds.warn{background:var(--coral);color:var(--ink)}
.layout-tall .topline-status .turn-seconds:before{filter:invert(1)}
.layout-tall .table-tools .icon-button{width:36px;height:36px;border-radius:50%;box-shadow:0 3px 0 var(--ink)}
.layout-tall .arena{justify-self:center;width:390px;height:560px;margin:0;transform:scale(var(--ak,1));transform-origin:50% 0}
.layout-tall .deck-table{inset:0;left:0;top:0;width:390px;height:560px;aspect-ratio:auto;transform:none;border:0;border-radius:0;box-shadow:none;background:url(art/tall-table-6.webp) 0 0/390px 560px no-repeat}
.layout-tall [data-n="5"] .deck-table{background-image:url(art/tall-table-5.webp)}.layout-tall [data-n="4"] .deck-table{background-image:url(art/tall-table-4.webp)}
.layout-tall .deck-table:after{content:none}
/* Seats. A player who is out stays solid (2026-11-29: the see-through cat showed its cushion) — the plate turns teal with the place. */
.layout-tall .cat-seat.finished{opacity:1}
.layout-tall .cat-seat.finished .seat-tag{background:var(--teal-deep);box-shadow:0 0 0 2px var(--ink),0 3px 0 var(--ink)}
.layout-tall .cat-seat.finished .seat-tag .seat-title{color:var(--cream)}
.layout-tall .cat-seat.finished .seat-place{padding:0 6px;background:#ffd866;color:var(--ink);font-size:11px;line-height:16px}
.layout-tall .cat-seat{flex-direction:column;align-items:center;gap:0;width:72px}
.layout-tall .cat-seat .seat-medal{width:72px;height:95px;background:none}
.layout-tall .cat-seat .seat-medal:after{content:none}
.layout-tall .seat-cat{display:block;width:72px;height:95px;overflow:visible}.layout-tall .seat-cat.flip{transform:scaleX(-1)}
/* Whose turn: a gold 차례 flag bobbing over the head and a gold name plate (2026-11-29: the glow read badly and was cut at the screen edge). */
.layout-tall .actions button{transition:filter .15s,opacity .15s}
.layout-tall .cat-seat .seat-tag{transition:background-color .2s,box-shadow .2s}
.layout-tall .turn-mark{position:absolute;z-index:4;left:50%;top:-7px;padding:2px 9px 3px;border-radius:999px;background:#ffd866;color:var(--ink);border:2px solid var(--ink);box-shadow:0 2px 0 var(--ink);font-size:11px;font-weight:900;line-height:1.2;white-space:nowrap;animation:turn-bob 1s ease-in-out infinite}
.layout-tall .turn-mark:after{content:'';position:absolute;left:50%;top:100%;width:8px;height:8px;margin:-3px 0 0 -4px;background:#ffd866;border:solid var(--ink);border-width:0 2px 2px 0;transform:rotate(45deg)}
@keyframes turn-bob{0%,100%{transform:translate(-50%,0)}50%{transform:translate(-50%,-4px)}}
.layout-tall .seat-0{left:44px;top:293px}.layout-tall .seat-1{left:44px;top:159px}.layout-tall .seat-2{left:195px;top:70px}.layout-tall .seat-3{left:346px;top:159px}.layout-tall .seat-4{left:346px;top:293px}
.layout-tall [data-n="4"] .seat-0,.layout-tall [data-n="4"] .seat-4{top:231px}
.layout-tall .seat-tag{position:absolute;z-index:3;left:50%;top:calc(100% + 1px);transform:translateX(-50%);padding:2px 8px 3px;border-radius:11px;background:#1f2a44eb;box-shadow:0 0 0 1px #fff8e92e,0 3px 6px #0006;color:var(--cream);text-align:center;white-space:nowrap;line-height:1.3}
.layout-tall .side-left .seat-tag{left:calc(50% + 8px)}.layout-tall .side-right .seat-tag{left:calc(50% - 8px)}
.layout-tall .side-top .turn-mark{top:-16px}
.layout-tall .side-top .seat-tag{left:calc(100% - 4px);top:40px;transform:none}
.layout-tall .seat-tag strong{display:block;max-width:86px;overflow:hidden;text-overflow:ellipsis;font-size:10.5px;font-weight:800;opacity:.92}
.layout-tall .seat-tag .seat-line{justify-content:center;gap:4px}
.layout-tall .seat-tag .seat-title{font-size:12px;color:var(--seat-light)}
.layout-tall .seat-tag .seat-count{gap:2px;padding:0 5px;border-radius:6px;background:var(--cream);color:var(--ink);font-size:11px;line-height:16px}
.layout-tall .seat-tag .seat-count .cards-icon{width:10px;height:10px}
.layout-tall .cat-seat.current .seat-tag{background:#ffd866;color:var(--ink);box-shadow:0 0 0 2px var(--ink),0 3px 0 var(--ink)}
.layout-tall .cat-seat.current .seat-tag .seat-title{color:var(--seat,var(--ink))}.layout-tall .cat-seat.current .seat-tag strong{opacity:1}
.layout-tall .cat-seat .prop-crown.seat-prop{left:50%;right:auto;top:-13px;width:36px;height:22px;transform:translateX(-50%) rotate(-6deg)}
.layout-tall .cat-seat .prop-bowl.seat-prop{left:auto;right:-4px;bottom:0;width:24px;height:24px}
.layout-tall .seat-me{left:195px;top:432px;bottom:auto;width:112px;z-index:4;flex-direction:column}
.layout-tall .seat-me .seat-medal{width:112px;height:126px}
.layout-tall .seat-cat-back{display:block;width:112px;height:126px;overflow:visible}
/* The middle: everything sits on the navy mat (168×150 at 111,252). */
.layout-tall .table-center{left:195px;top:327px;width:176px;max-height:196px;gap:5px}
.layout-tall .table-center:has(.pile-zone){top:327px}
.layout-tall .pile-zone{min-height:84px;align-items:center}
.layout-tall .pile{position:relative;display:block;flex:none}
.layout-tall .pile .played-card,.layout-tall .pile:has(.played-card:nth-child(6)) .played-card,.layout-tall .pile:has(.played-card:nth-child(9)) .played-card{position:absolute;left:var(--x);top:var(--y);width:44px;height:60px;margin:0}
.layout-tall .old-card{width:44px;height:60px;margin-left:-19px}
.layout-tall .old-card:first-child{margin-left:0}
.layout-tall .old-set{padding-left:0;scale:.86}
.layout-tall .pile-caption{gap:3px 5px;color:var(--cream)}
.layout-tall .pile-caption>span.pile-who{max-width:74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#1f2a44eb;border-color:#f2c14e88;color:#ffd866}
.layout-tall .table-center h2{font-size:12px}
.layout-tall .spent-stack{left:266px;top:426px;width:24px;height:33px;transform:translate(-50%,-50%) rotate(8deg)}
.layout-tall .seat-spread{flex-wrap:wrap;height:auto;max-width:170px;row-gap:22px;margin:2px 0}
.layout-tall .spread-card{width:38px;height:54px}
.layout-tall .table-center:has(.tribute-list){width:236px;top:327px}
.layout-tall .tribute-list li{font-size:11px;padding:2px 6px}

/* The hand: on the floor in front of me. No shelf — a shade so the cards read; my name and post, the line, the cards
   (one per number), then 패스 · 카드 내기 along the bottom edge for the thumb. */
.layout-tall .hand-panel{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(4,auto);align-content:end;gap:8px;padding:22px calc(12px + var(--sa-r)) calc(14px + var(--sa-b)) calc(12px + var(--sa-l));border-top:0;box-shadow:none;background:linear-gradient(#141b3000,#141b30a8 60px,#141b30d0)}
.layout-tall .hand-side{display:contents}
.layout-tall .hand-panel>*,.layout-tall .hand-side>*{grid-column:1}
.layout-tall .hand-heading{grid-row:1;height:26px;gap:6px}
.layout-tall .hand-heading h2{max-width:150px;padding:3px 11px;border-radius:999px;background:#1f2a44eb;box-shadow:0 0 0 1px #fff8e92e;font-size:13.5px;line-height:20px;color:#ffd866}
.layout-tall .action-message{grid-row:1;justify-self:end;align-self:center;max-width:46%;height:20px;padding:0 9px;border-radius:999px;background:#1f2a44eb;font-size:12px;line-height:20px;color:var(--cream)}
.layout-tall .action-message:empty{display:none}
.layout-tall .action-message.error{color:#ffc7b6}
.layout-tall .actions{grid-row:4;margin-top:2px}
.layout-tall .actions.duo{grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:0 10px}
.layout-tall .actions.duo>button,.layout-tall .actions .play-button{min-height:56px;font-size:18px}
.layout-tall .actions .play-button:disabled{filter:grayscale(1) brightness(.82);opacity:.7}
.layout-tall .hand-fan{grid-row:3;position:relative;width:366px;height:calc(var(--stack-h,161px) + 12px);min-height:0;margin:0 auto;padding:0;touch-action:manipulation}
.layout-tall .hand-fan>.fan-card{left:var(--x);top:calc(var(--y) + 10px);bottom:auto;width:var(--card-w);height:var(--card-h);overflow:visible;border-radius:7px;transform:translateY(var(--lift));transform-origin:50% 50%;box-shadow:0 3px 0 var(--ink),0 6px 0 #0004}
.layout-tall .hand-fan>.fan-card.under{visibility:hidden;pointer-events:none}
.layout-tall .hand-fan.dense>.fan-card .face-name{visibility:visible}
.layout-tall .hand-fan .fan-card.picked{--lift:-9px;box-shadow:0 0 0 3px #ffd866,0 0 0 6px #ffd86655,0 9px 0 #0004}
.layout-tall .hand-fan .fan-card.picked:after{border:0;box-shadow:none}
.layout-tall .hand-fan .fan-card.tribute{--lift:-9px;box-shadow:0 0 0 3px var(--coral),0 0 0 5px var(--ink)}
/* Not my turn: the whole hand sits under a brown veil; the moment the turn is mine it clears (no wait for the buttons). */
.layout-tall .hand-fan>.fan-card:before,.layout-tall .hand-fan>.fan-card:disabled:before{opacity:.5;transition:opacity .15s}
.layout-tall .hand-fan.live>.fan-card:before,.layout-tall .hand-fan.live>.fan-card:disabled:before{opacity:0}
.layout-tall .hand-fan:not(.live)>.fan-card{box-shadow:0 3px 0 var(--ink)}
.layout-tall .fan-card .card-count{z-index:8;left:auto;right:-7px;top:-9px;padding:4px 7px;border:0;border-radius:999px;background:var(--ink);color:var(--cream);box-shadow:0 0 0 1.5px var(--cream);font-size:11px;line-height:1}
.layout-tall .fan-card .card-count.some{background:#ffd866;color:var(--ink);box-shadow:0 0 0 1.5px var(--ink)}
.layout-tall .hand-fan.empty-hand{height:80px}
.layout-tall .turn-fuse{position:relative;grid-row:2;left:auto;right:auto;top:auto;height:4px;border:0;border-radius:2px;background:#ffd866}
/* Out of the hand (spectating), the draw, the results: the same place, one column. */
.layout-tall .spectator-hand .hand-heading,.layout-tall .draw-hand .hand-heading{grid-row:1/4;height:auto;min-height:140px;justify-content:center}
.layout-tall .spectator-hand .hand-fan,.layout-tall .draw-hand .hand-fan{display:none}
.layout-tall .results-hand{grid-template-columns:minmax(0,1fr);grid-template-rows:26px auto auto;gap:8px}
.layout-tall .results-hand .hand-heading{grid-row:1}
.layout-tall .result-strip{grid-column:1;grid-row:2;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:46px}
.layout-tall .result-actions{grid-column:1;grid-row:3}
.layout-tall .result-actions .primary{min-height:58px}

/* ── Cold start: the room fills the tall frame; the kotatsu and the cat sit low, the title high in the middle. */
.layout-tall .seq-room{background-position:30% 40%}
.layout-tall .seq-kotatsu{left:6%;bottom:16%;width:62%}
.layout-tall .seq-cat{right:-4%;bottom:14%;width:60%}
.layout-tall .seq-front{height:11%}
.layout-tall .seq-title{left:50%;top:9%}
.layout-tall .seq-title .title-banner{width:300px}
.layout-tall .seq-invite{bottom:30%}

/* ── Setup and the online list: one column on the chart paper. */
.layout-tall .setup-screen{grid-template-rows:52px minmax(0,1fr);gap:10px;padding:max(10px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))}
.layout-tall .setup-body,.layout-tall .room-form{grid-template-columns:minmax(0,1fr);align-content:start;gap:16px;width:100%;padding:18px 14px}
.layout-tall .solo-setup{align-content:center}
.layout-tall .player-options label>span{min-height:72px}
.layout-tall .player-options strong{font-size:24px}
.layout-tall .setup-start{min-height:96px}
.layout-tall .online-pane:not([hidden]){display:flex;height:100%;padding:12px}
.layout-tall .online-top{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto}
.layout-tall .online-top .name-field{grid-column:1/-1}
.layout-tall .online-top .primary,.layout-tall .online-top .secondary{min-height:50px}
.layout-tall .online-top #create-room{grid-column:2}.layout-tall .online-top #quick-join{grid-column:1}
.layout-tall .room-rows{grid-template-rows:repeat(6,60px);flex:none}
.layout-tall .room-row{grid-template-columns:22px minmax(0,1fr) auto;grid-template-rows:auto auto;row-gap:2px;padding:6px 10px}
.layout-tall .room-name{grid-column:2}
.layout-tall .room-facts{grid-column:2;grid-row:2;justify-self:start}
.layout-tall .room-state{grid-column:3;grid-row:1/3}
.layout-tall .room-lock{grid-row:1/3}
.layout-tall .online-foot{flex-direction:column;align-items:stretch;margin-top:auto}

/* ── Lobby: the door (code or invite) on top, the seats in two columns, start and leave at the bottom. */
.layout-tall .lobby-shell{display:grid;grid-template-rows:52px minmax(0,1fr);gap:10px;padding:max(10px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom))}
.layout-tall .lobby-body{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:12px}
.layout-tall .invite-code{min-height:120px}
.layout-tall .lobby-seats,.layout-tall .lobby-seats.seats-4{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:minmax(64px,1fr)}
/* Dialogs keep to the narrow stage. */
.layout-tall dialog.table-dialog{max-width:calc(var(--sw) - 20px)}
.layout-tall .create-grid{grid-template-columns:minmax(0,1fr)}

/* ── The first screen (2026-11): the game's own room. The table and the cats are the arena at .72, breathing; the title
   hangs over it and the ways in stand at the bottom on the hand's shade. */
.layout-tall .intro-screen{display:block;padding:0;background:url(art/tall-floor.webp) 50% 0/390px auto no-repeat,url(art/room-game.webp) 50% -11px/auto 270px no-repeat,#d6cb90}
.layout-tall .home-cat{display:none}
.layout-tall .intro-screen .start-header{position:absolute;z-index:5;left:12px;right:12px;top:calc(var(--sa-t) + 10px)}
.layout-tall .intro-room{position:absolute;z-index:0;left:0;right:0;top:calc(50% - 258px);height:404px;pointer-events:none}
.layout-tall .intro-arena{position:absolute;left:0;top:0;--ak:.72}
.layout-tall .intro-arena .seat-medal{animation:cat-bob 3.2s ease-in-out infinite;animation-delay:calc(var(--i) * -.55s)}
.layout-tall .intro-arena .table-center{top:327px}
@keyframes cat-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
.layout-tall .intro-stage{position:absolute;z-index:2;inset:0;margin:0;padding:calc(var(--sa-t) + 64px) 0 calc(var(--sa-b) + 18px);justify-content:space-between;gap:0;background:linear-gradient(#141b3000 58%,#141b30b0 76%,#141b30d8)}
.layout-tall .intro-identity .title-banner{width:268px}
.layout-tall .intro-play{width:318px;gap:9px}
.layout-tall .intro-play .mode-button{min-height:54px}
.layout-tall .nick-chip{align-self:center;display:inline-flex;align-items:center;gap:7px;min-height:34px;margin-top:3px;padding:0 13px;border-radius:999px;background:#1f2a44eb;box-shadow:0 0 0 1px #fff8e92e;color:var(--cream);font-size:12.5px;font-weight:800}
.layout-tall .nick-chip span{opacity:.75}.layout-tall .nick-chip b{color:#ffd866;font-weight:900}.layout-tall .nick-chip i{font-style:normal;font-size:11px;padding:1px 8px;border-radius:999px;background:var(--cream);color:var(--ink)}
@media (prefers-reduced-motion:reduce){.layout-tall .intro-arena .seat-medal{animation:none}}

/* The title's Japanese line, and the way in (2026-11-29): the old sideways sequence is a short curtain here; then the
   room sets itself — the cats pop onto their cushions one by one, the title drops, the planks rise. */
.title-sub{margin:-6px 0 0;font-family:'Noto Serif KR','Noto Serif CJK KR',serif;font-synthesis:weight;font-size:13px;font-weight:900;letter-spacing:.14em;text-align:center;color:#fff8e9;text-shadow:0 1px 0 var(--ink),0 0 6px #2a1a10}
.layout-tall .intro-identity{align-content:start;gap:0}
.layout-tall .intro-sequence{background:#2a1a10}
.layout-tall .seq-scene,.layout-tall .seq-skip{display:none}
.layout-tall .intro-screen:not(.enter):not(.entered) .intro-arena .cat-seat,.layout-tall .intro-screen:not(.enter):not(.entered) .intro-arena .table-center,.layout-tall .intro-screen:not(.enter):not(.entered) .intro-play,.layout-tall .intro-screen:not(.enter):not(.entered) .title-sub{opacity:0}
.layout-tall .intro-screen.enter .intro-arena .cat-seat{animation:cat-pop .42s cubic-bezier(.2,.9,.3,1.5) both;animation-delay:calc(var(--i) * 90ms + 80ms)}
.layout-tall .intro-screen.enter .intro-arena .table-center{animation:fade-in .4s .7s ease both}
@keyframes fade-in{from{opacity:0}to{opacity:1}}
.layout-tall .intro-screen.enter .title-sub{animation:start-in .4s .5s ease both}
.layout-tall .intro-screen.enter .intro-play{animation:start-in .5s .75s ease both}
.layout-tall .intro-play.start-reveal,.layout-tall .intro-identity.start-reveal{animation:none}
@keyframes cat-pop{0%{opacity:0;scale:.5}100%{opacity:1;scale:1}}

/* ── Touch targets (2026-11-29). Every control answers a thumb: a hand card's target covers the gaps round it (and the
   strip it leaves when lifted), the round buttons and chips reach 48px, the seat-draw cards no longer overlap. */
.layout-tall .hand-fan>.fan-card:not(.under):after{content:'';position:absolute;z-index:9;inset:-5px -5px -10px;border:0;box-shadow:none}
.layout-tall .hand-fan .fan-card.picked:after{content:'';inset:-5px -5px -19px}
.layout-tall .table-tools .icon-button,.layout-tall .start-tools .icon-button,.layout-tall .nick-chip,.layout-tall .career-chip,.layout-tall .start-back{position:relative}
.layout-tall .table-tools .icon-button:after,.layout-tall .nick-chip:after{content:'';position:absolute;inset:-8px -8px}
.layout-tall .actions.duo>button,.layout-tall .actions>button{position:relative}
.layout-tall .actions>button:after{content:'';position:absolute;inset:-6px -5px -14px}
.layout-tall .spread-card{margin:0 3px}
.layout-tall .spread-card.card-back:after{content:'';position:absolute;inset:-6px -3px -10px}
.layout-tall .seat-spread{max-width:190px;row-gap:20px}
.layout-tall .room-pager .icon-button{width:48px;height:44px}
.layout-tall .limit-options label>span,.layout-tall .menu-item{min-height:44px}
