* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #143018;
  color: #fff8ee;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
button, input { font-family: inherit; }
#stage {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
#court {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.panel {
  position: absolute;
  inset: 8px 10px;
  z-index: 3;
  display: grid;
  grid-template-columns: 22% 1fr 24%;
  gap: 10px;
}
.col {
  background: rgba(18, 12, 8, 0.82);
  border: 2px solid rgba(255, 138, 61, 0.85);
  border-radius: 12px;
  padding: 10px;
  min-height: 0;
  overflow: auto;
}
.who { display: flex; gap: 8px; align-items: center; }
.who img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #ff8a3d;
}
.who b { display: block; font-size: 16px; }
.who span, .rank-card small, .look small, .plan {
  display: block;
  font-size: 12px;
  color: #ffd7b0;
}
.rank-card, .look { margin-top: 10px; }
.rank-top, .look {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.rank-top b { color: #ff8a3d; font-size: 18px; }
.bar {
  height: 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  margin: 6px 0;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: #ff8a3d;
}
.looks { display: flex; gap: 6px; }
.looks button, .pos-row button, .mode, .sub-row button, .sheet-body button, .pick {
  border: 0;
  border-radius: 8px;
  background: #3a2418;
  color: #fff8ee;
}
.swatch {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
}
.swatch.on { border-color: #fff; }
.pos-row { display: flex; gap: 6px; }
.pos-row button {
  flex: 1;
  height: 36px;
  font-weight: 700;
}
.pos-row button.on, .mode.on, .pick.on { background: #ff8a3d; color: #2a1206; }
.roster {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.pick {
  text-align: left;
  padding: 8px;
  min-height: 52px;
}
.pick b { display: block; font-size: 14px; }
.pick span { font-size: 11px; color: #ffd7b0; }
.five {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}
.five div {
  flex: 1;
  background: rgba(255,138,61,0.14);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
}
.five b { display: block; font-size: 13px; }
.mode-row, .sub-row { display: flex; gap: 8px; }
.mode, .sub-row button {
  flex: 1;
  height: 40px;
  font-size: 14px;
  font-weight: 700;
}
.ctrl-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 14px;
}
.ctrl-toggle input { width: 18px; height: 18px; }
.go {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: #ff8a3d;
  color: #2a1206;
  font-size: 18px;
  font-weight: 800;
}
.sub-row { margin-top: 8px; }
.plan { margin: 8px 0 0; }
.sheet, .overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-box, .match-card {
  width: min(560px, 78vw);
  background: rgba(20, 14, 10, 0.96);
  border: 2px solid #ff8a3d;
  border-radius: 14px;
  padding: 12px;
}
.sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sheet-head button {
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: #3a2418;
  color: #fff;
}
#sheet-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
#sheet-body button { min-height: 44px; font-size: 14px; }
#sheet-body button.on { background: #ff8a3d; color: #2a1206; font-weight: 800; }
.match-card { text-align: center; width: min(320px, 60vw); }
.dots { display: flex; justify-content: center; gap: 8px; margin: 10px 0; }
.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff8a3d;
  display: block;
  animation: blink 1s infinite;
}
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .25; } }
.hidden { display: none !important; }
#hud {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  z-index: 2;
  pointer-events: none;
}
.score-board {
  display: flex;
  background: rgba(18, 12, 8, 0.78);
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(255, 138, 61, 0.9);
}
.team { display: flex; align-items: center; gap: 8px; min-width: 84px; padding: 6px 10px; }
.team b { font-size: 26px; line-height: 1; }
.team.home b { color: #ff8a3d; }
.team.away b { color: #7ec8ff; }
.tag { font-size: 12px; }
.clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  background: #1b120c;
  padding: 4px 8px;
}
.clock span { font-size: 11px; color: #ffd7b0; }
.clock strong { font-size: 18px; }
.mid-hud {
  display: flex;
  gap: 8px;
  background: rgba(18,12,8,0.78);
  border-radius: 10px;
  padding: 6px 10px;
  border: 2px solid rgba(255,138,61,0.5);
  font-size: 13px;
}
#shot-clock { color: #ff8a3d; font-weight: 800; }
#btn-home {
  pointer-events: auto;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: rgba(18,12,8,0.85);
  color: #fff;
  border: 2px solid #ff8a3d;
}
#banner {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  background: rgba(18, 12, 8, 0.86);
  color: #ffe7c8;
  border: 2px solid #ff8a3d;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 18px;
  z-index: 3;
  pointer-events: none;
}
#stats {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 70vw);
  background: rgba(20, 14, 10, 0.94);
  border: 2px solid #ff8a3d;
  border-radius: 14px;
  padding: 14px 16px;
  z-index: 5;
}
#stats h2 { margin: 0 0 8px; font-size: 18px; color: #ffb07a; }
.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
}
#btn-again {
  margin-top: 10px;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: #ff8a3d;
  color: #2a1206;
  font-size: 16px;
  font-weight: 700;
}
#controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36%;
  pointer-events: none;
  z-index: 2;
}
.stick-wrap {
  position: absolute;
  left: 4%;
  bottom: 8%;
  width: 118px;
  height: 118px;
  pointer-events: auto;
}
.stick-base {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  border: 2px solid rgba(255,255,255,0.32);
}
.stick-knob {
  position: absolute;
  left: 39px;
  top: 39px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ff8a3d;
}
.btns {
  position: absolute;
  right: 3%;
  bottom: 10%;
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.btns button {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  font-size: 18px;
  font-weight: 800;
  color: #2a1206;
  background: #ffd08a;
}
#btn-shoot { background: #ff8a3d; }
#btn-steal { background: #7ec8ff; color: #082033; }
#btn-switch { background: #d7c4ff; color: #24143a; }

#stage{background:#253e40 url('../../../attachments/901ff51cd88b/ui_style_ref.png') center center/cover no-repeat;container-type:size}
#home{inset:auto 0 0;max-height:88%;padding:10px max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:rgba(17,29,33,.96);border-top:3px solid #ff8a3d;grid-template-columns:minmax(122px,.84fr) minmax(235px,2fr) minmax(156px,1fr);gap:12px}
.col{border:0;border-radius:0;background:none;padding:0 8px 0 0;touch-action:pan-y}.lineup,.actions{border-left:1px solid #526065;padding-left:12px}.look{display:grid;grid-template-columns:1fr;margin-top:8px;gap:3px}.looks{gap:4px}.looks .swatch{width:34px;height:32px;color:white;font-weight:800;border:2px solid transparent}.looks .swatch.on{border-color:white}.pick,.pos-row button,.mode,.sub-row button,#sheet-body button{background:#344448;color:#fff;border-radius:6px}.pick.on span{color:#382515}.pick{min-height:50px}.five div{background:#273839}.five b{color:#ffbd89}.lineup:before{content:'首发阵容';display:block;margin-bottom:6px;font-weight:750}.actions .ctrl-toggle{margin:6px 0}.go{height:44px}.plan{color:#ffcca4}.sheet-box{max-height:90%;overflow:auto}.stick-wrap,.btns{touch-action:none}button{cursor:pointer}button:focus-visible{outline:3px solid #fff;outline-offset:-3px}#stats{max-height:94%;overflow:auto}.panel button{touch-action:manipulation}@container(max-width:670px){#home{gap:5px;padding:6px;grid-template-columns:116px 1fr 148px}.lineup,.actions{padding-left:5px}.pos-row,.five,.mode-row,.sub-row{gap:3px}.mode,.sub-row button{font-size:12px}.who b{font-size:14px}.pick{padding:5px}}
/* [STATE] 横屏主界面样式已接入。 */
