@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@500;700;900&display=swap');
:root{color-scheme:dark;--gold:#ddbd79;--pale:#f2dfb4;--ink:#081722;--muted:#a7b1ae;--header:52px;--card-w:82px;--card-h:123px;--atlas:url('./cards-atlas.2d9ffe340eaca1c3.webp');--table:url('./captains-table.ce2184716f297704.webp');--ship:url('./moonlit-ship.a5e09e37ba7a59d8.webp')}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;overscroll-behavior:none}body{height:100dvh;background:#07131b;color:#eee6d4;font-family:system-ui,-apple-system,sans-serif;-webkit-tap-highlight-color:transparent}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation;min-height:44px;color:var(--pale);border:1px solid #a7844c;border-radius:7px;background:linear-gradient(#173d53,#092337);padding:10px 16px;box-shadow:inset 0 1px #ffffff12,0 3px 10px #0004}button:disabled{cursor:default;filter:saturate(.25);opacity:.45}button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #ffe3a0;outline-offset:3px}button:not(:disabled):active{filter:brightness(1.25)}input,select{min-width:0;max-width:100%;min-height:44px;border:1px solid #a98c5d77;border-radius:5px;background:#091d2b;color:#f7e6be;padding:9px 12px;font-size:16px}select{width:100%}input{width:100%}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:'Noto Serif KR',Georgia,serif}p{line-height:1.65}.eyebrow{font-size:10px;letter-spacing:2.8px;color:var(--gold)}.primary{background:linear-gradient(#195275,#092c43);border-color:#c8a361;box-shadow:inset 0 0 0 1px #143a50,0 3px 10px #0006;color:#fff0ca;font-weight:700}.wood-button{background:linear-gradient(#65462d,#342419);border-color:#b38b51}.quiet-button{background:transparent;border-color:#8b774c66}.icon-button{width:44px;height:44px;min-height:44px;padding:0;font-size:22px;border-color:#b08d563b;background:#07141ba8;color:#e6c885;display:grid;place-items:center;flex-shrink:0}.ambient{position:fixed;inset:0;background:radial-gradient(ellipse at 50% 0,#22414e55,transparent 65%);pointer-events:none}header{height:var(--header);padding:0 22px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:2;border-bottom:1px solid #c5a66a40;background:linear-gradient(#10212c,#08131b);box-shadow:0 3px 15px #0006}.brand{text-decoration:none;color:var(--gold);display:flex;align-items:center;gap:10px;font-size:24px}.brand span{font-family:Georgia,serif;font-size:16px;letter-spacing:3px}.brand small{display:block;font-family:system-ui;font-size:8px;letter-spacing:1.5px;margin-top:3px}#status{font-size:11px;color:#c6b48e;white-space:nowrap}#app{height:calc(100dvh - var(--header));width:100%;position:relative;isolation:isolate}footer{display:none}#toast{position:fixed;left:50%;bottom:max(26px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:100;max-width:min(90vw,480px);width:max-content;border:1px solid #d8b97b;background:#112b38f5;color:#f6e5bd;box-shadow:0 10px 40px #000a;padding:13px 18px;border-radius:8px;font-size:13px;line-height:1.5}#toast[hidden]{display:none}.parchment{color:#332419;background:radial-gradient(ellipse at 40% 30%,#f2dfb6,#d6b886 70%,#ae8856);border:2px solid #9a713e;box-shadow:inset 0 0 22px #6a381f40,inset 0 0 0 3px #e6c28b88,0 15px 50px #0009;border-radius:10px}.parchment .eyebrow{color:#72522c}.parchment input,.parchment select{background:#f6e8c9;color:#3c2b18;border-color:#a98650}.parchment p{color:#6b4a2a}.parchment small{color:#6b4a2a}.parchment h2{color:#352417}.landing{height:100%;position:relative;display:grid;grid-template-columns:1fr 420px;align-items:center;gap:6vw;padding:30px max(7vw,24px);background-image:linear-gradient(90deg,#06131b11,#06131b44 50%,#06131bf2 85%),var(--ship);background-size:cover,auto 140%;background-position:center,20% 35%;overflow:hidden}.landing:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,#020a10d9,transparent 30%,#06131b77);z-index:0}.title-art,.landing-port{position:relative;z-index:1}.title-art{text-align:center;text-shadow:0 4px 20px #000,0 2px 2px #000}.title-art h1{font-family:Georgia,serif;font-size:clamp(75px,9vw,140px);line-height:.87;letter-spacing:-4px;font-weight:700;color:#ebc77f;text-shadow:0 2px 0 #765019,1px 4px 0 #39230e,0 0 30px #000;margin:24px 0}.title-art h1 span{font-size:1.22em}.title-rule{display:flex;align-items:center;justify-content:center;gap:15px;font-family:'Noto Serif KR',serif;letter-spacing:6px;font-size:21px;color:#f1d8a6}.title-rule:before,.title-rule:after{content:'';width:45px;height:1px;background:#d5ac65}.title-art p{font-size:12px;color:#e4d1b0;margin-top:18px;letter-spacing:1px}.home-paper{padding:30px;display:flex;flex-direction:column;gap:14px;position:relative}.home-paper:before,.home-paper:after{content:'✥';position:absolute;top:7px;color:#7c5627;font-size:17px}.home-paper:before{left:9px}.home-paper:after{right:9px}.name-label{font-family:'Noto Serif KR',serif;font-size:14px;font-weight:700;margin-top:8px}.home-paper input{margin-top:-7px}.sail-button{font-family:'Noto Serif KR',serif;font-size:18px;min-height:72px;display:grid;grid-template-columns:30px 1fr;align-items:center;column-gap:10px;text-align:left}.sail-button>span{grid-row:span 2;font-size:28px}.sail-button small{font-family:system-ui;font-size:10px;font-weight:400;color:#b5c9cd;letter-spacing:1px}.home-links{display:flex;gap:10px}.home-links button{font-size:12px;flex:1;background:#32261d;color:#e9cfa1;padding:10px 7px}.edition-note{font-size:10px;color:#bdae8d;text-align:center;margin-top:17px;letter-spacing:.6px}
/* A fixed viewport: controls stay on the table; documents scroll inside sheets only. */
.game-shell{height:100%;display:grid;grid-template-rows:52px minmax(0,1fr) 244px;overflow:hidden;background:#07131a}.game-toolbar{display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid #bf995449;background:#08141cf2;z-index:5}.round-heading{text-align:center}.round-heading b{font:700 18px Georgia,serif;letter-spacing:2px;color:#ebcf98}.round-heading b span{font-size:12px;color:#9e9279}.round-heading small{display:block;font-size:10px;color:#a99d84;margin-top:3px;letter-spacing:1px}.toolbar-end{display:flex;gap:6px}.toolbar-end .icon-button{position:relative}.toolbar-end i{position:absolute;right:1px;top:0;border-radius:10px;font-size:9px;font-style:normal;background:#aa7f39;color:#fff2c9;padding:1px 4px}.arena{min-height:0;position:relative;isolation:isolate;background-image:var(--table);background-size:100% 100%;background-position:center;overflow:hidden}.table-vignette{position:absolute;inset:0;pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 50% 45%,#0c0d0e00 10%,#080c1266 95%)}.rope-ring{position:absolute;inset:13% 7% 8%;border:1px solid #c3944044;box-shadow:0 0 0 2px #080b0e33,inset 0 0 70px #0003;border-radius:49%;pointer-events:none}.opponent{position:absolute;left:clamp(43px,var(--sx),calc(100% - 43px));top:var(--sy);transform:translate(-50%,-36%);width:112px;z-index:4;display:flex;align-items:center;flex-direction:column;gap:3px;filter:drop-shadow(0 3px 4px #000b)}.avatar{width:49px;height:49px;display:block;border-radius:50%;border:2px solid #d8b971;box-shadow:0 0 0 3px #0d161b,0 3px 8px #0009;position:relative;background:#17313c;flex-shrink:0}.avatar-art{display:block;width:100%;height:100%;border-radius:50%;background-image:var(--atlas);background-size:800% 600%;background-position:var(--portrait-x) var(--portrait-y)}.ai-dot{position:absolute;bottom:-1px;right:-5px;font:700 8px system-ui;background:#162f37;color:#e8c786;padding:1px 3px;border-radius:4px;border:1px solid #a37c43}.seat-label{background:linear-gradient(#091117ef,#121a1bd9);padding:4px 9px;border:1px solid #af8a4a66;border-radius:5px;max-width:100%;text-align:center}.seat-label>b{font-size:12px;white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden;color:#f0dfbc}.seat-label>span{font-size:10px;color:#d6c4a6;display:block;margin-top:2px}.seat-label i{color:#876f44;font-style:normal;margin:0 3px}.active .avatar{box-shadow:0 0 0 3px #edca78,0 0 22px #e6b04d99}.active .seat-label{border-color:#f0cc7a}.active:after{content:'차례';position:absolute;right:-7px;top:10px;font-size:9px;background:#dab56b;color:#271c10;padding:2px 4px;border-radius:4px}.bid-ready .seat-label:after{content:'✓';position:absolute;right:4px;top:4px;color:#9bd7b0;font-size:11px}.opponent-hand{height:17px;width:40px;position:relative;margin-top:3px}.opponent-hand>i{position:absolute;left:calc(5px + var(--back-i)*7px);top:0;width:17px;height:24px;background:repeating-linear-gradient(45deg,#0c2535 0,#0c2535 3px,#a2824433 4px,#0c2535 5px);border:1px solid #cba56b;border-radius:2px;transform:rotate(calc((var(--back-i) - 1)*12deg));box-shadow:0 2px 3px #0008}.opponent-hand small{position:absolute;right:-9px;top:7px;font-size:9px;color:#dec99e}.table-message{position:absolute;left:50%;top:31%;transform:translate(-50%,-50%);text-align:center;z-index:2;max-width:65%;width:max-content;text-shadow:0 2px 5px #000,0 0 10px #000}.table-message>span{display:block;font-size:9px;letter-spacing:2px;color:#b29a70;margin-bottom:5px}.table-message>b{font-size:12px;font-weight:500;color:#cabca1}.table-message.your-turn>b{color:#ffe3a2}.trick-space{position:absolute;inset:0;pointer-events:none}.played-card{position:absolute;left:var(--px);top:var(--py);transform:translate(-50%,-50%) rotate(var(--tilt));display:flex;align-items:center;flex-direction:column;z-index:calc(2 + var(--order));gap:4px}.played-card>.card{width:clamp(55px,8.7vh,83px);height:clamp(82px,13.05vh,124.5px);box-shadow:2px 8px 12px #0009}.played-card>span{font-size:10px;color:#ffedc3;background:#0b111bb3;padding:2px 7px;border-radius:3px;max-width:90px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 2px #000}.table-emblem{position:absolute;left:50%;top:56%;transform:translate(-50%,-50%);font-size:70px;text-align:center;color:#cea25322;pointer-events:none}.table-emblem span{display:block;font:9px Georgia,serif;letter-spacing:3px;margin-top:7px}.self-seat{position:absolute;bottom:7px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:35px auto;column-gap:10px;z-index:5;align-items:center;background:#07141ce0;padding:5px 14px 5px 7px;border:1px solid #bb945c66;border-radius:30px;color:#edd5a3;white-space:nowrap}.self-seat .avatar{width:31px;height:31px;grid-row:span 2;border-width:1px}.self-seat>b{font-size:11px;font-weight:600}.self-seat>b>span{font-size:10px;color:#c9b68f;font-weight:400}.self-seat>small{font-size:9px;color:#c5ba9c}.hand-rack{z-index:6;position:relative;min-height:0;background:linear-gradient(#091923ef,#09141bf7),var(--table);background-size:cover;border-top:2px solid #a9844977;box-shadow:0 -6px 30px #0008;display:grid;grid-template-rows:30px minmax(0,1fr) 59px;padding:0 max(20px,env(safe-area-inset-left)) max(0px,env(safe-area-inset-bottom))}.hand-caption{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9a9e96;z-index:5;position:relative}.hand-caption b{color:#dcc696;font-weight:500;margin-right:5px}.hand-caption button{min-height:28px;padding:2px 0;background:none;border:none;box-shadow:none;color:#bbaa89;font-size:10px}.suit-legend{display:flex;gap:5px;align-items:center}.suit-legend i{display:grid;place-items:center;font-style:normal;width:18px;height:18px;border-radius:50%;font-size:11px;border:1px solid #d4b77288;color:white}.suit-legend .green{background:#155638}.suit-legend .yellow{background:#9f741c}.suit-legend .purple{background:#603c8c}.suit-legend .black{background:#111a22}.hand-fan{position:relative;min-height:0;width:100%;max-width:900px;margin:auto;align-self:stretch;height:100%;isolation:isolate;--step:min(73px,calc((100vw - 124px) / var(--divisor)))}.hand-slot{position:absolute;left:50%;top:2px;transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(var(--arc)) rotate(var(--fan-angle));transform-origin:50% 160%;z-index:var(--z);transition:transform .24s cubic-bezier(.15,.6,.2,1)}.hand-slot.raised{transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(-19px) rotate(0deg);z-index:50}.hand-slot .card{width:var(--card-w);height:var(--card-h);touch-action:none}.hand-slot .card:focus-visible{outline-offset:4px}.card{border:3px solid #ddc497;border-radius:7px;position:relative;isolation:isolate;display:block;overflow:hidden;width:var(--card-w);height:var(--card-h);min-height:0;flex-shrink:0;background:#0d202b;padding:0;color:#fff2cd;box-shadow:0 5px 10px #0009;text-align:left;font-family:Georgia,serif;user-select:none;-webkit-user-select:none}.card:before{content:'';position:absolute;inset:3px;z-index:2;border:1px solid #f9dda56b;border-radius:3px;pointer-events:none}.card-art{position:absolute;inset:0;background-image:var(--atlas);background-size:400% 300%;background-position:var(--art-x) var(--art-y);z-index:-1}.card:after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(120deg,#fff2ce14,transparent 45%,#0004);z-index:0}.card.green{border-color:#9bc69a}.card.yellow{border-color:#f4d079}.card.purple{border-color:#be9bd6}.card.black{border-color:#c5bdad}.card.pirate{border-color:#e6b197}.card.mermaid{border-color:#91d7d3}.card.king{border-color:#eed392}.card.selected{border-color:#fff0a3;box-shadow:0 0 0 2px #d5ac4a,0 0 22px #f8d68b33,0 8px 20px #000b}.card.unavailable:after{background:#09131b55}.card.unavailable .card-corner{opacity:.75}.card-corner{position:absolute;display:flex;flex-direction:column;align-items:center;line-height:.95;z-index:3;color:#fff7d8;text-shadow:0 1px 2px #000,0 0 4px #000,1px 0 1px #000,-1px 0 1px #000;font-weight:700;min-width:18px}.card-corner b{font-size:23px;letter-spacing:-1px}.card-corner i{font-size:11px;font-style:normal;margin-top:2px}.card-corner.top{top:5px;left:3px}.card-corner.bottom{bottom:5px;right:3px;transform:rotate(180deg)}.card-name{position:absolute;bottom:7px;left:5px;right:15px;z-index:3;text-align:center;font:600 9px system-ui;color:#fff0ca;text-shadow:0 1px 2px #000,0 0 5px #000;background:#0a10185c;border-radius:3px;padding:2px 1px;overflow:hidden;white-space:nowrap}.flying-card{position:fixed!important;pointer-events:none;z-index:80!important;transform-origin:0 0;will-change:transform;box-shadow:3px 14px 22px #0009}.empty-hand{position:absolute;inset:0;display:grid;place-items:center;color:#8f978f;font-size:12px}.play-controls{position:relative;z-index:55;display:flex;align-items:center;justify-content:center;gap:14px;border-top:1px solid #a9884933;background:#091722f5;max-width:900px;width:100%;margin:auto;height:100%}.selection-info{flex:1;min-width:0}.selection-info>b{font-size:12px;font-weight:500;color:#e1cea4;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.selection-info>small{display:block;font-size:10px;color:#8f9c9e;margin-top:5px}.submit-button{min-width:132px;min-height:43px;display:flex;gap:20px;align-items:center;justify-content:center}.submit-button>span{font-size:20px}.play-controls select{width:90px;font-size:12px}
/* Paper bidding and results are contained overlays, never more page height. */
.bid-sheet{position:absolute;left:50%;top:49%;transform:translate(-50%,-50%);width:min(360px,80%);padding:20px 25px;z-index:10;text-align:center;max-height:90%;overflow:auto}.sheet-ornament{color:#805c2a;font-size:23px;margin-bottom:5px}.bid-sheet h2{font-size:20px;margin:9px 0}.bid-sheet p{font-size:11px;margin-bottom:15px}.bidgrid{display:flex;justify-content:center;flex-wrap:wrap;gap:7px;margin-bottom:14px}.bidgrid>button{width:43px;min-width:0;min-height:43px;background:#e5c792;border:1px solid #9b7545;color:#3b2917;padding:5px;font-size:20px;box-shadow:inset 0 1px #fff8}.bidgrid>button.chosen{background:linear-gradient(#1c5573,#0c2e43);color:#fff0c8;border-color:#183d4e;box-shadow:0 0 0 2px #b99355}.bid-sheet>#bid{width:100%;min-height:46px}.bid-sheet>small{display:block;font-size:9px;margin-top:10px}.bid-confirmed{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10;background:#0b2633eb;border:1px solid #c8a360;padding:20px;text-align:center;border-radius:10px;color:#ebd6ac;white-space:nowrap;font-size:13px}.bid-confirmed>span{color:#a9d5b1;font-size:23px;margin-right:7px}.bid-confirmed small{display:block;font-size:10px;color:#9caaa6;margin-top:9px}.result-sheet{position:absolute;inset:5% auto auto 50%;transform:translateX(-50%);width:min(510px,83%);max-height:91%;z-index:20;padding:18px 24px;display:flex;flex-direction:column}.appearing{animation:reveal-sheet .5s .7s both}.result-heading{text-align:center;flex-shrink:0}.result-heading>span{font-size:23px;color:#805c2d}.result-heading h2{font-size:24px;margin:7px 0 12px}.result-scroll{min-height:0;overflow:auto;overscroll-behavior:contain}.result-scroll table{width:100%;border-collapse:collapse;text-align:center;font-size:12px}.result-scroll th{font-size:10px;color:#79532b;font-weight:500;padding:8px 4px;border-top:1px solid #91663266;border-bottom:1px solid #91663266;white-space:nowrap}.result-scroll td{padding:10px 4px;border-bottom:1px solid #91663233;white-space:nowrap}.result-scroll td:first-child{text-align:left;max-width:145px;overflow:hidden;text-overflow:ellipsis}.result-scroll td i{font:700 10px Georgia;border:1px solid #b28a4b;border-radius:50%;padding:2px 5px;color:#765021;margin-right:4px}.result-scroll tr.me{background:#fff2c754}.result-reason{font-size:10px;margin:12px 0;color:#6c4b2a}.result-scroll details{font-size:10px}.result-scroll details p{font-size:10px;margin:7px 0}.result-actions{padding-top:14px;flex-shrink:0}.result-actions>button{width:100%;min-height:44px}.result-actions p{font-size:12px;text-align:center}@keyframes reveal-sheet{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}
/* Lobby */
.lobby-page,.lab-page{height:100%;padding:22px max(6vw,20px);display:flex;flex-direction:column;background:linear-gradient(#07131b77,#07131b99),var(--table);background-size:cover;overflow:hidden}.lobby-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-shrink:0;margin-bottom:18px}.lobby-heading>div{flex:1}.lobby-heading h2{font-size:25px;margin-top:7px;color:#efd3a0}.lobby-body{display:grid;grid-template-columns:1fr 1fr;gap:25px;min-height:0;flex:1;width:min(900px,100%);align-self:center}.crew-manifest{padding:20px;background:#08151ce8;border:1px solid #b08b4b7a;border-radius:10px;min-height:0;overflow:auto}.manifest-title{font:12px Georgia,serif;letter-spacing:3px;color:#bca36f;border-bottom:1px solid #a182453d;padding-bottom:13px;margin-bottom:4px;display:flex;justify-content:space-between}.manifest-title span{font:11px system-ui;letter-spacing:0}.crew-row{display:flex;align-items:center;gap:13px;padding:12px 0;border-bottom:1px solid #b08b4b22}.crew-row .avatar{width:43px;height:43px}.crew-row>div{flex:1;min-width:0}.crew-row b{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}.crew-row small{font-size:10px;display:block;color:#a29983;margin-top:4px}.crown{font-size:22px;color:#dcbb74}.ready-label{font-size:9px;color:#8da99c}.manifest-note{font-size:11px;color:#ac9a75;margin-top:18px}.lobby-config{padding:22px;display:flex;flex-direction:column;min-height:0}.lobby-config h3{font-size:20px;padding-bottom:15px;border-bottom:1px solid #9e773b66}.config-scroll{min-height:0;overflow:auto}.config-scroll label{font-size:12px;display:block;margin:14px 0 0}.config-scroll select{margin-top:7px;font-size:13px;min-height:40px}.toggle{display:flex!important;align-items:center;justify-content:space-between;gap:15px}.toggle input{appearance:none;width:37px;min-height:21px;height:21px;padding:0;border-radius:20px;background:#7a7668;position:relative;border:1px solid #776245;flex-shrink:0;cursor:pointer}.toggle input:after{content:'';position:absolute;width:15px;height:15px;top:2px;left:2px;border-radius:50%;background:#f0e2be;box-shadow:0 1px 3px #0005;transition:translate .2s}.toggle input:checked{background:#247f7a;border-color:#296f68}.toggle input:checked:after{translate:15px 0}.config-pair{display:grid;grid-template-columns:1fr 1fr;gap:15px}.edition-settings{margin-top:16px;font-size:11px;color:#70502a}.edition-settings p{font-size:10px;margin-top:8px}.edition-settings summary{cursor:pointer;min-height:30px;padding:6px 0}.lobby-bottom{width:min(900px,100%);align-self:center;display:flex;align-items:center;justify-content:space-between;gap:15px;padding-top:18px;flex-shrink:0}.lobby-bottom>span{font-size:12px;color:#c7b38b}.lobby-bottom .primary{min-width:220px;font-size:15px;height:50px}
/* Slide-out sheets */
#drawer-root{position:fixed;inset:0;z-index:60}.drawer-scrim{position:absolute;inset:0;width:100%;height:100%;background:#02080c99;border:0;border-radius:0;backdrop-filter:blur(3px)}.drawer{position:absolute;right:0;top:0;bottom:0;width:min(410px,94vw);background:linear-gradient(130deg,#142a35f9,#07141bf9);border-left:1px solid #bda06588;box-shadow:-15px 0 70px #0008;display:flex;flex-direction:column;animation:drawer-in .22s ease}.drawer-heading{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #c3a06144}.drawer-heading h2{font-size:20px;color:#dfc38c}.drawer-content{overflow:auto;overscroll-behavior:contain;min-height:0;padding:22px;flex:1}.drawer-content p{font-size:13px;color:#c6c4b5;margin-bottom:17px}.drawer-content label{display:block;font-size:12px;color:#b4b3a0;margin:14px 0}.drawer-content input,.drawer-content select{margin-top:7px}.drawer-content .toggle input{margin-top:0}.drawer-content>button{width:100%;margin-bottom:13px}.drawer-content .quiet-button{margin-top:15px;color:#c9b084}.drawer-content .muted{font-size:11px;color:#8e9d9d;line-height:1.7}.drawer-content .hierarchy{padding:15px;background:#c8a36515;border:1px solid #bd9e6344;border-radius:6px;margin-bottom:17px}.hierarchy b{font-size:13px;color:#e6c68a}.hierarchy small{display:block;font-size:10px;color:#afbaa9;margin-top:8px}.menu-code{font-family:Georgia,serif;font-size:20px;letter-spacing:2px;color:#d5b575;margin-bottom:24px}.chatlog{min-height:150px;max-height:calc(100dvh - 250px);overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere}.chatlog>p{font-size:12px;padding:10px 0;border-bottom:1px solid #d3b16a22;margin-bottom:0}.chatlog b{color:#d3b16a;font-size:10px;display:block;margin-bottom:4px}.chatlog span{display:block}.chat-form{display:flex;gap:8px;margin:18px 0}.chat-form input{margin:0;min-width:0}.chat-form button{min-width:45px}.drawer-empty{text-align:center;padding:40px 10px;color:#929e95;font-size:13px}.log-row{border-top:1px solid #c3a06133;padding:16px 0}.log-row>b,.log-last>b{color:#d5b575;font-size:12px}.log-row p{font-size:11px;margin:9px 0}.log-row small,.log-last small{font-size:10px;color:#99a49c}.log-last{margin-bottom:20px}.log-last p{margin:9px 0;font-size:12px}.join-row{display:flex;gap:8px;margin-bottom:20px}.join-row input{margin:0}.drawer-content details{margin-top:20px;font-size:12px;color:#bda675}.drawer-content details summary{cursor:pointer}.drawer-content details button{margin-top:12px}@keyframes drawer-in{from{transform:translateX(100%)}to{transform:translateX(0)}}
/* Card room, with intentional local scrolling. */
.lab-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding:5px}.lab-pass{font-size:10px;color:#b4c4ac}.card-gallery{display:grid;grid-template-columns:repeat(6,1fr);gap:20px;max-width:900px;margin:0 auto 25px}.card-gallery>div{display:flex;flex-direction:column;align-items:center;gap:9px}.card-gallery>div>span{font-size:11px;color:#d6c396}.card-gallery .card{width:90px;height:135px}.lab-case{max-width:700px;margin:auto;padding:25px}.lab-case>label{display:block;font-size:12px}.lab-case select{margin-top:9px}.scenario-cards{display:flex;justify-content:center;gap:15px;margin:25px 0}.scenario-cards>div{display:flex;align-items:center;flex-direction:column;gap:7px}.scenario-cards small{font-size:10px}.lab-case h3{font-size:17px;margin-bottom:10px}.lab-case p{font-size:12px;margin-top:10px}
@media(min-width:1450px){.game-shell{grid-template-rows:58px minmax(0,1fr) 245px;--card-w:98px;--card-h:147px}.hand-fan{--step:min(80px,calc((100vw - 140px)/var(--divisor)))}.opponent{width:140px}.opponent .avatar{width:60px;height:60px}.seat-label>b{font-size:14px}.seat-label>span{font-size:12px}.table-message>b{font-size:15px}}
@media(max-width:700px){:root{--header:44px;--card-w:76px;--card-h:114px}header{padding:0 15px}.brand{font-size:20px;gap:8px}.brand span{font-size:14px;letter-spacing:2px}.brand small{font-size:7px}#status{font-size:10px}.landing{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;padding:20px 26px max(18px,env(safe-area-inset-bottom));gap:15px;background-image:linear-gradient(0deg,#04111bf0,transparent 65%),var(--ship);background-size:cover,cover;background-position:center,50% 28%}.title-art{align-self:center}.title-art .eyebrow{font-size:8px;letter-spacing:3px}.title-art h1{font-size:clamp(62px,12vh,102px);margin:18px 0 20px;letter-spacing:-3px}.title-rule{font-size:17px;letter-spacing:5px}.title-art p{font-size:10px;margin-top:12px}.landing-port{width:min(390px,100%);justify-self:center}.home-paper{padding:21px 23px;gap:10px}.home-paper>.eyebrow{font-size:9px;text-align:center}.name-label{font-size:12px;margin-top:3px}.home-paper input{min-height:40px}.sail-button{min-height:61px;font-size:16px}.home-paper>.wood-button{font-size:12px;min-height:39px}.home-links{gap:7px}.home-links button{font-size:11px;min-height:39px}.edition-note{font-size:9px;margin-top:11px}.game-shell{grid-template-rows:47px minmax(0,1fr) 222px}.game-toolbar{padding:0 9px}.round-heading b{font-size:16px}.round-heading small{font-size:9px}.game-toolbar .icon-button{width:38px;min-height:38px;height:38px}.toolbar-end{gap:3px}.arena{background-size:auto 100%}.opponent{width:84px;gap:2px}.opponent .avatar{width:39px;height:39px}.seat-label{padding:3px 7px;min-width:65px}.seat-label>b{font-size:10px}.seat-label>span{font-size:9px;margin-top:1px}.seat-label i{margin:0 1px}.opponent-hand{scale:.75;transform-origin:50% 0;height:17px;margin-top:2px}.active:after{right:-3px;top:6px;font-size:8px;padding:2px 3px}.ai-dot{font-size:7px}.table-message{top:32%;max-width:64%}.table-message>b{font-size:10px}.table-message>span{font-size:8px}.self-seat{bottom:6px;padding:4px 12px 4px 5px;column-gap:6px;grid-template-columns:27px auto}.self-seat .avatar{width:25px;height:25px}.self-seat>b{font-size:10px}.self-seat>small{font-size:8px}.played-card>.card{width:60px;height:90px;border-width:2px}.played-card .card-corner b{font-size:18px}.played-card .card-corner i{font-size:8px}.played-card .card-corner.top{top:4px;left:2px}.played-card .card-corner.bottom{bottom:4px;right:2px}.played-card .card-name{font-size:7px;bottom:5px;right:12px;left:3px}.played-card>span{font-size:8px;max-width:70px;padding:2px 5px}.rope-ring{inset:16% 8% 11%}.table-emblem{font-size:55px}.table-emblem span{font-size:7px;letter-spacing:2px}.hand-rack{padding-left:14px;padding-right:14px;grid-template-rows:28px minmax(0,1fr) 57px}.hand-caption{font-size:9px}.hand-caption button{font-size:9px}.suit-legend{gap:4px}.suit-legend i{width:16px;height:16px;font-size:9px}.hand-fan{--step:min(65px,calc((100vw - 160px)/var(--divisor)))}.hand-slot{top:2px}.hand-slot.raised{transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(-15px) rotate(0deg)}.card{border-width:2px}.card-corner.top{left:3px;top:5px}.card-corner.bottom{right:3px;bottom:5px}.card-corner b{font-size:22px}.card-corner i{font-size:10px}.card-name{font-size:8px;left:4px;right:14px;bottom:6px}.play-controls{gap:9px}.selection-info>b{font-size:11px}.selection-info>small{font-size:9px;margin-top:4px}.submit-button{min-width:112px;padding:8px 12px;gap:16px;font-size:13px;min-height:43px}.play-controls select{width:72px;padding:7px;font-size:11px}.bid-sheet{padding:17px 18px;width:min(310px,80%);max-height:85%;top:51%}.sheet-ornament{font-size:19px;margin-bottom:4px}.bid-sheet .eyebrow{font-size:8px;letter-spacing:2px}.bid-sheet h2{font-size:17px;margin:8px 0}.bid-sheet p{font-size:10px;margin-bottom:12px}.bidgrid{gap:6px;margin-bottom:12px}.bidgrid>button{min-height:39px;width:38px;font-size:18px}.bid-sheet>#bid{min-height:43px;font-size:13px}.bid-sheet>small{font-size:8px;margin-top:9px}.result-sheet{padding:13px 15px;width:86%;max-height:94%;top:3%}.result-heading>span{font-size:18px}.result-heading .eyebrow{font-size:8px;letter-spacing:2px}.result-heading h2{font-size:19px;margin:4px 0 9px}.result-scroll th{font-size:9px;padding:6px 2px}.result-scroll td{padding:8px 2px;font-size:11px}.result-scroll td:first-child{max-width:105px}.result-scroll td i{font-size:8px;padding:1px 3px}.result-actions{padding-top:10px}.result-actions>button{min-height:43px;font-size:13px}.result-reason{font-size:9px;margin:9px 0}.lobby-page,.lab-page{padding:15px 17px 14px}.lobby-heading{gap:12px;margin-bottom:12px}.lobby-heading h2{font-size:20px;margin-top:5px}.lobby-heading .eyebrow{font-size:8px;letter-spacing:2px}.lobby-heading .icon-button{height:38px;min-height:38px;width:38px}.lobby-body{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:12px}.crew-manifest{padding:12px 15px;overflow:hidden}.manifest-title{font-size:10px;padding-bottom:8px}.crew-row{padding:7px 0;gap:10px}.crew-row .avatar{width:30px;height:30px}.crew-row b{font-size:12px}.crew-row small{font-size:9px;margin-top:2px}.crown{font-size:18px}.manifest-note{display:none}.lobby-config{padding:14px 17px}.lobby-config h3{font-size:15px;padding-bottom:8px}.config-scroll label{font-size:11px;margin-top:9px}.config-scroll select{font-size:12px;min-height:36px;margin-top:5px;padding:6px 9px}.option-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}.option-row .toggle{gap:5px;flex-direction:column}.toggle input{width:34px;min-height:19px;height:19px}.toggle input:after{width:13px;height:13px}.toggle input:checked:after{translate:15px 0}.config-pair{gap:12px}.edition-settings{font-size:10px;margin-top:9px}.edition-settings summary{min-height:24px;padding:4px 0}.lobby-bottom{padding-top:12px;gap:10px}.lobby-bottom>span{font-size:10px}.lobby-bottom .primary{min-width:175px;height:46px;min-height:46px;font-size:14px}.drawer-heading{padding:12px 17px}.drawer-heading h2{font-size:18px}.drawer-content{padding:18px}.drawer-content p{font-size:12px}.card-gallery{grid-template-columns:repeat(4,minmax(0,1fr));gap:15px 7px}.card-gallery .card{width:66px;height:99px}.card-gallery>div>span{font-size:9px}.card-gallery>div{gap:5px}.lab-case{padding:17px}.scenario-cards{gap:8px;margin:20px 0}.scenario-cards .card{width:60px;height:90px}.lab-case h3{font-size:14px}.lab-case p{font-size:11px}}
@media(max-width:370px){:root{--card-w:69px;--card-h:103.5px}.game-shell{grid-template-rows:43px minmax(0,1fr) 207px}.hand-rack{grid-template-rows:25px minmax(0,1fr) 54px}.opponent{width:74px}.opponent .avatar{width:34px;height:34px}.seat-label>b{font-size:9px}.seat-label>span{font-size:8px}.seat-label{min-width:60px}.played-card>.card{width:52px;height:78px}.bid-sheet{padding:12px 13px}.bid-sheet h2{font-size:15px}.bid-sheet p{font-size:9px}.landing{padding:15px 20px}.title-art h1{font-size:clamp(58px,11vh,90px)}.home-paper{padding:17px 20px}.home-paper .eyebrow{font-size:8px}.edition-note{font-size:8px}}
@media(max-height:700px) and (orientation:portrait){:root{--header:40px;--card-w:66px;--card-h:99px}.game-shell{grid-template-rows:42px minmax(0,1fr) 195px}.hand-rack{grid-template-rows:25px minmax(0,1fr) 51px}.hand-slot{top:1px}.opponent .avatar{width:31px;height:31px}.opponent-hand{display:none}.opponent{transform:translate(-50%,-30%)}.seat-label{padding:3px 6px}.seat-label>b{font-size:9px}.played-card>.card{width:48px;height:72px}.played-card .card-corner b{font-size:15px}.played-card .card-name{font-size:6px}.bid-sheet{padding:11px 15px;max-height:86%}.sheet-ornament{display:none}.bid-sheet h2{font-size:15px;margin:6px 0}.bid-sheet p{font-size:9px;margin-bottom:8px}.bidgrid{gap:5px;margin-bottom:9px}.bidgrid button{width:32px;min-height:33px;font-size:16px}.bid-sheet>#bid{min-height:39px}.bid-sheet>small{font-size:7px;margin-top:7px}.title-art h1{font-size:70px;margin:14px 0}.title-art p{display:none}.home-paper{padding:15px 19px;gap:8px}.sail-button{min-height:53px}.home-links button{min-height:35px}.home-paper>.wood-button{min-height:34px;padding:6px}.lobby-page{padding-top:10px}.lobby-heading{margin-bottom:8px}.crew-row{padding:5px 0}.crew-row .avatar{width:25px;height:25px}.crew-row small{display:none}.lobby-config{padding:10px 14px}.lobby-body{gap:9px}.lobby-bottom{padding-top:9px}.lobby-bottom .primary{height:42px;min-height:42px}.result-heading>span{display:none}.result-heading h2{font-size:17px}.result-scroll td{padding:6px 2px}}
@media(orientation:landscape) and (max-height:600px){:root{--header:35px;--card-w:55px;--card-h:82.5px}header{padding:0 18px}.brand small{display:none}.game-shell{grid-template-rows:37px minmax(0,1fr) 165px}.game-toolbar{padding:0 12px}.game-toolbar .icon-button{height:32px;min-height:32px;width:36px}.round-heading b{font-size:14px}.round-heading small{display:inline;margin-left:12px;font-size:9px}.arena{background-size:100% 100%}.hand-rack{grid-template-rows:20px minmax(0,1fr) 41px;padding-bottom:0}.hand-caption{font-size:8px}.hand-caption button{font-size:8px;min-height:20px}.suit-legend i{width:13px;height:13px;font-size:8px}.hand-slot{top:0}.hand-slot.raised{transform:translateX(calc(-50% + var(--offset)*var(--step))) translateY(-11px) rotate(0deg)}.hand-fan{--step:min(62px,calc((100vw - 160px)/var(--divisor)))}.play-controls{gap:12px}.submit-button{min-height:34px;font-size:11px;padding:4px 15px}.selection-info>b{font-size:10px}.selection-info>small{display:none}.play-controls select{min-height:31px;font-size:10px;padding:3px}.opponent{width:95px;display:grid;grid-template-columns:31px 1fr;gap:5px;transform:translate(-50%,-30%)}.opponent .avatar{width:29px;height:29px}.opponent-hand{display:none}.seat-label{min-width:0;padding:3px 4px}.seat-label>b{font-size:9px}.seat-label>span{font-size:8px}.active:after{top:-8px;right:0;font-size:7px}.self-seat{bottom:4px;grid-template-columns:23px auto;padding:3px 9px 3px 4px}.self-seat .avatar{width:21px;height:21px}.self-seat>b{font-size:8px}.self-seat>small{font-size:7px}.table-message{top:31%}.table-message>b{font-size:9px}.table-message>span{font-size:7px;margin-bottom:2px}.played-card>.card{width:38px;height:57px}.played-card .card-corner b{font-size:13px}.played-card .card-corner i{font-size:7px}.played-card .card-name{display:none}.played-card>span{font-size:7px;padding:1px 4px}.card-corner b{font-size:19px}.card-corner i{font-size:8px}.card-name{font-size:7px}.bid-sheet{top:50%;width:min(350px,55%);padding:10px 17px;max-height:95%}.sheet-ornament,.bid-sheet>small,.bid-sheet p{display:none}.bid-sheet h2{font-size:14px;margin:4px 0 8px}.bid-sheet .eyebrow{font-size:8px}.bidgrid{gap:5px;margin-bottom:8px}.bidgrid button{width:29px;min-height:30px;font-size:15px}.bid-sheet>#bid{min-height:34px;font-size:11px}.result-sheet{top:2%;max-height:96%;width:min(470px,60%);padding:10px 15px}.result-heading>span{display:none}.result-heading h2{font-size:16px;margin:3px 0 7px}.result-heading .eyebrow{font-size:7px}.result-scroll td{padding:5px 3px;font-size:10px}.result-scroll th{padding:4px 3px;font-size:8px}.result-actions{padding-top:8px}.result-actions>button{min-height:34px;font-size:11px}.result-reason{display:none}.lobby-page{padding:12px 30px}.lobby-heading{margin-bottom:8px}.lobby-heading h2{font-size:18px;margin-top:3px}.lobby-heading .eyebrow{font-size:8px}.lobby-heading .icon-button{height:34px;min-height:34px;width:34px}.lobby-body{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr);gap:17px}.crew-manifest{padding:10px 14px;overflow:auto}.manifest-title{font-size:9px;padding-bottom:6px}.crew-row{padding:6px 0;gap:9px}.crew-row .avatar{width:28px;height:28px}.crew-row b{font-size:11px}.crew-row small{font-size:8px;margin-top:2px}.manifest-note{display:none}.lobby-config{padding:12px 15px}.lobby-config h3{font-size:15px;padding-bottom:8px}.config-scroll label{font-size:10px;margin-top:7px}.config-scroll select{min-height:33px;font-size:11px;padding:5px}.option-row{display:flex;justify-content:space-between;gap:10px}.option-row .toggle{flex-direction:row;gap:7px}.toggle input{width:30px;height:18px;min-height:18px}.toggle input:after{height:12px;width:12px}.toggle input:checked:after{translate:12px 0}.lobby-bottom{padding-top:9px}.lobby-bottom .primary{height:37px;min-height:37px;font-size:12px;min-width:180px}.landing{grid-template-columns:1fr 330px;grid-template-rows:1fr;padding:18px 7vw;background-size:cover,auto 160%}.title-art h1{font-size:65px;margin:16px 0}.title-art p{display:none}.title-rule{font-size:14px}.home-paper{padding:16px 20px;gap:8px}.home-paper input{min-height:34px}.name-label{font-size:10px}.home-paper>.eyebrow{font-size:8px}.sail-button{min-height:48px;font-size:14px}.home-links button{min-height:32px;font-size:10px}.home-paper>.wood-button{min-height:32px;padding:5px}.edition-note{font-size:8px;margin-top:8px}.card-gallery{grid-template-columns:repeat(6,1fr);gap:12px}.card-gallery .card{width:63px;height:94.5px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-delay:0ms!important;transition-duration:.001ms!important}}

.table-message{top:55%;max-width:38%}.table-message>b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
