:root {
  --red:#a81e2a; --red-dark:#681018; --cream:#fff7e7; --paper:#fffdf7; --ink:#2d2020; --muted:#77645e;
  --gold:#e6ad31; --blue:#1767b4; --green:#39735b; --line:rgba(98,42,35,.16); --shadow:0 24px 70px rgba(79,20,25,.18);
}
*{box-sizing:border-box} html{min-height:100%} body{margin:0;min-height:100vh;color:var(--ink);font-family:"Microsoft JhengHei","Noto Sans TC",system-ui,sans-serif;background:radial-gradient(circle at 15% 15%,rgba(255,207,95,.32),transparent 25rem),radial-gradient(circle at 85% 85%,rgba(168,30,42,.17),transparent 28rem),var(--cream);overflow-x:hidden}
button,a,input,textarea{font:inherit} button,a{ -webkit-tap-highlight-color:transparent } button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
.food-sky{position:fixed;inset:0;z-index:-1;overflow:hidden;pointer-events:none}.food-sky::before{content:"";position:absolute;inset:0;opacity:.34;background-image:radial-gradient(rgba(104,16,24,.22) .7px,transparent .7px);background-size:20px 20px;mask-image:linear-gradient(#000,transparent 80%)}.food-sky img{position:absolute;width:clamp(64px,8vw,120px);height:clamp(64px,8vw,120px);object-fit:contain;opacity:.11;filter:saturate(.8);animation:float 8s ease-in-out infinite}.food-sky img:nth-child(1){left:4%;top:18%}.food-sky img:nth-child(2){right:7%;top:10%;animation-delay:-2s}.food-sky img:nth-child(3){left:9%;bottom:8%;animation-delay:-4s}.food-sky img:nth-child(4){right:4%;bottom:13%;animation-delay:-1s}.food-sky img:nth-child(5){left:34%;top:5%;width:58px;height:58px;animation-delay:-5s}.food-sky img:nth-child(6){right:30%;bottom:4%;width:66px;height:66px;animation-delay:-3s}.food-sky img:nth-child(7){left:25%;top:54%;width:54px;height:54px;animation-delay:-6s}.food-sky img:nth-child(8){right:24%;top:48%;width:56px;height:56px;animation-delay:-2.5s}@keyframes float{50%{transform:translateY(-15px) rotate(5deg)}}
.player-name-bar{position:fixed;z-index:20;top:20px;left:22px;display:flex;align-items:center;gap:8px;padding:10px 12px 10px 15px;border:1px solid rgba(255,255,255,.9);border-radius:14px;background:rgba(255,253,247,.9);box-shadow:0 9px 25px rgba(70,25,22,.11);backdrop-filter:blur(12px)}.name-label{color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.08em}.player-name-bar strong{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--red-dark)}.icon-button{width:30px;height:30px;border:0;border-radius:9px;color:var(--red);background:#f8ded8;cursor:pointer;font-size:19px;font-weight:900}.version-badge{position:fixed;z-index:20;top:24px;right:24px;color:#6f1018;font-family:Arial,"Noto Sans TC",sans-serif;font-size:18px;font-weight:900;letter-spacing:.03em;text-shadow:-2px -2px 0 rgba(255,255,255,.95),2px -2px 0 rgba(255,255,255,.95),-2px 2px 0 rgba(255,255,255,.95),2px 2px 0 rgba(255,255,255,.95),0 3px 8px rgba(70,25,22,.22)}.version-badge::before{content:"ver." attr(data-version)}
main{min-height:100vh}.screen{display:none;min-height:100vh;padding:82px 24px 28px}.screen.active{display:grid;place-items:center;animation:screenIn .28s ease both}@keyframes screenIn{from{opacity:0;transform:translateY(8px)}}
#homeScreen{position:relative;isolation:isolate;overflow:hidden}#homeScreen::before{content:"";position:absolute;z-index:0;inset:0;pointer-events:none;background:url("assets/home/home-campaign-speaker.webp?v=20261025-2") center center/cover no-repeat;opacity:.18}.home-card{position:relative;z-index:1;overflow:hidden;width:min(720px,100%);padding:clamp(42px,7vw,78px) clamp(30px,5vw,56px) clamp(30px,5vw,56px);text-align:center;border:2px solid rgba(255,255,255,.8);border-radius:38px;background:rgba(255,253,247,.9);box-shadow:var(--shadow);backdrop-filter:blur(16px)}.overline{margin:0 0 7px;color:var(--red);font-size:12px;font-weight:900;letter-spacing:.16em}.home-card h1{margin:0 0 38px;color:var(--red-dark);font-size:clamp(48px,8vw,82px);line-height:.95;letter-spacing:-.06em;text-shadow:0 2px 0 #fff,0 0 16px #fff}.home-card h1 span{color:var(--red);font-size:.7em;letter-spacing:.12em}.home-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.menu-button{min-height:92px;padding:15px;display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;align-items:center;text-align:left;border:0;border-radius:18px;color:#fff;background:linear-gradient(145deg,#b92b36,#7c141d);box-shadow:0 7px 0 #5e0c13;text-decoration:none;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease}.menu-button:hover{transform:translateY(-3px);box-shadow:0 10px 0 #5e0c13}.menu-button>span{grid-row:1/span 2;width:34px;height:34px;display:grid;place-items:center;border-radius:11px;background:rgba(255,255,255,.16);font-size:25px;font-weight:900}.menu-button strong{font-size:19px}.menu-button small{color:rgba(255,255,255,.72);font-size:11px}.menu-button.blue{background:linear-gradient(145deg,#2386cf,#18528c);box-shadow:0 7px 0 #103d6d}.menu-button.gold{color:#4d330b;background:linear-gradient(145deg,#ffd976,#dda52b);box-shadow:0 7px 0 #a27215}.menu-button.gold small{color:#745419}.menu-button.ghost{color:var(--red-dark);background:linear-gradient(145deg,#fff,#f4e4c0);box-shadow:0 7px 0 #d2bc8c}.menu-button.ghost small{color:var(--muted)}.menu-button.report{grid-column:1/-1;min-height:72px;color:#fff;background:linear-gradient(145deg,#8555a7,#56316e);box-shadow:0 7px 0 #3d204f;text-align:center;display:block}.menu-button.report:hover{box-shadow:0 10px 0 #3d204f}
.lobby-shell,.game-shell{width:min(1180px,100%);padding:clamp(22px,4vw,42px);border:2px solid rgba(255,255,255,.8);border-radius:32px;background:rgba(255,253,247,.93);box-shadow:var(--shadow);backdrop-filter:blur(16px)}.room-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.room-header h2{margin:0;color:var(--red-dark);font-size:clamp(27px,4vw,43px)}.text-button{padding:10px 14px;border:1px solid #e6c9c4;border-radius:12px;color:var(--red);background:#fff;cursor:pointer;font-weight:900}.room-banner{margin:24px 0;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;border:2px dashed #dca79f;border-radius:20px;background:#fff7eb}.room-banner>div:first-child{display:flex;align-items:baseline;gap:16px}.room-banner span{color:var(--muted);font-size:13px;font-weight:800}.room-banner strong{color:var(--red-dark);font-family:ui-monospace,Consolas,monospace;font-size:34px;letter-spacing:.18em}.room-code-actions{display:flex;gap:8px}.small-button{min-height:40px;padding:0 13px;display:inline-flex;align-items:center;gap:7px;border:1px solid #e3cbc5;border-radius:11px;color:var(--red-dark);background:#fff;cursor:pointer;font-weight:900}.copy-icon{position:relative;width:15px;height:17px;border:2px solid currentColor;border-radius:2px}.copy-icon::before{content:"";position:absolute;left:-6px;top:-6px;width:11px;height:13px;border:2px solid currentColor;border-radius:2px;background:#fff}.spectator-notice{margin:-10px 0 20px;padding:12px 16px;text-align:center;border-radius:13px;color:#19558a;background:#e5f4ff;font-weight:900}.seat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.seat-card{min-height:220px;padding:20px 14px;display:flex;flex-direction:column;align-items:center;text-align:center;border:2px solid #ead7d1;border-radius:22px;background:#fff;position:relative}.seat-card.occupied{border-color:#d87c71;background:linear-gradient(160deg,#fff,#fff0eb)}.seat-card.me{box-shadow:0 0 0 4px rgba(230,173,49,.3)}.seat-number{position:absolute;top:11px;left:13px;color:#a88d86;font-size:11px;font-weight:900}.host-badge{position:absolute;top:10px;right:10px;padding:5px 7px;border-radius:99px;color:#75500c;background:#ffe69b;font-size:10px;font-weight:900}.avatar{width:78px;height:78px;margin:12px 0 13px;display:grid;place-items:center;border-radius:50%;color:#fff;background:linear-gradient(145deg,#bd3641,#7c141d);box-shadow:0 6px 0 #5f0c14;font-size:31px}.empty-avatar{background:#faf5eb;border:2px dashed #c9b4ad;box-shadow:none;color:#c1aaa3}.seat-card h3{max-width:100%;margin:0;overflow:hidden;text-overflow:ellipsis;color:var(--red-dark);font-size:18px}.seat-card p{margin:7px 0 0;color:var(--muted);font-size:12px}.coin-field{width:100%;margin-top:auto;padding-top:14px}.coin-field label{display:block;margin-bottom:5px;color:var(--muted);font-size:10px;font-weight:800}.coin-field input{width:100%;padding:8px;border:1px solid #e1cbc5;border-radius:9px;text-align:center;color:var(--red-dark);background:#fff;font-weight:900}.lobby-footer{margin-top:24px;display:flex;align-items:center;justify-content:space-between;gap:20px}.lobby-footer p{margin:0;color:var(--muted)}.start-button{min-width:180px;min-height:52px;border:0;border-radius:15px;color:#fff;background:linear-gradient(145deg,#bd2c38,#7c141d);box-shadow:0 7px 0 #590c13;cursor:pointer;font-weight:900;font-size:18px}.start-button:disabled{cursor:not-allowed;filter:grayscale(.65);opacity:.48;box-shadow:0 4px 0 #827674}
.game-shell{width:min(1320px,100%)}.game-header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:22px;padding-bottom:20px;border-bottom:1px solid var(--line)}.round-chip{width:92px;height:76px;display:flex;flex-wrap:nowrap;align-items:center;justify-content:center;gap:5px;border-radius:17px;color:#fff;background:linear-gradient(145deg,#b72a35,#78131c);box-shadow:0 6px 0 #580b12}.round-chip strong{font-size:38px;line-height:1;white-space:nowrap}.round-chip span{flex:0 0 auto;font-size:12px;font-weight:900;line-height:1;white-space:nowrap;writing-mode:horizontal-tb}.phase-heading p{margin:0 0 4px;color:var(--red);font-size:12px;font-weight:900;letter-spacing:.1em}.phase-heading h2{margin:0;color:var(--red-dark);font-size:clamp(23px,3.2vw,38px)}.timers{display:flex;gap:9px}.timers>div{min-width:100px;padding:10px 12px;text-align:center;border:1px solid var(--line);border-radius:14px;background:#fff}.timers .phase-timer-card{min-width:220px}.phase-timer-row{display:flex;align-items:center;justify-content:center;gap:10px}.phase-progress{width:120px;height:12px;overflow:hidden;border:1px solid #e2b5aa;border-radius:999px;background:#f3e4de;box-shadow:inset 0 1px 2px rgba(89,25,29,.12)}.phase-progress span{display:block;width:var(--phase-progress,100%);height:100%;border-radius:inherit;background:linear-gradient(90deg,#f0b72c,#bd2633);transition:width .25s linear}.timers small{display:block;color:var(--muted);font-size:10px;font-weight:800}.timers strong{color:var(--red-dark);font-family:ui-monospace,Consolas,monospace;font-size:21px}.scoreboard{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.score-card{padding:13px;border:2px solid #ead9d4;border-radius:16px;background:#fff;position:relative}.score-card.active{border-color:var(--gold);background:#fff8df;box-shadow:0 5px 16px rgba(203,145,29,.13)}.score-card.me::after{content:"你";position:absolute;top:8px;right:8px;padding:3px 6px;border-radius:99px;color:#fff;background:var(--green);font-size:9px;font-weight:900}.score-name{display:block;max-width:75%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--red-dark);font-weight:900}.score-stats{display:flex;gap:13px;margin-top:8px;color:var(--muted);font-size:12px}.score-stats strong{color:var(--ink);font-size:16px}.game-stage{display:grid;grid-template-columns:270px 1fr;gap:16px}.turn-card{min-height:340px;padding:23px;border-radius:22px;color:#fff;background:linear-gradient(160deg,#b72834,#74121b);position:relative;overflow:hidden}.turn-card::after{content:"🎤";position:absolute;right:-18px;bottom:-25px;font-size:130px;opacity:.12;transform:rotate(-10deg)}.turn-card .turn-label{color:#ffd991;font-size:11px;font-weight:900;letter-spacing:.1em}.turn-card h3{margin:8px 0 15px;font-size:28px;overflow-wrap:anywhere}.turn-card p{color:#f6d9d4;line-height:1.7}.turn-card .coin-limit{margin-top:20px;padding:13px;border:1px solid rgba(255,255,255,.2);border-radius:13px;background:rgba(255,255,255,.1)}.turn-card .coin-limit strong{display:block;margin-top:3px;color:#fff;font-size:24px}.action-panel{min-height:340px;padding:24px;border:1px solid var(--line);border-radius:22px;background:#fff}.action-panel h3{margin:0 0 8px;color:var(--red-dark);font-size:24px}.action-panel>p{color:var(--muted);line-height:1.65}.field-stack{display:grid;gap:15px}.field-stack label{display:grid;gap:7px;color:#594743;font-weight:900}.field-stack textarea,.field-stack input{width:100%;padding:13px 14px;border:2px solid #e4d1cb;border-radius:13px;color:var(--ink);background:#fffdf8}.field-stack textarea{min-height:95px;resize:vertical}.action-submit{min-height:48px;padding:0 20px;border:0;border-radius:13px;color:#fff;background:linear-gradient(145deg,#bd2b37,#7b131c);box-shadow:0 6px 0 #580b12;cursor:pointer;font-weight:900}.action-submit:disabled{opacity:.45;filter:grayscale(.6);cursor:not-allowed}.waiting-state{height:100%;display:grid;place-items:center;text-align:center}.waiting-icon{font-size:58px;animation:pulse 1.5s ease-in-out infinite}@keyframes pulse{50%{transform:scale(1.08);opacity:.65}}.policy-bubble{padding:18px;border:2px solid #edcf8e;border-radius:18px;background:#fff8df;color:#51380c;font-size:20px;font-weight:900;line-height:1.55}.choice-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:18px}.choice-button{min-height:96px;border:2px solid;border-radius:17px;cursor:pointer;font-weight:900;font-size:20px}.choice-button.agree{color:#286142;border-color:#5c9d76;background:#e8f7ed}.choice-button.oppose{color:#a51d28;border-color:#d4626c;background:#fff0f1}.guess-panel{display:none;margin-top:14px;padding:15px;border-radius:15px;background:#fff2f2}.guess-panel.active{display:block}.guess-panel input{width:100%;margin:8px 0 12px;padding:12px;border:2px solid #dfadb0;border-radius:11px}.actions-status{display:grid;gap:7px;margin-top:16px}.action-status-row{display:flex;align-items:center;justify-content:space-between;padding:9px 12px;border-radius:10px;background:#f8f3ed;color:var(--muted);font-size:12px}.result-box{padding:19px;border-radius:18px;background:#fff8df;border:2px solid #efd182}.result-box h3{margin:0 0 10px}.result-list{margin:0;padding-left:1.3em}.result-list li{margin:8px 0;line-height:1.55}.event-log-wrap{margin-top:16px}.log-toggle{width:100%;padding:11px;border:0;border-radius:12px;color:var(--muted);background:#f8f2e8;cursor:pointer;font-weight:900}.event-log{max-height:180px;margin:8px 0 0;padding:10px 10px 10px 35px;overflow:auto;border-radius:12px;background:#2e2020;color:#f4e5db;font-size:12px;line-height:1.7}.hidden{display:none!important}
.modal{width:min(560px,calc(100% - 28px));padding:0;border:0;border-radius:25px;background:transparent;box-shadow:var(--shadow)}.modal::backdrop{background:rgba(40,13,15,.63);backdrop-filter:blur(5px)}.dialog-card,.help-card{position:relative;padding:31px;border-radius:24px;background:var(--paper)}.dialog-card h2,.help-card h2{margin:0 0 22px;color:var(--red-dark)}.close-button{position:absolute;top:13px;right:13px;width:37px;height:37px;border:0;border-radius:50%;color:var(--red-dark);background:#f4e5df;cursor:pointer;font-size:24px}.dialog-card label{display:grid;gap:8px;margin-top:14px;color:var(--red-dark);font-weight:900}.dialog-card input,.dialog-card textarea{width:100%;padding:13px;border:2px solid #e5cfc9;border-radius:12px;background:#fffdf8}.dialog-card textarea{min-height:160px;resize:vertical}.field-note{color:var(--muted);font-size:12px}.dialog-submit{width:100%;min-height:48px;margin-top:13px;border:0;border-radius:13px;color:#fff;background:linear-gradient(145deg,#bb2c37,#79121b);cursor:pointer;font-weight:900}.dialog-submit:disabled{opacity:.55;cursor:wait}.code-input{text-align:center;text-transform:uppercase;font-family:ui-monospace,Consolas,monospace;font-size:27px;letter-spacing:.18em}.form-error{min-height:20px;margin:8px 0;color:#b51f2b;font-size:12px;font-weight:800}.help-modal{width:min(1180px,calc(100% - 28px))}.help-card{padding:28px}.help-card h2{margin-bottom:14px}.help-carousel{position:relative;display:grid;place-items:center;min-height:380px;overflow:hidden;border-radius:18px;background:#f2e9da}.help-carousel img{display:block;max-width:100%;max-height:72vh;object-fit:contain}.carousel-arrow{position:absolute;z-index:2;top:50%;width:50px;height:70px;border:0;border-radius:14px;color:#fff;background:rgba(104,16,24,.88);cursor:pointer;font-size:44px;transform:translateY(-50%)}.carousel-arrow.left{left:12px}.carousel-arrow.right{right:12px}.carousel-dots{display:flex;justify-content:center;gap:7px;margin-top:13px}.carousel-dots span{width:9px;height:9px;border-radius:50%;background:#d4bdb6}.carousel-dots span.active{width:25px;border-radius:99px;background:#d4bdb6}.carousel-dots span.active{width:25px;border-radius:99px;background:var(--red)}.winner-card{text-align:center}.winner-crown{font-size:74px}.winner-card h2{font-size:38px}.toast{position:fixed;z-index:80;left:50%;bottom:25px;max-width:calc(100% - 32px);padding:11px 16px;border-radius:12px;color:#fff;background:#322525;box-shadow:0 8px 25px rgba(0,0,0,.24);font-weight:900;opacity:0;pointer-events:none;transform:translate(-50%,15px);transition:.2s ease}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:900px){.seat-grid,.scoreboard{grid-template-columns:repeat(2,1fr)}.game-stage{grid-template-columns:1fr}.turn-card{min-height:220px}.game-header{grid-template-columns:auto 1fr}.timers{grid-column:1/-1}.timers>div{flex:1}.timers .phase-timer-card{min-width:0}.phase-progress{display:none}.phase-timer-row{display:block}.timers{display:flex}.room-banner{align-items:flex-start;flex-direction:column}.room-code-actions{align-self:stretch}.small-button{flex:1;justify-content:center}}
.phase-progress span{transition:width .1s linear}
@media(max-width:620px){.player-name-bar{top:10px;left:10px}.version-badge{top:67px;right:12px;font-size:15px}.screen{padding:112px 10px 14px}.home-card,.lobby-shell,.game-shell{border-radius:24px;padding:21px}.home-actions{grid-template-columns:1fr}.menu-button{min-height:78px}.menu-button.report{grid-column:auto;min-height:78px;padding:15px;display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;align-items:center;text-align:left}.room-header{align-items:flex-start}.seat-grid{grid-template-columns:1fr 1fr}.seat-card{min-height:190px;padding:15px 9px}.avatar{width:60px;height:60px}.lobby-footer{align-items:stretch;flex-direction:column}.start-button{width:100%}.game-header{gap:11px}.round-chip{width:68px;height:65px}.phase-heading h2{font-size:20px}.phase-timer-row{display:grid;grid-template-columns:1fr;align-items:center;gap:4px}.phase-progress{display:block;width:100%;height:9px}.timers .phase-timer-card{flex:1 1 58%;min-width:0}.timers>div:last-child{flex:0 1 42%;min-width:86px}.scoreboard{grid-template-columns:1fr 1fr}.game-stage{display:block}.turn-card{margin-bottom:12px}.choice-grid{grid-template-columns:1fr}.game-example-card figcaption{align-items:flex-start;flex-direction:column}.help-card{padding:20px 12px 14px}.carousel-arrow{width:42px;height:58px}.room-banner>div:first-child{align-items:flex-start;flex-direction:column;gap:4px}}
