:root{color-scheme:light;--paper:#fff7ee;--cream:#fffaf2;--ink:#563427;--soft:#805447;--rose:#ad4257;--pink:#f6c9ca;--line:#e9bcae;--line2:#f0d4c4;--shadow:0 8px 24px #a96c5720;--gingham:repeating-linear-gradient(90deg,#f5a6af39 0 28px,transparent 28px 56px),repeating-linear-gradient(0deg,#f4a4ad32 0 28px,#fff2e5 28px 56px)}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:radial-gradient(ellipse at 50% 0,#fffaf2 0,#fff2e5 34%,#fadbd3 100%);font:16px/1.5 ui-rounded,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;min-height:100vh}h1,h2,p{margin:0}a{color:#9a3c4f}main{max-width:1220px;margin:auto;padding:16px clamp(12px,3.5vw,38px) 20px}header,.brand,.man{display:flex;align-items:center;justify-content:space-between;gap:14px}header{position:relative;border:1px solid #efc9b8;border-radius:22px;background:#fffaf2e8;padding:9px 14px;box-shadow:0 3px 0 #efd0bd}header .header-note{color:#c96e76;letter-spacing:.22em;position:absolute;left:50%;transform:translateX(-50%);font-size:19px;pointer-events:none}.brand{justify-content:start}.brand b{font-size:28px;letter-spacing:.19em;font-weight:900;line-height:1;color:#754134}.brand small{display:block;color:var(--soft);font-size:13px;line-height:1.25;margin-top:2px}.tile{background:linear-gradient(150deg,#ffe4a3,#fff6d6);color:#a05031;border:2px solid #d89568;border-radius:9px;display:grid;place-items:center;width:35px;height:44px;font-size:24px;font-weight:950;transform:rotate(-9deg);box-shadow:2px 3px 0 #eeb6a8}
button,input{font:inherit}button{background:linear-gradient(#ffd3d5,#f3a9b2);color:#632e37;border:1px solid #d88590;box-shadow:0 3px 0 #d9969c55;border-radius:999px;min-height:42px;padding:7px 16px;font-weight:760;cursor:pointer}button:hover:not(:disabled){filter:brightness(1.04);box-shadow:0 4px 0 #c3867755}button:active:not(:disabled){transform:translateY(1px)}button:disabled{cursor:default;opacity:.52}.outline,.subtle{background:#fffaf2;color:#78483b;border-color:#dfb3a3}.subtle{font-weight:650;box-shadow:none}.controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.controls.launch{margin-top:16px;justify-content:center}.launch button{min-width:120px}
.hero{display:grid;grid-template-columns:1.2fr .9fr;gap:clamp(24px,7vw,92px);align-items:center;padding:clamp(28px,6vw,75px) clamp(0px,4vw,64px) 36px}.pitch h1{font-size:clamp(43px,6.4vw,79px);letter-spacing:-.05em;font-weight:900;line-height:1.12;margin:12px 0 14px;color:#6b3b31}.pitch p{font-size:clamp(16px,2vw,19px);color:var(--soft)}.tag,.eyebrow{display:inline-block;color:#984052;font-weight:800;letter-spacing:.09em;font-size:13px!important}.tag{background:#fde4df;border:1px solid #f0bfb5;padding:4px 12px;border-radius:99px}.samples{display:flex;padding:14px 10px 4px;justify-content:center;max-width:340px}.samples .card{width:clamp(60px,8vw,92px);margin:0 1px}.samples .card:nth-child(1){transform:rotate(-12deg) translateY(12px)}.samples .card:nth-child(2){transform:rotate(-2deg);z-index:1}.samples .card:nth-child(3){transform:rotate(11deg) translateY(11px)}
.panel,.log{background:#fffaf1;border:1px solid var(--line);border-radius:25px;box-shadow:var(--shadow);padding:clamp(15px,3.5vw,32px)}.panel h2{font-size:27px;margin:3px 0}.panel label{display:block;margin:12px 0 9px;font-weight:650}.panel input{display:block;color:var(--ink);background:#fff6e9;border:1px solid #dcb7a5;padding:9px 12px;border-radius:13px;width:100%;margin-top:4px;min-height:44px}.panel form button,#entry button{width:100%}.separator{text-align:center;color:var(--soft);margin:12px 0 0;font-size:14px}.top{margin:15px 0 10px;display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 3px}.top p{color:var(--soft)}.top .code{font-family:ui-monospace,monospace;letter-spacing:.08em;color:var(--ink)}.top h2{font-size:24px}.lobby{text-align:center;margin:0 auto;max-width:900px}.lobby .seats{text-align:left;margin-top:16px}.lobby>p:last-of-type{color:var(--soft)}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,225px);gap:12px;align-items:start}.play-space{position:relative;border:1px solid #eab7a2;border-radius:28px;background:var(--gingham);padding:14px;box-shadow:var(--shadow);min-width:0}.seats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:8px}.seat{padding:9px;background:#fff8ec;border:1px solid #e1b5a0;border-radius:17px;min-width:0;box-shadow:0 2px 0 #ddb19e66}.seat.active{border-color:#bc6e59;box-shadow:inset 0 0 0 1px #d59476,0 1px 6px #c7886460;background:#fff2d7}.seat-head{display:flex;align-items:center;gap:7px;min-width:0}.seat-head div{min-width:0}.avatar{display:grid;flex:none;width:43px;height:43px;place-items:center;background:var(--hue);border-radius:50%;border:1px solid #dda994}.avatar .animal{width:37px;height:35px}.seat b{overflow-wrap:anywhere;line-height:1.15;display:block}.seat em{font-style:normal;color:#8b374c;background:#ffdedf;border-radius:99px;padding:1px 5px;margin-left:4px;font-size:11px}.seat p{color:var(--soft);font-size:12px;margin-top:2px}.seat .wins{margin-top:5px}.wins strong{display:inline-block;background:#f8dfb7;color:#734134;border-radius:20px;padding:0 6px}.edges{display:flex;gap:4px;margin-top:6px}.edges button,.seat>.subtle{font-size:12px;flex:1;min-height:34px;padding:4px 6px;white-space:nowrap}.seat>.subtle{margin-top:7px}
.felt{position:relative;isolation:isolate;margin:16px 0 12px;text-align:center;padding:8px clamp(9px,3vw,24px) 13px;border-radius:42px;background:radial-gradient(ellipse at 46% 28%,#fffbef,#fff0de);border:2px solid #e7bfa4;box-shadow:0 5px 0 #d49d8670,0 8px 18px #b2796260}.felt:before{content:"";position:absolute;inset:6px;border:1.5px dashed #e6b699;border-radius:35px;z-index:-1;pointer-events:none}.ribbon{display:table;margin:0 auto;padding:5px 22px;border-radius:11px 11px 16px 16px;border:1px solid #cf7e80;background:linear-gradient(#ffe4df,#ffbfbe);box-shadow:0 2px 0 #e4a69d;color:#713b36;font-size:clamp(16px,2.5vw,22px);line-height:1.25;min-height:31px}.turn-tip{margin:7px 0;color:var(--soft);font-size:13px}.board-label{margin:3px 0 6px;font-size:13px;font-weight:800;color:#7a4b3b}.row{display:flex;gap:5px;flex-wrap:wrap;align-items:center}.board{--cw:clamp(34px,6.1vw,70px);justify-content:center;min-height:76px;gap:6px}.card{width:var(--cw,49px);height:auto;aspect-ratio:.69;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;padding:0;position:relative;overflow:hidden;border-radius:9px;border:1px solid #d89180;color:#653a30;flex:none;box-shadow:0 2px 0 #ad776260}.card.face{background:linear-gradient(148deg,#ffffff75,transparent 50%),var(--hue,#ffe7d2);border:2px solid #fff9eb;outline:1px solid var(--border,#d89d80)}.face:before{content:"";position:absolute;inset:3px;border:1px solid #fff7e9;border-radius:5px;pointer-events:none}.face .card-num{font-weight:950;font-size:clamp(18px,3.6vw,35px);line-height:1;z-index:1;letter-spacing:-.055em;margin-top:4px}.card .animal{width:88%;height:55%;z-index:1}.card.back{background:repeating-linear-gradient(45deg,#f5a3a655 0 5px,#ffe0d480 5px 10px),#f4adae;border:2px solid #fff7ea;outline:1px solid #c97c7e}.back-medal{border-radius:100%;background:#fff2da;border:1px solid #dfaaa0;color:#a44c50;width:64%;aspect-ratio:1;display:grid;place-items:center;font-size:21px}.card.back:disabled{opacity:.76}.card.gone{visibility:hidden}.card.c7{color:#81502b;box-shadow:0 0 0 1px #d59d46,0 3px 0 #dfb45e88}
.c1,.c7{--hue:#ffdfa0;--border:#dda554}.c2,.c9{--hue:#fac9cb;--border:#da9c9e}.c3,.c11{--hue:#e7d4f0;--border:#c1a1d2}.c4,.c6,.c10{--hue:#cee6f1;--border:#9fbecf}.c5,.c12{--hue:#ffdac0;--border:#e2ad85}.c8{--hue:#dceac9;--border:#a7bc8d}
.reveal{margin:8px auto 0;min-height:46px;color:#784434;font-size:13px}.peek{display:flex;justify-content:center;gap:4px;flex-wrap:wrap;margin-top:2px}.peek span{padding:1px 6px;border-radius:8px;background:#ffebdb;color:#764937;white-space:nowrap}.peek b{color:#8c3950}
.hand-zone{display:grid;grid-template-columns:minmax(125px,160px) minmax(0,1fr);gap:10px;align-items:center;border-radius:17px;background:#fff6eae6;border:1px solid #e3b5a0;padding:8px}.hand h2{font-size:15px;margin:0 0 7px}.hand h2 small,.empty{font-weight:500;color:var(--soft);font-size:12px}.hand .row{gap:5px;--cw:clamp(30px,4.6vw,53px)}.hand .card-num{font-size:clamp(16px,2.8vw,27px)}
.log{padding:12px;border-radius:22px}.log h2{background:#fce2df;border:1px solid #ecc1b5;color:#8b3e4c;border-radius:99px;text-align:center;font-size:15px;padding:5px}.log ul{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:5px}.log li{display:flex;gap:5px;background:#fff1e3;border-radius:9px;padding:6px;color:var(--soft);font-size:13px;overflow-wrap:anywhere}.log li span{color:#aa5261}
#status{color:#953b4d;margin:6px 0;min-height:0;font-weight:650}#status:not(:empty){position:fixed;bottom:11px;left:50%;transform:translateX(-50%);z-index:2;max-width:calc(100% - 24px);width:max-content;border-radius:12px;border:1px solid #dfb5a4;background:#fffaf2;box-shadow:var(--shadow);padding:8px 13px}footer{color:#885a4a;font-size:12px;text-align:center;margin:17px 0 0}dialog{color:var(--ink);background:#fff7eb;border:1px solid var(--line);border-radius:21px;max-width:min(520px,92vw);padding:20px;box-shadow:var(--shadow)}dialog::backdrop{background:#633c4070}dialog li{margin:8px 0}dialog p{margin-bottom:7px}:focus-visible{outline:3px solid #93465a!important;outline-offset:2px}[hidden]{display:none!important}
@media(max-width:900px){.game-layout{grid-template-columns:minmax(0,1fr)}.log{padding:9px}.log ul{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}}
@media(max-width:620px){main{padding:9px 9px 15px}header{padding:7px 9px;border-radius:15px}.brand b{font-size:22px}.brand small{font-size:12px}.tile{width:30px;height:37px}.header-note{display:none}.hero{grid-template-columns:1fr;gap:15px;padding:19px 5px 18px}.pitch h1{font-size:clamp(36px,11vw,53px);margin:7px 0}.pitch p{font-size:15px}.samples{max-width:none;padding-bottom:13px}.samples .card{width:56px}.panel h2{font-size:22px}.top{margin:8px 0 5px}.top .controls button{padding:3px 8px;font-size:13px;min-height:36px}.play-space{padding:7px;border-radius:18px}.seats{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.seats.opposing .seat:only-child{grid-column:1/-1}.seat{padding:6px;border-radius:12px}.seat b{font-size:14px}.avatar{width:34px;height:34px}.avatar .animal{width:29px;height:28px}.edges button{min-height:38px}.felt{margin-top:9px;border-radius:26px;padding:6px 8px 8px}.felt:before{border-radius:20px}.turn-tip{font-size:12px;margin:4px 0}.board{--cw:clamp(30px,10vw,43px);max-width:270px;margin:0 auto;min-height:60px;gap:4px 5px}.board .card{border-radius:7px}.reveal{min-height:38px;margin-top:5px}.hand-zone{grid-template-columns:1fr;gap:5px;padding:5px}.my-seat .seat{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 6px}.my-seat .wins{grid-column:1;grid-row:2;margin-top:0}.my-seat .edges{grid-column:2;grid-row:1/3;margin:0;align-items:center}.my-seat .edges button{padding:4px 10px}.hand{padding:2px}.hand h2{margin-bottom:5px}.hand .row{--cw:clamp(26px,7.6vw,43px);gap:4px}.hand .card{border-radius:6px}.hand .card-num{margin-top:1px}.log{display:block}.log h2,.log li{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* NANA board: true two-sided rotation, without GIF assets or external libraries. */
.board-slot{display:inline-block;position:relative;flex:none;width:var(--cw);aspect-ratio:.69;perspective:650px;vertical-align:middle}
.board-slot .card{width:100%;height:100%;min-height:0;vertical-align:top;box-sizing:border-box}
.board-rotor,.board-ghost,.board-incoming{position:absolute;inset:0;display:block;width:100%;height:100%}
.board-rotor{transform-style:preserve-3d;-webkit-transform-style:preserve-3d;will-change:transform}
.board-ghost,.board-incoming{backface-visibility:hidden;-webkit-backface-visibility:hidden}
.board-incoming{transform:rotateY(180deg)}
.board-ghost{pointer-events:none}
.board-moving{z-index:1;pointer-events:none}
.board-collecting .board-incoming{visibility:hidden;transform:none}
@media(prefers-reduced-motion:reduce){.board-rotor{will-change:auto}}
