:root {
  --ink: #14281f;
  --ink-soft: #395047;
  --paper: #f5f1e5;
  --paper-bright: #fffdf6;
  --forest: #1b493b;
  --forest-dark: #102d25;
  --lime: #d6f278;
  --coral: #f26a4f;
  --coral-dark: #c84631;
  --gold: #e8b949;
  --line: rgba(20, 40, 31, 0.16);
  --shadow: 7px 7px 0 var(--ink);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  padding-right: env(safe-area-inset-right);
  padding-left: env(safe-area-inset-left);
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(214, 242, 120, 0.42), transparent 23rem),
    radial-gradient(circle at 96% 82%, rgba(242, 106, 79, 0.16), transparent 30rem),
    var(--paper);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-x: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  touch-action: manipulation;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.page-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1500px, calc(100% - 48px));
  min-height: 98px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--lime);
  background: var(--forest);
  border: 2px solid var(--ink);
  border-radius: 16px 16px 16px 4px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-2deg);
}

.brand-mark svg {
  width: 39px;
  height: 39px;
  overflow: visible;
  fill: currentColor;
  stroke: none;
}

.brand-mark svg path:first-child {
  fill: currentColor;
}

.brand-mark svg path:nth-child(n + 3) {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.brand-mark .brand-mark-light {
  fill: var(--forest);
  opacity: 0.72;
}

.brand-mark circle {
  fill: var(--ink);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.brand-copy small {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(242, 106, 79, 0.12);
  animation: pulse 2s ease-in-out infinite;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 253, 246, 0.72);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: transform 160ms ease, background 160ms ease;
}

.icon-button:hover {
  background: var(--paper-bright);
  transform: translateY(-2px);
}

.icon-button svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button .sound-on {
  display: none;
}

.icon-button.is-sound-on .sound-on {
  display: block;
}

.icon-button.is-sound-on .sound-off {
  display: none;
}

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 26px;
  width: min(1500px, calc(100% - 48px));
  margin: 38px auto 54px;
  align-items: start;
}

.arena-column {
  min-width: 0;
}

.section-kicker {
  display: flex;
  justify-content: space-between;
  margin: 0 4px 12px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker span:first-child {
  color: var(--coral-dark);
}

.arena-card {
  overflow: hidden;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.arena-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: var(--paper-bright);
  border-bottom: 1px solid var(--line);
}

.arena-title-group,
.arena-toolbar-right {
  display: flex;
  align-items: center;
}

.arena-title-group {
  gap: 12px;
}

.arena-toolbar-right {
  gap: 9px;
}

.arena-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #ecf0d3;
  border: 1px solid rgba(20, 40, 31, 0.2);
  border-radius: 12px;
  font-size: 21px;
}

.arena-title-group h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
}

.arena-title-group p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: #efede3;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.status-pill span {
  width: 7px;
  height: 7px;
  background: #9a9c91;
  border-radius: 50%;
}

.status-pill.is-fighting {
  color: #8e2d20;
  background: #ffe4dc;
}

.status-pill.is-fighting span {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(242, 106, 79, 0.14);
  animation: pulse 1.2s infinite;
}

.speed-button {
  min-width: 42px;
  height: 32px;
  padding: 0 10px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.speed-button:hover {
  background: var(--paper);
}

.stage-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9.7;
  min-height: 390px;
  background: #203d2f;
  isolation: isolate;
}

#arena {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}

#arena3d {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity 180ms ease;
}

#arena3d.is-active {
  opacity: 1;
  pointer-events: auto;
}

.view-button {
  min-width: 34px;
  color: var(--ink);
  background: var(--lime);
  border-color: rgba(18, 49, 34, 0.24);
}

.view-button.is-2d {
  color: var(--ink-soft);
  background: var(--paper);
}

.camera-panel {
  position: absolute;
  z-index: 7;
  top: 112px;
  right: 20px;
  display: none;
  width: 176px;
  padding: 9px 10px 8px;
  color: white;
  background: rgba(7, 22, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 11px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.camera-panel.is-visible {
  display: block;
}

.camera-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.camera-heading button {
  padding: 2px 6px;
  color: var(--ink);
  background: var(--lime);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 7px;
  cursor: pointer;
}

.camera-panel label {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 7px;
  font-weight: 800;
}

.camera-panel input[type="range"] {
  width: 100%;
  height: 16px;
}

.camera-panel small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 7px;
}

.fighter-hud {
  position: absolute;
  z-index: 4;
  top: 22px;
  width: clamp(180px, 28%, 280px);
  padding: 11px 12px 9px;
  color: white;
  background: rgba(9, 24, 20, 0.67);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 13px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(12px);
}

.fighter-hud-roach {
  left: 22px;
}

.fighter-hud-snake {
  right: 22px;
}

.hud-topline,
.hud-bottomline {
  display: flex;
  align-items: center;
}

.hud-topline {
  gap: 6px;
  margin-bottom: 7px;
}

.fighter-side {
  padding: 2px 5px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 4px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.fighter-hud-snake .fighter-side {
  color: white;
  background: var(--coral);
}

.hud-topline strong {
  overflow: hidden;
  flex: 1;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-size {
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.health-track {
  position: relative;
  overflow: hidden;
  height: 9px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.health-lag,
.health-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
}

.health-lag {
  z-index: 0;
  background: rgba(255, 255, 255, 0.55);
  transition: width 700ms ease 250ms;
}

.health-fill {
  z-index: 1;
  transition: width 180ms ease-out;
}

.roach-health {
  background: linear-gradient(90deg, #efc84b, var(--lime));
}

.snake-health {
  background: linear-gradient(90deg, #ef765d, #ffb065);
}

.ultimate-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
}

.ultimate-track {
  position: relative;
  flex: 1;
  overflow: hidden;
  height: 6px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.ultimate-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #4adbd1, #f4e85d 72%, #fff4a8);
  border-radius: inherit;
  box-shadow: 0 0 9px rgba(244, 232, 93, 0.65);
  transition: width 160ms linear;
}

.ultimate-button {
  min-width: 44px;
  height: 19px;
  padding: 0 7px;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font: inherit;
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 0.04em;
  cursor: default;
}

.ultimate-button:disabled {
  opacity: 0.7;
}

.ultimate-button.is-ready {
  color: var(--ink);
  background: var(--lime);
  border-color: #fff4a8;
  box-shadow: 0 0 0 2px rgba(244, 232, 93, 0.25), 0 0 16px rgba(244, 232, 93, 0.72);
  cursor: pointer;
  animation: ultimate-ready 760ms ease-in-out infinite;
}

.ultimate-button.is-queued {
  color: var(--ink);
  background: #f4e86b;
  opacity: 1;
}

.hud-bottomline {
  justify-content: space-between;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  font-weight: 700;
}

.hud-bottomline span:first-child {
  overflow: hidden;
  max-width: 60%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.intro-banner {
  position: absolute;
  z-index: 10;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: max-content;
  padding: 15px 32px 13px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.7) rotate(-3deg);
  transition: opacity 160ms ease, transform 220ms cubic-bezier(0.2, 1.5, 0.4, 1);
}

.intro-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) rotate(-2deg);
}

.intro-eyebrow {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.intro-banner strong {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.floating-callout {
  position: absolute;
  z-index: 11;
  top: 44%;
  left: 50%;
  color: white;
  font-size: clamp(22px, 3vw, 35px);
  font-weight: 1000;
  font-style: italic;
  letter-spacing: -0.03em;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-shadow:
    -2px -2px 0 var(--ink),
    2px -2px 0 var(--ink),
    -2px 2px 0 var(--ink),
    2px 2px 0 var(--ink),
    0 6px 16px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%) rotate(-5deg) scale(0.5);
}

.floating-callout.is-visible {
  animation: callout-pop 1s cubic-bezier(0.2, 1.2, 0.3, 1) both;
}

.floating-callout.is-danger {
  color: #ffd05f;
}

.floating-callout.is-roach {
  color: var(--lime);
}

.floating-callout.is-snake {
  color: #ff9a7f;
}

.result-panel {
  position: absolute;
  z-index: 20;
  top: 50%;
  left: 50%;
  display: none;
  width: min(420px, calc(100% - 36px));
  padding: 28px;
  color: var(--ink);
  text-align: center;
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: 9px 9px 0 rgba(4, 14, 11, 0.68);
  transform: translate(-50%, -50%);
}

.result-panel.is-visible {
  display: block;
  animation: result-in 420ms cubic-bezier(0.1, 1.2, 0.2, 1) both;
}

.result-rays {
  position: absolute;
  inset: -200px;
  z-index: -1;
  opacity: 0.2;
  background: repeating-conic-gradient(from 0deg, var(--lime) 0deg 12deg, transparent 12deg 24deg);
  border-radius: 50%;
  animation: spin 18s linear infinite;
}

.result-kicker,
.tiny-label {
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.result-emblem {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 12px auto 10px;
  place-items: center;
  background: #edf1d3;
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 38px;
  transform: rotate(-5deg);
}

.result-panel h2 {
  margin: 0;
  font-size: clamp(27px, 4vw, 39px);
  font-weight: 1000;
  letter-spacing: -0.06em;
}

.result-panel > p {
  margin: 8px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 20px;
  padding: 13px 0;
  border-block: 1px solid var(--line);
}

.result-stats div + div {
  border-left: 1px solid var(--line);
}

.result-stats strong,
.result-stats span {
  display: block;
}

.result-stats strong {
  font-size: 18px;
}

.result-stats span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
}

.result-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 9px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 17px;
  cursor: pointer;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: white;
  background: var(--forest);
  box-shadow: 3px 3px 0 var(--ink);
}

.button-primary:hover {
  box-shadow: 4px 5px 0 var(--ink);
}

.button-secondary {
  background: white;
}

.stage-controls {
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 16px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.stage-controls > * {
  pointer-events: auto;
}

.fight-button {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 11px;
  min-height: 54px;
  padding: 6px 18px 6px 7px;
  cursor: pointer;
  text-align: left;
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.fight-button:hover {
  box-shadow: 6px 6px 0 var(--ink);
  transform: translateY(-2px);
}

.fight-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.fight-button-icon {
  display: grid;
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  place-items: center;
  color: white;
  background: var(--forest);
  border-radius: 10px;
}

.fight-button-icon svg {
  width: 18px;
  fill: currentColor;
}

.fight-button-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fight-button-copy strong {
  font-size: 13px;
  font-weight: 1000;
}

.fight-button-copy small {
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 700;
}

.round-button {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 253, 246, 0.9);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--ink);
}

.round-button:hover {
  background: white;
}

.round-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.round-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.commentary-card {
  margin-top: 24px;
  padding: 20px 22px;
  background: rgba(255, 253, 246, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.commentary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.commentary-heading h2 {
  margin: 2px 0 0;
  font-size: 17px;
}

.commentary-state {
  padding: 5px 9px;
  color: var(--ink-soft);
  background: #e9e8dc;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.commentary-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 132px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.commentary-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 8px 2px;
  border-bottom: 1px dashed var(--line);
}

.commentary-item:last-child {
  border-bottom: 0;
}

.commentary-time {
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.commentary-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.commentary-item:first-child p {
  color: var(--ink);
  font-weight: 700;
}

.commentary-item-muted {
  opacity: 0.66;
}

.control-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(20, 40, 31, 0.08);
  scrollbar-width: thin;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 3px 0 4px;
  font-size: 24px;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.panel-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.5;
}

.panel-number {
  color: rgba(20, 40, 31, 0.13);
  font-size: 42px;
  font-weight: 1000;
  line-height: 0.9;
}

.preset-block {
  padding: 12px;
  background: #f0eee2;
  border-radius: var(--radius-sm);
}

.control-label {
  display: block;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.preset-chip {
  min-height: 30px;
  padding: 4px 5px;
  cursor: pointer;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
}

.preset-chip:hover,
.preset-chip.is-active {
  color: white;
  background: var(--forest);
  border-color: var(--forest);
}

.fighter-config {
  margin: 14px -2px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.roach-config {
  background: #f7f5ea;
}

.snake-config {
  background: #f4f0e7;
}

.config-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.fighter-avatar {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  background: var(--forest);
  border-radius: 13px;
}

.fighter-avatar svg {
  width: 43px;
  height: 43px;
  overflow: visible;
}

.roach-avatar svg {
  width: 45px;
  height: 45px;
}

.roach-avatar .mantis-legs,
.roach-avatar .mantis-antennae,
.roach-avatar .mantis-foreleg {
  fill: none;
  stroke: #e8c98d;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.roach-avatar .mantis-wing {
  fill: var(--roach-main, #6f963f);
  opacity: 0.52;
  stroke: #dce994;
  stroke-width: 0.8;
}

.roach-avatar .mantis-body {
  fill: var(--roach-main, #6f963f);
  stroke: #dce994;
  stroke-width: 0.8;
}

.roach-avatar .mantis-thorax {
  fill: #9cb66d;
  fill: color-mix(in srgb, var(--roach-main, #6f963f) 75%, #dfea9d);
}

.roach-avatar .mantis-head {
  fill: var(--roach-light, #88a955);
  stroke: #dce994;
  stroke-width: 0.8;
}

.roach-avatar .mantis-eye {
  fill: #182018;
}

.snake-avatar {
  background: #ded7bd;
}

.snake-avatar .snake-body {
  fill: none;
  stroke: var(--snake-main, #526338);
  stroke-width: 10;
  stroke-linecap: round;
}

.snake-avatar .snake-head {
  fill: var(--snake-main, #526338);
}

.snake-avatar .snake-eye {
  fill: var(--snake-eye, #f6ca54);
}

.snake-avatar .snake-mark {
  fill: none;
  stroke: #d3bd73;
  stroke-width: 2;
  stroke-linecap: round;
}

.fighter-tag {
  display: block;
  margin-bottom: 2px;
  color: var(--coral-dark);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.config-title-row h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
}

.type-chip {
  margin-left: auto;
  padding: 4px 7px;
  color: var(--forest);
  background: #e8eebf;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
}

.snake-type-chip {
  background: #f3ded4;
}

.skin-row {
  margin-bottom: 14px;
}

.color-options {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.color-swatch,
.color-picker {
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  background: var(--swatch);
  border: 2px solid var(--paper-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.color-swatch:hover,
.color-swatch.is-active {
  box-shadow: 0 0 0 2px var(--ink);
  transform: scale(1.1);
}

.color-picker {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: white;
  border: 1px dashed var(--ink-soft);
  font-size: 15px;
  font-weight: 700;
}

.color-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.skin-attribute {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 7px 9px;
  background: rgba(111, 150, 63, 0.09);
  border: 1px solid rgba(20, 40, 31, 0.08);
  border-radius: 8px;
}

.skin-attribute-mark {
  display: grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--forest);
  background: #e3ebc9;
  border-radius: 6px;
  font-size: 12px;
}

.skin-attribute p {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
}

.skin-attribute strong {
  font-size: 8px;
}

.skin-attribute small {
  color: var(--ink-soft);
  font-size: 7px;
  line-height: 1.45;
}

.range-control {
  margin-bottom: 10px;
}

.range-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.range-heading label {
  font-size: 10px;
  font-weight: 900;
}

.range-heading output {
  padding: 2px 7px;
  color: var(--forest);
  background: #e4ecd0;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  height: 16px;
  margin: 0;
  cursor: pointer;
  appearance: none;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: linear-gradient(90deg, var(--forest) var(--fill, 50%), #dddbd0 var(--fill, 50%));
  border-radius: 999px;
}

input[type="range"]::-moz-range-track {
  height: 4px;
  background: linear-gradient(90deg, var(--forest) var(--fill, 50%), #dddbd0 var(--fill, 50%));
  border-radius: 999px;
}

input[type="range"]::-webkit-slider-thumb {
  width: 16px;
  height: 16px;
  margin-top: -6px;
  appearance: none;
  background: var(--paper-bright);
  border: 4px solid var(--forest);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  background: var(--paper-bright);
  border: 4px solid var(--forest);
  border-radius: 50%;
}

.range-ends {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  color: #7c877f;
  font-size: 7px;
  font-weight: 700;
}

.stats-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.stat-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
}

.stat-row label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stat-row label span {
  font-size: 10px;
  font-weight: 900;
}

.stat-row label small {
  color: #7c877f;
  font-size: 7px;
}

.stat-row output {
  text-align: right;
  font-size: 10px;
  font-weight: 900;
}

.species-block {
  margin-bottom: 13px;
}

.mantis-species-block {
  margin-bottom: 13px;
}

.mantis-species-block .ability-note {
  margin-top: 8px;
}

.snake-config #speciesGrid .species-card:last-child {
  grid-column: 1 / -1;
}

.species-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.species-card {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 150ms ease, transform 150ms ease;
}

.species-card:hover {
  transform: translateY(-1px);
}

.species-card.is-active {
  border: 1.5px solid var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}

.species-dot {
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  background: var(--species-color);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(20, 40, 31, 0.16);
}

.species-card span:last-child {
  display: flex;
  flex-direction: column;
}

.species-card strong {
  font-size: 9px;
}

.species-card small {
  color: #7c877f;
  font-size: 7px;
}

.ability-note {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 9px;
  background: #e9e9d9;
  border-radius: 8px;
}

.ability-icon {
  color: var(--coral-dark);
  font-size: 12px;
}

.ability-note p {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
}

.ability-note strong {
  font-size: 8px;
}

.ability-note span {
  color: var(--ink-soft);
  font-size: 7px;
  line-height: 1.5;
}

.skill-strip {
  display: flex;
  gap: 7px;
  align-items: baseline;
  margin-top: 7px;
  padding: 5px 2px 0;
  color: var(--ink-soft);
  font-size: 7px;
  line-height: 1.5;
}

.skill-strip span {
  flex: 0 0 auto;
  padding: 1px 4px;
  color: var(--forest);
  background: #e3ebc9;
  border-radius: 4px;
  font-weight: 900;
}

.skill-strip p {
  margin: 0;
}

.scene-config {
  margin: 14px -2px 0;
  padding: 15px 16px;
  background: #f4f1e7;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.compact-title {
  margin-bottom: 10px;
}

.scene-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.scene-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  cursor: pointer;
  text-align: left;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.scene-card.is-active {
  border: 1.5px solid var(--forest);
  box-shadow: inset 0 0 0 1px var(--forest);
}

.scene-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 42px;
  overflow: hidden;
  border-radius: 6px;
}

.scene-preview::before,
.scene-preview::after {
  position: absolute;
  content: "";
}

.scene-preview-jungle {
  background: linear-gradient(160deg, #446e4c, #163c31 60%, #0d2922);
}

.scene-preview-jungle::before {
  right: 12%;
  bottom: -17px;
  width: 25px;
  height: 60px;
  background: #24452b;
  box-shadow: -54px 16px 0 #31563a, -32px -5px 0 #31563a;
  transform: rotate(12deg);
}

.scene-preview-jungle::after {
  right: 8%;
  top: 5px;
  width: 50px;
  height: 5px;
  background: #8ba65e;
  border-radius: 50%;
  box-shadow: -42px 24px 0 -1px #8ba65e;
  transform: rotate(-24deg);
}

.scene-preview-kitchen {
  background:
    linear-gradient(90deg, transparent 48%, rgba(28, 67, 58, 0.4) 49%, rgba(28, 67, 58, 0.4) 51%, transparent 52%),
    linear-gradient(0deg, #bd7450 0 31%, #e7d2ae 32% 100%);
  background-size: 22px 100%, 100% 100%;
}

.scene-preview-kitchen::before {
  right: 8px;
  bottom: 8px;
  width: 23px;
  height: 13px;
  background: #29473d;
  border-radius: 3px 3px 8px 8px;
}

.scene-preview-kitchen::after {
  right: 14px;
  bottom: 20px;
  width: 12px;
  height: 5px;
  background: #f3ece0;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 -2px 0 #c84f3a;
}

.scene-preview-desert {
  background: linear-gradient(#f0a760 0 54%, #d68347 55%);
}

.scene-preview-desert::before {
  right: -8px;
  bottom: -18px;
  width: 80px;
  height: 44px;
  background: #bd6036;
  border-radius: 50%;
  box-shadow: -50px 12px 0 #e39b5b;
}

.scene-preview-desert::after {
  left: 12px;
  bottom: 12px;
  width: 7px;
  height: 24px;
  background: #547145;
  border-radius: 4px;
  box-shadow: 5px 7px 0 -2px #547145, -4px 8px 0 -3px #547145;
}

.scene-preview-lab {
  background:
    linear-gradient(90deg, transparent 49%, rgba(58, 191, 171, 0.26) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(58, 191, 171, 0.2) 50%, transparent 51%),
    #163e39;
  background-size: 15px 15px;
}

.scene-preview-lab::before {
  top: 6px;
  left: 10px;
  width: 30px;
  height: 30px;
  border: 2px solid #6bc7aa;
  border-radius: 50%;
}

.scene-preview-lab::after {
  right: 10px;
  bottom: 8px;
  width: 38px;
  height: 3px;
  background: #72d8bd;
  box-shadow: 0 6px 0 rgba(114, 216, 189, 0.45);
}

.scene-card strong,
.scene-card small {
  display: block;
}

.scene-card strong {
  font-size: 9px;
}

.scene-card small {
  margin-top: 1px;
  color: #7c877f;
  font-size: 7px;
}

.scene-check {
  position: absolute;
  top: 4px;
  right: 4px;
  display: none;
  width: 16px;
  height: 16px;
  color: white;
  background: var(--forest);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
}

.scene-card.is-active .scene-check {
  display: block;
}

.power-summary {
  margin: 15px -2px 0;
  padding: 14px 16px;
  color: white;
  background: var(--forest);
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
}

.power-heading,
.power-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.power-heading {
  margin-bottom: 9px;
  font-size: 8px;
  font-weight: 800;
}

.power-heading span:last-child {
  color: var(--lime);
}

.power-bar {
  display: flex;
  gap: 3px;
  height: 8px;
}

.power-roach,
.power-snake {
  border-radius: 999px;
  transition: width 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.power-roach {
  width: 48%;
  background: var(--lime);
}

.power-snake {
  width: 52%;
  background: var(--coral);
}

.power-labels {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 7px;
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 38px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 9px;
}

.site-footer p {
  margin: 0;
}

.footer-tip span {
  margin-right: 7px;
  padding: 2px 5px;
  color: var(--ink);
  background: var(--lime);
  border-radius: 3px;
  font-weight: 900;
}

.help-dialog {
  width: min(620px, calc(100% - 32px));
  padding: 34px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow: 10px 10px 0 var(--ink);
}

.help-dialog::backdrop {
  background: rgba(8, 25, 20, 0.63);
  backdrop-filter: blur(4px);
}

.help-dialog h2 {
  margin: 6px 0 22px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.dialog-close {
  position: absolute;
  top: 13px;
  right: 16px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 21px;
}

.help-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.help-steps > div {
  padding: 14px;
  background: #f2f0e5;
  border-radius: 12px;
}

.help-steps > div > span {
  display: block;
  margin-bottom: 5px;
  color: var(--coral-dark);
  font-size: 18px;
  font-weight: 1000;
}

.help-steps p {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.help-steps strong {
  color: var(--ink);
  font-size: 12px;
}

.help-ok {
  width: 100%;
  margin-top: 18px;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.66;
    transform: scale(0.82);
  }
}

@keyframes ultimate-ready {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes callout-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4) rotate(-10deg);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -64%) scale(1.18) rotate(-3deg);
  }
  32% {
    transform: translate(-50%, -60%) scale(1) rotate(-2deg);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -100%) scale(0.94) rotate(2deg);
  }
}

@keyframes result-in {
  0% {
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.8) rotate(-3deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1180px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 20px;
  }

  .control-panel {
    padding: 18px;
  }

  .fighter-config {
    padding: 13px;
  }

  .fighter-hud {
    width: clamp(160px, 32%, 230px);
  }
}

@media (max-width: 960px) {
  .topbar,
  .app-layout,
  .site-footer {
    width: min(760px, calc(100% - 32px));
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .control-panel > * {
    max-width: none;
  }

  .preset-block,
  .fighter-config,
  .scene-config,
  .power-summary {
    margin-inline: 0;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 78px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .topbar-center {
    display: none;
  }

  .app-layout {
    margin-top: 24px;
  }

  .section-kicker {
    font-size: 8px;
  }

  .arena-toolbar {
    padding: 13px;
  }

  .arena-icon {
    width: 35px;
    height: 35px;
    font-size: 17px;
  }

  .arena-title-group h1 {
    font-size: 16px;
  }

  .arena-title-group p {
    display: none;
  }

  .status-pill {
    padding: 0 9px;
    font-size: 9px;
  }

  .stage-wrap {
    aspect-ratio: auto;
    height: 490px;
    min-height: 0;
  }

  .fighter-hud {
    top: 12px;
    width: calc(50% - 18px);
    padding: 8px;
  }

  .fighter-hud-roach {
    left: 11px;
  }

  .fighter-hud-snake {
    right: 11px;
  }

  .camera-panel {
    top: 108px;
    right: 10px;
    width: 150px;
    padding: 7px 8px;
  }

  .fighter-side {
    display: none;
  }

  .hud-topline strong {
    font-size: 10px;
  }

  .hud-size {
    font-size: 7px;
  }

  .hud-bottomline {
    font-size: 7px;
  }

  .stage-controls {
    right: 11px;
    bottom: 11px;
    left: 11px;
  }

  .fight-button {
    min-height: 50px;
    padding-right: 10px;
  }

  .fight-button-copy small {
    display: none;
  }

  .round-button {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }

  .result-panel {
    padding: 24px 18px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .help-dialog {
    padding: 25px 18px 18px;
  }

  .help-dialog h2 {
    padding-right: 25px;
    font-size: 22px;
  }

  .help-steps {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    gap: 9px;
  }
}

@media (pointer: coarse) {
  input[type="range"] {
    height: 30px;
  }

  input[type="range"]::-webkit-slider-thumb {
    width: 21px;
    height: 21px;
    margin-top: -8px;
  }

  input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
  }

  .preset-chip {
    min-height: 38px;
  }

  .color-swatch,
  .color-picker {
    width: 31px;
    height: 31px;
  }

  .species-card {
    min-height: 48px;
  }

  .scene-card {
    min-height: 80px;
  }
}

.mobile-setup-button,
.mobile-drawer,
.mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 680px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #102d25;
  }

  .page-grain,
  .topbar,
  .section-kicker,
  .commentary-card,
  .control-panel,
  .site-footer {
    display: none !important;
  }

  .app-layout {
    display: block;
    width: 100%;
    height: var(--app-height, 100dvh);
    margin: 0;
    padding: 0;
  }

  .arena-column,
  .arena-card {
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .arena-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .arena-toolbar {
    flex: 0 0 auto;
    min-height: 56px;
    padding:
      max(8px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      8px
      max(10px, env(safe-area-inset-left));
  }

  .arena-toolbar-right {
    gap: 5px;
  }

  .mobile-setup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0 8px;
  }

  .stage-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
  }

  .fighter-hud {
    top: max(8px, env(safe-area-inset-top));
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms ease, background 120ms ease;
  }

  .fighter-hud:active {
    background: rgba(9, 24, 20, 0.82);
    transform: scale(0.988);
  }

  .stage-controls {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
  }

  .camera-panel {
    top: 100px;
    right: 8px;
    width: 140px;
    max-height: 126px;
  }

  .mobile-drawer-backdrop {
    position: fixed;
    z-index: 90;
    inset: 0;
    display: block;
    padding: 0;
    pointer-events: none;
    background: rgba(5, 15, 11, 0.56);
    border: 0;
    opacity: 0;
    backdrop-filter: blur(3px);
    transition: opacity 180ms ease;
  }

  .mobile-drawer-backdrop.is-visible {
    pointer-events: auto;
    opacity: 1;
  }

  .mobile-drawer {
    position: fixed;
    z-index: 100;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(92vw, 410px);
    color: var(--ink);
    background: var(--paper);
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.35);
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .mobile-drawer-left {
    left: 0;
    transform: translateX(-104%);
  }

  .mobile-drawer-right {
    right: 0;
    transform: translateX(104%);
  }

  .mobile-drawer-setup {
    top: auto;
    left: 50%;
    bottom: 0;
    width: min(94vw, 430px);
    height: min(84dvh, 720px);
    border-radius: 20px 20px 0 0;
    transform: translate(-50%, 104%);
  }

  .mobile-drawer.is-open {
    transform: translate(0, 0);
  }

  .mobile-drawer-left.is-open {
    transform: translateX(0);
  }

  .mobile-drawer-right.is-open {
    transform: translateX(0);
  }

  .mobile-drawer-setup.is-open {
    transform: translate(-50%, 0);
  }

  .mobile-drawer-head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding:
      max(16px, env(safe-area-inset-top))
      16px
      13px;
    color: white;
    background: var(--forest);
  }

  .mobile-drawer-head div {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .mobile-drawer-head span {
    color: var(--lime);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.14em;
  }

  .mobile-drawer-head strong {
    font-size: 17px;
  }

  .mobile-drawer-close {
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--ink);
    background: var(--lime);
    border: 0;
    border-radius: 8px;
    font-size: 22px;
    font-weight: 900;
  }

  .mobile-drawer-body {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 12px max(20px, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
  }

  .mobile-drawer .fighter-config {
    margin: 0;
    padding: 13px;
    border: 0;
    border-radius: 14px;
    box-shadow: none;
  }

  .mobile-drawer .preset-block,
  .mobile-drawer .scene-config,
  .mobile-drawer .power-summary {
    margin: 0 0 12px;
  }

  .mobile-audio-tools {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px 10px;
    margin-top: 14px;
    padding: 13px;
    background: var(--paper-bright);
    border: 1px solid var(--line);
    border-radius: 14px;
  }

  .mobile-audio-tools span {
    align-self: center;
    font-weight: 900;
  }

  .mobile-audio-actions {
    display: flex;
    gap: 8px;
  }

  .mobile-audio-actions button {
    flex: 1;
    padding: 8px 12px;
    color: white;
    background: var(--forest);
    border: 0;
    border-radius: 8px;
    font-weight: 900;
  }

  .mobile-audio-tools small {
    grid-column: 1 / -1;
    color: var(--ink-soft);
    font-size: 9px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
