* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #A38EAB;
  color: #1E2A18;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button {
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  cursor: pointer;
  touch-action: none;
}
[hidden] { display: none !important; }

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  background: #A38EAB;
}
#cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#safe-top { position: absolute; width: 0; height: env(safe-area-inset-top, 0px); pointer-events: none; }
#safe-bot { position: absolute; width: 0; height: env(safe-area-inset-bottom, 0px); pointer-events: none; }

#hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 4;
  padding: calc(max(28px, env(safe-area-inset-top, 0px)) + 8px) 12px 0;
  pointer-events: none;
}
.hud-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
}
.heart-pill, .score-pill, .wave-pill {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 14px rgba(70, 36, 10, 0.14);
}
.heart-pill {
  justify-self: start;
  border-radius: 14px;
  padding: 6px 8px 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.score-pill {
  justify-self: end;
  border-radius: 14px;
  padding: 6px 10px;
  text-align: right;
  min-width: 72px;
}
.wave-pill {
  justify-self: center;
  color: #73E31E;
  font-weight: 800;
  font-size: 12px;
  line-height: 20px;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.hearts { display: flex; align-items: center; gap: 1px; }
.hearts svg { display: block; }
.hud-score {
  font-size: 20px;
  font-weight: 800;
  color: #65E804;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.hud-dist { margin-top: 1px; font-size: 12px; font-weight: 700; color: #778A68; }
.buffs { display: flex; gap: 4px; flex-wrap: wrap; }
.buffs:empty { display: none; }
.buff {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 16px;
}
.buff.fire { background: #FF8A3D; }
.buff.ice { background: #2E9BFF; }
.buff.gear { background: #336A16; }
.buff.spd { background: #3D6BFF; }

.banner {
  position: absolute;
  left: 50%;
  top: calc(max(28px, env(safe-area-inset-top, 0px)) + 78px);
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  color: #73E31E;
  font-weight: 800;
  font-size: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 3px solid #FF8A3D;
  box-shadow: 0 8px 20px rgba(80, 30, 0, 0.16);
  opacity: 0;
  white-space: nowrap;
}
.banner.show { opacity: 1; transform: translateX(-50%) translateY(0); transition: 0.18s ease; }
.combo {
  position: absolute;
  left: 50%;
  top: calc(max(28px, env(safe-area-inset-top, 0px)) + 128px);
  transform: translateX(-50%);
  font-size: 16px;
  font-weight: 800;
  color: #65E804;
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  border: 2px solid #FF8A3D;
  opacity: 0;
  white-space: nowrap;
}
.combo.show { opacity: 1; }
.tip {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.96);
  color: #325A18;
  font-weight: 800;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid #FFD7B0;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(80, 40, 10, 0.12);
}

#hurt {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 40, 40, 0) 42%, rgba(255, 30, 30, 0.42) 100%);
  opacity: 0;
}
#hurt.on { animation: hurtflash 0.38s ease-out; }
@keyframes hurtflash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.stick {
  position: absolute;
  z-index: 5;
  left: 16px;
  bottom: calc(14px + max(10px, env(safe-area-inset-bottom, 0px)));
  width: 120px;
  height: 120px;
  touch-action: none;
}
.stick-base {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 10px rgba(255, 138, 61, 0.2), 0 6px 16px rgba(80, 40, 10, 0.14);
  position: relative;
}
.stick-knob {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -27px 0 0 -27px;
  background: radial-gradient(circle at 35% 30%, #FFE7C4, #FF8A3D 55%, #89F222);
  border: 3px solid #fff;
  box-shadow: 0 4px 0 #64C612;
}
.pad {
  position: absolute;
  z-index: 5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.pad-fire {
  right: 16px;
  bottom: calc(16px + max(10px, env(safe-area-inset-bottom, 0px)));
  width: 88px;
  height: 88px;
  color: #fff;
  font-size: 16px;
  border: 4px solid #fff;
  background: radial-gradient(circle at 35% 30%, #FFD0A6, #FF8A3D 46%, #65E804);
  box-shadow: 0 6px 0 #64C612, 0 10px 16px rgba(198, 83, 18, 0.35);
}
.pad-fire.on { transform: translateY(3px) scale(0.98); box-shadow: 0 3px 0 #64C612; }
.pad-fire.hint { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse {
  50% { box-shadow: 0 6px 0 #64C612, 0 0 0 10px rgba(255, 138, 61, 0.28); }
}
.pad-jump {
  right: 28px;
  bottom: calc(116px + max(10px, env(safe-area-inset-bottom, 0px)));
  width: 64px;
  height: 64px;
  color: #488A12;
  font-size: 18px;
  border: 4px solid #fff;
  background: radial-gradient(circle at 35% 30%, #fff, #FFE7C4 42%, #FFC48A);
  box-shadow: 0 5px 0 #89E060, 0 8px 14px rgba(120, 60, 10, 0.2);
}
.pad-jump.on { transform: translateY(3px) scale(0.96); box-shadow: 0 2px 0 #89E060; }

.panel {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding: calc(max(28px, env(safe-area-inset-top, 0px)) + 10px) 16px calc(max(12px, env(safe-area-inset-bottom, 0px)) + 12px);
  gap: 12px;
}
#panel-start {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 22, 30, 0.04) 0%, rgba(16, 22, 30, 0.02) 46%, rgba(8, 10, 14, 0.42) 100%);
}
.start-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}
.diff-card {
  flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(60, 30, 10, 0.16);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.diff-label {
  font-size: 12px;
  font-weight: 800;
  color: #778A68;
  letter-spacing: 0.06em;
}
.diff { display: flex; gap: 6px; }
.diff.wrap { flex-wrap: wrap; }
.diff.wrap .diff-btn { flex: 1 1 calc(50% - 6px); }
.diff-btn {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 4px;
  border-radius: 12px;
  white-space: nowrap;
  background: #F6F3EE;
  color: #455C36;
  font-size: 14px;
  font-weight: 800;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.diff-btn.on {
  color: #fff;
  background: linear-gradient(180deg, #FFB072, #FF8A3D 52%, #89F222);
  border-color: #fff;
  box-shadow: 0 3px 0 #64C612;
}
.diff-btn:active { transform: translateY(1px); }
.diff-hint {
  font-size: 12px;
  font-weight: 700;
  color: #778A68;
  line-height: 1.35;
}
.pick { display: flex; gap: 10px; flex-shrink: 0; }
.tips { flex-shrink: 0; }
#panel-start .card { flex-shrink: 0; }
.pick-btn {
  position: relative;
  flex: 1;
  height: 84px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 3px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(180deg, #f4f7fa, #d5dde6);
  box-shadow: 0 6px 16px rgba(16, 22, 30, 0.2);
}
.pick-btn.on {
  border-color: #FF8A3D;
  box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.35), 0 8px 16px rgba(16, 22, 30, 0.2);
}
.pick-btn:active { transform: translateY(2px); }
.pick-btn img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 84% 72%;
  pointer-events: none;
}
.pick-btn span {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #17181A;
  font-size: 13px;
  font-weight: 800;
}
.pick-btn .atk {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #FF8A3D;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 16px;
}
.pick-btn[data-hero="hero_m"] .atk { background: #3D6BFF; }
.logo { margin-top: 4px; margin-bottom: 0; text-align: center; }
.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.94);
  color: #73E31E;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(70, 36, 10, 0.1);
}
.ribbon {
  display: inline-block;
  margin-top: 10px;
  background: linear-gradient(180deg, #FFE7C4, #FFC48A);
  color: #376A0C;
  font-size: clamp(32px, 10vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  padding: 8px 22px 10px;
  border-radius: 18px;
  border: 3px solid #fff;
  box-shadow: 0 6px 0 #82E055, 0 14px 28px rgba(198, 83, 18, 0.28);
}
.tagline {
  margin: 10px 0 0;
  color: #2B1B30;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 8px rgba(255, 255, 255, 0.75);
}
.card {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(60, 30, 10, 0.16);
}
.who { display: flex; align-items: center; gap: 12px; }
.who-text { min-width: 0; }
.who-name {
  font-size: 17px;
  font-weight: 800;
  color: #17181A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.who-meta { margin-top: 2px; font-size: 12px; color: #778A68; font-weight: 700; }
.who-meta b { color: #65E804; font-size: 15px; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(180deg, #FFB067, #FF8A3D) center/cover no-repeat;
  box-shadow: inset 0 0 0 2px #fff, 0 4px 10px rgba(198, 83, 18, 0.28);
}
.btn-main {
  width: 100%;
  height: 56px;
  flex-shrink: 0;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #FFB072, #FF8A3D 48%, #89F222);
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 6px 0 #64C612, 0 12px 22px rgba(242, 101, 34, 0.32);
  text-shadow: 0 1px 0 rgba(140, 50, 10, 0.35);
}
.btn-main .mp-icon { width: 22px; height: 22px; color: #fff; }
.btn-main:active { transform: translateY(4px); box-shadow: 0 2px 0 #64C612; }
.btn-ghost {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: #FFF4E8;
  color: #488A12;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid rgba(255, 138, 61, 0.4);
  box-shadow: 0 3px 0 #C7F0B4;
}
.btn-ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 #C7F0B4; }
.btn-main:focus-visible, .btn-ghost:focus-visible, .pad:focus-visible {
  outline: 3px solid #FFE08A;
  outline-offset: 2px;
}
.tips { display: flex; gap: 8px; }
.tips span {
  flex: 1;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  color: #486A32;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

#panel-over {
  justify-content: center;
  background: rgba(48, 26, 12, 0.5);
}
.over-card {
  width: min(440px, 100%);
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 40px rgba(40, 20, 0, 0.28);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.over-card .who {
  background: #F7F4EF;
  border-radius: 14px;
  padding: 8px 10px;
}
.over-kicker {
  text-align: center;
  color: #778A68;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.over-score {
  text-align: center;
  font-size: 48px;
  line-height: 1;
  font-weight: 800;
  color: #65E804;
  font-variant-numeric: tabular-nums;
}
.new-badge {
  align-self: center;
  background: linear-gradient(180deg, #FFE08A, #FFB020);
  color: #266A08;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}
.stats { display: flex; gap: 8px; }
.stats div {
  flex: 1;
  background: #F7F4EF;
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
}
.stats b {
  display: block;
  color: #1E2A18;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stats span { color: #778A68; font-size: 12px; font-weight: 700; }

@media (max-height: 760px) {
  .logo { margin-top: 0; }
  .tagline { display: none; }
  .ribbon { font-size: 28px; margin-top: 6px; padding: 6px 16px; }
  .pick-btn { height: 72px; }
  .diff-card { padding: 8px 10px; gap: 6px; }
}
@media (max-height: 560px) {
  .logo { margin-top: 4px; }
  .tagline { display: none; }
  .pick-btn { height: 64px; }
  .ribbon { font-size: 26px; padding: 6px 14px; }
  .diff-btn { height: 44px; font-size: 13px; }
  .pad-fire { width: 72px; height: 72px; font-size: 14px; }
  .pad-jump {
    width: 56px;
    height: 56px;
    font-size: 16px;
    bottom: calc(96px + max(8px, env(safe-area-inset-bottom, 0px)));
  }
  .stick, .stick-base { width: 100px; height: 100px; }
  .stick-knob { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
}

/* 废土射击：保持原有触控命中区域，仅收紧菜单与 HUD。 */
#stage { touch-action: auto; }
#cv { touch-action: none; }
.start-scroll, .start-scroll button { touch-action: pan-y; }
#panel-start .ribbon { margin-bottom: 0; }
#weapon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 340px);
}
#weapon .diff-btn { height: 44px; font-size: 13px; border-radius: 9px; }
#pick { width: min(100%, 440px); margin: auto auto 3px; }
#hud { padding: max(8px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 0 max(12px, env(safe-area-inset-left, 0px)); }
.hud-top { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.hud-center { display: grid; justify-items: center; gap: 2px; }
.battle-title { color: #fff; font-size: 14px; font-weight: 800; text-shadow: 0 1px 3px #212c1c; }
.hud-center .wave-pill { padding: 2px 8px; color: #376a0c; }
.hud-dist { margin-top: 0; font-variant-numeric: tabular-nums; }
.banner, .tip { max-width: calc(100vw - 32px); white-space: normal; text-align: center; font-size: 12px; padding: 4px 9px; border-width: 2px; }
.banner { top: calc(max(8px, env(safe-area-inset-top, 0px)) + 52px); color: #376a0c; }
.tip { top: calc(max(8px, env(safe-area-inset-top, 0px)) + 84px); transform: translateX(-50%); }
.stick-base, .stick-knob, .pad-fire, .pad-jump { background: linear-gradient(145deg, #ffb072, #ff8a3d 42%, #78d229); }
.stick-base { background: linear-gradient(145deg, rgba(255,138,61,.72), rgba(120,210,41,.72)); }
.pad-jump, .pad-fire { color: #212c1c; }

@media (orientation: landscape) {
  #panel-start { align-items: center; padding-top: max(8px, env(safe-area-inset-top, 0px)); gap: 6px; }
  .start-scroll {
    width: min(100%, 820px);
    display: grid;
    grid-template-columns: minmax(155px, 1fr) minmax(0, 1.9fr);
    grid-template-areas: "logo settings" "profile settings" "tips settings" "skins skins";
    align-content: start;
    gap: 6px 12px;
    padding: 3px;
  }
  .start-scroll .logo { grid-area: logo; }
  .start-scroll .ribbon { margin-top: 0; font-size: clamp(25px, 5vw, 40px); }
  .start-scroll .card { grid-area: profile; }
  .start-scroll .diff-card {
    grid-area: settings;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 8px;
    padding: 8px;
  }
  .start-scroll .diff-label { letter-spacing: 0; }
  .start-scroll .diff-hint { grid-column: 1 / -1; }
  .start-scroll .tips { grid-area: tips; align-self: start; }
  .start-scroll .tips span { padding: 4px 2px; }
  #pick { grid-area: skins; }
  #pick .pick-btn { height: clamp(44px, 16vh, 72px); }
  #panel-start > .btn-main { width: min(100%, 460px); height: 44px; }
}

/* Compact landscape menu and shared battle controls. */
#stage {
  --edge-x: 12px;
  --edge-y: 8px;
  --battle-pad: linear-gradient(150deg, #FFB072 0%, #FF8A3D 44%, #91D944 100%);
}
#hud {
  padding: calc(var(--edge-y) + env(safe-area-inset-top, 0px))
    calc(var(--edge-x) + env(safe-area-inset-right, 0px)) 0
    calc(var(--edge-x) + env(safe-area-inset-left, 0px));
}
#hud .heart-pill, #hud .score-pill { padding: 4px 8px; border-radius: 10px; }
#hud .hud-dist { margin-top: 0; font-size: 16px; color: #304026; font-variant-numeric: tabular-nums; }
#hud .hud-score { font-size: 13px; color: #406624; }
#hud .wave-pill { padding: 1px 9px; color: #406624; }
#hud .battle-title { font-size: 14px; }
#hud .tip, #hud .banner {
  left: 50%;
  max-width: min(76%, 300px);
  text-align: center;
  white-space: normal;
  padding: 3px 9px;
  border-width: 1px;
  font-size: 12px;
  line-height: 1.4;
  color: #325A18;
}
#hud .tip { top: calc(env(safe-area-inset-top, 0px) + 80px); transform: translateX(-50%); }
#hud .banner { top: calc(env(safe-area-inset-top, 0px) + 54px); }
#hud .combo { top: calc(env(safe-area-inset-top, 0px) + 108px); }
#stage .stick-base, #stage .stick-knob, #stage .pad { background: var(--battle-pad); }
#stage .stick-base { opacity: .78; }
#stage .pad { color: #202916; }
#stage .stick { left: calc(12px + env(safe-area-inset-left, 0px)); }
#stage .pad-fire { right: calc(12px + env(safe-area-inset-right, 0px)); }
#stage .pad-jump { right: calc(22px + env(safe-area-inset-right, 0px)); }
#panel-start .start-scroll { touch-action: pan-y; }
#panel-start .diff-btn, #panel-start .pick-btn { touch-action: pan-y; }
#panel-start .diff-btn:focus-visible, #panel-start .pick-btn:focus-visible {
  outline: 2px solid #2C5216;
  outline-offset: -3px;
}
#panel-start #weapon { width: min(100%, 280px); }
#panel-start #weapon .diff-btn { min-height: 44px; height: auto; font-size: 12px; padding: 3px 2px; }
#panel-start .pick { margin-top: auto; width: min(100%, 420px); justify-self: center; }
#panel-start .pick-btn { height: clamp(46px, 15dvh, 74px); }
@media (orientation: landscape) {
  #panel-start { padding: calc(6px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) calc(16px + env(safe-area-inset-left, 0px)); gap: 5px; }
  #panel-start .start-scroll {
    display: grid;
    grid-template-columns: minmax(145px, 1fr) minmax(275px, 1.55fr);
    grid-template-rows: auto 1fr auto;
    align-items: center;
    gap: 5px 14px;
    width: min(100%, 780px);
    margin: 0 auto;
    padding: 3px;
  }
  #panel-start .logo { grid-area: 1 / 1; margin: 0; }
  #panel-start .ribbon { margin: 0; font-size: clamp(22px, 8dvh, 38px); padding: 3px 12px 5px; }
  #panel-start .tagline { display: none; }
  #panel-start .card { grid-area: 2 / 1; padding: 6px 9px; }
  #panel-start .avatar { width: 32px; height: 32px; font-size: 16px; }
  #panel-start .diff-card { grid-area: 1 / 2 / 3 / 3; gap: 4px; padding: 7px 9px; }
  #panel-start .diff-btn { height: 36px; border-radius: 8px; }
  #panel-start #weapon .diff-btn { min-height: 36px; }
  #panel-start .tips { display: none; }
  #panel-start .pick { grid-area: 3 / 1 / 4 / 3; margin: 0; }
  #panel-start #btn-start { width: min(100%, 420px); min-height: 42px; height: 42px; align-self: center; }
}

#panel-start .menu-reference {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
#panel-start .start-scroll { min-width: 0; }
#panel-start .diff-btn.on { color: #263119; }
@media (orientation: landscape) {
  #panel-start .start-scroll { grid-template-areas: none; }
  #panel-start .diff-card {
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
  }
  #panel-start #weapon { width: min(100%, 240px); }
  #panel-start #weapon .diff-btn { min-height: 36px; }
}

#panel-start { isolation: isolate; }
#panel-start .diff-card { min-width: 0; }
#panel-start .pick-btn:focus-visible { outline-color: #FF8A3D; }
@media (orientation: landscape) {
  #panel-start .start-scroll { align-self: stretch; }
  #panel-start .diff-card { display: grid; }
  #panel-start #weapon { justify-self: start; }
  #panel-start .diff-btn { height: 44px; }
  #panel-start #weapon .diff-btn { min-height: 44px; }
  #panel-start .pick { align-self: end; }
}
@media (orientation: landscape) and (max-height: 340px) {
  #panel-start .diff-label, #panel-start .diff-hint { font-size: 11px; }
  #panel-start .diff-btn { height: 38px; }
  #panel-start #weapon .diff-btn { min-height: 38px; }
}

@media (orientation: landscape) and (min-height: 355px) {
  #panel-start .logo { grid-area: 1 / 1 / 2 / 3; }
  #panel-start .diff-card { grid-area: 2 / 2 / 3 / 3; }
}
@media (orientation: landscape) and (max-width: 500px) {
  #panel-start .start-scroll { grid-template-columns: minmax(82px, .55fr) minmax(0, 1.45fr); gap: 5px 8px; }
  #panel-start .diff-card { padding-inline: 6px; column-gap: 4px; }
  #panel-start .diff-btn { font-size: 12px; }
  #panel-start .who { flex-wrap: wrap; gap: 4px; }
}
