/* ============ 基础 ============ */
:root{
  --ink:#2b2117;
  --ink-soft:#5b4a36;
  --paper:#e9dcba;
  --paper-2:#dcc99e;
  --paper-3:#f3e9cd;
  --edge:#4a3722;
  --gold:#c9a24a;
  --danger:#9c3a2c;
  --leaf:#5d7a4a;
  --sky:#6f8ea4;
  --shadow:0 10px 24px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:"Songti SC","Noto Serif SC","SimSun",serif;
  color:var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #2c2318 0%, rgba(20,16,12,0) 70%),
    radial-gradient(900px 600px at 100% 100%, #24190f 0%, rgba(20,16,12,0) 60%),
    #14100c;
  overflow:hidden;
}
body:before{
  content:"";
  position:fixed;inset:0;pointer-events:none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(0deg, rgba(0,0,0,.25) 0 1px, transparent 1px 4px);
  mix-blend-mode:overlay;
  opacity:.6;
}
/* 自定义背景：图片铺满整页，上面压一层深色，保证卡牌和文字仍然清楚 */
body.has-bg{
  background-image:
    linear-gradient(180deg, rgba(12,9,5,.64) 0%, rgba(12,9,5,.78) 70%, rgba(12,9,5,.88) 100%),
    var(--custom-bg);
  background-size:cover,cover;
  background-position:center,center;
  background-attachment:fixed,fixed;
  background-repeat:no-repeat,no-repeat;
}
body.has-bg:before{opacity:.18}
/* 天气背景：对局里用，比自定义背景少压一点，让当天天气看得出来 */
body.has-bg[data-bg="weather"]{
  background-image:
    linear-gradient(180deg, rgba(12,9,5,.48) 0%, rgba(12,9,5,.62) 58%, rgba(12,9,5,.80) 100%),
    var(--custom-bg);
}
body.has-bg[data-bg="weather"]:before{opacity:.22}
/* 搜寻通栏在天气背景上不再是一块死黑，压暗但不遮住岛 */
body.has-bg[data-bg="weather"] .search-band{
  background:linear-gradient(180deg,rgba(42,32,22,.40),rgba(31,23,15,.55));
}
.hidden{display:none !important}
button{font-family:inherit}
h1,h2,h3,h4{margin:0;font-weight:600;letter-spacing:.04em}

/* ============ 布局 ============ */
#app{height:100vh;display:flex;flex-direction:column}
.screen{flex:1;min-height:0;display:flex;flex-direction:column}
.center-wrap{flex:1;display:flex;align-items:center;justify-content:center;padding:24px}

/* ============ 大厅 ============ */
.lobby{
  width:min(1040px,95vw);
  background:linear-gradient(180deg,var(--paper-3),var(--paper));
  border:2px solid var(--edge);
  border-radius:14px;
  box-shadow:var(--shadow), inset 0 0 0 6px rgba(74,55,34,.12);
  padding:34px 34px 28px;
  position:relative;
}
.lobby:after{
  content:"";position:absolute;inset:10px;border:1px dashed rgba(74,55,34,.35);border-radius:8px;pointer-events:none;
}
.brand{display:flex;align-items:center;gap:16px;margin-bottom:6px}
.brand .mark{font-size:46px;filter:drop-shadow(0 4px 6px rgba(0,0,0,.25))}
.brand h1{font-family:"STKaiti","KaiTi",serif;font-size:40px;line-height:1.05}
.brand p{margin:4px 0 0;color:var(--ink-soft);font-size:16px;letter-spacing:.08em}
.lobby-grid{display:grid;grid-template-columns:1fr 1.18fr;gap:24px;margin-top:24px}
.panel{
  background:rgba(255,255,255,.28);
  border:1px solid rgba(74,55,34,.28);
  border-radius:10px;padding:18px;
}
.panel h3{font-size:18px;margin-bottom:12px;color:var(--edge)}
.field{display:flex;gap:10px;margin-bottom:12px}
input[type=text],input[type=password]{
  flex:1;min-width:0;padding:11px 12px;border-radius:8px;border:1.5px solid rgba(74,55,34,.45);
  background:var(--paper-3);color:var(--ink);font-family:inherit;font-size:17px;outline:none;
}
input[type=text]:focus,input[type=password]:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,162,74,.2)}
.btn{
  appearance:none;border:1.5px solid var(--edge);border-radius:8px;
  background:linear-gradient(180deg,#f1e5c8,#ddc9a0);
  color:var(--ink);padding:10px 16px;font-size:17px;cursor:pointer;
  box-shadow:0 2px 0 rgba(74,55,34,.55), 0 6px 12px rgba(0,0,0,.18);
  transition:transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover{filter:brightness(1.04)}
.btn:active{transform:translateY(2px);box-shadow:0 0 0 rgba(74,55,34,.55)}
.btn.primary{background:linear-gradient(180deg,#e2c374,#c9a24a);color:#2a1e0c;border-color:#7d5f20;font-weight:700}
.btn.ghost{background:rgba(255,255,255,.35)}
.btn.danger{background:linear-gradient(180deg,#d1836f,#a84b36);color:#fff2e6;border-color:#6f2a1c}
/* 材料齐了能合成时，动作栏那颗按钮描金、轻微呼吸，让人一眼看见又不抢抢眼 */
.btn.ready{
  background:linear-gradient(180deg,#f7e3a8,#e6c470);border-color:#8a6a2a;color:#33230f;font-weight:700;
  box-shadow:0 0 0 2px rgba(201,162,74,.32), 0 4px 12px rgba(150,110,30,.25);
  animation:readyPulse 1.9s ease-in-out infinite;
}
@keyframes readyPulse{
  0%,100%{box-shadow:0 0 0 2px rgba(201,162,74,.28), 0 4px 12px rgba(150,110,30,.22)}
  50%{box-shadow:0 0 0 4px rgba(201,162,74,.5), 0 6px 16px rgba(150,110,30,.34)}
}
.btn:disabled{opacity:.45;cursor:not-allowed;filter:grayscale(.3)}
.btn.small{padding:6px 10px;font-size:15px;white-space:nowrap}
.hint{font-size:15px;color:var(--ink-soft);line-height:1.7}
.urlbox{
  margin-top:14px;padding:10px 12px;border-radius:8px;background:rgba(74,55,34,.12);
  font-family:Consolas,monospace;font-size:15px;color:var(--ink);word-break:break-all;
}
.roomlist{display:flex;flex-direction:column;gap:7px;max-height:300px;overflow:auto}
.roomrow{
  display:flex;flex-direction:column;gap:5px;
  background:rgba(255,255,255,.4);border:1px solid rgba(74,55,34,.25);border-radius:8px;padding:7px 10px;
}
.roomrow.started{background:rgba(255,255,255,.26);border-color:rgba(74,55,34,.18)}
.rhead{display:flex;align-items:center;gap:8px}
.rhead .code{font-family:Consolas,monospace;font-weight:700;letter-spacing:.16em;font-size:15px;flex:0 0 auto}
.rmeta{font-size:14px;color:var(--ink-soft);flex:1 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rmeta b{color:var(--ink);font-weight:600}
.rtag{flex:0 0 auto;font-size:13px;padding:2px 7px;border-radius:10px;background:rgba(74,55,34,.14);color:#4a3722;white-space:nowrap}
.rtag.live{background:rgba(201,162,74,.2);border:1px solid rgba(201,162,74,.55);color:#7a5a1e}
.rfoot{display:flex;align-items:center;gap:8px}
.rsec{flex:1 1 auto;display:flex;gap:5px;flex-wrap:wrap;min-width:0;overflow:hidden}
.rwho{font-size:13.5px;background:rgba(74,55,34,.1);border-radius:10px;padding:2px 8px;color:#3c2d1c;white-space:nowrap}
.rtime{flex:0 0 auto;font-size:13px;color:#7a6a53}

/* ============ 准备室 ============ */
.prep{flex:1;overflow:auto;padding:26px 28px 40px}
.prep-inner{width:min(1120px,96vw);margin:0 auto}
.prep-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.prep-head h2{font-family:"STKaiti","KaiTi",serif;font-size:30px;color:#f2e6c9}
.prep .hint{color:#bdb094}
.code-tag{
  display:inline-flex;align-items:center;gap:8px;background:rgba(240,228,200,.1);
  border:1px dashed rgba(240,228,200,.35);border-radius:20px;padding:5px 12px;font-size:15px;color:#f0e4c8
}
.code-tag b{font-family:Consolas,monospace;letter-spacing:.16em;color:var(--gold)}
.char-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(172px,1fr));gap:14px;margin-top:22px}
.char-card{
  background:linear-gradient(180deg,var(--paper-3),var(--paper-2));
  border:2px solid var(--edge);border-radius:12px;padding:14px 12px 12px;cursor:pointer;
  box-shadow:0 6px 14px rgba(0,0,0,.25);position:relative;transition:transform .12s, box-shadow .12s;
}
.char-card:hover{transform:translateY(-3px);box-shadow:0 12px 22px rgba(0,0,0,.3)}
.char-card .cicon{font-size:36px}
.char-card .c-art{display:block;margin:0 auto;height:268px;width:auto;max-width:100%;object-fit:cover;border-radius:8px;border:1.5px solid rgba(74,55,34,.45);box-shadow:0 4px 10px rgba(0,0,0,.22)}
.char-card .c-art.faux{
  width:128px;height:268px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  background:
    radial-gradient(120px 90px at 50% 26%, rgba(255,255,255,.55), transparent 65%),
    linear-gradient(180deg,#f2e7ca,#dcc79b);
  border:2px solid #4a3722;font-size:42px;box-shadow:0 4px 10px rgba(0,0,0,.22);
}
.char-card .c-art.faux em{font-style:normal;font-size:12px;color:#8a755a;letter-spacing:.1em}
.char-card .cname{font-family:"STKaiti","KaiTi",serif;font-size:22px;margin-top:6px}
.char-card .cskill{font-size:14.5px;color:var(--ink-soft);margin-top:8px;line-height:1.5}
.char-card .cdesc{font-size:13.5px;color:#7a6a53;margin-top:6px;font-style:italic}
.char-card.taken{filter:grayscale(.45) opacity(.65)}
.char-card.mine{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,162,74,.35), 0 10px 20px rgba(0,0,0,.28)}
.char-card .who{position:absolute;top:6px;right:6px;z-index:3;font-size:13px;background:rgba(245,235,210,.92);border:1px solid rgba(120,92,54,.55);border-radius:10px;padding:1px 7px;color:#4a3722}
.seat-list{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.seat{
  background:rgba(240,228,200,.08);border:1px solid rgba(240,228,200,.25);border-radius:9px;padding:8px 12px;font-size:15px;
  display:flex;align-items:center;gap:8px;color:#f0e4c8;
}
.seat .dot{width:8px;height:8px;border-radius:50%;background:#7fbf74}
.seat.off .dot{background:#c96a56}
.prep .btn.ghost{background:rgba(240,228,200,.12);border-color:rgba(240,228,200,.3);color:#f0e4c8}
.seat .hint{color:#bdb094}
.seat.bot{background:rgba(111,142,164,.16);border-color:rgba(150,190,215,.38)}
.seat.bot .dot{background:#8fb8d6}
.seat.empty{background:rgba(240,228,200,.04);border-style:dashed;border-color:rgba(240,228,200,.22)}
.btn.tiny{padding:3px 9px;font-size:13.5px;border-radius:6px;box-shadow:0 1px 0 rgba(74,55,34,.5)}
.seat-del{margin-left:6px;background:rgba(240,228,200,.14);border-color:rgba(240,228,200,.3);color:#f0e4c8}
.prep-foot{margin-top:26px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}

/* ============ 游戏主界面 ============ */
#play{flex:1;min-height:0;display:flex;flex-direction:column}
.topbar{
  position:relative;z-index:38;
  display:flex;align-items:center;gap:18px;padding:8px 18px;
  background:linear-gradient(180deg,#3a2c1d,#2a2016);
  border-bottom:2px solid #6b4f30;color:#f0e4c8;flex-wrap:wrap;
}
.topbar .tb-item{display:flex;align-items:center;gap:8px;font-size:15px}
.topbar b{font-family:Consolas,monospace;letter-spacing:.14em;color:var(--gold)}
.phases{display:flex;align-items:center;gap:6px;margin-left:0}
.phases .ph{
  padding:4px 10px;border-radius:14px;font-size:14px;border:1px solid rgba(240,228,200,.25);color:rgba(240,228,200,.55)
}
.phases .ph.on{background:var(--gold);color:#2a1e0c;border-color:var(--gold);font-weight:700;box-shadow:0 0 12px rgba(201,162,74,.5)}
.weather-mini{
  display:flex;align-items:center;gap:9px;background:rgba(255,255,255,.08);border:1px solid rgba(240,228,200,.2);
  border-radius:9px;padding:2px 10px 2px 3px;
}
.wt-thumb{
  flex:0 0 auto;width:30px;height:62px;border-radius:6px;overflow:hidden;
  background:rgba(0,0,0,.35);box-shadow:0 2px 8px rgba(0,0,0,.45);border:1px solid rgba(240,228,200,.22);
}
.wt-thumb img{display:block;width:100%;height:100%;object-fit:cover;object-position:top center}
.wt-thumb em{display:flex;width:100%;height:100%;align-items:center;justify-content:center;font-size:24px;font-style:normal}
.wt-info{display:flex;flex-direction:column;gap:2px;line-height:1.1}
.wt-name{font-size:14.5px;font-weight:600;color:#f4e8cc;letter-spacing:.06em}
.wt-nums{display:flex;gap:12px}
.wt-n{display:flex;flex-direction:column;line-height:1.2}
.wt-n i{font-style:normal;font-size:12px;color:rgba(240,228,200,.6)}
.wt-n b{font-family:Consolas,monospace;font-size:18px;color:var(--gold);line-height:1}

/* 行动倒计时 */
.tb-timer{
  display:flex;align-items:center;gap:6px;padding:3px 10px 3px 9px;border-radius:10px;
  border:1px solid rgba(240,228,200,.25);background:rgba(255,255,255,.07);
  font-size:14px;color:#f0e4c8
}
.tb-timer .tnum{font-family:Consolas,monospace;font-size:21px;font-weight:700;line-height:1;color:var(--gold);min-width:24px;text-align:right}
.tb-timer .tunit{font-size:13px;color:rgba(240,228,200,.6);margin-left:-3px}
.tb-timer .tbar{display:block;width:74px;height:5px;border-radius:3px;background:rgba(0,0,0,.45);overflow:hidden}
.tb-timer .tbar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#c9a24a,#f0d68d);transition:width .2s linear}
.tb-timer .twho{font-size:13.5px;color:rgba(240,228,200,.75);max-width:120px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.tb-timer.mine{border-color:var(--gold);background:rgba(201,162,74,.2);box-shadow:0 0 14px rgba(201,162,74,.45)}
.tb-timer.low{border-color:#c4543f;background:rgba(196,84,63,.24);box-shadow:0 0 16px rgba(196,84,63,.5)}
.tb-timer.low .tnum,.tb-timer.low .twho{color:#ff9f86}
.tb-timer.low .tbar i{background:linear-gradient(90deg,#c4543f,#ff9f86)}

/* 提示条：单行横滑，只占一条高度，不挤占牌桌 */
.tipsbar{
  position:relative;display:flex;align-items:center;gap:9px;padding:5px 18px 6px;
  background:linear-gradient(180deg,#2b2116,#241b12);border-bottom:1px solid rgba(201,162,74,.28);
}
.tipsbar:after{
  content:'';position:absolute;right:0;top:0;bottom:0;width:30px;pointer-events:none;
  background:linear-gradient(90deg,rgba(36,27,18,0),#241b12);
}
.tips-tag{
  flex:none;padding:2px 9px;border-radius:9px;font-size:13.5px;font-weight:700;
  color:#2a1e0c;background:linear-gradient(180deg,#e6cd8f,#c9a24a);letter-spacing:.06em
}
.tips-list{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;flex:1;min-width:0;scrollbar-width:thin}
.tips-list::-webkit-scrollbar{height:4px;background:transparent}
.tips-list::-webkit-scrollbar-track{background:transparent}
.tips-list::-webkit-scrollbar-thumb{background:rgba(201,162,74,.5);border-radius:3px}
.tip-i{
  flex:none;font-size:14px;line-height:1.5;color:#ded0b4;white-space:nowrap;
  background:rgba(255,255,255,.05);border:1px solid rgba(240,228,200,.16);border-radius:7px;padding:2px 9px
}
.tip-i.warnc{color:#ffd9b0;border-color:rgba(201,162,74,.55);background:rgba(201,162,74,.14)}
.tip-i.ready{color:#ffe9c0;border-color:rgba(201,162,74,.8);background:rgba(201,162,74,.26);font-weight:600}


.table{
  flex:1;min-height:0;display:grid;grid-template-columns:250px minmax(0,1fr) 300px;grid-template-rows:minmax(0,1fr);gap:14px;padding:12px;
  overflow:hidden;
}
.col{min-height:0;display:flex;flex-direction:column;gap:10px;overflow:hidden}
.players-col{overflow:auto;padding-right:2px}
.center-col{overflow:auto}
.log-col{background:rgba(233,220,186,.9);border:1.5px solid var(--edge);border-radius:10px;padding:10px;box-shadow:var(--shadow)}
.log-col h3{font-size:16px;color:var(--edge);margin-bottom:6px;display:flex;justify-content:space-between}
.log-list{flex:1;overflow:auto;font-size:14px;line-height:1.6;display:flex;flex-direction:column;gap:3px;padding-right:4px}
.log-item{padding:3px 6px;border-radius:5px;background:rgba(74,55,34,.06);color:#43331f}
.log-item.good{background:rgba(93,122,74,.16);color:#33501f}
.log-item.bad{background:rgba(156,58,44,.14);color:#7a2a1c}
.log-item.phase{background:rgba(201,162,74,.22);font-weight:700;color:#4a3722}
.log-item.treasure{background:rgba(201,162,74,.3);font-weight:600}

/* ============ 玩家面板 ============ */
.player-panel{
  background:linear-gradient(180deg,var(--paper-3),var(--paper));
  border:2px solid var(--edge);border-radius:10px;padding:9px 10px;box-shadow:0 5px 12px rgba(0,0,0,.3);
  position:relative;transition:box-shadow .2s, border-color .2s;
}
.player-panel.active{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,162,74,.3),0 8px 18px rgba(0,0,0,.35)}
.player-panel.dead{filter:grayscale(.7);opacity:.65}
.player-panel .pp-head{display:flex;align-items:center;gap:8px}
.player-panel .pp-name{font-family:"STKaiti","KaiTi",serif;font-size:19px}
.player-panel .pp-char{font-size:13px;color:var(--ink-soft);background:rgba(74,55,34,.1);border-radius:9px;padding:1px 7px}
.player-panel .pp-me{font-size:13px;color:#7d5f20;background:rgba(201,162,74,.25);border-radius:9px;padding:1px 7px}
.pp-stats{display:flex;gap:5px;margin-top:7px;font-size:13.5px;color:#43331f;flex-wrap:wrap}
.pp-stats .s{display:flex;align-items:center;gap:4px;background:rgba(74,55,34,.09);border-radius:5px;padding:2px 6px;white-space:nowrap}
.pp-stats .s b{font-family:Consolas,monospace;font-size:15px}
.pp-flag{font-size:13px;color:#8a755a;margin-top:4px}
.player-panel.bot{border-color:#6f8ea4}
.pp-flag.botflag{color:#41647c}
.tinycards{display:flex;flex-wrap:wrap;gap:3px;margin-top:6px}
.tcard{
  font-size:12.5px;background:rgba(74,55,34,.12);border-radius:4px;padding:1px 5px;display:flex;gap:3px;align-items:center;
  border:1px solid rgba(74,55,34,.14);
}
.tcard .v{font-family:Consolas,monospace;font-weight:700}
.bld-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.bld{font-size:16px;background:rgba(111,142,164,.16);border-radius:5px;padding:2px 5px;border:1px solid rgba(74,55,34,.16)}
.stat-row{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.stat{font-size:12.5px;background:rgba(156,58,44,.16);color:#7a2a1c;border-radius:4px;padding:1px 5px}
.stat.debuff{background:rgba(156,58,44,.18);color:#8a2b1c;border:1px solid rgba(156,58,44,.32)}
.stat.buff{background:rgba(52,124,70,.16);color:#215c31;border:1px solid rgba(52,124,70,.34)}
.pm-st.buff{background:rgba(52,124,70,.18);color:#215c31;border:1px solid rgba(52,124,70,.34)}
.pm-st.debuff{background:rgba(156,58,44,.18);color:#8a2b1c;border:1px solid rgba(156,58,44,.32)}

/* ============ 天气 ============ */
.big-weather{
  display:flex;align-items:center;gap:18px;padding:12px 18px;border-radius:12px;flex:none;
  background:linear-gradient(135deg,rgba(243,233,205,.96),rgba(220,201,158,.96));
  border:2px solid var(--edge);box-shadow:var(--shadow);position:relative;overflow:hidden;
}
.big-weather:after{content:"";position:absolute;right:-30px;top:-30px;width:150px;height:150px;border-radius:50%;
  background:radial-gradient(circle,rgba(201,162,74,.35),transparent 70%)}
.big-weather .bw-icon{font-size:54px;filter:drop-shadow(0 6px 8px rgba(0,0,0,.2))}
.big-weather .bw-art{height:104px;width:auto;border-radius:6px;border:2px solid rgba(74,55,34,.55);box-shadow:0 4px 10px rgba(0,0,0,.28);flex:none}
.big-weather .bw-name{font-family:"STKaiti","KaiTi",serif;font-size:27px}
.big-weather .bw-desc{font-size:14.5px;color:var(--ink-soft);margin-top:2px}
.bw-nums{display:flex;gap:18px;margin-left:auto;text-align:center}
.bw-num{min-width:86px;background:rgba(74,55,34,.08);border-radius:10px;padding:8px 10px}
.bw-num .k{font-size:14px;color:var(--ink-soft);letter-spacing:.08em}
.bw-num .v{font-family:Consolas,monospace;font-size:35px;font-weight:700;line-height:1}
.bw-num .v.food{color:#8a5a20}
.section-title{display:flex;align-items:center;gap:10px;font-size:16px;color:#f0e4c8;margin:2px 0}
.section-title:after{content:"";flex:1;height:1px;background:linear-gradient(90deg,rgba(240,228,200,.4),transparent)}

/* ============ 市场 ============ */
.market{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;flex:none}
.idea-card{
  background:linear-gradient(180deg,var(--paper-3),var(--paper-2));
  border:2px solid var(--edge);border-radius:11px;padding:10px;position:relative;
  box-shadow:0 6px 14px rgba(0,0,0,.3);display:flex;flex-direction:column;gap:6px;
}
.idea-card .ic-top{display:flex;align-items:flex-start;gap:10px}
.idea-card .ic-side{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
.idea-card .ic-art{width:52px;height:110px;object-fit:cover;border-radius:6px;border:2px solid rgba(74,55,34,.5);box-shadow:0 3px 8px rgba(0,0,0,.25);flex:none}
.idea-card .ic-icon{font-size:30px}
.idea-card .ic-name{font-family:"STKaiti","KaiTi",serif;font-size:21px}
.idea-card .ic-text{font-size:14px;color:#4a3722;line-height:1.45}
.idea-card .ic-cost{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}
.chip{
  font-size:13.5px;background:rgba(74,55,34,.12);border-radius:5px;padding:2px 6px;display:inline-flex;align-items:center;gap:3px;
  font-family:Consolas,monospace
}
.chip.no{background:rgba(156,58,44,.18);color:#7a2a1c}
.idea-card .ic-build{margin-top:4px;align-self:flex-start}
.idea-card.disabled{opacity:.55}

/* ============ 搜寻区 ============ */
.search-box{
  background:rgba(20,16,12,.45);border:1.5px solid rgba(201,162,74,.4);border-radius:12px;padding:12px;
  box-shadow:inset 0 0 30px rgba(0,0,0,.35);flex:1;min-height:118px;display:flex;flex-direction:column;
}
.search-head{display:flex;align-items:center;gap:12px;color:#f0e4c8;font-size:15px}
.budget{flex:1;height:14px;border-radius:8px;background:rgba(0,0,0,.35);border:1px solid rgba(240,228,200,.25);overflow:hidden;position:relative}
.budget-fill{height:100%;background:linear-gradient(90deg,#c9a24a,#e0c274);transition:width .3s}
.budget-fill.over{background:linear-gradient(90deg,#a84b36,#d1836f)}
.budget-num{font-family:Consolas,monospace;color:#f0e4c8;min-width:64px;text-align:right}
.idle-wrap{margin:auto;max-width:820px;text-align:center;padding:6px}
.idle-title{font-family:"STKaiti","KaiTi",serif;font-size:19px;color:#f0e4c8}
.idle-tip{color:rgba(240,228,200,.72);font-size:14.5px;line-height:1.7;margin-top:6px}
.idle-piles{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:9px}
.idle-pill{background:rgba(240,228,200,.08);border:1px solid rgba(240,228,200,.2);border-radius:6px;padding:4px 10px;font-size:14px;color:#e8d9b2}
.idle-pill b{font-family:Consolas,monospace;color:#f5e7bf}
.pile{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px;min-height:206px;align-items:flex-start}
.pile .card{width:100px;height:206px}
.pile .card.imgcard{width:100px;height:206px;padding:0}
.pile .card{transform-origin:center;animation:pop .25s ease}
@keyframes pop{from{transform:translateY(10px) scale(.9);opacity:0}to{transform:none;opacity:1}}
.empty-hint{color:rgba(240,228,200,.55);font-size:15px;padding:36px 4px}

/* ============ 卡牌 ============ */
.card{
  width:90px;height:191px;border-radius:8px;position:relative;flex:none;
  background:
    radial-gradient(120px 80px at 50% 18%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(180deg,#f2e7ca,#dcc79b);
  border:2px solid #4a3722;
  box-shadow:0 7px 14px rgba(0,0,0,.35), inset 0 0 0 3px rgba(74,55,34,.12);
  overflow:hidden;display:flex;flex-direction:column;align-items:center;
  padding:6px 6px 4px;
}
.card:before{
  content:"";position:absolute;inset:0;background:repeating-linear-gradient(115deg,rgba(120,90,50,.07) 0 3px,transparent 3px 7px);pointer-events:none;
}
.card .badge{
  position:absolute;top:4px;left:50%;transform:translateX(-50%);
  min-width:24px;height:24px;border-radius:50%;border:1.6px solid #4a3722;
  background:radial-gradient(circle,#f7edd3,#d9c69c);display:flex;align-items:center;justify-content:center;
  font-family:Consolas,monospace;font-weight:700;font-size:16px;
}
.card .art{font-size:38px;margin-top:20px;filter:drop-shadow(0 3px 3px rgba(0,0,0,.25));line-height:1}
.card .ribbon{
  margin-top:auto;width:100%;text-align:center;font-family:"STKaiti","KaiTi",serif;font-size:16px;
  background:linear-gradient(180deg, rgba(201,162,74,.35), rgba(201,162,74,.15));
  border-top:1px solid rgba(74,55,34,.35);border-bottom:1px solid rgba(74,55,34,.35);padding:1px 0;
}
.card .ctext{font-size:11.5px;text-align:center;color:#5b4a36;line-height:1.3;margin-top:3px;height:22px;overflow:hidden}
.card.animal{border-color:#6d2f22}
.card.animal .ribbon{background:linear-gradient(180deg,rgba(156,58,44,.3),rgba(156,58,44,.12))}
.card.food .ribbon{background:linear-gradient(180deg,rgba(93,122,74,.32),rgba(93,122,74,.12))}
.card.treasure{border-color:#8a6a1f;box-shadow:0 0 0 2px rgba(201,162,74,.45), 0 8px 16px rgba(0,0,0,.4)}
.card.treasure .ribbon{background:linear-gradient(180deg,rgba(201,162,74,.5),rgba(201,162,74,.2))}
.card.status{border-color:#4b3a63}
.card.status .ribbon{background:linear-gradient(180deg,rgba(75,58,99,.28),rgba(75,58,99,.1))}
.card.idea{border-color:#3d5a6b}
.card.idea .ribbon{background:linear-gradient(180deg,rgba(111,142,164,.32),rgba(111,142,164,.12))}
.card.mini{width:64px;height:92px;padding:4px}
.card.mini .art{font-size:26px;margin-top:14px}
.card.mini .badge{min-width:18px;height:18px;font-size:13px;top:2px}
.card.mini .ribbon{font-size:13px}
.card.mini .ctext{display:none}
/* 实物卡面：照片自带宽高比 0.47，卡片框按同一比例，不裁掉顶部的点数 */
.card.imgcard{padding:0;background:#e7dcc0;display:block}
.card.imgcard img{width:100%;height:100%;object-fit:cover;display:block;border-radius:6px}
.card.imgcard::before{display:none}
.card.imgcard.noimg{background:linear-gradient(180deg,#f2e7ca,#dcc79b);display:flex;flex-direction:column;align-items:center;padding:6px 6px 4px}
.card.imgcard .fb{display:none}
.card.imgcard.noimg .fb{display:contents}

/* ============ 底部 ============ */
.dock{
  background:linear-gradient(180deg,rgba(58,44,29,.96),rgba(35,26,17,.98));
  border-top:2px solid #6b4f30;padding:8px 16px 8px;display:flex;flex-direction:column;gap:6px;
  box-shadow:0 -10px 24px rgba(0,0,0,.4);
}
.dock-top{display:flex;align-items:center;gap:16px;color:#f0e4c8;font-size:15px;flex-wrap:wrap}
.dock-stat{display:flex;align-items:center;gap:6px}
.dock-stat .big{font-family:Consolas,monospace;font-size:22px;font-weight:700;color:#f5e7bf}
.hand-row{display:flex;gap:9px;overflow-x:auto;padding:2px 2px 4px;min-height:206px;align-items:flex-start}
.hand-row:has(.empty-hint){min-height:56px}
.hand-row .empty-hint{padding:12px 4px}
.hand-row .card{width:100px;height:206px;padding:7px 6px 0;cursor:default;transition:transform .15s,box-shadow .15s}
.hand-row .card.imgcard{width:100px;height:206px;padding:0}
.hand-row .card.imgcard img{border-radius:7px}
.hand-row .card:hover{transform:translateY(-4px);box-shadow:0 12px 20px rgba(0,0,0,.45), inset 0 0 0 3px rgba(74,55,34,.12)}
.hand-row .card .art{font-size:38px;margin-top:20px}
.hand-row .card .badge{width:24px;height:24px;min-width:24px;font-size:15px;top:5px}
.hand-row .card .ribbon{font-size:17px;font-weight:600;flex:none;line-height:1.5;padding:4px 0;color:#3a2a18}
.mybuild{display:flex;flex-wrap:wrap;gap:6px}
.mybuild:empty{display:none}
.mybuild .bchip{
  display:flex;align-items:center;gap:5px;background:rgba(75,125,58,.24);border:1px solid rgba(150,210,130,.3);
  color:#f0e4c8;border-radius:6px;padding:3px 8px;font-size:14px
}
.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.actions .turn-hint{color:#e8d9b2;font-size:15px;display:flex;align-items:center;gap:8px}
.turn-hint .spinner{width:12px;height:12px;border-radius:50%;border:2px solid rgba(240,228,200,.35);border-top-color:var(--gold);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.actions .spacer{flex:1}
/* 公共/私有点子、公共建筑、治愈药剂（第 27 版） */
.scope{display:inline-block;font-size:10.5px;line-height:1.35;border-radius:3px;padding:0 4px;margin-left:4px;vertical-align:1px;font-weight:600;letter-spacing:.5px}
.scope.pub{background:#2f6f9e;color:#f4fbff;box-shadow:0 1px 0 rgba(0,0,0,.25)}
.scope.pri{background:#4b7d3a;color:#f4fff0;box-shadow:0 1px 0 rgba(0,0,0,.2)}
.scope.teamown{background:#8a5a1f;color:#fff6df;box-shadow:0 1px 0 rgba(0,0,0,.2)}
/* 队内共享：手牌区第一格提示；队友的牌右下角写名字 */
.team-hand-label{
  flex:0 0 auto;align-self:center;width:54px;padding:6px 4px;border-radius:7px;
  border:1px dashed rgba(201,162,74,.55);background:rgba(201,162,74,.12);
  color:#e7d3a4;font-size:12px;line-height:1.35;text-align:center;
}
.card .owner-chip{
  position:absolute;left:4px;bottom:4px;z-index:2;max-width:calc(100% - 8px);
  padding:1px 4px;border-radius:4px;background:rgba(73,47,20,.78);color:#ffe9bd;
  font-family:system-ui,sans-serif;font-size:10px;line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.built-tag{display:inline-block;font-size:10.5px;border-radius:3px;padding:0 4px;margin-left:4px;background:rgba(70,60,45,.22);color:#4a3b28}
.idea-card.built{opacity:.62}
.mybuild .bchip.shared{background:rgba(47,111,158,.38);border-color:rgba(140,200,240,.55);color:#eaf6ff}
.bld.bld-shared{box-shadow:0 0 0 1px rgba(80,160,215,.55)}
.btn.potion{background:linear-gradient(180deg,#5aa06a,#3d7a4c);color:#f2fff5;border-color:#2f6038;box-shadow:0 2px 0 #24512c}
.btn.potion:hover{filter:brightness(1.08)}

/* ============ 弹窗 ============ */
.modal{position:fixed;inset:0;background:rgba(10,7,4,.72);display:flex;align-items:center;justify-content:center;z-index:40;padding:20px}
.modal-box{
  width:min(760px,94vw);max-height:86vh;overflow:auto;
  background:linear-gradient(180deg,var(--paper-3),var(--paper));
  border:2px solid var(--edge);border-radius:14px;box-shadow:var(--shadow);padding:22px 24px;
}
.modal-box h2{font-family:"STKaiti","KaiTi",serif;font-size:26px;margin-bottom:6px}
.modal-box p{font-size:15px;line-height:1.7;color:var(--ink-soft)}
.modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}
.pick-grid{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.pick{
  border:1.5px solid rgba(74,55,34,.3);border-radius:7px;padding:6px 8px;font-size:14px;cursor:pointer;
  background:rgba(255,255,255,.35);display:flex;align-items:center;gap:5px;user-select:none;
}
.pick.on{background:rgba(201,162,74,.45);border-color:var(--gold);box-shadow:0 0 0 2px rgba(201,162,74,.25)}
.pick .pv{font-family:Consolas,monospace;color:#7a6a53}
/* 弃牌弹窗：手牌缩略图（直接摆卡面，认得出是哪张物资）；同类物资归成一组，鼠标移上去能放大 */
.modal-box.wide{width:min(1080px,96vw);max-height:92vh}
.dc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(232px,1fr));gap:14px 16px;margin-top:8px;align-items:start}
.dc-group{margin-top:2px}
.dc-ghead{
  display:flex;align-items:center;gap:7px;
  font-size:16px;font-weight:600;color:#5b4423;
  padding:0 2px 5px;margin-bottom:9px;
  border-bottom:1px dashed rgba(74,55,34,.28);
}
.dc-ghead b{font-family:Consolas,monospace;font-size:15px;color:#8a6f3f}
.dc-row{display:flex;flex-wrap:wrap;gap:10px}
.dc-card{
  width:104px;position:relative;cursor:pointer;padding:5px;border-radius:9px;user-select:none;
  border:2px solid rgba(74,55,34,.28);background:#f6ecd2;
  transition:transform .12s ease-out,border-color .12s ease-out,box-shadow .12s ease-out,opacity .12s;
}
.dc-card:hover{transform:translateY(-2px)}
.dc-art{width:100%;aspect-ratio:480/1020;overflow:hidden;border-radius:6px;background:#e9dcbe;display:flex;align-items:center;justify-content:center}
.dc-art img{width:100%;height:100%;object-fit:cover;display:block}
.dc-art .dc-icon{font-size:40px}
.dc-name{font-size:16px;font-weight:600;text-align:center;margin-top:7px;color:#4d3a1e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dc-val{font-size:14px;text-align:center;color:#7a6644;font-family:Consolas,monospace;margin-top:2px}
.dc-sum{font-size:17px;font-weight:600;text-align:left;margin-top:14px}
.dc-card.on{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,162,74,.28);transform:translateY(-3px)}
.dc-card.on .dc-art img{filter:brightness(.92) saturate(.92)}
.dc-mark{
  position:absolute;top:-10px;right:-10px;width:32px;height:32px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#b7352a;color:#fff5e6;border:1px solid rgba(255,255,255,.55);
  font-family:"STKaiti","KaiTi",serif;font-size:20px;box-shadow:0 2px 6px rgba(0,0,0,.3);
}
.trade-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:12px}
.trade-col{border:1px solid rgba(74,55,34,.25);border-radius:9px;padding:10px;background:rgba(255,255,255,.3)}
.trade-col h4{font-size:15px;margin-bottom:8px;color:var(--edge)}
.foodstep{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:14px}
.foodstep button{width:26px;height:26px;border-radius:6px;border:1px solid var(--edge);background:#e8d9b2;cursor:pointer}
.trade-sum{margin-top:10px;font-size:14.5px}
.trade-sum.bad{color:var(--danger)}
.result-list{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.result-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:rgba(255,255,255,.35);font-size:15px}
.result-row.win{background:rgba(93,122,74,.22)}
.result-row.lose{background:rgba(156,58,44,.14);color:#6d2a1d}
.rules h4{margin:14px 0 4px;font-size:16px;color:var(--edge)}
.rules ul{margin:4px 0 0 18px;padding:0;font-size:14.5px;line-height:1.75;color:#43331f}
.rules li{margin-bottom:2px}

/* ============ 提示 ============ */
.toast{
  position:fixed;left:50%;top:76px;transform:translateX(-50%);z-index:50;
  background:rgba(35,26,17,.95);color:#f3e6c3;border:1px solid rgba(201,162,74,.55);border-radius:10px;
  padding:10px 16px;font-size:15px;box-shadow:var(--shadow);max-width:86vw;text-align:center;
}
.toast.err{border-color:rgba(216,132,116,.8);color:#ffd9cf}
/* 可合成提醒：挪到牌桌下方空白处，只待 2.6 秒，不压提示条、不压牌桌 */
.toast.ready{top:auto;bottom:104px;border-color:rgba(201,162,74,.9);color:#ffe9c0;font-weight:600;font-size:16px}
.hunt-pop{
  position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:45;
  background:linear-gradient(180deg,#f4e9cc,#dcc79b);border:2px solid var(--edge);border-radius:16px;
  padding:20px 26px;box-shadow:0 24px 50px rgba(0,0,0,.55);text-align:center;min-width:260px;
  animation:pop .25s ease;
}
.hunt-pop .dial{font-size:48px;margin-bottom:6px}
.hunt-pop .hres{font-size:17px;margin-top:6px}
.hunt-pop .hres.ok{color:#33501f;font-weight:700}
.hunt-pop .hres.no{color:#7a2a1c;font-weight:700}

/* ============ 响应式 ============ */
@media (max-width:1100px){
  .table{grid-template-columns:210px minmax(0,1fr);}
  .log-col{display:none}
}
@media (max-width:820px){
  .lobby-grid{grid-template-columns:1fr}
  .table{grid-template-columns:1fr;overflow:auto;padding:10px}
  .players-col{flex-direction:row;overflow-x:auto;padding-bottom:4px}
  .player-panel{min-width:200px}
  .market{grid-template-columns:repeat(2,minmax(0,1fr))}
  .brand h1{font-size:32px}
  .dock{padding:8px 10px 12px}
  .hand-row{min-height:144px}
  .hand-row .card{width:96px;height:140px;padding:6px 5px 0}
  .hand-row .card .art{font-size:32px;margin-top:16px}
  .big-weather{flex-wrap:wrap;gap:12px;padding:14px 16px}
  .big-weather .bw-icon{font-size:42px}
  .big-weather .bw-name{font-size:23px}
  .bw-nums{margin-left:0;width:100%;gap:10px}
  .bw-num{flex:1;min-width:0;padding:6px 8px}
  .bw-num .v{font-size:32px}
}
@media (max-width:600px){
  .topbar{gap:6px;padding:8px 10px;font-size:14px}
  .topbar .phases{margin-left:0;flex-wrap:wrap;gap:4px;flex-basis:100%}
  .phases .ph{padding:3px 6px;font-size:13px}
  .topbar .tb-item{font-size:13.5px;gap:4px}
  .topbar .btn.small{padding:5px 8px;font-size:13.5px}
  .weather-mini{display:none}
  .topbar .tb-item[style]{margin-left:0 !important}
  .market{grid-template-columns:1fr}
  .actions{flex-direction:column;align-items:stretch}
  .actions .btn{width:100%;justify-content:center}
  .modal-box{padding:16px}
  .rules ul{font-size:14px}
}


/* 搜寻阶段：市场照旧摆着（当参考，按钮本来就是灰的），不再留一片空场 */
body.p-search #marketWrap{opacity:.72}
body.p-search .search-box{min-height:250px}




/* ============ 按钮：能点的高亮，不能点的置灰 ============ */
.btn:not(:disabled){
  box-shadow:0 2px 0 rgba(74,55,34,.55), 0 6px 14px rgba(0,0,0,.2), inset 0 0 0 1px rgba(201,162,74,.4);
}
.btn:not(:disabled):hover{
  filter:brightness(1.07);
  box-shadow:0 2px 0 rgba(74,55,34,.55), 0 9px 20px rgba(0,0,0,.26), 0 0 16px rgba(201,162,74,.55);
}
.btn.primary:not(:disabled){ box-shadow:0 2px 0 #6b4f20, 0 8px 18px rgba(0,0,0,.3), 0 0 20px rgba(201,162,74,.6); }
.btn:disabled{
  background:linear-gradient(180deg,#c8c0ae,#b0a895); color:#8d8577; border-color:#a49b88;
  cursor:not-allowed; box-shadow:none; filter:none; opacity:.9;
}
.btn:disabled:hover{ filter:none; }
.btn.ghost:not(:disabled){ background:linear-gradient(180deg,#fffef8,#f6ecd4); border-color:#7a5a30; color:#33230f; font-weight:600 }
.pick.off{ opacity:.45; cursor:not-allowed; filter:grayscale(.5) }
.pick:not(.off){ cursor:pointer }
.topbar .tb-ctl .btn.ghost{ background:rgba(240,228,200,.1); border-color:rgba(240,228,200,.28); color:#f0e4c8 }
.topbar .tb-ctl .btn.on{ background:rgba(201,162,74,.35); border-color:var(--gold); color:#2a1e0c; font-weight:700 }
.topbar .tb-ctl .btn:disabled{ background:rgba(240,228,200,.05); color:rgba(240,228,200,.42); border-color:rgba(240,228,200,.18) }
.tb-ctl{display:flex;gap:6px}

/* 倒计时：暂停 / 不限时两种非常态 */
.tb-timer.paused{border-color:rgba(201,162,74,.8);background:rgba(201,162,74,.22)}
.tb-timer.paused .tnum{font-size:18px;color:var(--gold)}
.tb-timer.paused .twho{color:#f0d68d}
.tb-timer.off .tnum{font-size:19px;color:#b9d8a8}
.tb-timer.off .tbar i{background:linear-gradient(90deg,#5d7a4a,#8fb86f)}
.tb-timer.off .twho{color:#c9e0b8}

/* 暂停遮罩 */
#pausedMask{
  position:fixed;inset:0;z-index:35;display:flex;align-items:center;justify-content:center;
  background:rgba(14,10,6,.42);backdrop-filter:blur(1.5px);
}
.pm-box{
  text-align:center;padding:22px 34px;border-radius:14px;
  background:linear-gradient(180deg,rgba(43,33,22,.97),rgba(28,20,13,.97));
  border:2px solid var(--gold);box-shadow:0 20px 50px rgba(0,0,0,.55);
}
.pm-icon{font-size:36px;color:var(--gold);line-height:1}
.pm-title{font-family:"STKaiti","KaiTi",serif;font-size:26px;color:#f5e7bf;margin-top:6px}
.pm-sub{font-size:14.5px;color:#c9bda3;margin-top:6px}
body.is-paused .table{filter:saturate(.8) brightness(.92)}

/* 卡牌放大 */
#zoomCard{
  position:fixed;z-index:60;pointer-events:none;border-radius:10px;overflow:hidden;
  border:2px solid #6b4f30;background:#e7dcc0;
  box-shadow:0 22px 50px rgba(0,0,0,.6), 0 0 0 4px rgba(201,162,74,.25);
}
#zoomCard img{width:100%;height:100%;object-fit:cover;display:block}

/* 材料提示气泡 */
#tipPop{
  position:fixed;z-index:70;pointer-events:none;max-width:320px;
  background:rgba(30,22,14,.97);border:1px solid rgba(201,162,74,.65);border-radius:9px;
  padding:9px 12px;font-size:14.5px;line-height:1.6;box-shadow:0 14px 30px rgba(0,0,0,.45);
}
#tipPop .tk{color:#f5e7bf}
#tipPop .tk b{color:#f0d68d}
#tipPop .tlack{color:#ff9f86;margin-top:3px}
#tipPop .tok{color:#a8d08d;margin-top:3px}

/* 手上的点子 */
.hand-idea-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin-top:12px}
.hand-idea{
  display:flex;gap:10px;padding:10px;border-radius:10px;background:rgba(255,255,255,.38);
  border:1.5px solid rgba(74,55,34,.3);cursor:default;
}
.hand-idea:hover{border-color:var(--gold);background:rgba(255,255,255,.55)}
.hand-idea.short{border-color:rgba(156,58,44,.35)}
.hand-idea .hi-art img{width:52px;height:110px;object-fit:cover;border-radius:6px;border:1.5px solid rgba(74,55,34,.45);display:block}
.hand-idea .hi-icon{font-size:32px}
.hand-idea .hi-main{display:flex;flex-direction:column;gap:4px;min-width:0}
.hi-name{font-family:"STKaiti","KaiTi",serif;font-size:18px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.hi-ok{font-family:system-ui,sans-serif;font-size:13px;color:#2b2117;background:linear-gradient(180deg,#f7e3a8,#e6c470);border:1px solid #8a6a2a;border-radius:6px;padding:1px 7px;font-weight:700}
.hi-text{font-size:13.5px;color:var(--ink-soft);line-height:1.45}
.hi-cost{display:flex;flex-wrap:wrap;gap:4px}
.hi-cost .mat{font-size:13.5px;background:rgba(74,55,34,.12);border-radius:5px;padding:1px 6px;font-family:Consolas,monospace}
.hi-cost .mat.ok{background:rgba(93,122,74,.2)}
.hand-idea .btn{align-self:flex-start}

/* 设置弹窗 */
.cfg-row{display:flex;align-items:center;gap:8px;margin-top:14px;font-size:15px;flex-wrap:wrap}
.cfg-row input{width:90px;padding:7px 9px;border-radius:7px;border:1.5px solid rgba(74,55,34,.45);background:var(--paper-3);font-family:Consolas,monospace;font-size:16px;color:var(--ink);outline:none}
.cfg-row input:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,162,74,.2)}
.cfg-row input:disabled{background:#ded6c4;color:#8d8577}
.timer-opt{font-family:Consolas,monospace}

/* 暂停/不限时时不再显示 "s" 单位 */
.tb-timer.paused .tunit,.tb-timer.off .tunit{display:none}
/* 让暂停时的"继续游戏"按钮浮在蒙层之上，不被挡住 */
.dock{position:relative;z-index:39}
/* 市场卡的"建造"按钮贴卡片右下角，不改变卡片高度（保证 1440×900 一屏） */
.idea-card .ic-build{position:absolute;right:8px;bottom:8px;padding:3px 9px;font-size:13.5px;margin:0;line-height:1.5}
.idea-card .ic-cost{padding-right:58px}
.idea-card{position:relative}

/* 暂停时：蒙层只负责视觉，不拦点击；真正的不可点交给 pointer-events */
#pausedMask{pointer-events:none}
body.is-paused .table{pointer-events:none}
body.is-paused .hand-row{pointer-events:none;opacity:.5}

/* ============ 卡牌模板编辑器 ============ */
.cards-wrap{flex:1;min-height:0;display:flex;flex-direction:column;padding:14px 20px 18px;gap:10px}
.cw-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.cw-head h2{font-family:"STKaiti","KaiTi",serif;font-size:26px;color:#f2e6c9}
.cw-head .hint{color:#bdb094;max-width:760px}
.cw-head-btns{display:flex;gap:8px;flex:0 0 auto}
.cw-body{flex:1;min-height:0;display:grid;grid-template-columns:150px minmax(300px,1fr) minmax(360px,420px);gap:12px}
.cw-tabs{display:flex;flex-direction:column;gap:6px;overflow:auto;padding-right:2px}
.cw-tab{
  display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:pointer;
  background:rgba(240,228,200,.1);border:1px solid rgba(240,228,200,.2);border-radius:8px;
  padding:9px 11px;color:#e8dcc0;font-size:15px;text-align:left;
}
.cw-tab em{font-style:normal;font-family:Consolas,monospace;font-size:13.5px;color:#b7a683}
.cw-tab.on{background:rgba(201,162,74,.28);border-color:var(--gold);color:#fff3d6;font-weight:700}
.cw-tab.on em{color:#f6e2ae}
.cw-mid{min-height:0;display:flex;flex-direction:column;gap:8px}
.cw-tools{display:flex;align-items:center;justify-content:space-between;gap:10px}
.cw-tools .hint{color:#bdb094;font-size:14px;line-height:1.5}
.cw-list{
  flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:6px;
  background:rgba(12,8,4,.25);border:1px solid rgba(240,228,200,.18);border-radius:10px;padding:8px;
}
.cw-item{
  display:flex;align-items:center;gap:10px;cursor:pointer;position:relative;
  background:linear-gradient(180deg,var(--paper-3),var(--paper-2));
  border:1.5px solid rgba(74,55,34,.35);border-radius:8px;padding:5px 8px 5px 5px;
}
.cw-item.on{border-color:var(--gold);box-shadow:0 0 0 2px rgba(201,162,74,.35)}
.cw-item .t{
  position:relative;flex:0 0 auto;width:28px;height:60px;border-radius:4px;overflow:hidden;background:#cbb88f;
}
.cw-item .t .ph{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:19px}
.cw-item .t img{position:relative;z-index:1;width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.cw-item .i{display:flex;flex-direction:column;gap:1px;min-width:0}
.cw-item .i b{font-size:15px;color:#2b2117;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-item .i em{font-style:normal;font-size:13px;color:#5b4a36;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-item .cw-del{
  position:absolute;right:4px;top:4px;border:0;background:transparent;color:#8a5a44;
  font-size:14px;cursor:pointer;line-height:1;padding:4px;border-radius:4px;
}
.cw-item .cw-del:hover{background:rgba(156,58,44,.15);color:var(--danger)}
.cw-form{
  min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;
  background:linear-gradient(180deg,var(--paper-3),var(--paper));border:2px solid var(--edge);
  border-radius:12px;padding:12px 14px;box-shadow:var(--shadow);
}
.cw-form .form-head{font-size:17px;font-weight:700;color:#2b2117;display:flex;gap:8px;align-items:baseline}
.cw-form .form-head .hint{font-size:13.5px;color:#7a6a53;font-weight:400}
.fld{display:flex;flex-direction:column;gap:4px}
.fld label{font-size:14px;color:#5b4a36}
.fld input{
  width:100%;padding:6px 9px;font-size:15px;color:#2b2117;border:1.5px solid rgba(74,55,34,.35);
  border-radius:7px;background:rgba(255,255,255,.55);font-family:inherit;
}
.fld input:focus{outline:2px solid rgba(201,162,74,.5);border-color:var(--gold)}
.fld input:disabled{background:rgba(74,55,34,.08);color:#6a5946}
.fld select{
  width:100%;padding:6px 9px;font-size:15px;color:#2b2117;border:1.5px solid rgba(74,55,34,.35);
  border-radius:7px;background:rgba(255,255,255,.55);font-family:inherit;
}
.fld select:focus{outline:2px solid rgba(201,162,74,.5);border-color:var(--gold)}
.fldrow{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.fld.narrow{min-width:0}
.imgbox{display:flex;gap:10px;align-items:flex-start;margin-top:2px}
.fimg{width:70px;height:149px;object-fit:cover;border-radius:8px;border:1.5px solid rgba(74,55,34,.35);background:#cbb88f}
.fimg.none{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  font-size:24px;color:#5b4a36;border-style:dashed;
}
.fimg.none em{font-style:normal;font-size:12px;color:#7a6a53}
.imgbtns{display:flex;flex-direction:column;gap:6px}
.cw-form .hint.warn{color:#8a5a2a;background:rgba(201,162,74,.12);border-left:3px solid var(--gold);padding:6px 9px;border-radius:0 6px 6px 0;font-size:13.5px}
.form-btns{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;padding-top:6px}
.btn.ghost.danger{color:var(--danger);border-color:rgba(156,58,44,.5)}

/* 上传裁剪弹窗 */
.crop-box{width:min(600px,94vw);max-height:94vh;display:flex;flex-direction:column;gap:10px}
.crop-box h3{font-family:"STKaiti","KaiTi",serif;font-size:24px;color:#2b2117}
.crop-tabs{display:flex;gap:8px}
.crop-stage{
  align-self:center;height:min(58vh,560px);aspect-ratio:480/1020;
  background:#221a12;border:2px solid var(--edge);border-radius:10px;overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);
}
.crop-stage canvas{width:100%;height:100%;display:block;cursor:default;touch-action:none}
.crop-stage canvas.grabbing{cursor:grabbing}
.crop-row{display:flex;align-items:center;gap:10px}
.crop-row label{font-size:14px;color:#5b4a36}
.crop-row input[type=range]{flex:1;accent-color:var(--gold)}
.crop-row input[type=range]:disabled{opacity:.4}
.crop-val{font-family:Consolas,monospace;font-size:14px;color:#5b4a36;min-width:42px;text-align:right}
.crop-foot{display:flex;align-items:center;gap:10px}
.crop-foot .hint{flex:1;font-size:14px;color:#7a6a53}

/* 自定义背景弹窗 */
.bg-box{width:min(760px,94vw);position:relative;display:flex;flex-direction:column;gap:10px}
.bg-box h3{font-family:"STKaiti","KaiTi",serif;font-size:24px;color:#2b2117}
.bg-preview{
  width:100%;aspect-ratio:16/9;border-radius:10px;overflow:hidden;position:relative;
  border:2px solid var(--edge);background:#1b1510;display:flex;align-items:center;justify-content:center;
}
.bg-preview img{width:100%;height:100%;object-fit:cover;display:none}
.bg-none{display:flex;flex-direction:column;align-items:center;gap:6px;color:#e8d9bb}
.bg-none b{font-size:18px;letter-spacing:.08em}
.bg-none em{font-style:normal;font-size:13px;color:#a9987e}
.bg-status{min-height:20px}
.bg-btns{display:flex;gap:10px;flex-wrap:wrap}
.bg-x{
  position:absolute;top:10px;right:12px;width:30px;height:30px;border-radius:50%;
  border:1.5px solid rgba(74,55,34,.35);background:rgba(255,255,255,.6);
  color:#5b4a36;font-size:15px;line-height:1;cursor:pointer;z-index:3;
}
.bg-x:hover{background:#fff}

/* ============ 捕猎转盘 ============ */
.wheel-modal{
  position:fixed;inset:0;z-index:70;
  display:flex;align-items:center;justify-content:center;
  padding:14px;
  background:radial-gradient(900px 600px at 50% 45%, rgba(24,18,12,.62), rgba(10,7,4,.88));
  backdrop-filter:blur(2px);
  animation:wheelFade .22s ease-out both;
}
@keyframes wheelFade{from{opacity:0}to{opacity:1}}
.wheel-box{
  width:min(760px,94vw);max-height:96vh;overflow:hidden;
  background:linear-gradient(180deg,var(--paper-3),var(--paper));
  border:2px solid var(--edge);border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.6), inset 0 0 0 6px rgba(74,55,34,.1);
  padding:16px 22px 14px;display:flex;flex-direction:column;gap:6px;
  position:relative;
}
.wheel-box:after{content:"";position:absolute;inset:9px;border:1px dashed rgba(74,55,34,.3);border-radius:9px;pointer-events:none}
/* 看别人转盘时的收起按钮：转盘是整屏蒙层，必须留个不受困的出口 */
.wheel-x{
  position:absolute;top:10px;right:12px;z-index:3;
  width:30px;height:30px;border-radius:50%;
  border:1.5px solid rgba(74,55,34,.35);background:rgba(255,255,255,.6);
  color:#5b4a36;font-size:15px;line-height:1;cursor:pointer;
}
.wheel-x:hover{background:rgba(201,162,74,.35);border-color:var(--gold)}
.wb-head{display:flex;gap:16px;align-items:center;padding:2px 4px 0}
.wb-img{
  width:76px;height:160px;flex:0 0 auto;object-fit:cover;
  border-radius:8px;border:2px solid #6a4a2c;background:#efe3cc;
  box-shadow:0 6px 14px rgba(0,0,0,.3);transform:rotate(-2deg);
}
.wb-img.ph{display:flex;align-items:center;justify-content:center;font-size:40px}
.wb-info{display:flex;flex-direction:column;gap:3px;min-width:0}
.wb-kicker{font-size:13px;letter-spacing:.28em;color:#8a6f45;text-transform:uppercase}
.wb-name{font-family:"STKaiti","KaiTi",serif;font-size:29px;line-height:1.1;color:#2b2117}
.wb-need{font-size:16px;color:#5b4a36}
.wb-need b{color:var(--danger);font-family:Consolas,monospace;font-size:18px}
.wb-sub{font-size:14.5px;color:#6b5840}
.wb-sub b{color:var(--gold);font-family:Consolas,monospace}
.wb-turner{
  align-self:flex-start;margin-top:4px;font-size:14.5px;color:#4a3722;
  background:rgba(201,162,74,.22);border:1px solid rgba(74,55,34,.3);
  padding:2px 9px;border-radius:999px;
}
.wb-turner b{color:var(--danger)}
.wb-extra{
  margin-left:auto;display:flex;flex-direction:column;gap:5px;
  padding:8px 12px;border:1px dashed rgba(74,55,34,.35);border-radius:8px;
  background:rgba(255,255,255,.28);
}
.wb-extra div{display:flex;align-items:baseline;gap:8px;justify-content:space-between;min-width:180px}
.wb-extra span{font-size:13.5px;color:#8a6f45;letter-spacing:.06em}
.wb-extra b{font-size:14.5px;color:#4a3722;font-weight:600}
.wheel-stage{
  position:relative;align-self:center;
  width:min(412px,64vh);aspect-ratio:1;margin-top:4px;
}
.wheel-disc{width:100%;height:100%;transform-origin:50% 50%;will-change:transform}
.wheel-svg{width:100%;height:100%;display:block;filter:drop-shadow(0 8px 16px rgba(0,0,0,.4))}
.seg{transition:stroke .25s}
.seg.hit{stroke:#9c3a2c;stroke-width:4}
/* 指针固定在正上方，只让盘面转 */
.wheel-arm{position:absolute;inset:0;pointer-events:none;z-index:2}
.wheel-arm b{
  position:absolute;left:50%;top:-2px;transform:translateX(-50%) rotate(180deg);
  width:0;height:0;border-left:11px solid transparent;border-right:11px solid transparent;
  border-bottom:22px solid #9c3a2c;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.5));
}
.wheel-arm i{display:none}
.wheel-hub{
  position:absolute;left:50%;top:50%;width:26%;aspect-ratio:1;transform:translate(-50%,-50%);
  border-radius:50%;border:3px solid #4a3722;z-index:3;
  background:radial-gradient(circle at 38% 32%, #fbf3dd, #e3d2ab 62%, #c9b184);
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;
  box-shadow:0 3px 9px rgba(0,0,0,.45);
}
.wheel-hub .wc-lab{font-family:"STKaiti","KaiTi",serif;font-size:17px;color:#6b5840;letter-spacing:.08em}
.wheel-hub .wc-num{font-family:Consolas,monospace;font-size:17px;color:#7a6242;line-height:1}
.wheel-hub .wc-num.big{font-size:36px;font-weight:700;animation:resIn .3s ease-out both}
.wheel-hub .wc-num.big.good{color:#5d7a4a}
.wheel-hub .wc-num.big.bad{color:#9c3a2c}
.wb-foot{display:flex;flex-direction:column;align-items:center;gap:5px;padding:2px 0 4px;min-height:76px;justify-content:center}
.wheel-btn{font-size:19px;padding:11px 40px;letter-spacing:.14em;box-shadow:0 5px 14px rgba(201,162,74,.45)}
.wb-tip{font-size:14px;color:#7a6a53}
.spinning-tip{font-size:15px;color:#8a6f45;letter-spacing:.1em}
.wb-wait{font-family:"STKaiti","KaiTi",serif;font-size:20px;color:#5b4a36}
.wb-roll{
  display:flex;align-items:baseline;gap:8px;
  font-size:16px;color:#5b4a36;
}
.wb-roll b{font-family:Consolas,monospace;font-size:32px;color:#2b2117;line-height:1}
.wb-roll span{font-family:Consolas,monospace;font-size:18px;color:var(--gold)}
.wb-roll em{font-style:normal;font-size:13.5px;color:#8a6f45}
.wb-res{font-size:18px;font-weight:600;letter-spacing:.05em;animation:resIn .3s ease-out both}
.wb-res.ok{color:var(--leaf)}
.wb-res.no{color:var(--danger)}
@keyframes resIn{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:none}}

/* ============================================================
   第 7 版：搜寻区与顶栏互换位置
   - 搜寻区提到最上面，整条通栏，翻牌时不用往中间滚
   - 顶栏（房间/周天/天气/回合/倒计时/按钮/阶段条）落到原搜寻区的位置，
     紧贴在底部操作区上方
   ============================================================ */
.search-band{
  flex:none;padding:10px 14px 0;
  background:linear-gradient(180deg,#2a2016,#20180f);
  border-bottom:1px solid rgba(201,162,74,.25);
}
.search-band .section-title{margin:0 0 6px}
#play .search-box{flex:none}
body.p-search .search-band{padding-bottom:2px}
/* 没有人在搜寻时，这一条只留一行信息，把高度让给牌桌和日志 */
.search-box .idle-wrap{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;
  text-align:left;max-width:none;margin:0;padding:2px 4px;
}
.search-box .idle-title{flex:0 0 auto}
.search-box .idle-wrap .idle-tip{flex:1 1 420px;margin:0;line-height:1.45}
.search-box .idle-wrap .idle-piles{margin:0;justify-content:flex-start;flex:1 1 auto}
body:not(.p-search) .search-box{min-height:0}

.topbar{
  border-top:2px solid #6b4f30;border-bottom:none;
  background:linear-gradient(0deg,#3a2c1d,#2a2016);
}

/* ============================================================
   第 7 版：音效 / 音乐面板
   ============================================================ */
.audio-modal{
  position:fixed;inset:0;z-index:60;background:rgba(10,7,4,.74);
  display:flex;align-items:center;justify-content:center;padding:18px;
  animation:wheelFade .2s ease-out both;
}
.audio-box{
  width:min(660px,95vw);max-height:92vh;overflow:auto;
  background:linear-gradient(180deg,var(--paper-3),var(--paper));
  border:2px solid var(--edge);border-radius:14px;box-shadow:var(--shadow);padding:18px 20px 14px;
}
.ab-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ab-head h3{font-family:"STKaiti","KaiTi",serif;font-size:25px;color:#2b2117}
.ab-note{font-size:13.5px;line-height:1.7;color:#7a6a53;margin:6px 0 0}
.ab-sec{
  margin-top:12px;padding:10px 12px 6px;border:1px dashed rgba(74,55,34,.35);border-radius:10px;
  background:rgba(255,255,255,.32);
}
.ab-row{display:flex;align-items:center;gap:10px;margin-bottom:8px;flex-wrap:wrap}
.ab-lab{flex:0 0 78px;font-size:15px;color:#5b4a36;font-weight:600}
.ab-val{font-size:14px;color:#7a6a53;min-width:18px}
.ab-mini{font-size:11.5px;color:#8a755a}
.sw{
  width:46px;height:24px;border-radius:12px;border:1.5px solid rgba(74,55,34,.45);
  background:rgba(74,55,34,.18);position:relative;cursor:pointer;padding:0;flex:none;transition:.18s;
}
.sw i{
  position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;
  background:linear-gradient(180deg,#fffaf0,#e0d3b4);box-shadow:0 1px 3px rgba(0,0,0,.35);transition:.18s;
}
.sw.on{background:linear-gradient(180deg,#e2c374,#c9a24a);border-color:#7d5f20}
.sw.on i{left:26px}
.ab-vol{width:118px;accent-color:var(--gold)}
.audio-box select{
  flex:1;min-width:200px;padding:7px 9px;border-radius:7px;border:1.5px solid rgba(74,55,34,.4);
  background:var(--paper-3);font-family:inherit;font-size:14.5px;color:var(--ink);
}
.audio-box select:focus{outline:2px solid rgba(201,162,74,.4);border-color:var(--gold)}
.ab-tip{font-size:13px;color:#8a755a;flex:1;min-width:160px}
.ab-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px}
.ab-status{font-size:14px;color:#5d7a4a}
.ab-status.bad{color:var(--danger)}

/* ============================================================
   第 8 版：顶栏分成三段 + 搜寻区右角放规则/退出 + 市场材料用中文*数量
   - 左：房间信息（房间码 / 周天 / 天气 / 行动人 / 倒计时）
   - 中：阶段条（搜寻 交易 建造 消耗 夜晚）
   - 右：暂停 / 设置 / 声音
   - 规则、退出挪到搜寻区这一条的最右侧
   ============================================================ */
.topbar{justify-content:space-between;gap:14px;flex-wrap:nowrap}
.topbar .tb-left{display:flex;align-items:center;gap:14px;flex:1 1 auto;min-width:0;flex-wrap:wrap}
.topbar .tb-ctl{flex:none;margin-left:auto}
.topbar .phases{flex:none}

.band-head{display:flex;align-items:center;gap:12px}
.band-head .section-title{flex:1;margin:0}
.band-ctl{display:flex;gap:6px;flex:none}
.band-ctl .btn{
  background:rgba(240,228,200,.1);border-color:rgba(240,228,200,.28);color:#f0e4c8;
  font-size:13.5px;padding:3px 10px;border-radius:7px;
}
.band-ctl .btn:hover{background:rgba(240,228,200,.18);border-color:rgba(240,228,200,.42)}

/* 电子市场：建造材料改中文*数量，缺料标红 */
.idea-card .ic-cost .mat{
  font-size:13.5px;font-family:Consolas,monospace;color:#4a3722;
  background:rgba(74,55,34,.12);border-radius:5px;padding:1px 6px;
}
.idea-card .ic-cost .mat.ok{background:rgba(93,122,74,.2);color:#3a5229}
.idea-card .ic-cost .mat.short{background:rgba(156,58,44,.16);color:#7a2a1c}

@media (max-width:1000px){
  .topbar{flex-wrap:wrap}
}

/* ============================================================
   第 9 版：天气上移、阶段条真正居中、玩家面板带角色立绘
   - 对局从上到下：今日天气 → 提示 → 搜寻区 → 牌桌 → 顶栏 → 底部操作区
   - 顶栏改成 1fr / auto / 1fr 三段网格，阶段条落在整条的正中间
   ============================================================ */
/* 季节条：春 → 夏 → 秋 → 冬，当前季节高亮，7 格显示本季进度 */
.season-band{
  flex:none;display:flex;align-items:center;justify-content:center;gap:9px;padding:4px 14px;
  background:linear-gradient(180deg,#17110b,#241b11);border-bottom:1px solid rgba(201,162,74,.18);
}
.season-label{
  flex:none;font-size:12px;font-weight:700;letter-spacing:.12em;color:#2a1e0c;padding:2px 8px;border-radius:7px;
  background:linear-gradient(180deg,#e6cd8f,#c9a24a);
}
.season-track{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%}
.season-chip{
  display:flex;align-items:center;gap:6px;padding:3px 9px;border:1px solid rgba(201,162,74,.22);border-radius:8px;
  background:rgba(255,255,255,.035);color:#b9a98c;opacity:.6;white-space:nowrap;transition:background .2s,border-color .2s,opacity .2s;
}
.season-chip.past{opacity:.42}
.season-chip.on{opacity:1;color:#f4e5bf;border-color:rgba(230,205,143,.75);background:rgba(201,162,74,.16);box-shadow:0 0 0 1px rgba(230,205,143,.18) inset,0 2px 8px rgba(0,0,0,.25)}
.season-chip.spring.on{border-color:#8fbf6f;background:rgba(111,160,82,.22)}
.season-chip.summer.on{border-color:#e0b45c;background:rgba(224,180,92,.24)}
.season-chip.autumn.on{border-color:#d88a4a;background:rgba(216,138,74,.24)}
.season-chip.winter.on{border-color:#8fb6c9;background:rgba(143,182,201,.2)}
.season-chip .sc-ico{font-size:15px;line-height:1}
.season-chip .sc-name{font-size:13px;font-weight:700}
.season-chip .sc-day{font-size:11px;color:#d8c49a}
.season-chip .sc-pips{display:flex;gap:2px;margin-left:1px}
.season-chip .sc-pips i{display:block;width:4px;height:7px;border-radius:2px;background:rgba(255,255,255,.13)}
.season-chip .sc-pips i.fill{background:#e6cd8f;box-shadow:0 0 5px rgba(230,205,143,.45)}
.bw-ex{
  display:inline-block;margin-left:6px;padding:1px 5px;border-radius:5px;vertical-align:2px;
  font-size:10px;font-weight:700;color:#3b1111;background:#e7a15c;letter-spacing:.05em;
}

/* 今日天气：整条通栏放在最上面，内容（标签 + 卡面 + 名字 + 数值）成组居中 */
.weather-band{
  flex:none;display:flex;align-items:center;justify-content:center;padding:7px 14px;
  background:linear-gradient(180deg,#2a2016,#221a11);border-bottom:1px solid rgba(201,162,74,.28);
}
.weather-band .wb-center{
  display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;max-width:100%;
}
.weather-band .wb-tag{
  flex:none;font-size:15px;font-weight:700;color:#2a1e0c;padding:3px 10px;border-radius:9px;
  background:linear-gradient(180deg,#e6cd8f,#c9a24a);letter-spacing:.06em;
}
.weather-band .big-weather{
  flex:none;width:auto;max-width:100%;display:flex;align-items:center;gap:12px;padding:5px 14px;border-radius:10px;
  background:linear-gradient(135deg,rgba(243,233,205,.95),rgba(222,204,162,.95));
  border:1.5px solid rgba(74,55,34,.55);box-shadow:0 3px 10px rgba(0,0,0,.28);overflow:hidden;
}
.weather-band .big-weather:after{display:none}
.weather-band .big-weather .bw-icon{font-size:30px}
.weather-band .big-weather .bw-art{height:60px;width:auto;border-radius:5px;border:1.5px solid rgba(74,55,34,.55)}
.weather-band .big-weather .bw-name{font-size:21px;line-height:1.15}
.weather-band .big-weather .bw-desc{font-size:13.5px;margin-top:1px}
.weather-band .bw-nums{gap:9px;margin-left:4px;align-items:center}
.weather-band .bw-num{min-width:78px;padding:3px 9px;border-radius:9px}
.weather-band .bw-num .k{font-size:12.5px}
.weather-band .bw-num .v{font-size:23px}

/* 顶栏三段：左房间信息 / 中阶段条 / 右按钮，阶段条按整条顶栏居中 */
.topbar{
  display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;gap:12px;flex-wrap:nowrap;
}
.topbar .tb-left{display:flex;align-items:center;gap:12px;min-width:0;flex-wrap:nowrap}
.topbar .tb-left .tb-item{white-space:nowrap}
.topbar .phases{justify-self:center;margin:0}
.topbar .tb-ctl{justify-self:end;margin-left:0;flex-wrap:nowrap}

/* 玩家面板：整张角色立绘竖摆在面板上半部，名字、技能、数据、手牌在下方 */
.player-panel{padding:8px 9px 9px;display:flex;flex-direction:column;gap:7px}
.players-col{display:flex;flex-direction:column;gap:10px;scroll-snap-type:y proximity}
.player-panel{scroll-snap-align:start}
/* 非行动者的紧凑条：没立绘、只留名字/角色/三样关键数据，一列能多塞两个人 */
.pp-mini{
  display:flex;flex-direction:column;gap:3px;flex:none;
  padding:6px 10px 7px;border:1.5px solid var(--edge);border-radius:9px;
  background:linear-gradient(180deg,var(--paper-3),var(--paper));
  box-shadow:0 3px 8px rgba(0,0,0,.22);
}
/* 桌面端 6 人：紧凑条压成横排一行，5 个副玩家也能塞进左栏，不把整列撑爆 */
body:not(.ui-mobile) .pp-mini{flex-direction:row;align-items:center;gap:8px;padding:4px 9px}
body:not(.ui-mobile) .pp-mini .pm-top{flex:1 1 auto;gap:4px}
body:not(.ui-mobile) .pp-mini .pm-name{font-size:16px}
body:not(.ui-mobile) .pp-mini .pm-stats{flex:none;gap:8px;font-size:12.5px;flex-wrap:nowrap}
body:not(.ui-mobile) .pp-mini .pm-st{font-size:11px;white-space:nowrap}
body:not(.ui-mobile) .pp-mini .pp-char{font-size:10px;padding:0 4px;white-space:nowrap;flex:none}
body:not(.ui-mobile) #players:has(> .pp-mini:nth-child(6)) .player-panel .pp-portrait{height:150px}
/* 5–6 人局：副玩家搬到中间空白处的横排，左栏只留当前行动者 */
#othersStrip{display:none}
body:not(.ui-mobile) #othersStrip{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;align-content:flex-start}
body:not(.ui-mobile) #othersStrip .pp-mini{
  flex:1 1 150px;min-width:0;flex-direction:column;align-items:stretch;gap:3px;padding:5px 9px
}
body:not(.ui-mobile) #othersStrip .pp-mini .pm-top{flex:none}
body:not(.ui-mobile) #othersStrip .pp-mini .pm-name{font-size:14px}
body:not(.ui-mobile) #othersStrip .pp-mini .pm-stats{font-size:11.5px;gap:6px}
body.ui-mobile #othersStrip{display:none!important}
.pp-mini.dead{filter:grayscale(.65);opacity:.7}.pp-mini.bot{background:linear-gradient(180deg,rgba(226,236,244,.95),rgba(214,228,240,.9))}
.pp-mini.isme{border-color:var(--gold);box-shadow:0 0 0 2px rgba(201,162,74,.25),0 3px 8px rgba(0,0,0,.22)}
.pp-mini .pm-top{display:flex;align-items:center;gap:6px;min-width:0}
.pp-mini .pm-name{font-family:"STKaiti","KaiTi",serif;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pp-mini .pm-stats{display:flex;align-items:center;gap:10px;font-size:14px;color:#43331f;flex-wrap:wrap}
.pp-mini .pm-stats b{font-family:Consolas,monospace;color:#2b2117}
.pp-mini .pm-st{font-size:13px;background:rgba(74,55,34,.12);border-radius:5px;padding:0 5px}
body.p-search .pp-mini{padding:4px 9px 5px}
body.p-search .pp-mini .pm-name{font-size:16px}
body.p-search .pp-mini .pm-stats{font-size:13px;gap:7px}
.player-panel .pp-portrait{
  width:min(172px,74%);height:200px;margin:0 auto;position:relative;overflow:hidden;
  border-radius:9px;border:2px solid rgba(74,55,34,.55);background:#e7dcc3;
  box-shadow:0 4px 12px rgba(0,0,0,.34);
}
/* 半身像：只取卡面上半段（头肩胸），下缘渐隐虚化，不跟下面的字抢读 */
.player-panel .pp-art{
  display:block;width:100%;height:auto;cursor:zoom-in;
  -webkit-mask-image:linear-gradient(180deg,#000 52%,rgba(0,0,0,.82) 68%,rgba(0,0,0,.35) 84%,transparent 98%);
  mask-image:linear-gradient(180deg,#000 52%,rgba(0,0,0,.82) 68%,rgba(0,0,0,.35) 84%,transparent 98%);
}
.player-panel .pp-art.faux{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-size:46px;color:#6b5535;background:linear-gradient(180deg,#efe4c9,#dccba6);cursor:default;
}
.player-panel .pp-info{min-width:0;display:flex;flex-direction:column;gap:4px}
.player-panel .pp-name{font-size:17px}
.player-panel .pp-name-row{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.player-panel .pp-skill{
  font-size:12px;line-height:1.3;color:#7a5a2c;
  background:rgba(201,162,74,.16);border-radius:5px;padding:2px 6px;
}
.player-panel .pp-stats{margin-top:0;gap:8px;flex-wrap:wrap;font-size:12.5px}
.player-panel .pp-stats .s{background:none;padding:0;border-radius:0;gap:3px}
.player-panel .pp-stats .s b{font-size:14px}
.player-panel .tinycards{margin-top:2px}

/* 几条横带压薄一点，竖向空间留给牌桌 */
.weather-band{padding:5px 14px}
.weather-band .big-weather{padding:4px 12px}
.weather-band .big-weather .bw-art{height:52px}
.weather-band .big-weather .bw-name{font-size:20px}
.tipsbar{padding:4px 18px 5px}
.search-band{padding:8px 14px 0}
.search-band .band-head{margin:0}
.topbar{padding:6px 18px}

/* 搜寻阶段翻牌区占高度：面板转横向小卡（小立绘 + 名字 + 技能 + 三个数），立绘照样在，只是缩小 */
body.p-search .player-panel{flex-direction:row;align-items:center;gap:8px;padding:6px 8px}
body.p-search .player-panel .pp-portrait{width:58px;height:64px;margin:0;flex:none}
body.p-search .player-panel .pp-info{gap:2px;flex:1;min-width:0}
body.p-search .player-panel .pp-name{font-size:15px}
body.p-search .player-panel .pp-skill{font-size:11.5px;padding:1px 5px}
body.p-search .player-panel .tinycards,
body.p-search .player-panel .bld-row,
body.p-search .player-panel .stat-row{display:none}

@media (max-width:1180px){
  .topbar{grid-template-columns:minmax(0,1fr) auto auto;flex-wrap:wrap}
  .topbar .tb-left{flex-wrap:wrap}
  .weather-band .wb-center{flex-wrap:wrap;justify-content:center}
}



/* ============================================================
   第 19 版：移动端适配 + 大厅里的「网页端 / 移动端」切换
   - 手机不是把桌面版硬塞小，而是重排：单列、按钮大、底栏吸底
   - 切到移动端后点卡面即放大（触屏没有 hover）
   ============================================================ */

/* ---------- 切换按钮（大厅右上角） ---------- */
.ui-switch{position:absolute;right:18px;top:16px;display:flex;align-items:center;gap:6px;z-index:4}
.ui-switch .us-lab{font-size:13.5px;color:var(--ink-soft)}
.ui-switch .us-btn{
  border:1.5px solid rgba(74,55,34,.35);background:rgba(255,255,255,.4);color:#3b2c1a;
  border-radius:8px;padding:5px 10px;font-size:14px;cursor:pointer;white-space:nowrap;min-height:34px;
  font-family:inherit;
}
.ui-switch .us-btn.on{
  background:linear-gradient(180deg,#f7e3a8,#e6c470);border-color:#8a6a2a;font-weight:700;
  box-shadow:0 0 0 2px rgba(201,162,74,.3);
}
@media (max-width:700px){
  .ui-switch{position:static;justify-content:flex-end;margin:0 0 10px}
  .ui-switch .us-btn{flex:1 1 auto;justify-content:center}
}

/* ---------- 整屏骨架 ---------- */
body.ui-mobile #app{height:100dvh}
body.ui-mobile .screen{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
/* 输入框 16px，iOS 聚焦时不会自己放大整页 */
body.ui-mobile input,
body.ui-mobile select,
body.ui-mobile textarea{font-size:16px}

/* ---------- 大厅 ---------- */
body.ui-mobile .center-wrap{padding:10px;align-items:flex-start}
body.ui-mobile .lobby{width:100%;padding:16px 14px 16px}
body.ui-mobile .brand{gap:10px}
body.ui-mobile .brand h1{font-size:24px;letter-spacing:.04em}
body.ui-mobile .brand p{font-size:12px}
body.ui-mobile .brand .mark{font-size:34px}
body.ui-mobile .lobby-grid{grid-template-columns:1fr;gap:14px;margin-top:14px}
body.ui-mobile .panel{padding:12px 12px 14px}
body.ui-mobile .roomlist{max-height:40dvh;overflow:auto}
body.ui-mobile .panel .btn.primary{min-height:48px;font-size:17px}
body.ui-mobile .field{gap:8px}
body.ui-mobile .urlbox{word-break:break-all}

/* ---------- 准备室 ---------- */
body.ui-mobile .prep{padding:12px 12px 26px}
body.ui-mobile .prep-inner{width:100%}
body.ui-mobile .prep-head{gap:10px}
body.ui-mobile .prep-head h2{font-size:22px}
body.ui-mobile .prep-head .hint{font-size:13px}
body.ui-mobile .seat-list{gap:8px;margin-top:12px}
body.ui-mobile .seat{font-size:14px;padding:6px 10px}
body.ui-mobile .char-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
body.ui-mobile .char-card{padding:10px 9px 9px}
body.ui-mobile .prep-foot{gap:8px;margin-top:14px}
body.ui-mobile .prep-foot .btn{flex:1 1 46%;min-height:44px;font-size:15px}

/* ---------- 对局：一列往下排，底栏吸底 ---------- */
body.ui-mobile #play{display:flex;overflow-y:auto;overflow-x:hidden}
body.ui-mobile .season-band{padding:3px 6px;gap:5px}
body.ui-mobile .season-label{font-size:10px;padding:2px 5px;letter-spacing:.06em}
body.ui-mobile .season-track{flex:1;width:100%;gap:4px}
body.ui-mobile .season-chip{flex:1;justify-content:center;gap:2px;padding:2px 3px;min-width:0}
body.ui-mobile .season-chip .sc-ico{font-size:12px}
body.ui-mobile .season-chip .sc-name{font-size:11px}
body.ui-mobile .season-chip .sc-day,body.ui-mobile .season-chip .sc-pips{display:none}
body.ui-mobile .weather-band{padding:4px 8px;justify-content:center}
body.ui-mobile .weather-band .wb-center{gap:6px;flex-wrap:nowrap;overflow-x:auto}
body.ui-mobile .weather-band .wb-tag{font-size:12px;padding:2px 7px;flex:none}
body.ui-mobile .weather-band .big-weather{padding:5px 9px;gap:8px;flex:none}
body.ui-mobile .weather-band .big-weather .bw-art{height:44px}
body.ui-mobile .weather-band .big-weather .bw-icon{font-size:24px}
body.ui-mobile .weather-band .big-weather .bw-name{font-size:16px}
body.ui-mobile .weather-band .big-weather .bw-desc{display:none}
body.ui-mobile .weather-band .bw-nums{gap:7px}
body.ui-mobile .weather-band .bw-num{padding:3px 6px}
body.ui-mobile .weather-band .bw-num .v{font-size:19px}
body.ui-mobile .weather-band .bw-num .k{font-size:11px}

body.ui-mobile .tipsbar{padding:4px 8px;gap:6px}
body.ui-mobile .tipsbar .tips-tag{font-size:12px;padding:1px 6px}
body.ui-mobile .tip-i{font-size:12.5px;padding:2px 7px}

body.ui-mobile .search-band{padding:6px 10px 0}
body.ui-mobile .band-head{gap:8px}
body.ui-mobile .section-title{font-size:14px}
body.ui-mobile .band-ctl .btn{min-height:34px}
body.ui-mobile .search-box{padding:8px 9px}
body.ui-mobile .search-head{font-size:13px;gap:8px;flex-wrap:wrap}
body.ui-mobile .search-head .budget{order:3;flex:1 1 100%}
body.ui-mobile .budget-num{min-width:52px;font-size:13px}
body.ui-mobile .pile{min-height:0;gap:8px;margin-top:8px}
body.ui-mobile .pile .card{width:66px;height:140px;padding:5px 4px 0}
body.ui-mobile .pile .card .art{font-size:24px;margin-top:10px}
body.ui-mobile .pile .card .ctext{font-size:9.5px;height:16px}
body.ui-mobile .empty-hint{font-size:12.5px;padding:14px 2px}
body.ui-mobile .idle-title{font-size:15px}
body.ui-mobile .idle-tip{font-size:12.5px;margin-top:3px;flex-basis:100%}
body.ui-mobile .idle-pill{font-size:12px;padding:3px 8px}
body.ui-mobile.p-search .search-box{min-height:0}

/* 牌桌：单列 */
body.ui-mobile .table{display:flex;flex-direction:column;flex:none;gap:8px;padding:8px 10px}
body.ui-mobile .players-col{overflow:visible;gap:7px;scroll-snap-type:none}
body.ui-mobile .center-col{overflow:visible;gap:6px}
body.ui-mobile .log-col{padding:8px 10px;max-height:none}
body.ui-mobile .log-col h3{font-size:14px}
body.ui-mobile .log-list{max-height:168px;font-size:13px}
body.ui-mobile .player-panel{padding:7px 8px;gap:6px}
body.ui-mobile .player-panel .pp-portrait{width:104px;height:120px}
body.ui-mobile .player-panel .pp-name{font-size:17px}
body.ui-mobile .player-panel .pp-skill{font-size:12px}
body.ui-mobile .player-panel .pp-stats{font-size:13px;gap:8px}
body.ui-mobile .player-panel .tinycards .tcard{font-size:12px}
body.ui-mobile .pp-mini{padding:5px 9px 6px}
body.ui-mobile .pp-mini .pm-name{font-size:16px}
body.ui-mobile .pp-mini .pm-stats{font-size:13px;gap:8px}
body.ui-mobile.p-search .player-panel{flex-direction:row;padding:6px 8px}
body.ui-mobile.p-search .player-panel .pp-portrait{width:48px;height:54px}
body.ui-mobile .market{grid-template-columns:1fr;gap:8px}
body.ui-mobile .idea-card{padding:9px 9px 10px}
body.ui-mobile .idea-card .ic-build{position:static;margin-top:6px;min-height:40px;width:100%;font-size:15px}
body.ui-mobile .idea-card .ic-cost{padding-right:0}

/* 顶栏：允许换行，阶段条横滑 */
body.ui-mobile .topbar{padding:6px 10px;gap:8px;display:flex;flex-wrap:wrap}
body.ui-mobile .topbar .tb-left{flex:1 1 100%;gap:10px;flex-wrap:wrap}
body.ui-mobile .topbar .tb-item{font-size:13px;gap:5px}
body.ui-mobile .tb-timer{font-size:12px}
body.ui-mobile .tb-timer .tbar{width:52px}
body.ui-mobile .topbar .phases{flex:1 1 100%;order:3;overflow-x:auto;flex-wrap:nowrap;justify-content:flex-start}
body.ui-mobile .phases .ph{font-size:12.5px;padding:3px 8px;flex:none}
body.ui-mobile .topbar .tb-ctl{flex:1 1 100%;justify-content:flex-end;gap:6px}
body.ui-mobile .topbar .tb-ctl .btn{min-height:38px;font-size:14px}

/* 底栏：吸在屏幕底部，手牌横滑、按钮两列 */
body.ui-mobile .dock{position:sticky;bottom:0;z-index:39;padding:6px 10px 10px;gap:5px}
body.ui-mobile .dock-top{font-size:13px;gap:10px}
body.ui-mobile .dock-stat .big{font-size:18px}
body.ui-mobile .hand-row{min-height:0;gap:7px;padding:2px 0 4px}
body.ui-mobile .hand-row .card{width:74px;height:152px;padding:5px 4px 0}
body.ui-mobile .hand-row .card.imgcard{width:74px;height:152px}
body.ui-mobile .hand-row .card .art{font-size:26px;margin-top:12px}
body.ui-mobile .hand-row .card .ribbon{font-size:13px;padding:3px 0}
body.ui-mobile .hand-row .card .ctext{font-size:9.5px;height:16px}
body.ui-mobile .hand-row .card .badge{width:20px;height:20px;min-width:20px;font-size:13px;top:4px}
body.ui-mobile .hand-row .card:hover{transform:none}
body.ui-mobile .team-hand-label{width:44px;font-size:10.5px;padding:5px 3px}
body.ui-mobile .card .owner-chip{font-size:9px;padding:0 3px;left:3px;bottom:3px}
body.ui-mobile .mybuild .bchip{font-size:12.5px;padding:2px 7px}
body.ui-mobile .actions{gap:8px}
body.ui-mobile .actions .btn{flex:1 1 calc(50% - 4px);min-height:46px;font-size:15.5px;padding:9px 10px;white-space:normal;line-height:1.35}
body.ui-mobile .actions .btn.ready{flex-basis:100%}
body.ui-mobile .actions .turn-hint{flex-basis:100%;font-size:13px}

/* 弹窗：贴满宽度、内容可滚 */
body.ui-mobile .modal{padding:8px}
body.ui-mobile .modal-box{width:100%;max-height:88dvh;padding:14px 13px}
body.ui-mobile .bg-box{width:100%;max-height:90dvh}
body.ui-mobile .bg-preview{aspect-ratio:16/10}
body.ui-mobile .bg-btns .btn{flex:1 1 30%}
body.ui-mobile .modal-box h2{font-size:21px}
body.ui-mobile .modal-box p{font-size:13.5px}
body.ui-mobile .modal-actions{gap:8px;margin-top:14px}
body.ui-mobile .modal-actions .btn{flex:1 1 46%;min-height:46px;font-size:15px}
body.ui-mobile .dc-grid{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
body.ui-mobile .dc-name{font-size:14px}
body.ui-mobile .dc-val{font-size:13px}
body.ui-mobile .dc-sum{font-size:15px;margin-top:10px}
body.ui-mobile .hand-idea-grid{grid-template-columns:1fr}
body.ui-mobile .trade-grid{grid-template-columns:1fr}
body.ui-mobile .pick{font-size:14px;padding:8px 10px;min-height:40px}
body.ui-mobile .rules ul{font-size:13.5px}

/* 触屏：点卡面 → 屏幕正中放大 */
body.ui-mobile #zoomCard{
  left:50%!important;top:50%!important;transform:translate(-50%,-50%);
  width:min(84vw,35.6dvh)!important;height:auto!important;aspect-ratio:480/1020;
}

/* 转盘：竖屏也能整块看全 */
body.ui-mobile .wheel-modal{padding:8px}
body.ui-mobile .wheel-box{width:100%;max-height:94dvh;padding:10px 12px 10px;gap:6px}
body.ui-mobile .wb-head{gap:8px;flex-wrap:wrap;padding:0}
body.ui-mobile .wb-img{width:44px;height:92px}
body.ui-mobile .wb-name{font-size:19px}
body.ui-mobile .wb-need{font-size:13px}
body.ui-mobile .wb-sub,.wb-turner{font-size:12.5px}
body.ui-mobile .wb-extra{display:none}
body.ui-mobile .wheel-stage{width:min(84vw,46dvh);margin-top:2px}
body.ui-mobile .wheel-btn{min-height:48px;font-size:16px}
body.ui-mobile .wb-roll{font-size:16px}

/* 卡牌模板：单列 */
body.ui-mobile .cards-wrap{padding:10px 10px 16px;gap:8px}
body.ui-mobile .cw-head{flex-direction:column;gap:8px}
body.ui-mobile .cw-head h2{font-size:22px}
body.ui-mobile .cw-body{display:flex;flex-direction:column;gap:10px}
body.ui-mobile .cw-tabs{flex-direction:row;overflow-x:auto;gap:6px}
body.ui-mobile .cw-tab{flex:none;white-space:nowrap}
body.ui-mobile .cw-list{max-height:42dvh}
body.ui-mobile .cw-form{min-height:0}
body.ui-mobile .crop-stage{max-height:46dvh}

/* 第 19 版补充：手机上天气条压成一行、动作按钮两列排 */
body.ui-mobile .weather-band .big-weather{flex-wrap:nowrap;padding:4px 9px;gap:7px}
body.ui-mobile .weather-band .big-weather .bw-art{height:42px!important;width:auto!important}
body.ui-mobile .weather-band .big-weather .bw-nums{width:auto!important;margin-left:auto;flex:none;gap:8px}
body.ui-mobile .weather-band .big-weather .bw-num{flex:none;min-width:0;padding:3px 7px}
body.ui-mobile .actions{flex-direction:row;flex-wrap:wrap;align-items:stretch}

/* 第 19 版补充二：手机上面板改横排（小立绘在左），提示条允许换行 */
body.ui-mobile .player-panel{flex-direction:row;align-items:flex-start;gap:9px}
body.ui-mobile .player-panel .pp-portrait{width:84px;height:96px;margin:0;flex:none}
body.ui-mobile .player-panel .pp-info{flex:1;min-width:0}
body.ui-mobile.p-search .player-panel .pp-portrait{width:52px;height:58px}
body.ui-mobile .tipsbar{flex-wrap:wrap}
body.ui-mobile .tipsbar .tips-list{flex-wrap:wrap;overflow:visible}

/* 第 19 版补充三：在电脑上手动切成移动端也不会拉成一整屏宽 */
body.ui-mobile .lobby{max-width:560px;margin:0 auto}
body.ui-mobile .prep-inner{max-width:720px;margin:0 auto}
body.ui-mobile .center-wrap{justify-content:center}
body.ui-mobile .table{max-width:760px;margin:0 auto;width:100%}
body.ui-mobile .tipsbar{max-height:none;overflow:visible}

/* 第 20 版：移动端彻底不做卡牌放大（放大卡在手机上会糊住牌桌、挡点选） */
body.ui-mobile #zoomCard{display:block}

/* ============ 第 21 版：手机对局「一屏不滚」 ============
   目标：常见竖屏（390×667 起）一屏看全并直接操作，不用往下滑。
   手法：骨架改成固定高度的 flex 列；立绘/卡面/市场缩略图按比例缩小；
   只有「手牌」「市场」「提示」允许横向滑动，纵向一律不溢出一屏。 */
body.ui-mobile #play{
  height:100dvh;max-height:100dvh;overflow:hidden;
  display:flex;flex-direction:column;gap:3px;padding:4px 5px;
}
body.ui-mobile #play .screen{height:auto}

/* 天气：缩成一枚小徽章 + 两个数值 */
body.ui-mobile #play .weather-band{flex:none;padding:0}
body.ui-mobile #play .wb-center{gap:6px}
body.ui-mobile #play .wb-tag{font-size:11px;padding:2px 7px}
body.ui-mobile #play .big-weather{padding:2px 7px;gap:6px;border-radius:8px}
body.ui-mobile #play .big-weather .bw-art{height:28px!important;width:auto!important}
body.ui-mobile #play .big-weather .bw-icon{font-size:19px}
body.ui-mobile #play .big-weather .bw-name{font-size:13.5px}
body.ui-mobile #play .bw-num{padding:1px 5px;border-radius:6px}
body.ui-mobile #play .bw-num .v{font-size:15px}
body.ui-mobile #play .bw-num .k{font-size:9.5px;letter-spacing:0}

/* 提示：压成一行，左右滑看剩下几条 */
body.ui-mobile #play .tipsbar{flex:none;height:24px;padding:1px 5px;gap:4px;overflow:hidden;border-radius:8px}
body.ui-mobile #play .tipsbar .tips-tag{font-size:10.5px;padding:0 5px;height:17px;line-height:17px;flex:none}
body.ui-mobile #play .tips-list{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:5px;align-items:center}
body.ui-mobile #play .tip-i{flex:none;font-size:11px;padding:0 6px;height:18px;line-height:18px;white-space:nowrap}
body.ui-mobile #play .tip-i.ready{height:18px}

/* 搜寻区：不搜寻时严格一行；搜寻时三张牌也压小 */
body.ui-mobile #play .search-band{flex:none;padding:3px 8px 0;border-radius:9px}
body.ui-mobile #play .band-head{min-height:24px;gap:6px}
body.ui-mobile #play .section-title{font-size:12px}
body.ui-mobile #play .band-head .section-title::after{display:none}
body.ui-mobile #play .band-ctl .btn{min-height:24px;padding:1px 8px;font-size:11px;border-radius:7px}
body.ui-mobile #play .search-box{padding:4px 8px;gap:2px}
body.ui-mobile #play .search-head{font-size:11.5px;gap:6px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden}
body.ui-mobile #play .search-head .budget{order:0;flex:none}
body.ui-mobile #play .budget-num{min-width:40px;font-size:12px}
body.ui-mobile #play .idle-title{font-size:12.5px}
body.ui-mobile #play .idle-tip{display:none}
body.ui-mobile #play .idle-pill{font-size:10.5px;padding:1px 6px;height:18px;line-height:18px}
body.ui-mobile #play .idle-row{gap:5px;flex-wrap:nowrap;overflow-x:auto}
body.ui-mobile #play .pile{min-height:0;gap:6px;margin-top:4px;flex:none}
body.ui-mobile #play .pile .card{width:50px;height:106px;padding:3px 3px 0;border-radius:5px}
body.ui-mobile #play .pile .card .art{font-size:18px;margin-top:6px}
body.ui-mobile #play .pile .card .ctext{font-size:8.5px;height:12px}
body.ui-mobile #play .pile .card .ribbon{font-size:9.5px;padding:1px 0}
body.ui-mobile #play .pile .card .badge{width:15px;height:15px;min-width:15px;font-size:9.5px;top:2px;right:2px}
body.ui-mobile #play .empty-hint{font-size:11.5px;padding:4px 2px}
body.ui-mobile #play .search-progress{font-size:11px}

/* 牌桌：吃掉中间剩下的高度，内部纵向也不滚 */
body.ui-mobile #play .table{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:3px;padding:2px 2px 0;overflow:hidden}
body.ui-mobile #play #players{flex:none;display:flex;flex-wrap:wrap;gap:3px;overflow:hidden}
body.ui-mobile #play .player-panel{flex:1 0 100%;padding:3px 6px;gap:5px;border-radius:8px}
body.ui-mobile #play .player-panel .pp-portrait{width:44px;height:52px;border-radius:5px}
body.ui-mobile #play .player-panel .pp-name{font-size:13.5px}
body.ui-mobile #play .player-panel .pp-name .pp-nick{font-size:11px}
body.ui-mobile #play .player-panel .pp-skill{font-size:10.5px;line-height:1.25;margin-top:1px}
body.ui-mobile #play .player-panel .pp-stats{font-size:11px;gap:6px;margin-top:1px}
body.ui-mobile #play .pp-mini{flex:1 1 28%;min-width:0;padding:1px 6px;border-radius:8px;gap:1px}
body.ui-mobile #play .pp-mini .pm-top{gap:2px;flex-wrap:nowrap}
body.ui-mobile #play .pp-mini .pm-name{font-size:11.5px;flex:1 1 auto;min-width:0}
body.ui-mobile #play .pp-mini .pp-char{font-size:8.5px;padding:0 2px;white-space:nowrap;flex:none;max-width:30px;overflow:hidden;text-overflow:ellipsis}
body.ui-mobile #play .pp-mini .pm-stats{font-size:10.5px;gap:3px;flex-wrap:nowrap;white-space:nowrap}
body.ui-mobile #play .pp-mini .pm-st{font-size:10px}

/* 市场：横向卡片条，不再竖着排大卡 */
body.ui-mobile #play #marketWrap{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:2px}
body.ui-mobile #play #marketWrap .section-title{font-size:11px;margin:0 0 1px}
body.ui-mobile #play .market{display:flex;gap:5px;overflow-x:auto;overflow-y:hidden;flex:1 1 auto;padding-bottom:2px;align-items:stretch}
body.ui-mobile #play .idea-card{flex:0 0 auto;width:126px;padding:4px;gap:3px;border-radius:8px;display:flex;flex-direction:column}
body.ui-mobile #play .idea-card .ic-top{gap:5px;align-items:flex-start}
body.ui-mobile #play .idea-card .ic-art{width:32px;height:68px;object-fit:cover;border-radius:3px}
body.ui-mobile #play .idea-card .ic-icon{font-size:22px}
body.ui-mobile #play .idea-card .ic-name{font-size:11.5px;line-height:1.2}
body.ui-mobile #play .idea-card .ic-text{font-size:9.5px;line-height:1.25;margin-top:1px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.ui-mobile #play .idea-card .ic-cost{font-size:9.5px;gap:3px;margin-top:2px;padding:0}
body.ui-mobile #play .idea-card .ic-build{position:static;margin-top:auto;min-height:24px;width:100%;font-size:11px;padding:1px 4px}

/* 日志：只留最后一行滚动字幕 */
body.ui-mobile #play .log-col{flex:none;height:20px;padding:0 4px;background:transparent;border:0;border-radius:0}
body.ui-mobile #play .log-col h3{display:none}
body.ui-mobile #play .log-list{max-height:20px;font-size:10.5px;line-height:20px;overflow:hidden;color:#d8c9a6;text-align:left}

/* 顶栏：一行放完（房间 / 周天 / 计时 / 阶段 / 三个小键） */
body.ui-mobile #play .topbar{flex:none;height:30px;padding:0 6px;gap:6px;flex-wrap:nowrap;overflow:hidden;border-radius:8px}
body.ui-mobile #play .topbar .tb-left{flex:0 1 auto;gap:6px;flex-wrap:nowrap;overflow-x:auto;min-width:0}
body.ui-mobile #play .topbar .tb-item{font-size:10.5px;white-space:nowrap}
body.ui-mobile #play .tb-timer{font-size:10px;gap:3px}
body.ui-mobile #play .tb-timer .tnum{font-size:13px}
body.ui-mobile #play .tb-timer .tbar{width:30px;height:5px}
body.ui-mobile #play .topbar .phases{flex:1 1 auto;order:0;gap:2px;justify-content:center;overflow-x:auto;flex-wrap:nowrap;min-width:0}
body.ui-mobile #play .phases .ph{font-size:10px;padding:1px 5px;flex:none}
body.ui-mobile #play .topbar .tb-ctl{flex:none;gap:3px}
body.ui-mobile #play .topbar .tb-ctl .btn{min-height:22px;font-size:10.5px;padding:0 6px;border-radius:6px}

/* 底栏：手牌横滑，按钮压成两列矮键 */
body.ui-mobile #play .dock{flex:none;position:static;padding:2px 5px 5px;gap:3px;border-radius:0}
body.ui-mobile #play .dock-top{font-size:10.5px;gap:7px;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap}
body.ui-mobile.is-team #play .dock-top{flex-wrap:wrap;overflow-x:visible;white-space:normal;row-gap:1px;line-height:1.45}
body.ui-mobile.is-team #play .dock-stat.team{flex:1 1 100%;font-size:10px}
body.ui-mobile #play .dock-stat .big{font-size:12.5px}
body.ui-mobile #play .hand-row{min-height:0;gap:5px;padding:0}
body.ui-mobile #play .hand-row .card{width:58px;height:118px;padding:3px 3px 0;border-radius:6px}
body.ui-mobile #play .hand-row .card.imgcard{width:58px;height:118px}
body.ui-mobile #play .hand-row .card .art{font-size:18px;margin-top:8px}
body.ui-mobile #play .hand-row .card .ribbon{font-size:10px;padding:1px 0}
body.ui-mobile #play .hand-row .card .ctext{font-size:8.5px;height:12px}
body.ui-mobile #play .hand-row .card .badge{width:15px;height:15px;min-width:15px;font-size:9.5px;top:2px}
body.ui-mobile #play .hand-row .empty-hint{font-size:11px;padding:6px 2px}
body.ui-mobile #play .mybuild{max-height:19px;overflow:hidden}
body.ui-mobile #play .mybuild .bchip{font-size:10.5px;padding:1px 5px}
body.ui-mobile #play .actions{gap:5px}
body.ui-mobile #play .actions .btn{flex:1 1 calc(50% - 3px);min-height:34px;font-size:12.5px;padding:3px 8px;line-height:1.2;border-radius:8px}
body.ui-mobile #play .actions .btn.ready{flex-basis:100%}
body.ui-mobile #play .actions .turn-hint{flex-basis:100%;font-size:10.5px}

/* 矮屏（iPhone SE 667 这类）再收一档 */
@media (max-height:700px){
  body.ui-mobile #play .player-panel .pp-portrait{width:36px;height:44px}
  body.ui-mobile #play .hand-row .card{width:52px;height:106px}
  body.ui-mobile #play .pile .card{width:44px;height:94px}
  body.ui-mobile #play .idea-card{width:118px}
  body.ui-mobile #play .idea-card .ic-art{height:58px}
  body.ui-mobile #play .actions .btn{min-height:31px;font-size:12px}
}

/* 21 版修正：玩家列强制「主位整行 + 其余一条」、日志恢复一行、市场卡片吃满剩余高度 */
body.ui-mobile #play #players{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;gap:3px!important;overflow:visible!important}
body.ui-mobile #play #players > .player-panel{flex:0 0 100%!important;width:100%!important;min-width:0!important;max-width:none!important}
body.ui-mobile #play #players > .pp-mini{flex:1 1 0!important;width:auto!important;min-width:0!important;max-width:none!important}
body.ui-mobile #play .log-col{display:flex!important;flex-direction:column;height:20px;padding:0 4px}
body.ui-mobile #play .log-col .log-list{max-height:20px}
body.ui-mobile #play .idle-wrap{display:flex;flex-direction:row;align-items:center;gap:7px;flex-wrap:nowrap;overflow-x:auto}
body.ui-mobile #play .idle-title{flex:none;white-space:nowrap}
body.ui-mobile #play .idle-piles{display:flex;flex-wrap:nowrap;gap:4px;flex:none}
body.ui-mobile #play .market{align-items:stretch}
body.ui-mobile #play .idea-card{height:100%;min-height:96px;max-height:200px}
body.ui-mobile #play .idea-card .ic-top{flex:1 1 auto;align-items:stretch}
body.ui-mobile #play .idea-card .ic-art{width:36px;height:auto!important;flex:none;object-fit:cover;object-position:center top}
body.ui-mobile #play .idea-card .ic-side{display:flex;flex-direction:column;justify-content:flex-start;gap:2px;min-width:0}
body.ui-mobile #play .idea-card .ic-build{margin-top:auto}

/* 21 版修正二：让市场真的吃掉牌桌剩余高度（center-col 也要参与 flex） */
body.ui-mobile #play .table > .center-col{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body.ui-mobile #play .center-col > #marketWrap{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
body.ui-mobile #play .market{min-height:0}
body.ui-mobile #play .log-list{color:#efe3c6;opacity:1}

/* 21 版修正三：上方各区按内容定高，多余高度全部给「手牌」——手牌变大更好点，
   市场固定一条横向卡带，不再把卡面拉变形 */
body.ui-mobile #play .table{flex:0 0 auto;overflow:visible}
body.ui-mobile #play .table > .center-col{flex:0 0 auto;min-height:0;overflow:visible}
body.ui-mobile #play .center-col > #marketWrap{flex:0 0 auto;min-height:0}
body.ui-mobile #play .market{flex:0 0 auto;align-items:flex-start;min-height:0}
body.ui-mobile #play .idea-card{height:116px;max-height:none;min-height:0}
body.ui-mobile #play .idea-card .ic-top{flex:0 0 auto;align-items:flex-start}
body.ui-mobile #play .idea-card .ic-art{width:34px;height:78px!important;flex:none}
body.ui-mobile #play .idea-card .ic-build{margin-top:auto}
body.ui-mobile #play .dock{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;justify-content:flex-end}
body.ui-mobile #play .hand-row{flex:1 1 auto;min-height:96px;align-items:center;padding:0}
body.ui-mobile #play .hand-row .card{height:100%;width:auto;aspect-ratio:100/206;min-height:0;padding:4px 4px 0}
body.ui-mobile #play .hand-row .card.imgcard{height:100%;width:auto;aspect-ratio:100/206}
body.ui-mobile #play .hand-row .card .ribbon{font-size:11px}
body.ui-mobile #play .hand-row .card .ctext{font-size:9px;height:14px}
body.ui-mobile #play .hand-row .card .badge{width:18px;height:18px;min-width:18px;font-size:11px}

/* 21 版修正四：空白交给「牌桌绒布」，手牌高度按视口定、空手牌时不占位 */
body.ui-mobile #play .table{flex:1 1 auto;min-height:0}
body.ui-mobile #play .log-col{margin-top:auto}
body.ui-mobile #play .idea-card{height:140px}
body.ui-mobile #play .idea-card .ic-art{height:96px!important;width:40px}
body.ui-mobile #play .idea-card .ic-build{min-height:26px;font-size:11.5px}
body.ui-mobile #play .dock{flex:0 0 auto}
body.ui-mobile #play .hand-row{flex:0 0 auto;height:clamp(120px,22dvh,200px);align-items:center}
body.ui-mobile #play .hand-row:has(.empty-hint){height:52px}
body.ui-mobile #play .hand-row .card,body.ui-mobile #play .hand-row .card.imgcard{aspect-ratio:100/206}

/* 21 版修正五：市场卡带在绒布上居中，上下留白对称；卡片随屏幕高度微调 */
body.ui-mobile #play .center-col > #marketWrap{margin:auto 0}
body.ui-mobile #play .idea-card{height:clamp(126px,17dvh,168px)}
body.ui-mobile #play .idea-card .ic-art{height:calc(100% - 34px)!important;width:42px}
body.ui-mobile #play .player-panel .pp-portrait{height:clamp(52px,8.6dvh,92px);width:auto;aspect-ratio:172/200}
body.ui-mobile #play .hand-row{height:clamp(110px,20dvh,196px)}
body.ui-mobile #play .pile .card{width:auto;height:clamp(92px,12dvh,124px);aspect-ratio:66/140}

/* 21 版修正六：市场整块在绒布上垂直居中（上下留白对称），矮屏再收一档 */
body.ui-mobile #play .center-col > #marketWrap{margin:0}
body.ui-mobile #play .table > .center-col{margin:auto 0}
@media (max-height:760px){
  body.ui-mobile #play .idea-card{height:104px}
  body.ui-mobile #play .idea-card .ic-art{height:calc(100% - 30px)!important;width:34px}
  body.ui-mobile #play .idea-card .ic-build{min-height:22px;font-size:10.5px}
  body.ui-mobile #play .player-panel .pp-portrait{height:46px}
  body.ui-mobile #play .hand-row{height:104px}
  body.ui-mobile #play .hand-row:has(.empty-hint){height:40px}
  body.ui-mobile #play .log-col{height:18px}
  body.ui-mobile #play .log-list{max-height:18px;line-height:18px;font-size:10px}
  body.ui-mobile #play .actions .btn{min-height:30px;font-size:12px}
}

/* 21 版修正七：矮屏（≤760）把提示条和日志字幕让位给市场与手牌 */
@media (max-height:760px){
  body.ui-mobile #play .tipsbar{display:none}
  body.ui-mobile #play .log-col{display:none!important}
  body.ui-mobile #play .idea-card{height:100px}
  body.ui-mobile #play .idea-card .ic-art{height:calc(100% - 26px)!important;width:32px}
  body.ui-mobile #play .search-band{padding:2px 8px 0}
  body.ui-mobile #play .band-head{min-height:22px}
}

/* 21 版修正八：矮屏市场再收紧（去掉效果长句，只留名字/材料/按钮） */
@media (max-height:760px){
  body.ui-mobile #play .idea-card{height:86px}
  body.ui-mobile #play .idea-card .ic-text{display:none}
  body.ui-mobile #play .idea-card .ic-art{height:calc(100% - 24px)!important;width:30px}
  body.ui-mobile #play .idea-card .ic-build{min-height:20px;font-size:10px}
  body.ui-mobile #play #marketWrap .section-title{font-size:10px;margin:0}
}

/* 21 版修正九：搜寻翻出来的牌在手机上给足尺寸（看点数用），仍在一屏内 */
body.ui-mobile #play .pile .card{height:clamp(96px,13.5dvh,132px);aspect-ratio:66/140}
body.ui-mobile #play .pile .card .art{font-size:22px;margin-top:8px}
body.ui-mobile #play .pile .card .ribbon{font-size:10.5px}

/* 21 版修正十：≤700 的矮屏（iPhone SE 们）再让一轮内容，保证按钮一定在一屏里 */
@media (max-height:700px){
  body.ui-mobile #play #marketWrap .section-title{display:none}
  body.ui-mobile #play .player-panel .pp-skill{display:none}
  body.ui-mobile #play .player-panel .pp-flag.botflag{display:none}
  body.ui-mobile #play .player-panel .tinycards{display:none}
  body.ui-mobile #play .hand-row{height:92px}
  body.ui-mobile #play .hand-row:has(.empty-hint){height:34px}
  body.ui-mobile #play .dock-top{display:none}
  body.ui-mobile #play .actions .turn-hint{display:none}
  body.ui-mobile #play .actions .btn{min-height:28px;font-size:11.5px}
  body.ui-mobile #play .search-band{padding:1px 7px 0}
  body.ui-mobile #play .band-head{min-height:20px}
  body.ui-mobile #play .search-box{padding:2px 7px}
}

/* 21 版修正十一：≤700 不再靠绒布留白撑高度，桌面上半部按内容定高、剩下的都给底栏 */
@media (max-height:700px){
  body.ui-mobile #play .table{flex:0 0 auto}
  body.ui-mobile #play .table > .center-col{margin:0}
  body.ui-mobile #play .dock{flex:1 1 auto;justify-content:flex-end}
  body.ui-mobile #play .hand-row{flex:0 0 auto;height:84px}
}

/* 21 版修正十二：矮屏底栏再挤 20px，确保动作键露出来 */
@media (max-height:700px){
  body.ui-mobile #play .hand-row{height:70px}
  body.ui-mobile #play .mybuild{display:none}
  body.ui-mobile #play .actions{flex:0 0 auto}
  body.ui-mobile #play .actions .btn{min-height:26px;font-size:11px}
}

/* 21 版修正十三：手机准备室压成「六个角色一屏挑完」+ 开局按钮吸底。
   原先手机上一张角色卡就有 227×420，六个角色把准备室撑到 1670px，建完房要点到开局得滑三屏。 */
body.ui-mobile .prep{height:100dvh;padding:10px 10px 8px;overflow-y:auto;overscroll-behavior-y:contain}
body.ui-mobile .prep-head h2{font-size:20px;margin:0}
body.ui-mobile .prep-head .hint{display:none}
body.ui-mobile .seat-list{margin-top:8px;gap:6px}
body.ui-mobile .seat{font-size:12.5px;padding:4px 8px}
body.ui-mobile .char-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}
body.ui-mobile .char-card{padding:5px 5px 6px;border-radius:9px}
body.ui-mobile .char-card .c-art{height:clamp(76px,12dvh,112px);width:100%;border-radius:6px;object-position:50% 14%}
body.ui-mobile .char-card .cname{font-size:13.5px;margin-top:4px;line-height:1.2}
body.ui-mobile .char-card .cskill{font-size:10.5px;line-height:1.3;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.ui-mobile .char-card .cdesc{display:none}
body.ui-mobile .char-card .who{font-size:10.5px;padding:0 5px}
body.ui-mobile .prep-foot{position:sticky;bottom:0;z-index:6;margin-top:8px;padding:8px 0 4px;gap:6px;
  background:linear-gradient(180deg,rgba(15,22,19,0),rgba(15,22,19,.94) 26%)}
body.ui-mobile .prep-foot .btn{min-height:38px;font-size:13.5px;flex:1 1 30%}
body.ui-mobile .prep-foot .hint{font-size:12px}
/* 5–6 人准备室：座位与角色卡再压一档，保证手机一屏能看全 6 张角色卡 */
body.ui-mobile #prep.crowded .prep-head h2{font-size:18px}
body.ui-mobile #prep.crowded .seat-list{gap:4px;margin-top:5px}
body.ui-mobile #prep.crowded .seat{font-size:11.5px;padding:2px 7px}
body.ui-mobile #prep.crowded .seat .btn.tiny{padding:1px 6px;font-size:11px}
body.ui-mobile #prep.crowded .char-grid{margin-top:6px;gap:5px}
body.ui-mobile #prep.crowded .char-card .c-art{height:clamp(64px,10dvh,92px)}
body.ui-mobile #prep.crowded .char-card .cname{font-size:12.5px;margin-top:2px}
body.ui-mobile #prep.crowded .char-card .cskill{font-size:10px;margin-top:2px}
body.ui-mobile #prep.crowded .prep-foot{margin-top:6px;padding-top:6px}

/* 21 版修正十四：高屏（≥760）准备室内容垂直居中，别全挤在顶部留一大片黑 */
@media (min-height:760px){
  body.ui-mobile .prep{display:flex;flex-direction:column}
  body.ui-mobile .prep-inner{margin:auto 0;width:100%}
}

/* 21 版修正十五：手机上的横向条不画滚动条（顶着一条灰杠很难看），矮屏市场卡补 14px 让「建造」露出来 */
body.ui-mobile #play .phase-bar,
body.ui-mobile #play #market,
body.ui-mobile #play .hand-row,
body.ui-mobile #play .tips-list{scrollbar-width:none;-ms-overflow-style:none}
body.ui-mobile #play .phase-bar::-webkit-scrollbar,
body.ui-mobile #play #market::-webkit-scrollbar,
body.ui-mobile #play .hand-row::-webkit-scrollbar,
body.ui-mobile #play .tips-list::-webkit-scrollbar{display:none;width:0;height:0}
@media (max-height:700px){
  body.ui-mobile #play .idea-card{height:100px}
  body.ui-mobile #play .idea-card .ic-art{height:calc(100% - 26px)!important}
  body.ui-mobile #play .idea-card .ic-cost .mat{font-size:9px;padding:0 2px;line-height:1.2}
}

/* 21 版修正十六：矮屏顶栏不再让浏览器画那两条灰色滚动条——
   房间码与「轮到谁」在手机上意义不大（人数面板里有），阶段条只留当前一段 */
body.ui-mobile #play .topbar{overflow:hidden}
body.ui-mobile #play .tb-left{overflow:hidden}
body.ui-mobile #play #phaseBar{overflow:hidden}
@media (max-height:700px){
  body.ui-mobile #play .tb-left .tb-item:first-child{display:none}
  body.ui-mobile #play .tb-left #tbTurn{display:none}
  body.ui-mobile #play #phaseBar .ph:not(.on){display:none}
}

/* 21 版修正十七：矮屏天气不再塞一张 13px 宽的缩略卡（看起来像被裁断），只留天气名与两个数值 */
@media (max-height:760px){
  body.ui-mobile #play .big-weather .bw-art{display:none}
  body.ui-mobile #play .big-weather .bw-desc{display:none}
  body.ui-mobile #play .big-weather .bw-name{font-size:13px}
}

/* ===== 第 22 版：竖屏手机的再一轮改造 ===== */
/* 1) 搜寻区里的「行动条」：平时是回合倒计时，搜寻时变成已翻点数／探索上限 */
.act-strip{display:none}
body.ui-mobile #play .act-strip{
  display:flex;align-items:center;gap:6px;flex:1 1 auto;min-width:70px;height:20px;padding:0 5px;
  border:1px solid rgba(240,228,200,.28);border-radius:9px;background:rgba(0,0,0,.2)
}
body.ui-mobile #play .act-strip .act-track{flex:1 1 auto;height:6px;border-radius:3px;background:rgba(240,228,200,.22);overflow:hidden}
body.ui-mobile #play .act-strip #actFill{display:block;height:100%;width:0;background:linear-gradient(90deg,#e5c874,#c9a24a);transition:width .2s linear}
body.ui-mobile #play .act-strip #actWho{font-size:10px;line-height:1;white-space:nowrap;color:#e7d9b8;font-variant-numeric:tabular-nums}
body.ui-mobile #play .act-strip #actWho.low{color:#ff9f86}

/* 2) 顶栏三行：房间/周天+倒计时 ｜ 阶段（搜寻→交易→建造…） ｜ 暂停·设置·声音 */
body.ui-mobile #play .topbar{
  height:auto;padding:2px 6px;gap:2px 6px;flex-wrap:wrap;align-items:center;overflow:visible
}
body.ui-mobile #play .topbar .tb-left{flex:1 1 100%;justify-content:flex-start;gap:4px 10px;overflow:visible;flex-wrap:wrap}
body.ui-mobile #play .topbar .phases{flex:1 1 100%;justify-content:center;overflow:hidden}
body.ui-mobile #play .topbar .tb-ctl{flex:1 1 100%;justify-content:flex-end;gap:4px}
body.ui-mobile #play .topbar .tb-ctl .btn{min-height:24px;font-size:10.5px}

/* 3) 搜寻区固定两行：上行标题+行动条+规则/退出，下行翻牌／提示 */
body.ui-mobile #play .search-band{padding:2px 6px 0}
body.ui-mobile #play .search-band .band-head{height:24px;gap:6px;flex-wrap:nowrap}
body.ui-mobile #play .search-band .band-head .section-title{font-size:12px;white-space:nowrap;flex:0 0 auto}
body.ui-mobile #play .search-band .band-head .band-ctl{gap:3px}
body.ui-mobile #play .search-band .band-head .btn{min-height:22px;font-size:10.5px;padding:0 6px}
body.ui-mobile #play .search-head{display:none} /* 名字/点数已进行动条，省掉一行 */
body.ui-mobile #play .search-box{padding:2px 4px}

/* 4) 面板里「我拥有的物资」改成真正的迷你卡面（30×62），不再是一行小字 */
.tcard .tc-art{display:none}
body.ui-mobile #play .player-panel .tinycards{display:flex;gap:4px;margin-top:3px}
body.ui-mobile #play .player-panel .tcard{
  flex-direction:column;width:34px;padding:2px;gap:0;border-radius:5px;font-size:8.5px;line-height:1.1;text-align:center
}
body.ui-mobile #play .player-panel .tcard .tc-art{display:block;width:30px;height:62px;object-fit:cover;border-radius:3px;border:1px solid rgba(74,55,34,.5)}
body.ui-mobile #play .player-panel .tcard .v{font-size:10px}

/* 5) 手机点卡：居中放大到半屏，再点一下收起（不是原来的「手机完全不放大」） */
body.ui-mobile #zoomCard{pointer-events:auto;z-index:85;border-width:3px}
body.ui-mobile #zoomCard::after{
  content:'点一下收起';position:absolute;left:0;right:0;bottom:0;padding:6px 0 5px;text-align:center;font-size:11px;
  color:#f5e7bf;background:linear-gradient(180deg,rgba(20,14,9,0),rgba(20,14,9,.94) 50%)
}

@media (max-height:700px){
  /* 顶栏占了三行，就把之前矮屏藏起来的信息还回来 */
  body.ui-mobile #play .topbar .tb-left .tb-item:first-child{display:flex}
  body.ui-mobile #play .topbar .tb-left #tbTurn{display:flex}
  body.ui-mobile #play .topbar #phaseBar .ph:not(.on){display:inline-block}
  /* 搜寻牌放大到能看清，物资小卡保留（不再被矮屏藏掉） */
  body.ui-mobile #play .pile .card{width:64px;height:136px}
  body.ui-mobile #play .player-panel .tinycards{display:flex}
  body.ui-mobile #play .player-panel .tcard .tc-art{height:52px;width:29px}
  body.ui-mobile #play .hand-row{height:64px}
  body.ui-mobile #play .idea-card{height:92px}
}

/* 第 22 版补：行动条文字不许被进度条挤没；高屏给手牌和市场定个更合身的高度，别把手牌切掉 */
body.ui-mobile #play .act-strip #actWho{flex:0 0 auto;max-width:52%;overflow:hidden;text-overflow:ellipsis}
body.ui-mobile #play .hand-row{height:clamp(100px,14dvh,150px)}
body.ui-mobile #play .idle-wrap{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
body.ui-mobile #play .idle-title{flex:0 0 auto}
body.ui-mobile #play .idle-piles{display:flex;flex-wrap:wrap;gap:4px;flex:1 1 auto}
body.ui-mobile #play .idle-pill{font-size:10px;padding:1px 6px}
body.ui-mobile #play .pile{display:flex;gap:8px;justify-content:center}
body.ui-mobile #play .pile .card{width:clamp(74px,16.5dvh,112px) !important;height:auto !important;aspect-ratio:100/206}

body.ui-mobile #play .idle-pill.wx{display:none} /* 天气徽章已经写了探索点数，不重复占行 */
/* 搜寻翻牌按高度定尺寸，横屏手机也不会宽到把三张牌挤出屏幕 */
body.ui-mobile #play .pile .card{width:auto !important;height:clamp(120px,24dvh,170px) !important;aspect-ratio:100/206}

body.ui-mobile #play .idle-pill.dc{display:none} /* 弃牌堆数量不是每回合都要看，让搜寻区稳定两行 */
body.ui-mobile #play .player-panel .tinycards{gap:3px}
body.ui-mobile #play .player-panel .tcard{width:40px;font-size:9px}
body.ui-mobile #play .player-panel .tcard .tc-art{width:36px;height:74px}
@media (max-height:700px){
  body.ui-mobile #play .player-panel .tcard{width:36px}
  body.ui-mobile #play .player-panel .tcard .tc-art{width:32px;height:64px}
}

/* 19 版给手机写过「不放大」，那条 display:none 要把 22 版的放大卡放开 */
body.ui-mobile #zoomCard{display:block}

/* 手机放大卡=屏幕高度的一半，居中；167 行的旧规则给到四分之三屏，这里收回来 */
body.ui-mobile #zoomCard{
  width:min(84vw,23.5dvh)!important;height:auto!important;aspect-ratio:480/1020;
  left:50%!important;top:50%!important;transform:translate(-50%,-50%)
}

/* 第 23 版：按手绘稿重排手机面板；倒计时改成绿→黄→红渐变 */
/* 面板：左边头像，头像下面姓名/身份/技能；右边第一行食物线索物资，下面三张物资卡面 */
body.ui-mobile #play .player-panel{
  display:grid;grid-template-columns:112px minmax(0,1fr);
  grid-template-areas:
    "portrait stats"
    "portrait cards"
    "name cards"
    "skill cards";
  gap:2px 8px;align-items:start;padding:5px 7px
}
body.ui-mobile #play .player-panel .pp-info{display:contents}
body.ui-mobile #play .player-panel .pp-portrait{grid-area:portrait;width:94px;height:112px;margin:0;border-radius:6px}
body.ui-mobile #play .player-panel .pp-name-row{grid-area:name;flex-wrap:wrap;overflow:visible;gap:3px}
body.ui-mobile #play .player-panel .pp-name{font-size:11.5px;white-space:nowrap;flex:0 0 auto;overflow:visible;text-overflow:clip}
body.ui-mobile #play .player-panel .pp-char{font-size:9.5px;padding:1px 4px}
body.ui-mobile #play .player-panel .pp-skill{
  grid-area:skill;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font-size:9.5px;line-height:1.2;margin:0;padding:0;border:0;background:none
}
body.ui-mobile #play .player-panel .pp-stats{grid-area:stats;margin:0!important;gap:8px;font-size:12px;flex-wrap:nowrap}
body.ui-mobile #play .player-panel .pp-stats .s{background:none;padding:0}
body.ui-mobile #play .player-panel .pp-stats .s b{font-size:14.5px}
body.ui-mobile #play .player-panel .tinycards{grid-area:cards;margin:0!important;align-self:start;flex-wrap:nowrap;overflow-x:auto;gap:5px}
body.ui-mobile #play .player-panel .tcard{width:62px;padding:2px;font-size:9px}
body.ui-mobile #play .player-panel .tcard .tc-art{width:56px;height:112px;object-fit:cover}
body.ui-mobile #play .player-panel .tcard .v{font-size:10.5px}
body.ui-mobile #play .player-panel .bld-row,body.ui-mobile #play .player-panel .stat-row,body.ui-mobile #play .player-panel .pp-flag{grid-column:1/-1}
/* 手机上当前行动者的 buff / debuff 必须露出来：搜寻阶段和矮屏都不再隐藏 */
body.ui-mobile #play .player-panel .stat-row{
  display:flex!important;grid-column:1/-1;flex-wrap:wrap;gap:3px;margin-top:2px;max-height:42px;overflow-y:auto
}
body.ui-mobile #play .player-panel .stat{font-size:10px;line-height:1.3;padding:1px 4px;flex:0 0 auto}
/* 副玩家那一条也不再把状态挤成一行溢出：允许换行，状态牌跟在食物/线索后面 */
body.ui-mobile #play .pp-mini .pm-stats{flex-wrap:wrap;white-space:normal;row-gap:1px}
body.ui-mobile #play .pp-mini .pm-st{flex:0 0 auto}

/* 顶栏：第 1 行房间/周天/行动，第 2 行整条倒计时，第 3 行暂停/设置/声音（居中），第 4 行阶段条 */
body.ui-mobile #play .topbar .tb-left{display:contents}
body.ui-mobile #play .topbar .tb-left .tb-item{font-size:10.5px;white-space:nowrap;flex:0 0 auto;max-width:44vw;overflow:hidden;text-overflow:ellipsis}
body.ui-mobile #play .topbar #tbTimer{order:2;flex:1 1 100%;height:30px;margin:0;padding:0 8px;gap:8px;border-radius:10px}
body.ui-mobile #play .topbar #tbTimer .tnum{font-size:18px}
body.ui-mobile #play .topbar #tbTimer .tbar{flex:1 1 auto;width:auto;height:9px;border-radius:5px}
body.ui-mobile #play .topbar #tbTimer .twho{font-size:12px;flex:0 0 auto}
body.ui-mobile #play .topbar #tbTimer .twho:empty{display:none}
body.ui-mobile #play .topbar #phaseBar{order:4}
body.ui-mobile #play .topbar .tb-ctl{order:3;flex:1 1 100%;justify-content:center;margin:0;gap:8px}
body.ui-mobile #play .topbar .tb-ctl .btn{min-height:24px;font-size:10.5px;padding:0 10px}

/* 头像右侧已经画了物资卡面，底部那条同样的手牌就不要再占一屏了 */
body.ui-mobile #play .dock #hand{display:none}

@media (max-height:700px){
  body.ui-mobile #play .player-panel{grid-template-columns:96px minmax(0,1fr)}
  body.ui-mobile #play .player-panel .pp-portrait{width:78px;height:92px}
  body.ui-mobile #play .player-panel .tcard{width:54px}
  body.ui-mobile #play .player-panel .tcard .tc-art{width:48px;height:96px}
  /* 矮屏：翻牌和建造物都压扁，保证底部按钮留在屏幕里点得到 */
  body.ui-mobile #play .pile .card{height:104px!important;width:auto!important}
  body.ui-mobile #play .player-panel .bld{flex-direction:row;align-items:center;gap:2px;padding:1px 3px}
  body.ui-mobile #play .player-panel .bld-thumb{width:14px;height:18px;aspect-ratio:auto}
  body.ui-mobile #play .player-panel .bld-name{width:auto;font-size:8.5px;padding:0 2px}
}

/* 第 25 版：新牌一律向右排、建造物挂在物资卡下面、搜寻条只留点数 */
.player-panel .bld{display:inline-flex;align-items:center;gap:3px}
.player-panel .bld-thumb{display:none}
.player-panel .bld-name{font-size:11px;color:#2f6533}
.player-panel .bld.bld-shared .bld-name{color:#2f6f9e}

body.ui-mobile #play .pile{flex-wrap:nowrap!important;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;padding-bottom:4px}
body.ui-mobile #play .pile .card{flex:0 0 auto}
body.ui-mobile #play .player-panel .tinycards .tcard{flex:0 0 auto}
body.ui-mobile #play .player-panel .bld-row{
  grid-column:2;grid-row:auto;margin-top:2px;display:flex;flex-wrap:nowrap;gap:5px;overflow-x:auto
}
body.ui-mobile #play .player-panel .bld{
  flex:0 0 auto;flex-direction:column;gap:1px;padding:2px;margin:0;
  background:rgba(111,142,164,.14);border:1px solid rgba(74,55,34,.16);border-radius:6px
}
body.ui-mobile #play .player-panel .bld-thumb{display:block;width:38px;aspect-ratio:480/1020;object-fit:cover;border-radius:3px}
body.ui-mobile #play .player-panel .bld-name{font-size:9px;line-height:1.25;color:#3a2a18;background:rgba(255,248,230,.85);width:100%;text-align:center;border-radius:3px}
body.ui-mobile #play .player-panel .bld.bld-shared{box-shadow:0 0 0 2px #2f6f9e;background:rgba(47,111,158,.22)}
body.ui-mobile #play .player-panel .bld:not(.bld-shared) .bld-name{background:#eaf4e4;color:#2c5c2b}
body.ui-mobile #play .player-panel .bld.bld-shared .bld-name{background:#2f6f9e;color:#f4fbff}

/* ============ 第 34 版：3 套常用套牌 ============ */
.deck-field{align-items:center}
.deck-field > label{
  flex:0 0 72px;font-size:15px;font-weight:700;color:#4a3722;letter-spacing:.02em;
}
.deck-select{
  flex:1;min-width:0;padding:11px 12px;border-radius:8px;
  border:1.5px solid rgba(74,55,34,.45);background:var(--paper-3);
  color:var(--ink);font-family:inherit;font-size:16px;outline:none;
}
.deck-select:focus{border-color:var(--gold);box-shadow:0 0 0 2px rgba(201,162,74,.18)}

.prep-deck{
  display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:14px;padding:8px 12px;
  border:1px solid rgba(201,162,74,.22);border-radius:10px;
  background:linear-gradient(180deg,rgba(240,228,200,.08),rgba(240,228,200,.03));
}
.prep-deck .pd-ico{font-size:18px;line-height:1}
.prep-deck .pd-label{font-size:13px;font-weight:700;color:#c9b27f;letter-spacing:.06em}
.prep-deck #prepDeckName{font-size:15px;color:#f4e5bf;white-space:nowrap}
.prep-deck #prepDeckSelect{
  max-width:230px;padding:5px 9px;border-radius:7px;border:1px solid rgba(201,162,74,.4);
  background:#241b11;color:#f0e4c8;font-family:inherit;font-size:14px;outline:none;
}
.prep-deck #prepDeckSelect:focus{border-color:var(--gold)}
.prep-deck .hint{font-size:12.5px;color:#bdb094;margin-left:auto}

.cw-decks{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;padding:8px 10px;
  border:1.5px dashed rgba(201,162,74,.34);border-radius:9px;background:rgba(240,228,200,.07);
}
.cw-decks .cd-label{font-size:14px;font-weight:700;color:#c9b27f;white-space:nowrap}
.cw-decks .cd-tabs{display:flex;gap:7px;flex-wrap:wrap}
.cd-tab{
  cursor:pointer;display:flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;
  border:1.5px solid rgba(74,55,34,.3);background:#efe3cc;color:#3a2a18;font-family:inherit;
}
.cd-tab:hover{border-color:rgba(201,162,74,.8)}
.cd-tab.on{border-color:var(--gold);background:#f6ecd2;box-shadow:0 0 0 2px rgba(201,162,74,.22)}
.cd-tab b{font-size:14px;white-space:nowrap}
.cd-tab em{font-style:normal;font-size:12px;color:#7a6a53}
.cd-tab .cd-default{font-size:10px;font-weight:700;color:#2c5c2b;background:#e2efd8;border-radius:4px;padding:1px 5px}
.cw-decks .cd-hint{font-size:12px;color:#bdb094;margin-left:auto}

/* 套牌里的角色技能次数：每日 / 每季 / 本场，六行小配置，桌面三列、手机一列 */
.cw-skillbar{
  margin-top:8px;padding:9px 11px 10px;border:1.5px solid rgba(201,162,74,.3);border-radius:9px;
  background:rgba(240,228,200,.07);
}
.cw-skillbar-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.cw-skillbar-head b{color:#f2e6c9;font-size:15px}
.cw-skillbar-head .hint{color:#bdb094;font-size:12.5px;margin-left:8px}
.cw-skill-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px}
.cw-skill-row{
  display:flex;align-items:center;gap:6px;padding:5px 7px;border-radius:7px;
  border:1px solid rgba(240,228,200,.16);background:rgba(20,15,10,.18);color:#eadcbf;
}
.cw-skill-row b{font-size:13.5px;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cw-skill-row select,.cw-skill-row input{
  padding:4px 5px;border-radius:6px;border:1px solid rgba(240,228,200,.3);
  background:#efe3cc;color:#2b2117;font-family:inherit;font-size:13.5px;
}
.cw-skill-row select{width:74px}
.cw-skill-row input{width:48px;text-align:center}
body.ui-mobile .cw-skill-grid{grid-template-columns:1fr}
body.ui-mobile .cw-skillbar-head .hint{display:none}
body.ui-mobile .cw-skill-row b{font-size:13px}

body.ui-mobile .deck-field{gap:8px}
body.ui-mobile .deck-field > label{font-size:13px}
body.ui-mobile .deck-select{font-size:16px;padding:10px}
body.ui-mobile .prep-deck{margin-top:8px;padding:5px 8px;gap:6px}
body.ui-mobile .prep-deck .pd-label{display:none}
body.ui-mobile .prep-deck #prepDeckName{font-size:13px}
body.ui-mobile .prep-deck #prepDeckSelect{max-width:42vw;font-size:13px;padding:4px 6px}
body.ui-mobile .prep-deck #prepDeckEdit{display:none}
body.ui-mobile .prep-deck .hint{font-size:11px;margin-left:0;flex:1 1 100%;line-height:1.3}
body.ui-mobile #prep.crowded .prep-deck{margin-top:5px;padding:3px 7px}
body.ui-mobile #prep.crowded .prep-deck .hint{display:none}
body.ui-mobile .cw-decks{gap:6px;padding:6px;margin-top:8px}
body.ui-mobile .cw-decks .cd-label{display:none}
body.ui-mobile .cw-decks .cd-hint{display:none}
body.ui-mobile .cw-decks .cd-tabs{width:100%;gap:5px}
body.ui-mobile .cd-tab{flex:1 1 30%;justify-content:center;padding:4px 5px;gap:3px;min-width:0}
body.ui-mobile .cd-tab b{font-size:13px;overflow:hidden;text-overflow:ellipsis}
body.ui-mobile .cd-tab em{display:none}
body.ui-mobile .cd-tab .cd-default{display:none}
/* ============ 第 35 版：结盟 / 技能 / 预算明细 / 手机缩放 ============ */
.team-panel{margin-top:12px;padding:10px 12px;border:1px solid rgba(201,162,74,.28);border-radius:10px;background:rgba(240,228,200,.06);color:#f0e4c8}
.team-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;font-size:16px;font-weight:700;color:#f3e6c8}
.team-head em{font-style:normal;font-size:12.5px;font-weight:400;color:#bdb094;line-height:1.5}
.team-opts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:8px}
.team-btn{display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px 10px;border-radius:8px;border:1.5px solid rgba(240,228,200,.28);background:rgba(240,228,200,.08);color:#f0e4c8;font-family:inherit;cursor:pointer;min-width:0}
.team-btn b{font-size:14px}.team-btn span{font-size:11px;color:#c9b27f}.team-btn em{font-style:normal;font-size:11px;color:#bdb094;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.team-btn.on{border-color:var(--gold);background:rgba(201,162,74,.22);box-shadow:0 0 0 2px rgba(201,162,74,.18)}
.team-btn.full{opacity:.5}
.team-note{margin-top:8px;font-size:12.5px;color:#c9bca2;line-height:1.5}
.pp-team{font-size:11px;padding:1px 5px;border-radius:7px;background:rgba(47,111,158,.18);border:1px solid rgba(47,111,158,.45);color:#2f6f9e;white-space:nowrap}
.pp-stats .s.team{color:#2f6f9e}
.dock-stat.team{color:#7fb6d8}
.dock-stat.team-mats{font-size:12.5px;color:#cfe6b8;background:rgba(92,130,66,.20);border:1px solid rgba(150,200,120,.28);border-radius:5px;padding:1px 6px}
.team-mats-inline{font-style:normal;font-size:11.5px;color:#d6edbd;background:rgba(92,130,66,.24);border-radius:4px;padding:0 4px;white-space:nowrap}
.team-inline{font-style:normal;font-size:11px;color:#2f6f9e;background:rgba(47,111,158,.12);padding:1px 4px;border-radius:5px}
.skillbtn{background:linear-gradient(180deg,#e9dcc0,#d7c39a);border-color:#6f5a35}
.parts-line{font-size:11.5px;color:#bdb094;line-height:1.5;margin-top:3px}
.budget-btn{flex:0 0 auto}
.budget-list{margin:8px 0;border-top:1px dashed rgba(74,55,34,.25)}
.budget-row{display:flex;justify-content:space-between;gap:12px;padding:5px 0;border-bottom:1px dashed rgba(74,55,34,.18);font-size:14px}
.budget-row b{color:#2c5c2b}.budget-row b.minus{color:#9c3a2c}

/* 手机：整页可上下滑，底部按钮不再被 100vh 的壳子截掉；不做界面缩放，交给浏览器默认行为 */
body.ui-mobile{overflow-y:auto!important;overflow-x:hidden;overscroll-behavior-y:contain}
/* 关键：手机上只允许 body 这一层滚动。.screen 原来是 overflow-y:auto + overscroll-behavior:contain，
   它自己撑得比屏幕还高、又没有可滚距离，手指落在里面就既滚不动、也不把手势交给 body，表现就是“一指滑不动”。
   这里把内层滚动壳全部摊开，交给整页 body 原生滚动。 */
body.ui-mobile .screen{overflow:visible!important;overscroll-behavior-y:auto!important}
body.ui-mobile #app{height:auto!important;min-height:100vh;min-height:100dvh}
body.ui-mobile #play{overflow:visible!important;min-height:auto}
body.ui-mobile .table{flex:0 0 auto}
body.ui-mobile .dock{position:sticky!important;bottom:0!important;z-index:50}
body.ui-mobile #prep .prep{overflow:visible!important}

@media (max-width:560px){
  .team-opts{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* 手机：四个结盟选项压成同一排，别让四个大框占掉半屏 */
body.ui-mobile .team-panel{margin-top:8px;padding:7px 8px}
body.ui-mobile .team-head{font-size:13.5px;gap:2px 6px;line-height:1.3}
body.ui-mobile .team-head em{font-size:10px;line-height:1.35;flex:1 1 100%}
body.ui-mobile .team-opts{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px;margin-top:6px}
body.ui-mobile .team-btn{padding:5px 3px;gap:1px;border-radius:7px;text-align:center;align-items:stretch}
body.ui-mobile .team-btn b{font-size:clamp(10.5px,3.1vw,12.5px);line-height:1.2;white-space:nowrap}
body.ui-mobile .team-btn span{font-size:9.5px;line-height:1.2;white-space:nowrap}
body.ui-mobile .team-btn em{font-size:9px;line-height:1.2;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ui-mobile .team-note{margin-top:4px;font-size:10.5px;line-height:1.35}

/* 野兽牌左上显示「难N」，不要让人误以为占探索点数 */
.card .badge.huntbadge{
  min-width:26px !important;width:auto !important;height:18px !important;padding:0 4px !important;
  border-radius:9px !important;font-size:11px !important;line-height:16px;
  background:linear-gradient(180deg,#b8553f,#8d3324) !important;color:#fff3e2 !important;
}
