*{box-sizing:border-box;-webkit-tap-highlight-color:transparent} :root{font-family:"Microsoft YaHei","PingFang SC",sans-serif;color:#244f51;background:#d9f1e9;font-synthesis:none}body{margin:0;min-height:100dvh;background:linear-gradient(#eaf9f32e,#b5e0db36),url('assets/qijiu-background.webp') center/cover fixed}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation;border:1px solid #42877c32;border-radius:13px;background:#f6fff5;color:#275d58;padding:10px 18px;font-weight:700;transition:transform .15s,background .15s}button:hover{background:#e1f4e8}button:active{transform:translateY(2px)}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #e99c65;outline-offset:3px}header{height:68px;padding:0 max(24px,4vw);display:flex;align-items:center;justify-content:space-between;background:#f4fff1e8;border-bottom:1px solid #fff9;position:relative;z-index:3}.brand{color:#1d615a;font-size:25px;letter-spacing:2px;text-decoration:none;font-weight:900}.brand span{font-size:15px;letter-spacing:1px;margin-left:14px}.header-actions{display:flex;gap:9px}.header-actions button{font-size:13px;padding:9px 14px}#app{display:flex;align-items:center;justify-content:center;gap:22px;min-height:calc(100dvh - 68px);padding:16px 20px}.panel{background:#f6fff0ed;border:1px solid #fff;border-radius:23px;box-shadow:0 10px 32px #174e5020;backdrop-filter:blur(14px)}.left-panel{width:234px;padding:25px 20px;text-align:center}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;color:#648e83}h1{font-size:31px;line-height:1.45;letter-spacing:2px;margin:16px 0 12px}h1 em{font-style:normal;color:#e09a68}.intro{font-size:13px;line-height:1.9;color:#689087}.portrait{background:url('assets/qijiu-cast.webp') 0 center/400% 100% no-repeat;width:180px;height:150px;margin:18px auto 12px}.left-panel strong{font-size:21px}.left-panel #companion-line{font-size:12px;color:#64877c;margin:9px -6px 20px}.cast-row{display:flex;gap:5px;justify-content:center;border-top:1px solid #bedacf;padding-top:18px}.mini{display:block;width:42px;height:39px;background:url('assets/qijiu-cast.webp') 0 center/400% 100% no-repeat}.c1{background-position:33.333% center}.c2{background-position:66.667% center}.c3{background-position:100% center}.board-column{flex:none}.board-label{display:flex;justify-content:space-between;align-items:center;margin:0 3px 10px;gap:10px;font-weight:800;color:#184d50;text-shadow:0 1px 5px #fff}.board-label small{font-size:10px;font-weight:400}.board-wrap{position:relative;padding:7px;border-radius:21px;background:#eaffed;box-shadow:0 0 0 1px #ffffffcc,0 15px 45px #164f5950}#b{display:block;border-radius:14px;touch-action:none}#ctl{display:flex;gap:8px;margin-top:12px}#ctl button{padding:0;height:48px;flex:1;font-size:24px;box-shadow:0 3px 0 #9abeb1}#ctl #bd{flex:1.8;background:#eeaf7b;color:#593d2d;border-color:#eeaf7b;box-shadow:0 3px 0 #bf865b}#bd span{font-size:12px}#feedback{position:absolute;top:44%;width:100%;left:0;text-align:center;pointer-events:none;color:#fff7c1;text-shadow:0 2px 6px #15333b;font-size:25px;font-weight:900}#pause-layer{position:absolute;inset:7px;border-radius:14px;background:#173b49ed;display:flex;align-items:center;justify-content:center;flex-direction:column;color:#f1ffed;z-index:2}#pause-layer[hidden]{display:none}#pause-layer h2{font-size:29px;margin-bottom:5px}#pause-layer p{font-size:13px;margin-bottom:28px}.right-panel{width:230px;display:flex;flex-direction:column;gap:12px}.score-panel{padding:20px 18px}.st small, .stat-grid small{display:block;color:#77978b;font-size:11px}.st b{display:block;color:#226c61;font-size:40px;line-height:1.3;font-variant-numeric:tabular-nums}.stat-grid{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #d9e7d9;margin-top:12px;padding-top:14px}.stat-grid strong{font-size:20px;line-height:1.7;display:block}.next-panel{padding:15px 18px;text-align:center}.section-label{text-align:left;font-weight:800;font-size:14px}.section-label span{float:right;font-size:10px;color:#88a69a;letter-spacing:2px}#nx{width:160px;height:72px;display:block;margin:8px auto}#next-name{font-size:11px;color:#789283}.rules{padding:18px}.rules p{font-size:11px;line-height:1.8;color:#648479;margin:11px 0}.rules dl{margin:10px 0 0;font-size:10px}.rules dl div{display:flex;justify-content:space-between;align-items:center;margin:9px 0}.rules dd{margin:0;color:#698a80}kbd{font-family:inherit;display:inline-block;border-radius:4px;padding:2px 5px;background:#e1eddf;border:1px solid #c8decf;margin-right:3px}.rules p.hint{margin-bottom:0;color:#879d90}.audio-settings{padding:12px 17px;font-size:11px}.audio-settings summary{cursor:pointer}.audio-settings label{display:flex;align-items:center;justify-content:space-between;margin-top:12px}.audio-settings input{width:108px;accent-color:#368b78}.ov{position:fixed;inset:68px 0 0;z-index:5;display:none;align-items:center;justify-content:center;padding:20px;overflow:auto}.ov.on{display:flex}#start{background:linear-gradient(90deg,#c6efe420,#e3f5e520,#bee5eb20)}.welcome{text-align:center;width:min(540px,100%);padding:30px 38px 27px;background:#f4fff0e8;border:1px solid #fff;border-radius:32px;box-shadow:0 25px 70px #215d5942;backdrop-filter:blur(14px)}.welcome h2{font-size:51px;letter-spacing:5px;line-height:1.2;margin:14px 0;color:#236b62}.welcome h2 span{display:block;font-size:39px;letter-spacing:6px;margin-top:5px;color:#d38b59}.welcome p{font-size:14px;line-height:1.8;color:#6c8c7d;margin:15px 0}.welcome-cast{height:140px;background:url('assets/qijiu-cast.webp') center/contain no-repeat;margin:16px -17px 20px}.primary{border:0;background:#317d6f;color:#fffbe5;border-radius:16px;min-height:58px;font-size:21px;padding:14px 30px;box-shadow:0 5px 0 #1d5c52}.primary:hover{background:#3d9180}.welcome .primary{width:100%;display:flex;justify-content:space-between;padding:17px 25px;font-size:23px}.welcome>small{display:block;margin-top:18px;font-size:11px;color:#94a58d}.quick-rules{margin-top:15px;padding-top:13px;border-top:1px solid #d2e5d1;font-size:11px;line-height:1.9;color:#648479}body:has(#start.on) #app{visibility:hidden}#over{background:#163d4b83;backdrop-filter:blur(7px)}.result{width:360px;padding:28px;text-align:center}.result h2{font-size:28px;margin:12px 0 20px}.result-portrait{width:130px;height:108px;margin:0 auto 10px}.result small{font-size:12px;color:#7b9a88}#fs{font-size:62px;color:#247363;font-weight:900;margin:6px 0}#rec{font-size:13px;color:#7a957e}.result button{width:100%;margin-top:12px}.secondary{background:transparent;font-size:14px} @media(min-width:1500px){#app{gap:32px}.left-panel{width:270px;padding:32px 25px}.right-panel{width:260px}.portrait{width:210px;height:175px}.rules p{font-size:12px}.welcome{width:580px}.welcome h2{font-size:62px}.welcome h2 span{font-size:45px}.welcome-cast{height:160px}}
@media(max-height:820px) and (min-width:760px){.left-panel{padding:19px 16px}.left-panel h1{font-size:27px}.portrait{width:156px;height:130px}.rules{padding:12px 17px}.rules dl div{margin:6px 0}.score-panel{padding:14px 17px}.right-panel{gap:9px}.welcome{padding:22px 35px}.welcome-cast{height:110px}.welcome h2{font-size:43px}.welcome h2 span{font-size:33px}}
@media(max-width:759px){header{height:56px;padding:0 16px}.brand{font-size:21px}.brand span{font-size:12px;margin-left:8px}.header-actions{gap:5px}.header-actions button{padding:7px 9px;font-size:11px}#app{min-height:calc(100dvh - 56px);padding:8px 10px 12px;gap:8px;flex-direction:column;justify-content:flex-start}.left-panel{display:none}.right-panel{display:contents}.score-panel{order:-1;width:min(100%,420px);border-radius:16px;padding:6px 13px}#top{display:flex;justify-content:space-between;align-items:center;gap:20px}.st small{font-size:9px}.st b{font-size:23px}.stat-grid{margin:0;padding:0;border:0;gap:25px}.stat-grid small{font-size:9px}.stat-grid strong{font-size:16px}.board-label{margin-bottom:5px;font-size:12px}.board-label small{font-size:9px}.board-wrap{padding:5px;border-radius:16px}#ctl{margin-top:7px;gap:6px}#ctl button{height:41px}.next-panel,.audio-settings{display:none}.rules{box-shadow:none;backdrop-filter:none;background:#f4fff0e0;border-radius:10px;padding:5px 11px;width:min(420px,100%)}.rules .section-label,.rules dl,.rules .hint{display:none}.rules p{font-size:10px;margin:0;text-align:center}.ov{inset:56px 0 0;padding:15px}.welcome{padding:24px 23px;border-radius:26px}.welcome h2{font-size:45px}.welcome h2 span{font-size:34px}.welcome-cast{height:115px}.welcome p{font-size:13px}#pause-layer{inset:5px}}

/* Preserve the generated portrait proportions. */
.left-panel .portrait{width:150px;height:200px}.mini{height:56px}.result-portrait{width:105px;height:140px}@media(min-width:1500px){.left-panel .portrait{width:180px;height:240px}}@media(max-height:820px) and (min-width:760px){.left-panel .portrait{width:120px;height:160px}}
@media(max-width:759px){.score-panel{order:-2}.next-panel{order:-1;display:flex;align-items:center;justify-content:center;gap:12px;width:min(420px,100%);padding:4px 12px;border-radius:12px}.next-panel .section-label{font-size:10px}.next-panel .section-label span{display:none}.next-panel #nx{width:80px;height:36px;margin:0}.next-panel #next-name{font-size:10px}}
