/* =====================================================================
 * 深水城领主 · 新版界面「光辉之城·剑湾城图」（2026-11-21）
 * 官方主版图当主体，行动格贴中文牌匾，点了贴着弹小窗；外圈剑湾海 + 烫金铭牌。
 * 旧版界面在 classic/（顶栏「旧版」按钮切换）。
 * ===================================================================== */
:root{
  --sea:#3d7c84; --sea-d:#235466; --foam:#d6ebe5;
  --paper:#f7eed6; --paper-2:#ecdcb4; --paper-3:#d6bf8f;
  --ink:#1d2b35; --ink-2:#4e5862; --gold:#e3aa2c; --gold-l:#f8de8c; --gold-d:#8d5e12;
  --crim:#b3262c; --crim-d:#7a1720; --cave:#2b2442; --glow:#ffcd45; --ok:#2f8f4a; --ok-d:#1f6332;
  --f-t:'Noto Serif SC','Songti SC',serif; --f-d:'Cinzel','Noto Serif SC',serif; --f-b:'Noto Sans SC',system-ui,-apple-system,'PingFang SC',sans-serif;
  --top-h:52px; --hub-footer-h:28px;
}
*{box-sizing:border-box}
html{height:100%}
body{margin:0;min-height:100vh;height:auto;display:flex;flex-direction:column;font:14px/1.45 var(--f-b);color:var(--ink);-webkit-tap-highlight-color:transparent;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='44'%3E%3Cpath d='M0 22q15-9 30 0t30 0 30 0 30 0' fill='none' stroke='%23d6ebe5' stroke-opacity='.17' stroke-width='1.2'/%3E%3Cpath d='M-15 42q15-9 30 0t30 0 30 0 30 0 30 0' fill='none' stroke='%23d6ebe5' stroke-opacity='.08' stroke-width='1'/%3E%3C/svg%3E"),
   radial-gradient(120% 90% at 50% 0%,#5d9b9e 0%,var(--sea) 45%,var(--sea-d) 100%) fixed,var(--sea)}
button{font:inherit;color:inherit;cursor:pointer;border:0;background:none;padding:0}
button:disabled{cursor:not-allowed}
input,select{font:inherit;color:inherit}
.app-shell{flex:1 0 auto;display:flex;flex-direction:column;min-height:0}
.screen{display:none;flex-direction:column;flex:1 0 auto}
body[data-screen="start"] #screen-start,body[data-screen="resume"] #screen-resume,body[data-screen="lobby"] #screen-lobby,body[data-screen="game"] #screen-game{display:flex}
[hidden]{display:none!important}
html,body,body *{scrollbar-width:thin;scrollbar-color:#b08f56 transparent}
body ::-webkit-scrollbar{width:8px;height:8px}body ::-webkit-scrollbar-track{background:transparent}
body ::-webkit-scrollbar-thumb{background:#b08f56;border-radius:99px;border:2px solid transparent;background-clip:padding-box}
.scrolly{overflow-y:auto;overscroll-behavior:contain}

/* ---------- 纸面板（烫金双线） */
.sheet{background:linear-gradient(180deg,var(--paper),#f1e2bf);border-radius:10px;position:relative;
  box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 4px #f5e1a6,0 0 0 5px var(--gold-d),0 10px 24px rgba(8,36,46,.45)}

/* ---------- 顶栏：烫金铭牌 */
.topbar{height:var(--top-h);flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:0 14px;position:relative;z-index:5;
  background:linear-gradient(#fcf5e2,#ecdcb6);border-bottom:2px solid var(--gold-d);box-shadow:0 2px 0 var(--gold),0 6px 14px rgba(10,40,50,.35)}
.topbar .logo{width:40px;height:40px;flex:0 0 auto}
.brand{min-width:0;flex:0 1 auto}
.brand b{display:block;font:900 19px/1.1 var(--f-t);letter-spacing:2px;white-space:nowrap;color:#7a4c0c;background:linear-gradient(#b8801a,#6b430a);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.brand small{display:block;font:700 11px/1.3 var(--f-b);color:var(--ink-2);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sp{flex:1 1 0;min-width:0}
.rounds{display:flex;gap:3px;flex:0 0 auto}
.rounds i{width:21px;height:23px;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);background:#d6cebc;font:900 11px/23px var(--f-d);text-align:center;font-style:normal;color:var(--ink-2)}
.rounds i.done{background:#b4a988;color:#fff}.rounds i.now{background:var(--crim);color:#fff}.rounds i.v{background:linear-gradient(#d6cebc 68%,var(--gold) 68%)}.rounds i.v.done{background:linear-gradient(#b4a988 68%,var(--gold) 68%)}
.room-chip{flex:0 0 auto;display:flex;align-items:center;gap:6px;height:32px;padding:0 10px;border:1.5px solid var(--gold-d);border-radius:6px;background:#fff9e8}
.room-chip b{font:900 15px var(--f-d);letter-spacing:3px}.room-chip svg{width:14px;height:14px;color:var(--gold-d)}
.tools{display:flex;gap:6px;flex:0 0 auto}
.tb{height:32px;padding:0 11px;border-radius:6px;border:1.5px solid #b89a63;background:linear-gradient(#fffaf0,#efe1c0);font:700 13px var(--f-b);white-space:nowrap}
.tb:active{transform:translateY(1px)}
.tb.warn{color:var(--crim-d);border-color:#c98a7a}
.tb.off{color:#8a8070;text-decoration:line-through}
.timer{flex:0 0 auto;font:900 13px var(--f-d);color:var(--crim);padding:0 8px;border-radius:12px;background:#fff1e6;box-shadow:0 0 0 1px #e2b7a8}

/* ---------- 按钮 */
.btn{height:44px;border-radius:7px;font:900 15px var(--f-t);padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;transition:transform .1s}
.btn:active:not(:disabled){transform:translateY(2px)}
.btn.main{background:linear-gradient(#cc383d,var(--crim) 55%,#951f26);color:#fff7e3;box-shadow:inset 0 1px rgba(255,255,255,.35),0 0 0 1.5px var(--crim-d),0 3px 0 var(--crim-d)}
.btn.sec{background:linear-gradient(#fffaf0,#eedfbd);box-shadow:inset 0 1px #fff,0 0 0 1.5px #b89a63,0 3px 0 #a88b55}
.btn.sea{background:linear-gradient(#5aa0a3,#3d7c84 60%,#2f6870);color:#f3fbf8;box-shadow:inset 0 1px rgba(255,255,255,.3),0 0 0 1.5px #1f4f58,0 3px 0 #1f4f58}
.btn.ok{background:linear-gradient(#45a862,var(--ok) 60%,#257a3d);color:#f3fff6;box-shadow:inset 0 1px rgba(255,255,255,.3),0 0 0 1.5px var(--ok-d),0 3px 0 var(--ok-d)}
.btn.warn-ghost{background:transparent;color:var(--crim-d);box-shadow:0 0 0 1.5px #c98a7a}
.btn:disabled{opacity:.5;filter:grayscale(.4)}
.btn.big{height:48px;font-size:16px}
.btn.tiny{height:30px;font-size:12px;padding:0 9px}
.inp{height:46px;width:100%;border-radius:7px;border:1.5px solid #b89a63;background:#fffdf6;padding:0 12px;font-size:16px;box-shadow:inset 0 2px 3px rgba(80,60,20,.12)}
.inp:focus{outline:2px solid var(--gold);outline-offset:1px}
.inp.code{text-transform:uppercase;letter-spacing:6px;font:900 18px var(--f-d);text-align:center}

/* ---------- 资源图标 */
svg.ic{width:18px;height:18px;vertical-align:-4px;flex:0 0 auto}
.n{font:900 1em var(--f-d)}

/* ===================================================== 开始页 */
.start-main{flex:1 0 auto;display:grid;grid-template-columns:minmax(0,1.5fr) minmax(320px,420px);gap:18px;padding:18px clamp(12px,3vw,40px);max-width:1760px;width:100%;margin:0 auto;align-items:stretch}
.hero{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(260px,1fr) auto;overflow:hidden}
.hero-art{position:relative;min-height:260px;border-radius:10px 10px 0 0;overflow:hidden;background:#3a1f12}
.hero-art>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 30%}
.hero-fade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 60%,rgba(247,238,214,.95))}
.hero-cards{position:absolute;left:10px;bottom:10px;display:flex}
.hero-cards .hc{height:110px;border-radius:5px;box-shadow:0 0 0 1.5px #6b430a,0 6px 12px rgba(0,0,0,.45)}
.hero-cards .hc.b{margin-left:-24px;transform:rotate(5deg) translateY(4px)}.hero-cards .hc.c{height:66px;margin-left:-14px;align-self:flex-end;transform:rotate(-4deg)}
.hero-copy{padding:14px 24px 18px;display:flex;flex-direction:column;gap:9px;justify-content:center}
.hero-copy h1{margin:0;font:900 clamp(22px,2.4vw,32px)/1.25 var(--f-t);color:#5a3a0a}
.hero-copy p{margin:0;color:var(--ink-2)}
.hero-copy .tiny{font-size:12px;color:#7a6a4a}
.modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.modes div{padding:7px 10px;border-radius:7px;background:rgba(214,191,143,.28);box-shadow:inset 0 0 0 1px rgba(141,94,18,.25)}
.modes b{display:block;font:900 14px var(--f-t)}.modes span{font-size:12.5px;color:var(--ink-2)}
.entry{padding:18px 20px;display:flex;flex-direction:column;gap:10px;justify-content:center}
.entry-logo{width:76px;height:76px;align-self:center;margin-bottom:2px;filter:drop-shadow(0 4px 6px rgba(60,40,10,.3))}
.entry h2{text-align:center;margin:0 0 2px;font:900 20px var(--f-t);color:#5a3a0a;letter-spacing:3px}
.lbl{font:700 13px var(--f-b);color:var(--ink-2)}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}
.entry .btn{width:100%;height:46px}
#start-screen .ghf-copy-wrap,#screen-start .ghf-copy-wrap{display:none!important}

/* 恢复中 */
#screen-resume{align-items:center;justify-content:center;padding:20px}
.resume-box{padding:26px;text-align:center;max-width:380px;display:flex;flex-direction:column;gap:10px;align-items:center}
.resume-logo{width:64px;height:64px}.resume-box b{font:900 18px var(--f-t)}.resume-box p{margin:0;color:var(--ink-2);font-size:13px}

/* ===================================================== 准备大厅 */
.lobby-main{flex:1 0 auto;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px;padding:16px clamp(12px,3vw,40px);max-width:1760px;width:100%;margin:0 auto}
.lobby-left,.lobby-right{padding:14px 16px;display:flex;flex-direction:column;gap:12px}
.lobby-head{display:flex;align-items:center;gap:10px}
.lobby-head b{font:900 18px var(--f-t)}
.mode-pill{font:700 12px var(--f-b);padding:2px 10px;border-radius:12px;background:var(--sea);color:#fff}
.seats{display:grid;gap:12px}
.seats.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.seats.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.seat{position:relative;min-height:128px;padding:12px 8px 10px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:3px;
  border-radius:50% 50% 22px 22px/30% 30% 12% 12%;background:repeating-linear-gradient(45deg,rgba(141,94,18,.07) 0 6px,transparent 6px 12px),rgba(255,250,236,.6);border:1.5px dashed #b89a63}
.seat .ring{width:58px;height:58px;border-radius:50%;padding:3px;background:#fff8e6;box-shadow:0 0 0 2px var(--fc)}
.seat .ring img{width:100%;height:100%;border-radius:50%;display:block}
.seat .nm{font:900 15px var(--f-t);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.seat .fac{font:700 11px var(--f-b);color:var(--ink-2)}
.seat.taken{border:0;background:radial-gradient(70% 60% at 50% 35%,color-mix(in srgb,var(--fc) 26%,transparent),transparent 75%),linear-gradient(180deg,#fffaf0,#f1e2bf);
  box-shadow:0 0 0 1.5px var(--gold-d),0 4px 10px rgba(60,40,10,.2)}
.seat.taken.host{box-shadow:0 0 0 2px var(--gold),0 0 0 4px rgba(227,170,44,.3),0 4px 10px rgba(60,40,10,.2)}
.seat .muted{color:#9a8a6a}
.tags{display:flex;gap:4px;flex-wrap:wrap;justify-content:center}
.tag{font:700 11px/18px var(--f-b);padding:0 6px;border-radius:9px;background:#e7dcc2;color:var(--ink)}
.tag.host{background:var(--gold);color:#3b2604}.tag.you{background:var(--crim);color:#fff}.tag.bot{background:var(--sea);color:#fff}.tag.off{background:#999;color:#fff}
.seat-btns{margin-top:2px}
.cols-3 .seat{min-height:116px}.cols-3 .seat .ring{width:48px;height:48px}.cols-3 .seat .nm{font-size:13.5px}
.seat-tools{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.seat-tools .btn{height:44px}
.fill{display:flex;align-items:center;gap:6px;font:700 13px var(--f-b)}
.fill select{height:44px;border-radius:7px;border:1.5px solid #b89a63;background:#fffdf6;padding:0 6px}
.scoreboard{font-size:13px;padding:8px 10px;border-radius:7px;background:rgba(214,191,143,.25)}
.settings{display:flex;flex-direction:column;gap:12px}
.set-row{display:flex;flex-direction:column;gap:6px}
.set-row>b{font:900 14px var(--f-t)}
.set-row small{font-size:12px;color:var(--ink-2)}
.seg{display:flex;flex-wrap:wrap;gap:6px}
.seg button{min-height:38px;padding:0 12px;border-radius:7px;background:#fffaf0;box-shadow:inset 0 0 0 1.5px #c9b48a;font:700 13px var(--f-b)}
.seg button.on{background:var(--sea);color:#fff;box-shadow:inset 0 0 0 1.5px #1f4f58}
.seg button:disabled{opacity:.6}
.tgl{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:#fffaf0;box-shadow:inset 0 0 0 1.5px #d6c39a;cursor:pointer}
.tgl i{flex:0 0 auto;width:38px;height:22px;border-radius:11px;background:#cfc3a6;position:relative;transition:background .15s}
.tgl i:after{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.3);transition:left .15s}
.tgl.on i{background:var(--sea)}.tgl.on i:after{left:19px}
.tgl span{font:700 13.5px var(--f-b);display:flex;flex-direction:column}.tgl small{font-weight:400}
.tgl.lock{opacity:.6;cursor:default}
.lobby-go{display:flex;gap:10px}.lobby-go .btn.main{flex:1}
.lobby-art{flex:1 1 0;min-height:120px;border-radius:8px;position:relative;overflow:hidden;display:flex;align-items:flex-end;
  background:linear-gradient(180deg,rgba(247,238,214,.15),rgba(247,238,214,.92) 88%),url(assets/ui/heroes.webp?v=20261121) center 25%/cover;box-shadow:inset 0 0 0 1.5px rgba(141,94,18,.35)}
.lobby-art .history{position:relative;padding:8px 10px;max-height:100%;overflow:hidden}
.settings{gap:10px}
.set-row .tgls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.tgl{padding:7px 9px}
.history{font-size:12.5px;color:var(--ink-2);display:flex;flex-direction:column;gap:2px}

/* ===================================================== 对局三栏 */
.game{flex:1 0 auto;display:grid;grid-template-columns:clamp(232px,17vw,300px) minmax(0,1fr) clamp(360px,26vw,440px);gap:12px;padding:10px 12px;
  height:calc(100dvh - var(--top-h) - var(--hub-footer-h));min-height:620px;max-width:2000px;width:100%;margin:0 auto}
.col-left,.col-right{display:flex;flex-direction:column;gap:12px;min-height:0;min-width:0}

/* ---------- 领主密函 */
.lords{display:flex;flex-direction:column;gap:11px}
.lord{padding:8px 10px 7px 12px;cursor:pointer;overflow:hidden}
.lord:before{content:'';position:absolute;left:0;top:0;bottom:0;width:6px;background:var(--fc);border-radius:10px 0 0 10px}
.lord .h{display:flex;align-items:center;gap:8px}
.lord .seal{width:40px;height:40px;border-radius:50%;flex:0 0 auto;box-shadow:0 0 0 2px #fff8e6,0 0 0 3.5px var(--fc),0 3px 4px rgba(0,0,0,.3)}
.lord .nm{min-width:0;flex:1}
.lord .nm b{display:block;font:900 15px/1.2 var(--f-t);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lord .nm small{font:700 11px var(--f-b);color:var(--ink-2);white-space:nowrap}
.lord .vp{font:900 24px/1 var(--f-d);color:var(--crim);text-align:center;flex:0 0 auto}.lord .vp small{display:block;font:700 11px var(--f-b);color:var(--ink-2)}
.lord .res{display:flex;justify-content:space-between;margin:6px 0 0;padding:4px 6px;background:rgba(214,191,143,.28);border-radius:6px;font:900 13px var(--f-d)}
.lord .res span{display:flex;align-items:center;gap:2px}.lord .res svg{width:16px;height:16px}
.lord .ft{display:flex;align-items:center;gap:8px;margin-top:5px;font:700 12px var(--f-b);color:var(--ink-2)}
.lord .ft .ag{display:flex;gap:1px;flex:1;min-width:0;overflow:hidden}.lord .ft .ag svg{width:17px;height:17px;flex:0 0 auto}
.lord .ft svg.s{width:14px;height:14px;vertical-align:-2px}
.lord .ft .first{color:var(--crim)}
.lord.turn{box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 4px var(--glow),0 0 0 5px var(--gold-d),0 0 22px 6px rgba(255,205,69,.55)}
.lord .now{position:absolute;right:46px;top:-1px;font:900 11px/17px var(--f-b);color:#fff;background:var(--crim);padding:0 7px;border-radius:0 0 6px 6px}
.lord.off .nm b{color:#8a8070}
.lord.pick{box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 4px var(--glow),0 0 0 5px var(--gold-d),0 0 18px 4px rgba(255,205,69,.6);animation:lordpulse 1.6s ease-in-out infinite}
@keyframes lordpulse{50%{transform:translateX(3px)}}
.lords.many{gap:7px}.lords.many .lord .res{display:none}.lords.many .lord .seal{width:32px;height:32px}
.chron{flex:1 1 0;min-height:90px;display:flex;flex-direction:column;padding:8px 10px}
.chron h4{margin:0 0 4px;font:900 13px var(--f-t);color:#6f4f1c;letter-spacing:3px}
.logbox{flex:1 1 0;min-height:0;font-size:12.5px;line-height:1.5}
.logl{padding:2px 0;border-bottom:1px dashed rgba(141,94,18,.18)}
.logl.head{font:900 12.5px var(--f-t);color:#6f4f1c;border:0;margin-top:5px}
.logl.new{animation:logfade 1.2s ease-out}
@keyframes logfade{from{background:rgba(255,205,69,.55)}}

/* ---------- 城图 */
.city{padding:8px;display:flex;flex-direction:column;gap:8px;min-height:0;min-width:0}
.board-wrap{flex:1 1 0;min-height:0;display:flex;align-items:center;justify-content:center}
.board{position:relative;width:100%;container-type:inline-size;overflow:hidden;border-radius:6px;box-shadow:0 0 0 1.5px #6b5a3a,0 4px 10px rgba(0,0,0,.3);background-color:#cfc7b4;background-repeat:no-repeat}
.board>img.map{position:absolute;pointer-events:none;user-select:none;-webkit-user-drag:none;max-width:none}
/* 中文牌匾 = 行动格（官方卷轴牌匾的配色：米纸 + 金边 + 深褐墨） */
.pl{position:absolute;transform:translate(-50%,-50%);width:max-content;min-width:12cqw;padding:.7cqw 1.5cqw .7cqw 5cqw;border-radius:1.1cqw;cursor:pointer;z-index:3;text-align:left;
  background:linear-gradient(180deg,#fffaf0,#f6ead0 55%,#ead7ad);color:#2b1f12;font-size:max(calc(1cqw * var(--pk,1)),var(--pmin,5.95px));
  box-shadow:inset 0 1px #fff,0 0 0 1.5px #8d6a2e,0 0 0 3px #f2dca0,0 0 0 4px #7a5620,0 .5cqw 1.2cqw rgba(30,20,5,.45);transition:transform .15s,filter .15s}
.pl .md{position:absolute;left:.6cqw;top:50%;margin-top:-2cqw;width:4cqw;height:4cqw;border-radius:50%;background:radial-gradient(circle at 40% 35%,#fffdf6,#e2d7bf 70%,#bfae8a);box-shadow:0 0 0 1.5px #7a5620;pointer-events:none}
.pl .md svg{display:block;width:3cqw;height:3cqw;margin:.5cqw}
.pl b{display:block;font:900 1.85em/1.15 var(--f-t);white-space:nowrap}
.pl .gain{display:flex;align-items:center;gap:.1em;margin-top:.35em;font:900 1.85em/1 var(--f-d);white-space:nowrap}
.pl .gain svg{width:1.45em;height:1.45em}
.pl .occ{position:absolute;right:-1.3cqw;top:-1.8cqw;display:flex;pointer-events:none}
.pl .occ svg{width:3.8cqw;height:3.8cqw;filter:drop-shadow(0 .3cqw 0 rgba(0,0,0,.4))}
.pl .occ svg+svg{margin-left:-1.6cqw}
.pl .pile{position:absolute;left:50%;bottom:-2.4cqw;transform:translateX(-50%);display:flex;align-items:center;gap:.1cqw;padding:.1cqw .6cqw;border-radius:2cqw;background:#2b1f12;color:#fff4d6;font:900 max(1.4cqw,11px)/1 var(--f-d);white-space:nowrap;pointer-events:none}
.pl .pile svg{width:2.1cqw;height:2.1cqw}
.pl.legal{background:linear-gradient(180deg,#fffdf2,#fff1c4 55%,#f7d97c);z-index:4;
  box-shadow:inset 0 1px #fff,0 0 0 1.5px #8d5e12,0 0 0 3px var(--glow),0 0 0 4px #8d5e12,0 0 2.2cqw .6cqw rgba(255,205,69,.85),0 .5cqw 1.2cqw rgba(30,20,5,.45);animation:breath 1.9s ease-in-out infinite}
@keyframes breath{50%{box-shadow:inset 0 1px #fff,0 0 0 1.5px #8d5e12,0 0 0 3px var(--glow),0 0 0 4px #8d5e12,0 0 3.4cqw 1.2cqw rgba(255,205,69,.5),0 .5cqw 1.2cqw rgba(30,20,5,.45)}}
.pl.full{background:linear-gradient(180deg,#f3ede0,#e0d5bd)}
.pl.dim{filter:saturate(.7) brightness(.96)}
.pl.sel,.pl.on{transform:translate(-50%,-50%) scale(1.08);z-index:6}
.pl.on{background:linear-gradient(180deg,#e9fbe9,#bfe8c4);box-shadow:inset 0 1px #fff,0 0 0 1.5px var(--ok-d),0 0 0 3px #7fd08f,0 0 0 4px var(--ok-d),0 .5cqw 1.2cqw rgba(30,20,5,.45);animation:none}
.pl.last:after{content:'';position:absolute;inset:-.7cqw;border-radius:1.6cqw;border:.35cqw solid rgba(179,38,44,.75);pointer-events:none;animation:lastping 1.4s ease-out 2}
@keyframes lastping{from{opacity:1;transform:scale(.92)}to{opacity:0;transform:scale(1.18)}}
.pl.sm{min-width:9cqw;padding:.45cqw 1.1cqw .45cqw 3.9cqw}
.pl.sm .md{width:3cqw;height:3cqw;margin-top:-1.5cqw}.pl.sm .md svg{width:2.2cqw;height:2.2cqw;margin:.4cqw}
.pl.sm b{font-size:1.85em}.pl.sm .gain{display:none}
.pl.inn{min-width:10cqw;padding-left:4.6cqw}
/* 卡槽（旅馆任务 / 待售建筑 / 城中建筑） */
.slotc{position:absolute;z-index:3;cursor:pointer}
.bt{position:absolute;inset:0;border-radius:.9cqw;padding:4.9cqw .5cqw .5cqw;text-align:center;overflow:hidden;
  background:linear-gradient(180deg,#f6f2e8 0,#f6f2e8 46%,rgba(246,242,232,.72) 62%,rgba(246,242,232,.08) 100%),url(assets/board/main.webp) var(--bx,50%) var(--by,50%)/560% auto,#ddd5c3;
  box-shadow:inset 0 1px #fff,0 0 0 1.5px #6e6553,0 .4cqw .9cqw rgba(0,0,0,.4)}
.bt:before{content:'';position:absolute;left:0;right:0;top:0;height:.7cqw;background:var(--oc,#8a826f)}
.bt b{display:block;font:900 max(1.7cqw,11px)/1.2 var(--f-t)}
.bt .gain{display:inline-flex;justify-content:center;flex-wrap:wrap;gap:.1cqw;margin-top:.6cqw;padding:.2cqw .6cqw;border-radius:2cqw;background:rgba(255,250,238,.9);box-shadow:0 0 0 1px rgba(110,101,83,.45);font:900 max(1.5cqw,11px)/1.2 var(--f-d)}
.bt .gain svg{width:2.3cqw;height:2.3cqw}
.bt .own,.bt .cost{position:absolute;left:50%;top:1.1cqw;margin-left:-1.6cqw;width:3.2cqw;height:3.2cqw;border-radius:50%}
.bt .own{background-size:cover;background-position:center;box-shadow:0 0 0 1.5px #fff8e6,0 0 0 2.5px var(--oc)}
.bt .cost{background:radial-gradient(circle at 40% 35%,#fff3b8,#e3ad37 60%,#a06c12);box-shadow:0 0 0 1.5px #6b4a0c;font:900 1.8cqw/3.2cqw var(--f-d);color:#3b2604}
.bt .vpb{position:absolute;right:.3cqw;top:.9cqw;background:var(--crim);color:#fff;font:900 max(1.3cqw,11px)/max(2.2cqw,15px) var(--f-d);padding:0 .6cqw;border-radius:2cqw}
.bt .m{position:absolute;right:.3cqw;bottom:.2cqw;display:flex;pointer-events:none}.bt .m svg{width:3.4cqw;height:3.4cqw;filter:drop-shadow(0 .3cqw 0 rgba(0,0,0,.4))}
.bt .pile{position:absolute;left:.4cqw;bottom:.4cqw;display:flex;align-items:center;padding:0 .4cqw;border-radius:2cqw;background:#2b1f12;color:#fff4d6;font:900 max(1.3cqw,11px)/max(1.8cqw,15px) var(--f-d)}.bt .pile svg{width:1.8cqw;height:1.8cqw}
.slotc.legal{z-index:4}
.slotc.legal .bt{background:linear-gradient(180deg,#fff8dc 0,#fff8dc 46%,rgba(255,240,190,.7) 62%,rgba(255,230,150,.1) 100%),url(assets/board/main.webp) var(--bx,50%) var(--by,50%)/560% auto,#f7df94;
  box-shadow:inset 0 1px #fff,0 0 0 1.5px #8d5e12,0 0 0 3px var(--glow),0 0 2cqw .5cqw rgba(255,205,69,.85);animation:breath2 1.9s ease-in-out infinite}
@keyframes breath2{50%{box-shadow:inset 0 1px #fff,0 0 0 1.5px #8d5e12,0 0 0 3px var(--glow),0 0 3cqw 1cqw rgba(255,205,69,.45)}}
.slotc.sel{z-index:6}.slotc.sel .bt,.slotc.sel .qc{outline:.4cqw solid var(--crim);outline-offset:.2cqw}
.slotc.last .bt{outline:.35cqw solid rgba(179,38,44,.7);outline-offset:.2cqw}
.slotc .qc{position:absolute;inset:0}
.slotc .qc .art{height:auto;flex:1 1 0;min-height:0}
.slotc .qc .ty,.slotc .qc .ok{font-size:max(1.45cqw,11px);line-height:max(2.3cqw,14px);padding:0 .7cqw 0 .6cqw}
.slotc .qc .nm{font-size:max(1.55cqw,9px);line-height:max(2.5cqw,14px);padding:.2cqw .4cqw 0}
.slotc .qc .rq{font-size:max(1.4cqw,11px);line-height:max(2.3cqw,13px);padding:0 .3cqw .3cqw}.slotc .qc .rq svg{width:1.9cqw;height:1.9cqw}.slotc .qc .rq svg.v{width:2.2cqw;height:2.2cqw}
.slotc.legal .qc{box-shadow:0 0 0 1.5px #8d5e12,0 0 0 3px var(--glow),0 0 2cqw .5cqw rgba(255,205,69,.85)}
.deckn{position:absolute;z-index:2;transform:translate(-50%,-50%);background:rgba(29,43,53,.84);color:#fff6dc;font:900 max(1.55cqw,9px)/1 var(--f-t);padding:.6cqw 1cqw;border-radius:2cqw;white-space:nowrap;pointer-events:none}
.bmark{position:absolute;z-index:2;left:1cqw;top:1cqw;display:flex;flex-direction:column;gap:.6cqw;pointer-events:none}
.bmark span{background:rgba(29,43,53,.84);color:#fff6dc;font:900 1.45cqw/1 var(--f-t);padding:.6cqw 1cqw;border-radius:2cqw;white-space:nowrap;display:flex;align-items:center;gap:.5cqw}
.bmark svg{width:2cqw;height:2cqw}
.extra-b{display:flex;gap:8px;overflow-x:auto;padding:4px 2px}
.extra-b .slotc{position:relative;flex:0 0 96px;height:84px;container-type:inline-size}
.extra-b .bt{padding-top:22px}.extra-b .bt b{font-size:11.5px}.extra-b .bt .gain{font-size:10px}.extra-b .bt .gain svg{width:13px;height:13px}
.extra-b .bt .own,.extra-b .bt .cost{width:18px;height:18px;top:3px;margin-left:-9px;font-size:11px;line-height:18px}.extra-b .bt .m svg{width:20px;height:20px}

/* ---------- 地底洞穴带 */
.unders{display:flex;flex-direction:column;gap:7px;flex:0 0 auto}
.unders:empty{display:none}
.unders.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.unders.two .corrbar{grid-column:1/-1}
.corrbar{display:flex;align-items:center;justify-content:center;padding:4px 10px;border-radius:6px;background:linear-gradient(90deg,#241d3a,#2f2750,#241d3a);box-shadow:0 0 0 1.5px #1e1834}
.corrbar .corr{display:flex;flex-wrap:nowrap;padding:0;gap:4px}.corrbar .corr .ct{position:static;margin-right:6px;font:900 12px var(--f-t);color:#ddd3ff}.corrbar .corr .cv{margin-left:8px}
.under.half{padding:7px 8px;gap:8px}
.under.half .uh{min-width:0;padding-right:8px}.under.half .uh b{writing-mode:vertical-rl;font-size:14px;letter-spacing:3px}.under.half .uh small{display:none}
.under.half .ups{gap:7px}
.under.half .pl{padding:5px 5px 5px 36px;min-height:48px}.under.half .pl .md{width:26px;height:26px;margin-top:-13px;left:5px}.under.half .pl .md svg{width:19px;height:19px;margin:3.5px}
.under.half .pl b{font-size:12.5px}.under.half .pl .gain{font-size:11px}.under.half .pl .gain svg{width:15px;height:15px}
.under{position:relative;display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:6px;color:#efeaff;flex:0 0 auto;
  background:linear-gradient(90deg,rgba(30,24,50,.94),rgba(43,36,66,.86) 60%,rgba(30,24,50,.94)),var(--ub) center 40%/cover,#2b2442;box-shadow:0 0 0 1.5px #1e1834,inset 0 2px 8px rgba(0,0,0,.5)}
.under+.under{margin-top:-2px}
.under .uh{flex:0 0 auto;text-align:center;padding-right:12px;border-right:1px solid rgba(200,190,240,.25);min-width:58px}
.under .uh b{display:block;font:900 15px var(--f-t);letter-spacing:2px}.under .uh small{font:700 11px var(--f-b);color:#b9aee0}
.under .ups{display:flex;gap:12px;flex:1;min-width:0}
.under .pl{position:relative;transform:none;left:auto;top:auto;flex:1 1 0;width:auto;min-width:0;min-height:52px;padding:6px 10px 6px 46px;border-radius:8px;font-size:7.4px;
  color:#f3efff;background:linear-gradient(180deg,#665c8c,#4a4169 60%,#3c3459);box-shadow:inset 0 1px rgba(255,255,255,.25),0 0 0 1.5px #a99bd8,0 0 0 3px #2b2442,0 4px 8px rgba(0,0,0,.4);animation:none}
.under .pl .md{left:6px;width:32px;height:32px;margin-top:-16px;background:radial-gradient(circle at 40% 35%,#8c82b4,#4f466f 75%);box-shadow:0 0 0 1.5px #1e1834}.under .pl .md svg{width:24px;height:24px;margin:4px}
.under .pl b{font-size:14px;overflow:hidden;text-overflow:ellipsis}.under .pl .gain{font-size:12px;margin-top:3px}.under .pl .gain svg{width:18px;height:18px}
.under .pl .occ{right:-6px;top:-10px}.under .pl .occ svg{width:26px;height:26px}.under .pl .occ svg+svg{margin-left:-10px}
.under .pl .pile{bottom:-9px;font-size:11px;padding:1px 6px}.under .pl .pile svg{width:14px;height:14px}
.under .pl.legal{background:linear-gradient(180deg,#8576bd,#5d5191);box-shadow:inset 0 1px rgba(255,255,255,.3),0 0 0 2px var(--glow),0 0 0 4px #2b2442,0 0 16px 4px rgba(255,205,69,.55);animation:none}
.under .pl.full{background:linear-gradient(180deg,#4e4670,#3a3356)}
.under .pl.sel,.under .pl.on{transform:scale(1.04)}
.under .pl.on{background:linear-gradient(180deg,#4f8f5e,#2f6b40);box-shadow:inset 0 1px rgba(255,255,255,.3),0 0 0 2px #7fd08f,0 0 0 4px #2b2442}
.corr{flex:0 0 auto;display:grid;grid-template-columns:repeat(5,22px);gap:3px;align-items:center;font:700 11px var(--f-b);color:#cfc5f3;position:relative;padding-top:15px}
.corr .ct{position:absolute;left:0;top:-2px;white-space:nowrap}
.corr i{width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.35);display:grid;place-items:center;font:900 10px var(--f-d);font-style:normal;color:#e9e3ff;box-shadow:inset 0 0 0 1px rgba(200,190,240,.35)}
.corr i svg{width:18px;height:18px}.corr i.k{background:#0f4a62}.corr i.val{box-shadow:0 0 0 2px var(--glow)}
.corr .cv{grid-column:1/-1;white-space:nowrap;text-align:center;color:#ffe08a}

/* ---------- 卡（手牌 / 卡槽 / 议事令） —— 插图占大头，类型角标压在图上，卡名一行 */
.qc{position:relative;border-radius:7px;background:var(--paper);overflow:hidden;cursor:pointer;display:flex;flex-direction:column;min-width:0;
  box-shadow:0 0 0 1px #9b7d45,0 3px 0 #8f7444,0 6px 10px rgba(60,40,10,.25);transition:transform .16s,box-shadow .16s}
.qc .art{position:relative;height:100px;background-repeat:no-repeat;background-size:210% auto;background-position:2.6% 30%;border-bottom:2px solid var(--tc)}
.qc.ic .art{background-size:160% auto;background-position:50% 18%}
.qc.lc .art{background-size:118% auto;background-position:50% 22%}
.qc .ty{position:absolute;left:0;top:0;font:900 11px/16px var(--f-t);color:#fff;padding:0 6px 0 5px;background:var(--tc);border-radius:0 0 7px 0;box-shadow:0 1px 2px rgba(0,0,0,.35);white-space:nowrap}
.qc .ok{position:absolute;right:0;top:0;font:900 11px/16px var(--f-t);color:#fff;padding:0 5px;background:var(--ok);border-radius:0 0 0 7px;white-space:nowrap}
.qc .ok.bad{background:#8a7a5a}
.qc .nm{font:900 11px/18px var(--f-t);padding:2px 4px 0;text-align:center;white-space:nowrap;overflow:hidden;background:var(--paper)}
.qc .rq{display:flex;align-items:center;justify-content:center;gap:1px;padding:0 3px 3px;font:900 11px/16px var(--f-d);white-space:nowrap;overflow:hidden}
.qc .rq svg{width:14px;height:14px;flex:0 0 auto}.qc .rq .to{margin:0 2px;color:var(--ink-2)}.qc .rq .n{margin:0 2px 0 -1px}
.qc .rq svg.v{width:15px;height:15px}
.qc.can{box-shadow:0 0 0 2.5px var(--ok),0 0 0 6px rgba(47,143,74,.25),0 4px 0 var(--ok-d)}
.qc.pick{box-shadow:0 0 0 2.5px var(--gold),0 0 0 6px rgba(255,205,69,.35),0 4px 0 var(--gold-d)}
.qc.on{box-shadow:0 0 0 3px var(--crim),0 0 0 6px rgba(179,38,44,.25),0 4px 0 var(--crim-d)}
.qc.up{transform:translateY(-9px)}
.qc.mand .art{filter:saturate(.85)}
.qc.plot{opacity:.92}

/* ---------- 右栏 */
.order{padding:11px 14px 12px;flex:0 0 auto}
.order h3{margin:0;font:900 18px/1.3 var(--f-t);display:flex;align-items:center;gap:9px}
.order h3 .dot{flex:0 0 auto;width:10px;height:10px;border-radius:50%;background:var(--glow);box-shadow:0 0 0 4px rgba(255,205,69,.35)}
.order h3 .dot.wait{background:var(--fc,#999);box-shadow:0 0 0 4px color-mix(in srgb,var(--fc,#999) 30%,transparent);animation:dotblink 1.2s ease-in-out infinite}
@keyframes dotblink{50%{opacity:.35}}
.order h3 .timer{margin-left:auto}
.order p.hint{margin:3px 0 0;font-size:13px;color:var(--ink-2)}
.order .acts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.order .acts .btn{width:100%;min-width:0;height:auto;min-height:44px;padding:6px 10px;white-space:normal;line-height:1.25;font-size:14px}
.order .acts .btn.wide{grid-column:1/-1}
.order .acts .btn svg{width:18px;height:18px;flex:0 0 auto}
.order .cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:9px;margin-top:10px;padding-top:9px}
.order .more{margin-top:9px}
.order .more summary{cursor:pointer;font:700 12.5px var(--f-b);color:var(--ink-2);list-style:none;display:inline-flex;align-items:center;gap:4px;padding:4px 0}
.order .more summary:before{content:'▸';transition:transform .15s}.order .more[open] summary:before{transform:rotate(90deg)}
.order .more .list{display:flex;flex-direction:column;gap:6px;margin-top:6px;max-height:220px;overflow-y:auto}
.order .more .list button{min-height:40px;padding:6px 10px;border-radius:7px;text-align:left;background:#fffaf0;box-shadow:inset 0 0 0 1.5px #c9b48a;font:700 13px var(--f-b)}
.order .res-line{margin-top:6px;font:700 13px var(--f-b);color:#5a3a0a}
.dist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.stepper{display:flex;align-items:center;gap:6px;padding:5px 6px;border-radius:8px;background:#fffaf0;box-shadow:inset 0 0 0 1.5px #d6c39a}
.stepper svg{width:22px;height:22px}.stepper .nm{flex:1;font:700 13px var(--f-b)}.stepper .nm small{color:var(--ink-2);font-weight:400}
.stepper button{width:34px;height:34px;border-radius:50%;background:linear-gradient(#fffaf0,#eedfbd);box-shadow:0 0 0 1.5px #b89a63;font:900 18px/1 var(--f-d)}
.stepper button:disabled{opacity:.35}
.stepper b{min-width:16px;text-align:center;font:900 16px var(--f-d)}
.tavern{display:flex;align-items:center;gap:6px;padding:8px 10px;font:900 16px var(--f-d);flex:0 0 auto;min-width:0}
.tavern .lt{font:900 12px var(--f-t);color:#6f4f1c;letter-spacing:2px;writing-mode:vertical-rl;flex:0 0 auto}
.tavern .tv{display:flex;align-items:center;gap:2px;flex:0 0 auto}.tavern .tv svg{width:20px;height:20px}
.tavern .tv.zero{opacity:.45}
.tavern .agents{display:flex;gap:0;margin-left:2px;min-width:0;overflow:hidden}.tavern .agents svg{width:18px;height:18px;flex:0 0 auto}
.lordc{margin-left:auto;width:38px;height:52px;border-radius:5px;background:url(assets/cards/back_lord.webp?v=h3ae9323966098e03) center/cover;box-shadow:0 0 0 1px #6b430a,0 3px 0 #6b430a;flex:0 0 auto}
.hand{padding:9px 12px 10px;flex:1 1 0;min-height:0;display:flex;flex-direction:column;gap:4px;overflow:hidden}
.hand h4{margin:0;font:900 13px var(--f-t);color:#6f4f1c;letter-spacing:3px;display:flex;justify-content:space-between;align-items:center;gap:6px}
.hand h4 small{font:700 11px var(--f-b);letter-spacing:0;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hrow{display:flex;gap:10px;overflow-x:auto;padding:11px 2px 5px;flex:0 0 auto}
.hrow .qc{flex:0 0 calc((100% - 20px) / 3);max-width:150px}
.hrow .qc .art{height:clamp(96px,11.5vh,132px)}
.hrow .empty{font-size:12.5px;color:var(--ink-2);padding:10px 2px}
.plots{display:flex;flex-wrap:wrap;gap:5px}
.plots button{font:700 11.5px var(--f-b);padding:3px 8px;border-radius:12px;background:#efe3c4;box-shadow:inset 0 0 0 1px #b89a63}
.mtabs{display:none}

/* ---------- 贴物件小弹窗 */
.pop{position:absolute;z-index:60;width:256px;padding:10px 12px 12px;border-radius:10px;background:linear-gradient(#fffaf0,#f4e6c6);touch-action:pan-x;
  box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 4px #f5e1a6,0 0 0 5px var(--gold-d),0 16px 30px rgba(8,36,46,.5);animation:popin .14s ease-out}
@keyframes popin{from{opacity:0;transform:translateY(6px) scale(.97)}}
.pop .tip{position:absolute;left:var(--tx,30px);bottom:-12px;width:20px;height:20px;background:#f4e6c6;transform:rotate(45deg);box-shadow:4px 4px 0 -2.5px var(--gold-d),5px 5px 0 -2.5px #f5e1a6;pointer-events:none}
.pop.down .tip{bottom:auto;top:-12px;transform:rotate(225deg);background:#fffaf0}
.pop.side .tip{display:none}
.pop .grab{display:none}
.pop .h{display:flex;align-items:center;gap:6px;font:900 17px/1.25 var(--f-t)}
.pop .h small{font:700 10px var(--f-d);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.pop .x{margin-left:auto;width:30px;height:30px;border-radius:50%;border:1.5px solid #b89a63;background:#fff8e6;font-weight:900;flex:0 0 auto}
.pop .ptext{font-size:13px;margin:5px 0 9px;color:var(--ink-2)}
.pop .ptext b{color:var(--ink)}
.pop .act{width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px;text-align:left;height:auto;min-height:44px;padding:6px 12px;white-space:normal}
.pop .act small{display:flex;align-items:center;gap:2px;font:900 13px var(--f-d);flex:0 0 auto}.pop .act small svg{width:18px;height:18px}
.pop .act.dis{background:#e6dcc6;color:#8a7a5a;box-shadow:inset 0 0 0 1.5px #c9b48a;cursor:not-allowed}
.pop .act.dis small{font:700 11.5px var(--f-b);color:#8a6a3a}
.pop .look{width:100%;height:40px;border:1.5px dashed #a88b55;background:transparent;border-radius:7px;font:700 13px var(--f-b);color:var(--ink-2)}
.pop .info{display:flex;flex-wrap:wrap;gap:4px 10px;font:700 12.5px var(--f-b);color:var(--ink-2);margin:4px 0 8px}
.pop .info span{display:flex;align-items:center;gap:3px}.pop .info svg{width:16px;height:16px}
.pop .qs{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 8px}
.pop .qs button{font:700 11.5px var(--f-b);padding:2px 7px;border-radius:10px;background:#efe3c4;box-shadow:inset 0 0 0 1px var(--tc,#b89a63)}

/* ---------- 大图 / 规则 / 结算弹窗 */
.modal{position:fixed;inset:0;z-index:80;background:rgba(10,30,38,.6);display:flex;align-items:center;justify-content:center;padding:16px;overscroll-behavior:contain}
.modal-box{width:min(520px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;padding:16px 18px;border-radius:12px;background:linear-gradient(#fffaf0,#f4e6c6);position:relative;
  box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 4px #f5e1a6,0 0 0 5px var(--gold-d),0 20px 40px rgba(0,0,0,.5)}
.modal-box.wide{width:min(760px,100%)}
.modal-box h3{margin:0 0 8px;font:900 19px var(--f-t);padding-right:36px}
.modal-box p{margin:6px 0}
.modal-box .mx{position:absolute;right:10px;top:10px;width:32px;height:32px;border-radius:50%;border:1.5px solid #b89a63;background:#fff8e6;font-weight:900}
.modal-box .grab{display:none}
.row-btns{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:12px}
.cardview{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:14px;align-items:start}
.cardview img{width:100%;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.35)}
.cardview .zh{display:flex;flex-direction:column;gap:6px}
.cardview .t{font:900 20px var(--f-t)}.cardview .en{font:700 12px var(--f-d);color:var(--ink-2)}
.cardview .line{font-size:13.5px;display:flex;align-items:center;gap:3px;flex-wrap:wrap}.cardview .line svg{width:18px;height:18px}
.cardview .fx{padding:8px 10px;border-radius:8px;background:rgba(214,191,143,.3);font-size:13.5px}
.ref h4{margin:12px 0 4px;font:900 15px var(--f-t);color:#6f4f1c}.ref ul{margin:0;padding-left:20px}.ref li{margin:3px 0;font-size:13.5px}
.small{font-size:12.5px}.muted{color:var(--ink-2)}
.result-table{width:100%;border-collapse:collapse;margin-top:10px;font-size:13.5px}
.result-table th,.result-table td{padding:6px 5px;border-bottom:1px solid rgba(141,94,18,.25);text-align:center}
.result-table th{font:900 12.5px var(--f-t);color:#6f4f1c}.result-table td:first-child{text-align:left}
.result-table tr.win td{background:rgba(255,205,69,.25);font-weight:900}
.rank{margin:6px 0;font:700 14px var(--f-b)}
.copybox{margin-top:6px}

/* ---------- 提示 / 断线条 / 页脚 */
.toast{position:fixed;left:50%;bottom:calc(var(--hub-footer-h) + 16px);transform:translateX(-50%);z-index:90;max-width:min(92vw,520px);padding:10px 16px;border-radius:10px;
  background:#1d2b35;color:#fff6dc;font:700 14px var(--f-b);box-shadow:0 0 0 1.5px var(--gold),0 10px 24px rgba(0,0,0,.4);text-align:center}
.netbar{position:fixed;left:0;right:0;top:0;z-index:95;padding:6px;text-align:center;background:var(--crim);color:#fff;font:700 13px var(--f-b)}
.hub-footer{flex:0 0 auto;height:var(--hub-footer-h);display:flex;align-items:center;justify-content:center;text-align:center}
.hub-footer .hub-back-link{font:700 11px var(--f-b);color:#e6f2ee;text-decoration:none;letter-spacing:1px}
.hub-footer .hub-back-link:before,.hub-footer .hub-back-link:after{content:'◆';color:var(--gold-l);margin:0 8px;font-size:9px}

/* ---------- 演出层（动效开关 / 系统减少动态都会关掉） */
.fxlayer{position:fixed;inset:0;z-index:70;pointer-events:none;overflow:hidden}
.fx-banner{position:absolute;left:50%;top:22%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:10px 22px 10px 12px;border-radius:12px;width:max-content;max-width:min(560px,92vw);
  background:linear-gradient(#fffaf0,#f4e6c6);box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 4px #f5e1a6,0 0 0 5px var(--gold-d),0 16px 34px rgba(0,0,0,.45);animation:banner 2.1s ease-in-out forwards}
.fx-banner img{height:84px;border-radius:5px;box-shadow:0 2px 6px rgba(0,0,0,.4)}
.fx-banner>div{min-width:0}.fx-banner b{display:block;font:900 20px var(--f-t);color:#5a3a0a}.fx-banner small{display:block;font:700 13px var(--f-b);color:var(--ink-2)}
.fx-banner.atk{box-shadow:0 0 0 1.5px var(--crim-d),0 0 0 4px #f3b8a8,0 0 0 5px var(--crim-d),0 16px 34px rgba(0,0,0,.45)}
.fx-banner.atk b{color:var(--crim)}
@keyframes banner{0%{opacity:0;transform:translate(-50%,-18px) scale(.9)}12%{opacity:1;transform:translate(-50%,0) scale(1)}82%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,-10px)}}
.fx-vp{position:absolute;font:900 22px var(--f-d);color:var(--crim);text-shadow:0 0 0 #fff,0 2px 0 #fff,0 0 8px #fff;animation:vpup 1.4s ease-out forwards;transform:translate(-50%,-50%);white-space:nowrap}
@keyframes vpup{0%{opacity:0;transform:translate(-50%,-30%) scale(.6)}20%{opacity:1;transform:translate(-50%,-60%) scale(1.15)}100%{opacity:0;transform:translate(-50%,-160%) scale(1)}}
.fx-drop{animation:drop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes drop{from{transform:translateY(-16px);opacity:0}}
body.nofx .pl.legal,body.nofx .slotc.legal .bt,body.nofx .lord.pick,body.nofx .pl.last:after,body.nofx .fx-drop{animation:none!important}
@media (prefers-reduced-motion:reduce){.pl.legal,.slotc.legal .bt,.lord.pick,.pl.last:after,.fx-drop,.pop,.logl.new{animation:none!important}}

/* ===================================================== 电脑端悬停 */
@media (hover:hover) and (pointer:fine){
  .pl:hover{filter:brightness(1.04)}
  .qc:hover{transform:translateY(-4px)}
  .qc.up:hover{transform:translateY(-9px)}
  .lord:hover{filter:brightness(1.03)}
}
/* 中等宽度：两栏（领主一排在上） */
@media (max-width:1180px) and (min-width:901px){
  .game{grid-template-columns:minmax(0,1fr) clamp(340px,36vw,420px);grid-template-rows:auto minmax(0,1fr)}
  .col-left{grid-column:1/-1;flex-direction:row}
  .lords{flex-direction:row;flex:1;min-width:0}.lords .lord{flex:1;min-width:0}.lords .lord .res{display:none}
  .chron{display:none}
  .game{height:auto;min-height:calc(100dvh - var(--top-h) - var(--hub-footer-h))}
  .city .board-wrap{flex:0 0 auto}
}
/* 矮屏电脑：允许整页稍微滚动 */
@media (min-width:901px) and (max-height:640px){ .game{height:auto} }

/* 电脑端棋盘：标题和牌匾内边距随版图宽度调整。 */
@media (min-width:901px){
  .pl{font-size:clamp(var(--pmin,5px),calc(.64cqw * var(--pk,1)),7px);min-width:0;padding:.62em 1.25em .62em 3.75em;border-radius:.9em;
    background:linear-gradient(180deg,#fffcf3,#f7edd6 60%,#efdfba);
    box-shadow:0 0 0 1px #9a7836,inset 0 0 0 .22em rgba(255,250,232,.95),inset 0 0 0 .3em rgba(154,120,54,.35),0 .35em .9em rgba(30,20,5,.32)}
  .pl .md{left:.6em;width:2.65em;height:2.65em;margin-top:-1.325em;box-shadow:0 0 0 1px #9a7836}
  .pl .md svg{width:1.95em;height:1.95em;margin:.35em}
  .pl b{font-size:max(1.7em,8.5px);line-height:1.25;letter-spacing:.06em;font-weight:900}
  .pl .gain{font-size:max(1.45em,8px);margin-top:.42em;gap:.12em}
  .pl .gain svg{width:1.32em;height:1.32em}
  .pl .occ{right:-1em;top:-1.35em}.pl .occ svg{width:2.9em;height:2.9em;filter:drop-shadow(0 .2em 0 rgba(0,0,0,.35))}.pl .occ svg+svg{margin-left:-1.2em}
  .pl .pile{bottom:-1.7em;font-size:1.2em;padding:.1em .6em}.pl .pile svg{width:1.3em;height:1.3em}
  .pl.legal{background:linear-gradient(180deg,#fffdf4,#fff3cc 60%,#f9e29a);
    box-shadow:0 0 0 1px #8d5e12,0 0 0 .32em var(--glow),inset 0 0 0 .22em rgba(255,252,236,.95),0 0 1.8em .35em rgba(255,205,69,.75),0 .35em .9em rgba(30,20,5,.3);animation:breath3 2.2s ease-in-out infinite}
  @keyframes breath3{50%{box-shadow:0 0 0 1px #8d5e12,0 0 0 .32em var(--glow),inset 0 0 0 .22em rgba(255,252,236,.95),0 0 2.8em .7em rgba(255,205,69,.45),0 .35em .9em rgba(30,20,5,.3)}}
  .pl.on{box-shadow:0 0 0 1px var(--ok-d),0 0 0 .32em #7fd08f,0 .35em .9em rgba(30,20,5,.3)}
  .pl.sm{padding:.42em 1em .42em 3.1em}
  .pl.sm .md{width:2.15em;height:2.15em;margin-top:-1.075em;left:.5em}.pl.sm .md svg{width:1.55em;height:1.55em;margin:.3em}
  .pl.sm b{font-size:max(1.6em,8.5px)}
  .pl.inn{padding-left:3.6em}
  .board .pl{padding-top:.8em;padding-bottom:.8em;padding-right:1.4em}
  .board .pl b,.board .pl.sm b{font-size:clamp(11px,2cqw,14px);letter-spacing:.04em}
  .board .pl.sm{padding-top:.55em;padding-bottom:.55em;padding-right:1.15em}
  .board .pl .occ{right:-.65em;top:-.65em}
  .board .pl.sm .occ{right:0}
  /* 特工单独占位时，地点徽章作为底座。 */
  .board .pl:has(>.occ>svg:only-child)>.md svg{visibility:hidden}
  .board .pl:has(>.occ>svg:only-child)>.occ{left:1.925em;right:auto;top:50%;translate:-50% -50%}
  .board .pl.sm:has(>.occ>svg:only-child)>.occ{left:1.575em}
  .board .pl .occ svg:only-child{width:clamp(16px,3cqw,22px);height:clamp(16px,3cqw,22px)}
  .board .pl.sm .occ svg:only-child{width:clamp(14px,2.65cqw,19px);height:clamp(14px,2.65cqw,19px)}
  .city .pl .occ svg,.city .bt .m svg{
    filter:drop-shadow(1px 0 #fff8e6) drop-shadow(-1px 0 #fff8e6) drop-shadow(0 -1px #fff8e6) drop-shadow(0 1px #fff8e6) drop-shadow(0 1px 1px #382817);
  }
  .board .pl .pile{bottom:-1em}
  .pl.last:after{inset:-.6em;border-radius:1.3em;border-width:.25em}

  /* 卡槽里的建筑：字小一号、上下多留白 */
  .bt{padding:4.3cqw .7cqw .7cqw;border-radius:.8cqw;box-shadow:inset 0 1px #fff,0 0 0 1px #6e6553,0 .3cqw .8cqw rgba(0,0,0,.32)}
  .bt:before{height:.55cqw}
  .bt b{font-size:max(1.22cqw,8.5px);line-height:1.35;letter-spacing:.04em}
  .bt .gain{font-size:max(1.08cqw,8px);margin-top:.8cqw;padding:.25cqw .7cqw}.bt .gain svg{width:1.75cqw;height:1.75cqw}
  .bt .cost,.bt .own{width:2.6cqw;height:2.6cqw;margin-left:-1.3cqw;top:1.1cqw}
  .bt .cost{font-size:max(1.35cqw,8px);line-height:2.6cqw}
  .bt .vpb{font-size:max(1cqw,8px);line-height:max(1.7cqw,12px);padding:0 .55cqw;right:.4cqw;top:.9cqw}
  .bt .m svg{width:2.9cqw;height:2.9cqw}
  .bt .pile{font-size:max(1cqw,8px);line-height:max(1.5cqw,12px)}

  /* 旅馆卡槽里的任务卡：图保持大，字小一号，卡名和需求之间留一点缝 */
  .slotc .qc{box-shadow:0 0 0 1px #9b7d45,0 .25cqw .7cqw rgba(60,40,10,.28)}
  .slotc .qc .ty,.slotc .qc .ok{font-size:max(1.05cqw,8px);line-height:max(1.8cqw,12px);padding:0 .6cqw 0 .5cqw}
  .slotc .qc .nm{font-size:max(1.15cqw,8px);line-height:max(2cqw,12px);padding:.45cqw .5cqw .1cqw;letter-spacing:.03em}
  .slotc .qc .rq{font-size:max(1.02cqw,8px);line-height:max(1.8cqw,11px);padding:0 .4cqw .55cqw}.slotc .qc .rq svg{width:1.45cqw;height:1.45cqw}.slotc .qc .rq svg.v{width:1.65cqw;height:1.65cqw}
  .slotc.legal .qc{box-shadow:0 0 0 1px #8d5e12,0 0 0 .3cqw var(--glow),0 0 1.6cqw .4cqw rgba(255,205,69,.75)}

  .deckn{font-size:max(1.12cqw,8px);padding:.5cqw .95cqw;letter-spacing:.04em;background:rgba(29,43,53,.78)}

  /* 地底洞穴带 */
  .under .pl{padding:6px 10px 6px 40px;min-height:44px;font-size:7px}
  .under .pl .md{width:26px;height:26px;margin-top:-13px;left:7px}.under .pl .md svg{width:19px;height:19px;margin:3.5px}
  .under .pl b{font-size:12px;letter-spacing:.05em}.under .pl .gain{font-size:10px;margin-top:4px}.under .pl .gain svg{width:14px;height:14px}
  .under.half .pl{padding-left:36px}.under.half .pl b{font-size:11px}.under.half .pl .gain{font-size:9.5px}.under.half .pl .gain svg{width:13px;height:13px}
  .under .pl .occ{right:-6px;top:-10px}.under .pl .occ svg{width:22px;height:22px}
  .corr i{width:20px;height:20px}.corr i svg{width:16px;height:16px}
}
/* ===================================================== 手机 */
@media (max-width:900px){
  :root{--top-h:48px}
  .topbar{padding:0 8px;gap:6px}.topbar .logo{width:32px;height:32px}
  .brand b{font-size:16px;letter-spacing:1px}.brand small{font-size:11px}
  .rounds{display:none}
  #screen-start .brand small,#screen-lobby .brand small{display:none}
  .room-chip{height:30px;padding:0 6px;gap:4px}.room-chip b{font-size:13px;letter-spacing:2px}.room-chip svg{width:12px;height:12px}
  .tools{gap:4px}.tb{height:30px;padding:0 5px;font-size:12px}
  .game-top .brand b{font-size:14px;letter-spacing:0}
  .game-top .room-chip svg{display:none}.game-top .room-chip b{letter-spacing:1px}
  .start-main{grid-template-columns:1fr;padding:10px;gap:12px}
  .hero{grid-template-rows:auto auto}.modes{grid-template-columns:1fr}.hero-art{min-height:170px;border-radius:10px 10px 0 0}.hero-fade{background:linear-gradient(180deg,transparent 55%,rgba(247,238,214,.95))}
  .hero-cards .hc{height:70px}.hero-cards .hc.c{height:50px}
  .hero-copy{padding:12px 14px}.hero-copy h1{font-size:20px}
  .entry{order:-1;padding:14px}.entry-logo{display:none}
  .lobby-main{grid-template-columns:1fr;padding:10px;gap:12px}
  .lobby-left,.lobby-right{padding:12px}
  .set-row .tgls{grid-template-columns:1fr}.lobby-art{min-height:90px}
  .seat{min-height:118px}
  .seat-tools{gap:6px;flex-wrap:nowrap}.seat-tools .btn{padding:0 10px;font-size:14px;flex:0 0 auto}.fill{gap:4px}.fill select{padding:0 4px}
  .game{display:flex;flex-direction:column;height:auto;min-height:0;padding:8px 8px 10px;gap:9px;max-width:720px}
  .col-left,.col-right{display:contents}
  .lords{order:1;flex-direction:row;gap:6px}
  .lord{flex:1;min-width:0;padding:5px 5px 5px 9px;border-radius:8px}.lord:before{width:4px}
  .lord .seal{display:none}.lord .h{gap:4px}.lord .nm b{font-size:12px}.lord .nm small{display:none}
  .lord .vp{font-size:16px}.lord .vp small,.lord .res,.lord .ft,.lord .now{display:none}
  .lord.turn{box-shadow:0 0 0 1.5px var(--gold-d),0 0 0 3.5px var(--glow),0 0 12px 3px rgba(255,205,69,.6)}
  .chron{display:none}
  .order{order:2;padding:8px 10px 9px 12px}
  .order h3{font-size:15px}.order p.hint{font-size:12px}
  .order .acts{margin-top:8px}
  .city{order:3;padding:5px;gap:6px}
  .board-wrap{flex:0 0 auto}
  .tavern{order:4;font-size:15px;gap:7px;padding:6px 10px}.tavern .tv svg{width:20px;height:20px}.tavern .lt{display:none}.tavern .agents svg{width:16px;height:16px}.lordc{width:30px;height:41px}
  .hand{order:5;padding:6px 8px 8px;flex:0 0 auto;overflow:visible}
  .hand h4{font-size:12px;letter-spacing:2px}
  .hrow{gap:8px;padding:10px 2px 4px}.hrow .qc{flex:0 0 96px}.hrow .qc .art{height:90px}
  .mtabs{order:6;display:block;padding:6px 8px 8px}
  .mtabs nav{display:flex;gap:6px;margin-bottom:6px}
  .mtabs nav button{flex:1;height:36px;border-radius:7px;font:900 13px var(--f-t);background:#fffaf0;box-shadow:inset 0 0 0 1.5px #c9b48a}
  .mtabs nav button.on{background:var(--sea);color:#fff;box-shadow:inset 0 0 0 1.5px #1f4f58}
  .mtab-body{max-height:300px;font-size:13px}
  /* 牌匾缩成「徽章 + 地名」小签 */
  .pl{width:max-content;min-width:0;min-height:36px;padding:4px 9px 4px 31px;border-radius:13px;display:flex;align-items:center;font-size:7px}
  .pl .md{width:26px;height:26px;left:3px;margin-top:-13px}.pl .md svg{width:19px;height:19px;margin:3.5px}
  .pl b{font-size:12.5px}.pl .gain{display:none}
  .pl .occ{right:-8px;top:-11px}.pl .occ svg{width:20px;height:20px}.pl .occ svg+svg{margin-left:-8px}
  .pl .pile{bottom:-11px;font-size:10px;padding:1px 5px}.pl .pile svg{width:12px;height:12px}
  .pl.sm,.pl.inn{min-width:0;padding-left:31px}
  .pl.sm .md{width:26px;height:26px;margin-top:-13px}.pl.sm .md svg{width:19px;height:19px;margin:3.5px}.pl.sm b{font-size:12.5px}
  .mstrip .mh{font:900 11.5px var(--f-t);color:#6f4f1c;letter-spacing:2px;margin:2px 2px 3px;display:flex;justify-content:space-between}
  .mstrip .mh small{font:700 11px var(--f-b);letter-spacing:0;color:var(--ink-2)}
  .minn{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .minn .slotc{position:relative;height:auto;container-type:normal}
  .minn .qc{position:relative;inset:auto}
  .minn .qc .art{height:78px;flex:0 0 auto}.minn .qc .nm{font-size:11px;line-height:17px}.minn .qc .rq{font-size:11px;line-height:15px}.minn .qc .rq svg{width:12px;height:12px}.minn .qc .rq svg.v{width:13px;height:13px}
  .minn .qc .ty,.minn .qc .ok{font-size:11px;line-height:15px;padding:0 5px}
  .minn .slotc.legal .qc{box-shadow:0 0 0 2px #8d5e12,0 0 0 4px var(--glow),0 0 12px 3px rgba(255,205,69,.75)}
  .mlots{display:flex;gap:7px;overflow-x:auto;padding:8px 2px 4px}
  .mlots .slotc{position:relative;flex:0 0 94px;height:84px;container-type:normal}
  .mlots .bt{padding:23px 3px 3px}.mlots .bt b{font-size:11px}.mlots .bt .gain{font-size:11px;margin-top:4px;padding:1px 4px;line-height:1.2}.mlots .bt .gain svg{width:13px;height:13px}
  .mlots .bt .own,.mlots .bt .cost{width:18px;height:18px;top:4px;margin-left:-9px;font-size:11px;line-height:18px}
  .mlots .bt .vpb{font-size:11px;line-height:15px;padding:0 4px;right:2px;top:3px}.mlots .bt .m svg{width:20px;height:20px}
  .mlots .bt:before{height:3px}
  .mlots .bt .pile{font-size:11px;line-height:13px}.mlots .bt .pile svg{width:11px;height:11px}
  .mlots .slotc.legal .bt{box-shadow:inset 0 1px #fff,0 0 0 1.5px #8d5e12,0 0 0 3px var(--glow),0 0 10px 2px rgba(255,205,69,.75)}
  .mlots .slotc.sel .bt{outline:2.5px solid var(--crim);outline-offset:1px}
  .mlots .empty{font-size:12px;color:var(--ink-2);padding:6px 2px}
  .unders.two{display:flex}.corrbar .corr{flex-wrap:wrap}
  .under{flex-wrap:wrap;gap:6px;padding:7px}.under .uh{display:none}.under .ups{gap:6px;width:100%}
  .under .pl{min-height:44px;padding:4px 4px 4px 32px;font-size:6px}.under .pl .md{width:26px;height:26px;margin-top:-13px;left:3px}.under .pl .md svg{width:19px;height:19px;margin:3.5px}
  .under .pl b{font-size:12px}.under .pl .gain{display:none}
  .under .pl .occ svg{width:20px;height:20px}.under .pl .occ{right:-5px;top:-9px}
  .corr{display:flex;flex-wrap:wrap;width:100%;padding:0;gap:3px}.corr .ct{position:static;margin-right:2px}.corr .cv{margin-left:auto;grid-column:auto}.corr i{width:20px;height:20px}.corr i svg{width:16px;height:16px}
  .pop{width:min(286px,calc(100vw - 16px));touch-action:none}
  .pop .grab{display:block;width:40px;height:4px;border-radius:2px;background:#c9b48a;margin:-4px auto 6px}
  .modal{align-items:flex-end;padding:0}
  .modal-box{border-radius:14px 14px 0 0;max-height:92dvh;width:100%!important;padding:10px 14px 16px}
  .modal-box .grab{display:block;width:44px;height:5px;border-radius:3px;background:#c9b48a;margin:0 auto 8px}
  .cardview{grid-template-columns:1fr}
  .cardview img{max-height:46dvh;object-fit:contain}
  .fx-banner img{height:64px}.fx-banner b{font-size:17px}
}
@media (max-width:360px){ .tb{padding:0 5px} .brand b{font-size:15px} }
