/* 快捷槽紧接画布的下沿；保持在正常文档流，给画布内的方向键和缩放控件留出独立点击区域。 */
.play-column > .viewport {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.quick-dock {
  container-type: inline-size;
  border: 1px solid #45505a;
  border-radius: 0 0 9px 9px;
  background: #242b32;
  box-shadow: inset 0 1px #616b74, inset 0 -2px #1b2026;
}
.quick-row { display: grid; grid-template-columns: 1fr 1.08fr; }
.quick-dock .quick-group {
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  gap: 9px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  min-width: 0;
}
.quick-dock .belt { border-left: 1px solid #404952; }
.quick-group h2 {
  margin: 0;
  color: #bbc7ca;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
  white-space: nowrap;
}
.quick-dock .quick-slots {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 5px;
  margin: 0;
}
.quick-dock .quick-slots .hud-slot {
  position: relative;
  display: grid;
  grid-template-rows: 31px auto;
  gap: 1px;
  place-content: center;
  place-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 3px 1px 4px;
  border: 1px solid #47545e;
  border-radius: 4px;
  background: linear-gradient(160deg,#2c353d,#20272e);
  box-shadow: inset 0 1px #ffffff0d, 0 1px 1px #13171c99;
  color: #d0d8db;
  text-align: center;
}
.quick-slots .hud-slot > span {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  white-space: nowrap;
}
.quick-dock .desk-actions .ico { width: 21px; height: 21px; color: #acccc4; }
.quick-dock .tool img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}
.quick-dock .hud-slot kbd {
  display: block;
  position: absolute;
  top: 3px;
  right: 5px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  font: 600 11px/1 var(--mono);
  color: #a8b0b8;
}
.quick-dock .tool[aria-pressed="true"] {
  border-color: #ffc481;
  background: linear-gradient(150deg,#473b30,#352e28);
  color: #ffe3c4;
  box-shadow: inset 0 0 0 1px #dd9657, 0 2px 3px #14181c66;
}
.quick-dock .tool[aria-pressed="true"] kbd { color: #ffd29a; }
.quick-dock .hud-slot:focus-visible { outline: 2px solid #fff0d9; outline-offset: 2px; z-index: 1; }
@media (hover: hover) {
  .quick-dock .quick-slots .hud-slot:hover { border-color: #92aaa9; background: #354049; }
  .quick-dock .quick-slots .tool[aria-pressed="true"]:hover { border-color: #ffe3b5; background: #4b3d31; }
}
.quick-dock #tool-action {
  padding: 5px 12px 6px;
  border-top: 1px solid #3b464f;
  color: #bfc7cc;
  font-size: 12px;
}
.quick-dock #throw-current { min-height: 32px; padding: 4px 10px; }
.quick-dock #throw-current .ico { width: 15px; height: 15px; }
.quick-dock ~ .control-strip { padding-inline: 4px; }
/* 根据游戏栏的实际宽度换行，桌面侧栏缩窄与手机竖屏都保持足够大的点击目标。 */
@container (max-width: 680px) {
  .quick-dock .quick-group { grid-template-columns: minmax(0,1fr); gap: 5px; padding: 7px 9px 9px; }
  .quick-group h2 { font-size: 11px; }
}
@container (max-width: 470px) {
  .quick-row { grid-template-columns: minmax(0,1fr); }
  .quick-dock .quick-group { grid-template-columns: 28px minmax(0,1fr); gap: 5px; padding: 6px 7px; }
  .quick-dock .belt { border-left: 0; border-top: 1px solid #404952; }
  .quick-dock .quick-slots .hud-slot { min-height: 48px; grid-template-rows: 25px auto; gap: 0; padding: 2px 1px 3px; }
  .quick-dock .tool img { width: 26px; height: 26px; }
  .quick-dock .desk-actions .ico { width: 19px; height: 19px; }
  .quick-dock .hud-slot kbd { font-size: 9px; right: 3px; }
  .quick-slots .hud-slot > span { font-size: 11px; }
  .quick-dock #tool-action { flex-wrap: wrap; gap: 4px; padding: 5px 8px; }
}
@media (pointer: coarse) { .quick-dock #throw-current { min-height: 44px; } }

/* 牢门动作留在画布边缘，只有相应阶段的操作占用热栏空间。 */
.gate-hud {
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:7px 12px;background:#232d32;border-bottom:1px solid #465156;
}
.gate-target,.gate-controls {display:flex;align-items:center;gap:8px;min-width:0}
.gate-target>div {min-width:0}
.gate-target>.ico {width:19px;height:19px;color:#b8c9bb}
.gate-target strong,.gate-target small {display:block;line-height:1.3}
.gate-target strong {max-width:26ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#e4e4d9;font-size:13px}
.gate-target small {margin-top:2px;font-size:11px;color:#aebcb7}
.gate-controls {flex-shrink:0;gap:5px}
.gate-controls button {min-height:33px;padding:5px 10px;border-radius:4px;font-size:13px;font-weight:650}
#gate-main {color:#f5dbb0;border:1px solid #967b56;background:#3a332b}
#gate-back {color:#c3cdc6;border:1px solid #54635e}
#gate-main kbd {color:#f0ce9f;font-size:10px;border-color:#83705a;background:#302e29}
.gate-hud[data-phase=mounted] #gate-main {border-color:#cd935e;color:#ffdfb5;background:#4a382e}
@media(pointer:coarse){.gate-controls button{min-height:42px}#gate-main kbd{display:none}}
@media(max-width:520px){.gate-hud{padding:5px 8px}.gate-target strong{max-width:15ch}}

/* 首次进入和被浏览器拦截时，给玩家一个可直接解锁媒体的明确入口。 */
.head-actions #sound {width:auto;min-width:32px;padding:0 8px;gap:5px;white-space:nowrap;}
#sound span {font-size:12px;font-weight:650;}
#sound[data-audio=ready],#sound[data-audio=blocked] {color:#ffc184;border-color:#8d6c43;}
#sound[data-audio=playing] {color:#abceba;}
@media(max-width:420px){.head-actions #sound{padding-inline:5px;gap:3px}#sound span{font-size:11px}}
