/* Chrome 61 基线层 + 能力检测增强层：Q 弹奶油纵跃螺旋塔 HUD */

.hud-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding-top: 12px;
  padding-top: calc(12px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--capsule-extra-top, 0px));
  padding-left: 12px;
  padding-right: 12px;
  padding-right: calc(12px + var(--capsule-extra-right, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 12;
}

.hud-brand, .hud-tools {
  display: flex;
  align-items: center;
  pointer-events: auto;
}

.hud-brand > * + * { margin-left: 5px; }
.hud-tools > * + * { margin-left: 5px; }

.pill-badge {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 9px;
  background: rgba(255, 248, 234, 0.94);
  border: 2px solid #6a495c;
  border-radius: 15px;
  box-shadow: 0 3px 0 rgba(106, 73, 92, 0.22);
  font-size: 12px;
  color: #6a495c;
}

.pill-badge > * + * { margin-left: 4px; }
.pill-soft { background: rgba(248, 239, 250, 0.92); }
.star-icon { color: #e89b48; font-size: 13px; line-height: 1; }
.pill-label { color: #906b7d; }
.pill-val { font-size: 14px; font-weight: 800; color: #6a495c; }

.icon-btn {
  height: 30px;
  padding: 0 9px;
  background: rgba(255, 248, 234, 0.94);
  border: 2px solid #6a495c;
  border-radius: 15px;
  box-shadow: 0 3px 0 rgba(106, 73, 92, 0.22);
  color: #6a495c;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(106, 73, 92, 0.22); }
.icon-btn:disabled { opacity: 0.55; }
.icon-btn.is-active { background: #cbeed3; }

.big-score-wrap {
  position: absolute;
  top: 50px;
  top: calc(50px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--capsule-extra-top, 0px));
  left: 0; right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 10;
}

.score-pill {
  min-width: 86px;
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 248, 234, 0.94);
  border: 2px solid #6a495c;
  border-radius: 22px;
  box-shadow: 0 4px 0 rgba(106, 73, 92, 0.22);
  transition: transform 0.12s ease;
}

.score-pill.is-bump { transform: scale(1.15); }
.big-score { font-size: 28px; font-weight: 800; line-height: 1; color: #6a495c; letter-spacing: 0.5px; }

.combo-tag {
  margin-top: 6px;
  padding: 3px 11px;
  border-radius: 12px;
  border: 2px solid #6a495c;
  background: #ffdbb8;
  color: #6a495c;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 0 rgba(106, 73, 92, 0.22);
}

.combo-tag.is-fever { background: linear-gradient(90deg, #ffe5a6 0%, #ffc4c4 100%); }

.feedback-pop {
  margin-top: 5px;
  padding: 2px 10px;
  border-radius: 10px;
  background: rgba(106, 73, 92, 0.88);
  color: #fff9ec;
  font-size: 12px;
  font-weight: 700;
}

.bottom-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 20px;
  bottom: calc(20px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 10;
  padding: 0 18px;
}

.charge-wrap {
  display: flex;
  align-items: center;
  width: 236px;
  max-width: 80%;
  padding: 5px 10px;
  margin-bottom: 8px;
  background: rgba(255, 248, 234, 0.90);
  border: 2px solid #6a495c;
  border-radius: 16px;
  box-shadow: 0 3px 0 rgba(106, 73, 92, 0.20);
  opacity: 0.72;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.charge-wrap.is-charging {
  opacity: 1;
  transform: scale(1.05);
}

.charge-track {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 13px;
  background: #f5e6d3;
  border: 2px solid #6a495c;
  border-radius: 8px;
  overflow: hidden;
}

.charge-fill {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 0%;
  background: linear-gradient(90deg, #b9ebbf 0%, #ffe09e 42%, #ffb09c 74%, #f07d94 100%);
  border-radius: 5px;
}

.charge-tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: rgba(106, 73, 92, 0.28);
}

.tick-25 { left: 25%; }
.tick-50 { left: 50%; }
.tick-75 { left: 75%; }

.charge-label {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 800;
  color: #6a495c;
  min-width: 30px;
  text-align: right;
}

.island-chip {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 248, 234, 0.92);
  border: 2px solid #6a495c;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #6a495c;
  margin-bottom: 5px;
  box-shadow: 0 2px 0 rgba(106, 73, 92, 0.18);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.island-chip.is-melting {
  background: rgba(226, 244, 255, 0.96);
  border-color: #5b82a6;
  color: #3d6386;
}

.hold-tip {
  font-size: 11px;
  color: #6a495c;
  background: rgba(255, 248, 234, 0.78);
  padding: 3px 10px;
  border-radius: 10px;
}

.orbit-bar {
  position: absolute;
  left: 0; right: 0;
  bottom: 18px;
  bottom: calc(18px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
  z-index: 15;
  pointer-events: none;
}

.orbit-tip {
  font-size: 12px;
  font-weight: 600;
  color: #6a495c;
  background: rgba(255, 248, 234, 0.92);
  border: 2px solid #6a495c;
  border-radius: 12px;
  padding: 4px 12px;
  margin-bottom: 10px;
}

.orbit-actions { display: flex; pointer-events: auto; }
.orbit-actions > * + * { margin-left: 10px; }

.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid #6a495c;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 700;
  color: #6a495c;
  box-shadow: 0 4px 0 #6a495c;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.08s ease;
}

.pixel-btn:focus { outline: 2px solid #a886be; outline-offset: 2px; }
.pixel-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #6a495c; }
.pixel-btn:disabled { opacity: 0.55; transform: none; }
.pixel-btn-primary { background: linear-gradient(180deg, #ffe1cd 0%, #f7b2ac 100%); }
.pixel-btn-sub { background: #fff8ea; }
.retry-btn { margin-top: 12px; min-height: 38px; padding: 6px 18px; }

.modal-mask {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(106, 73, 92, 0.36);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 30;
}

.modal-card {
  width: 100%;
  max-width: 312px;
  background: #fff8ea;
  border: 2px solid #6a495c;
  border-radius: 20px;
  box-shadow: 0 8px 0 rgba(106, 73, 92, 0.25);
  padding: 16px;
  color: #6a495c;
}

.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-title { font-size: 17px; font-weight: 800; color: #6a495c; }

.modal-close {
  width: 28px; height: 28px;
  border-radius: 14px;
  border: 2px solid #6a495c;
  background: #f8e9ce;
  color: #6a495c;
  font-size: 18px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
}

.over-head { text-align: center; margin-bottom: 12px; }

.medal-badge {
  display: inline-block;
  padding: 3px 11px;
  margin-bottom: 6px;
  background: #f0e1f5;
  border: 2px solid #6a495c;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #6a495c;
}

.score-grid { display: flex; justify-content: space-between; margin-bottom: 12px; }

.score-cell {
  flex: 1; min-width: 0;
  padding: 10px 6px;
  text-align: center;
  background: #fffdf5;
  border: 2px solid #6a495c;
  border-radius: 14px;
}

.score-cell + .score-cell { margin-left: 8px; }
.cell-label { display: block; font-size: 11px; color: #906b7d; margin-bottom: 4px; }
.cell-num { font-size: 22px; font-weight: 800; color: #6a495c; line-height: 1.1; }
.cell-star { color: #de8a42; }

.new-best-tag {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #bd576b;
  background: #ffe8e2;
  border: 1px solid #ebb0b8;
  border-radius: 10px;
  padding: 4px 8px;
  margin-bottom: 12px;
}

.postcard-frame {
  width: 100%;
  background: #f0e1f5;
  border: 2px solid #6a495c;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.postcard-frame img { display: block; width: 100%; max-width: 100%; height: auto; }
.modal-hint { font-size: 12px; color: #906b7d; text-align: center; margin-bottom: 12px; }

.modal-actions { display: flex; }
.modal-actions .pixel-btn { flex: 1; min-width: 0; }
.modal-actions .pixel-btn + .pixel-btn { margin-left: 10px; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 118px;
  bottom: calc(118px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)));
  transform: translateX(-50%);
  padding: 7px 14px;
  background: rgba(106, 73, 92, 0.92);
  color: #fff9ec;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  z-index: 40;
  pointer-events: none;
}

.is-hidden { display: none !important; }

/* 可隐藏、可折叠半透明 Dev 重力手感调参浮窗（Chrome 61 基线兼容） */
.dev-panel {
  position: absolute;
  top: 98px;
  top: calc(98px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + var(--capsule-extra-top, 0px));
  right: 10px;
  width: 244px;
  max-width: calc(100% - 20px);
  background: rgba(255, 248, 234, 0.78);
  border: 2px solid rgba(106, 73, 92, 0.85);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(106, 73, 92, 0.16);
  color: #5e3f52;
  z-index: 22;
  pointer-events: auto;
  overflow: hidden;
}

.dev-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px 10px;
  background: rgba(247, 234, 214, 0.72);
  border-bottom: 1px solid rgba(106, 73, 92, 0.22);
}

.dev-panel.is-folded .dev-panel-head { border-bottom: none; }
.dev-panel.is-folded .dev-panel-body { display: none; }

.dev-panel-title {
  font-size: 11px;
  font-weight: 800;
  color: #5e3f52;
  letter-spacing: 0.3px;
}

.dev-panel-head-btns {
  display: flex;
  align-items: center;
}

.dev-panel-head-btns > * + * { margin-left: 4px; }

.dev-mini-btn {
  height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  border: 1.5px solid #6a495c;
  background: rgba(255, 250, 240, 0.9);
  color: #5e3f52;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.dev-panel-body {
  padding: 8px 9px 9px;
}

.dev-presets {
  display: flex;
  margin-bottom: 7px;
}

.dev-preset-btn {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 4px;
  border-radius: 8px;
  border: 1.5px solid rgba(106, 73, 92, 0.55);
  background: rgba(255, 252, 245, 0.85);
  color: #5e3f52;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.dev-preset-btn + .dev-preset-btn { margin-left: 4px; }
.dev-preset-btn:active { background: #ffe0ca; }

.dev-slider-row {
  display: flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 3px;
}

.dev-sl-name {
  width: 78px;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: #6a495c;
}

.dev-slider-row input[type="range"] {
  flex: 1;
  min-width: 0;
  height: 22px;
  accent-color: #d97a8c;
}

.dev-sl-val {
  width: 38px;
  text-align: right;
  font-size: 11px;
  font-weight: 800;
  color: #5e3f52;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dev-panel-foot {
  display: flex;
  margin-top: 7px;
}

.dev-foot-btn {
  flex: 1;
  min-width: 0;
  height: 26px;
  border-radius: 9px;
  border: 1.5px solid #6a495c;
  background: rgba(255, 250, 240, 0.9);
  color: #5e3f52;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.dev-foot-btn + .dev-foot-btn { margin-left: 6px; }
.dev-foot-btn.is-primary { background: linear-gradient(180deg, #ffe1cd 0%, #f7b2ac 100%); }

@supports ((-webkit-backdrop-filter: blur(4px)) or (backdrop-filter: blur(4px))) {
  .pill-badge, .icon-btn, .score-pill, .charge-wrap, .island-chip, .orbit-tip, .dev-panel {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
