:root {
  --bg: #04101a;
  --bg-soft: #071b2a;
  --panel: rgba(5, 20, 32, 0.76);
  --panel-strong: rgba(4, 18, 31, 0.9);
  --panel-soft: rgba(7, 31, 48, 0.72);
  --ink: #eaf9ff;
  --ink-soft: #94bed0;
  --ink-muted: #6f9bad;
  --border: rgba(77, 220, 255, 0.18);
  --border-strong: rgba(77, 220, 255, 0.38);
  --teal: #0fd4ff;
  --teal-dark: #7beaff;
  --orange: #ff5a33;
  --amber: #ffb84f;
  --red: #ff3f2f;
  --green: #5dffb0;
  --success: #5dffb0;
  --danger: #ff3f2f;
  --muted: #6f9bad;
  --cyan-glow: rgba(15, 212, 255, 0.42);
  --red-glow: rgba(255, 63, 47, 0.3);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --shadow: 0 22px 60px rgba(0, 7, 16, 0.48);
  --grid-gap: 1.2rem;
  --step-bg: rgba(15, 212, 255, 0.12);
  --danger-bg: rgba(255, 63, 47, 0.12);
  --warning-bg: rgba(255, 184, 79, 0.12);
}

/* Phase 1 account shell: intentionally compact, without changing the product layout. */
.account-control {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 42px;
  padding: 0.38rem 0.72rem 0.38rem 0.42rem;
  color: #edf7ff;
  background: rgba(5, 19, 31, 0.86);
  border: 1px solid rgba(100, 170, 215, 0.28);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}

.account-control:hover,
.account-control:focus-visible {
  border-color: rgba(72, 190, 255, 0.72);
  background: rgba(8, 31, 50, 0.94);
  outline: none;
}

.account-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  color: #04101a;
  background: linear-gradient(145deg, #f6b91c, #ffdb68);
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 900;
}

.account-avatar-large {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-size: 1rem;
}

.account-copy {
  display: grid;
  min-width: 82px;
  line-height: 1.15;
}

.account-copy strong {
  max-width: 150px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  margin-top: 0.18rem;
  color: #8fa6b8;
  font-size: 0.64rem;
}

.auth-dialog-backdrop {
  position: fixed;
  z-index: 3000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 7, 13, 0.76);
  backdrop-filter: blur(8px);
}

.auth-dialog-backdrop.hidden {
  display: none;
}

.auth-dialog-card {
  width: min(430px, 100%);
  max-height: min(760px, calc(100dvh - 2rem));
  overflow-y: auto;
  padding: 1.15rem;
  color: #eaf6ff;
  background:
    linear-gradient(145deg, rgba(12, 35, 54, 0.98), rgba(3, 14, 24, 0.99)),
    #071724;
  border: 1px solid rgba(76, 181, 238, 0.36);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.auth-dialog-head,
.auth-user-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-dialog-head {
  margin-bottom: 1rem;
}

.auth-dialog-head h2 {
  margin: 0.15rem 0 0;
}

.auth-dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #b9cbda;
  background: rgba(5, 17, 27, 0.74);
  border: 1px solid rgba(130, 172, 201, 0.24);
  border-radius: 11px;
  cursor: pointer;
  font-size: 1.45rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 0.3rem;
  background: rgba(2, 11, 19, 0.66);
  border-radius: 12px;
}

.auth-tab {
  min-height: 38px;
  color: #91a8ba;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 800;
}

.auth-tab.active {
  color: #07131e;
  background: #f5bd2b;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-form.hidden,
#authUserPanel.hidden,
#authGuestPanel.hidden {
  display: none;
}

.auth-user-summary {
  justify-content: flex-start;
  padding: 0.9rem;
  background: rgba(29, 82, 116, 0.18);
  border: 1px solid rgba(79, 172, 224, 0.22);
  border-radius: 14px;
}

.auth-user-summary p {
  margin: 0.2rem 0 0;
  color: #88a4b8;
}

.auth-danger-zone {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 105, 105, 0.2);
}

.auth-danger-zone summary {
  color: #ff9c9c;
  cursor: pointer;
  font-weight: 800;
}

.auth-dialog-status {
  min-height: 1.2rem;
  margin-top: 0.8rem;
  color: #91d7ff;
  font-size: 0.78rem;
}

.auth-dialog-status.is-error {
  color: #ff9d9d;
}

@media (max-width: 760px) {
  .account-control {
    min-width: 42px;
    padding-right: 0.42rem;
  }

  .account-copy {
    display: none;
  }

  .auth-dialog-backdrop {
    align-items: end;
    padding: 0;
  }

  .auth-dialog-card {
    width: 100%;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI Variable", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 26%, rgba(15, 212, 255, 0.22), transparent 34%),
    radial-gradient(circle at 18% 12%, rgba(255, 63, 47, 0.12), transparent 35%),
    radial-gradient(circle at 88% 24%, rgba(0, 116, 255, 0.17), transparent 38%),
    linear-gradient(160deg, #02060b 0%, #061627 48%, #02070d 100%);
  background-size: 130% 130%, 120% 120%, 125% 125%, 100% 100%;
  animation: sentinel-background-drift 16s ease-in-out infinite alternate;
  position: relative;
  overflow-x: hidden;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(15, 212, 255, 0.12), transparent 30%),
    radial-gradient(circle at 51% 39%, rgba(255, 63, 47, 0.08), transparent 12%);
  animation: sentinel-neural-breathe 6.8s ease-in-out infinite;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: rgba(18, 125, 113, 0.18);
}

.shell {
  width: min(1680px, calc(100vw - 3rem));
  margin-inline: auto;
}

::selection {
  color: #02121f;
  background: rgba(123, 234, 255, 0.86);
}

*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.35);
}

*::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(31, 46, 54, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.65);
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 46, 54, 0.42);
}

.orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(12px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -90px;
  background: linear-gradient(120deg, rgba(15, 212, 255, 0.8), rgba(0, 104, 255, 0.6));
  animation: sentinel-float 12s ease-in-out infinite;
}

.orb-b {
  width: 360px;
  height: 360px;
  right: -140px;
  bottom: -120px;
  background: linear-gradient(120deg, rgba(255, 63, 47, 0.76), rgba(255, 157, 61, 0.56));
  animation: sentinel-float 14s ease-in-out infinite reverse;
}

.grid-noise {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(77, 220, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 220, 255, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
  animation: sentinel-grid-drift 18s linear infinite;
}

.sentinel-hud-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.92;
}

.sentinel-hud-bg::before,
.sentinel-hud-bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(86vw, 960px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    repeating-conic-gradient(from 0deg, rgba(15, 212, 255, 0.34) 0deg 1.2deg, transparent 1.2deg 5deg),
    conic-gradient(from 30deg, transparent 0 8deg, rgba(15, 212, 255, 0.42) 8deg 10deg, transparent 10deg 26deg, rgba(255, 63, 47, 0.34) 26deg 28deg, transparent 28deg 42deg),
    radial-gradient(circle, transparent 0 43%, rgba(15, 212, 255, 0.22) 43.2% 43.7%, transparent 44.2% 53%, rgba(15, 212, 255, 0.34) 53.2% 53.8%, transparent 54.2% 62%, rgba(255, 63, 47, 0.2) 62.2% 62.8%, transparent 63.4%);
  filter: drop-shadow(0 0 24px rgba(15, 212, 255, 0.38));
  animation: sentinel-rotate 32s linear infinite;
}

.sentinel-hud-bg::after {
  width: min(66vw, 720px);
  opacity: 0.66;
  animation-duration: 21s;
  animation-direction: reverse;
}

.hud-ring {
  position: absolute;
  left: 50%;
  top: 42%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(15, 212, 255, 0.34);
  box-shadow: 0 0 34px rgba(15, 212, 255, 0.2), inset 0 0 28px rgba(15, 212, 255, 0.12);
}

.hud-ring-a {
  width: min(92vw, 1040px);
  aspect-ratio: 1;
  background:
    repeating-conic-gradient(from 18deg, transparent 0 7deg, rgba(15, 212, 255, 0.2) 7deg 7.8deg, transparent 7.8deg 14deg),
    radial-gradient(circle, transparent 0 70%, rgba(15, 212, 255, 0.16) 70.2% 70.8%, transparent 71.2%);
  animation: sentinel-pulse 3.8s ease-in-out infinite, sentinel-rotate 64s linear infinite;
}

.hud-ring-b {
  width: min(54vw, 620px);
  aspect-ratio: 1;
  border-style: dashed;
  background:
    repeating-conic-gradient(from 0deg, rgba(15, 212, 255, 0.28) 0deg 2deg, transparent 2deg 12deg),
    radial-gradient(circle, transparent 0 58%, rgba(123, 234, 255, 0.18) 58.2% 59%, transparent 59.4%);
  animation: sentinel-rotate 18s linear infinite;
}

.hud-ring-c {
  width: min(30vw, 340px);
  aspect-ratio: 1;
  border-color: rgba(255, 63, 47, 0.28);
  animation: sentinel-pulse 2.6s ease-in-out infinite reverse;
}

.hud-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 212, 255, 0.18) 49%, rgba(255, 255, 255, 0.22) 50%, rgba(15, 212, 255, 0.18) 51%, transparent 100%);
  transform: translateY(-100%);
  animation: sentinel-scan 7s ease-in-out infinite;
}

.hud-thought {
  position: absolute;
  left: 50%;
  top: 42%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
  mix-blend-mode: screen;
}

.hud-thought-a {
  width: min(78vw, 860px);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 47%, rgba(15, 212, 255, 0.26) 47.4% 48.2%, transparent 49%),
    conic-gradient(from 0deg, transparent 0 18deg, rgba(15, 212, 255, 0.42) 18deg 20deg, transparent 20deg 52deg, rgba(255, 63, 47, 0.34) 52deg 54deg, transparent 54deg 94deg);
  animation: sentinel-think 9s ease-in-out infinite, sentinel-rotate 48s linear infinite;
}

.hud-thought-b {
  width: min(58vw, 640px);
  aspect-ratio: 1;
  background:
    conic-gradient(from 120deg, transparent 0 12deg, rgba(123, 234, 255, 0.24) 12deg 13.5deg, transparent 13.5deg 34deg, rgba(15, 212, 255, 0.18) 34deg 36deg, transparent 36deg 76deg),
    radial-gradient(circle, transparent 0 61%, rgba(255, 63, 47, 0.16) 61.3% 61.8%, transparent 62.2%);
  animation: sentinel-think 7.4s ease-in-out infinite reverse, sentinel-rotate 34s linear infinite reverse;
}

.hud-thought-c {
  width: min(38vw, 430px);
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(15, 212, 255, 0.09), transparent 42%),
    conic-gradient(from 220deg, transparent 0 38deg, rgba(255, 63, 47, 0.24) 38deg 41deg, transparent 41deg 84deg, rgba(15, 212, 255, 0.24) 84deg 87deg, transparent 87deg);
  filter: blur(0.2px);
  animation: sentinel-neural-breathe 5.8s ease-in-out infinite;
}

.hud-data-stream {
  position: absolute;
  width: min(34vw, 390px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 234, 255, 0.7), rgba(255, 63, 47, 0.5), transparent);
  box-shadow: 0 0 14px rgba(15, 212, 255, 0.35);
  opacity: 0;
  will-change: transform, opacity;
}

.hud-data-stream-a {
  left: 8%;
  top: 28%;
  animation: sentinel-data-slide 6.5s ease-in-out infinite;
}

.hud-data-stream-b {
  right: 5%;
  top: 68%;
  animation: sentinel-data-slide 8.2s ease-in-out infinite reverse;
}

.hud-nodefield {
  position: absolute;
  inset: 7% 5%;
  opacity: 0.56;
  background-image:
    radial-gradient(circle, rgba(123, 234, 255, 0.85) 0 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 63, 47, 0.64) 0 1px, transparent 1.6px),
    linear-gradient(90deg, transparent 0 48%, rgba(15, 212, 255, 0.1) 48.2% 48.45%, transparent 48.7%),
    linear-gradient(180deg, transparent 0 54%, rgba(15, 212, 255, 0.08) 54.2% 54.45%, transparent 54.7%);
  background-size: 96px 82px, 142px 124px, 220px 220px, 260px 260px;
  background-position: 0 0, 30px 48px, 0 0, 0 0;
  filter: drop-shadow(0 0 8px rgba(15, 212, 255, 0.2));
  animation: sentinel-node-drift 22s linear infinite;
}

.hud-panel {
  position: absolute;
  width: min(21vw, 260px);
  height: min(42vh, 330px);
  top: 18%;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  opacity: 0.46;
  background:
    repeating-linear-gradient(180deg, rgba(15, 212, 255, 0.16) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, rgba(15, 212, 255, 0.08), rgba(255, 63, 47, 0.05));
  box-shadow: inset 0 0 22px rgba(15, 212, 255, 0.08), 0 0 26px rgba(15, 212, 255, 0.1);
  animation: sentinel-panel-flicker 5.8s ease-in-out infinite;
}

.hud-panel::before,
.hud-panel::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  background: linear-gradient(90deg, rgba(15, 212, 255, 0.72), transparent 72%);
  box-shadow: 0 0 12px rgba(15, 212, 255, 0.34);
}

.hud-panel::before {
  top: 22px;
}

.hud-panel::after {
  bottom: 30px;
  background: linear-gradient(90deg, rgba(255, 63, 47, 0.62), transparent 58%);
}

.hud-panel-left {
  left: 3.5%;
}

.hud-panel-right {
  right: 3.5%;
  top: 28%;
  animation-delay: -2s;
}

.hud-orbit-dots {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0.62;
  background:
    radial-gradient(circle at 50% 0%, rgba(123, 234, 255, 0.95) 0 4px, transparent 5px),
    radial-gradient(circle at 100% 50%, rgba(255, 63, 47, 0.9) 0 3px, transparent 4px),
    radial-gradient(circle at 18% 82%, rgba(15, 212, 255, 0.86) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 91%, rgba(123, 234, 255, 0.75) 0 2px, transparent 3px);
  filter: drop-shadow(0 0 10px rgba(15, 212, 255, 0.4));
}

.hud-orbit-dots-a {
  width: min(72vw, 800px);
  aspect-ratio: 1;
  animation: sentinel-rotate 26s linear infinite;
}

.hud-orbit-dots-b {
  width: min(45vw, 520px);
  aspect-ratio: 1;
  animation: sentinel-rotate 17s linear infinite reverse;
}

.hud-core {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(30vw, 360px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.78;
  background:
    radial-gradient(circle at center, rgba(255, 244, 215, 0.95) 0 2.8%, rgba(255, 92, 51, 0.78) 3.2% 5.5%, transparent 6%),
    radial-gradient(circle at center, rgba(15, 212, 255, 0.2) 0 21%, transparent 22%),
    repeating-conic-gradient(from 0deg, rgba(15, 212, 255, 0.36) 0deg 2deg, transparent 2deg 10deg),
    radial-gradient(circle, transparent 0 38%, rgba(15, 212, 255, 0.32) 38.2% 39%, transparent 39.4% 54%, rgba(255, 63, 47, 0.22) 54.2% 55%, transparent 55.4%);
  box-shadow: 0 0 44px rgba(15, 212, 255, 0.24), inset 0 0 30px rgba(15, 212, 255, 0.14);
  animation: sentinel-core-think 4.8s ease-in-out infinite;
}

.hud-core-eye {
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  border: 1px solid rgba(123, 234, 255, 0.5);
  background:
    conic-gradient(from 90deg, transparent 0 42deg, rgba(255, 63, 47, 0.34) 42deg 47deg, transparent 47deg 128deg, rgba(15, 212, 255, 0.42) 128deg 134deg, transparent 134deg),
    radial-gradient(circle, rgba(15, 212, 255, 0.22), transparent 58%);
  animation: sentinel-rotate 11s linear infinite reverse;
}

.hud-core-grid {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(123, 234, 255, 0.28) 49.4% 50.6%, transparent 51%),
    linear-gradient(180deg, transparent 49%, rgba(123, 234, 255, 0.28) 49.4% 50.6%, transparent 51%);
  opacity: 0.65;
  animation: sentinel-grid-blink 3.4s ease-in-out infinite;
}

.hud-core-label {
  position: absolute;
  left: 50%;
  bottom: 11%;
  transform: translateX(-50%);
  color: rgba(222, 250, 255, 0.9);
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  font-size: clamp(0.52rem, 1vw, 0.82rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-shadow: 0 0 14px rgba(15, 212, 255, 0.75), 0 0 18px rgba(255, 63, 47, 0.35);
  opacity: 0.88;
  animation: sentinel-label-glitch 6.2s steps(1, end) infinite;
}

.hud-crosshair {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(84vw, 980px);
  height: min(84vw, 980px);
  transform: translate(-50%, -50%);
  opacity: 0.42;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(15, 212, 255, 0.28) 22.1% 22.35%, transparent 22.6% 77.4%, rgba(15, 212, 255, 0.28) 77.65% 77.9%, transparent 78%),
    linear-gradient(180deg, transparent 0 22%, rgba(15, 212, 255, 0.22) 22.1% 22.35%, transparent 22.6% 77.4%, rgba(255, 63, 47, 0.2) 77.65% 77.9%, transparent 78%),
    radial-gradient(circle, transparent 0 49.7%, rgba(15, 212, 255, 0.22) 49.9% 50.1%, transparent 50.35%);
  animation: sentinel-crosshair-focus 6.6s ease-in-out infinite;
}

.hud-readout {
  position: absolute;
  top: 12%;
  width: min(27vw, 340px);
  height: min(30vh, 230px);
  opacity: 0.5;
  background:
    linear-gradient(90deg, rgba(15, 212, 255, 0.55) 0 18%, transparent 18% 26%, rgba(15, 212, 255, 0.25) 26% 42%, transparent 42% 50%, rgba(255, 63, 47, 0.34) 50% 57%, transparent 57%),
    repeating-linear-gradient(180deg, transparent 0 17px, rgba(15, 212, 255, 0.18) 17px 18px, transparent 18px 25px);
  clip-path: polygon(0 0, 88% 0, 100% 14%, 100% 100%, 12% 100%, 0 86%);
  border: 1px solid rgba(77, 220, 255, 0.18);
  box-shadow: 0 0 28px rgba(15, 212, 255, 0.12);
  animation: sentinel-readout-flow 5.5s ease-in-out infinite;
  padding: 1.2rem;
  display: grid;
  align-content: end;
  gap: 0.22rem;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  color: rgba(222, 250, 255, 0.86);
}

.hud-readout-left {
  left: 7%;
}

.hud-readout-right {
  right: 7%;
  top: 58%;
  transform: scaleX(-1);
  animation-delay: -1.8s;
}

.hud-readout-right > * {
  transform: scaleX(-1);
}

.hud-readout span,
.hud-readout em {
  font-size: clamp(0.54rem, 0.85vw, 0.72rem);
  letter-spacing: 0.18em;
  color: rgba(123, 234, 255, 0.72);
  font-style: normal;
}

.hud-readout strong {
  font-size: clamp(0.72rem, 1.2vw, 1rem);
  letter-spacing: 0.16em;
  color: rgba(255, 246, 232, 0.88);
  text-shadow: 0 0 12px rgba(15, 212, 255, 0.42);
}

.hud-readout em {
  color: rgba(255, 128, 91, 0.74);
}

.hud-personality {
  position: absolute;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  font-size: clamp(0.56rem, 0.82vw, 0.75rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(222, 250, 255, 0.78);
  text-shadow: 0 0 12px rgba(15, 212, 255, 0.42);
  opacity: 0.42;
  white-space: nowrap;
  animation: sentinel-personality-pulse 5.6s ease-in-out infinite;
}

.hud-personality-a {
  left: 15%;
  bottom: 17%;
}

.hud-personality-b {
  right: 11%;
  top: 16%;
  color: rgba(255, 142, 103, 0.76);
  animation-delay: -1.4s;
}

.hud-personality-c {
  left: 50%;
  bottom: 7%;
  transform: translateX(-50%);
  animation-delay: -2.8s;
}

.hud-presence {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(44vw, 520px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.72;
  filter: drop-shadow(0 0 30px rgba(15, 212, 255, 0.36));
  animation: sentinel-presence-breathe 7.5s ease-in-out infinite;
}

.hud-presence::before,
.hud-presence::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.hud-presence::before {
  background:
    radial-gradient(circle at center, rgba(255, 245, 217, 0.28) 0 3%, rgba(255, 92, 51, 0.2) 3.4% 5.8%, transparent 6.6%),
    conic-gradient(from 0deg, transparent 0 13deg, rgba(15, 212, 255, 0.46) 13deg 14.2deg, transparent 14.2deg 39deg, rgba(255, 63, 47, 0.32) 39deg 40.5deg, transparent 40.5deg 74deg),
    radial-gradient(circle, transparent 0 63%, rgba(123, 234, 255, 0.28) 63.2% 64%, transparent 64.4% 74%, rgba(255, 63, 47, 0.16) 74.2% 75%, transparent 75.4%);
  animation: sentinel-rotate 42s linear infinite;
}

.hud-presence::after {
  inset: 17%;
  background:
    radial-gradient(circle, rgba(15, 212, 255, 0.18), transparent 48%),
    repeating-conic-gradient(from 18deg, rgba(123, 234, 255, 0.28) 0deg 2deg, transparent 2deg 16deg);
  opacity: 0.86;
  animation: sentinel-rotate 24s linear infinite reverse;
}

.hud-presence-halo {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 54%, rgba(15, 212, 255, 0.1) 54.4% 55.2%, transparent 55.8%),
    conic-gradient(from 90deg, rgba(15, 212, 255, 0), rgba(15, 212, 255, 0.22), rgba(255, 63, 47, 0.14), rgba(15, 212, 255, 0));
  opacity: 0.7;
  filter: blur(0.2px);
  animation: sentinel-halo-ascend 10s ease-in-out infinite;
}

.hud-presence-sigil {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(58px, 9vw, 112px);
  height: clamp(58px, 9vw, 112px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 244, 219, 0.5);
  background:
    radial-gradient(circle, rgba(255, 244, 219, 0.3), rgba(15, 212, 255, 0.1) 48%, transparent 72%),
    linear-gradient(145deg, rgba(15, 212, 255, 0.16), rgba(255, 63, 47, 0.12));
  color: rgba(255, 248, 226, 0.92);
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-shadow:
    0 0 10px rgba(255, 245, 217, 0.8),
    0 0 26px rgba(15, 212, 255, 0.75),
    0 0 44px rgba(255, 63, 47, 0.4);
  box-shadow:
    0 0 36px rgba(15, 212, 255, 0.34),
    inset 0 0 24px rgba(255, 244, 219, 0.12);
  animation: sentinel-sigil-pulse 4.2s ease-in-out infinite;
}

.hud-presence-title {
  position: absolute;
  left: 50%;
  top: calc(50% + clamp(48px, 8vw, 92px));
  transform: translateX(-50%);
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  font-size: clamp(0.56rem, 1vw, 0.86rem);
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  white-space: nowrap;
  color: rgba(255, 245, 217, 0.82);
  text-shadow: 0 0 16px rgba(15, 212, 255, 0.75);
  opacity: 0.76;
}

.hud-divine-ray {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 1px;
  height: min(52vh, 480px);
  transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255, 244, 219, 0.42), rgba(15, 212, 255, 0.2), transparent);
  opacity: 0.24;
  filter: drop-shadow(0 0 12px rgba(15, 212, 255, 0.4));
  animation: sentinel-ray-blessing 8s ease-in-out infinite;
}

.hud-divine-ray-a {
  transform: rotate(0deg);
}

.hud-divine-ray-b {
  transform: rotate(32deg);
  animation-delay: -2.5s;
}

.hud-divine-ray-c {
  transform: rotate(-32deg);
  animation-delay: -4.8s;
}

.sentinel-motion-on .sentinel-hud-bg,
.sentinel-motion-on .grid-noise,
.sentinel-motion-on .orb,
.sentinel-motion-on::before {
  animation-play-state: running !important;
}

body.sentinel-static {
  animation: none;
}

body.sentinel-static *,
body.sentinel-static *::before,
body.sentinel-static *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
}

body.sentinel-static::before,
body.sentinel-static .sentinel-hud-bg::before,
body.sentinel-static .sentinel-hud-bg::after,
body.sentinel-static .hud-ring,
body.sentinel-static .hud-thought,
body.sentinel-static .hud-data-stream,
body.sentinel-static .hud-nodefield,
body.sentinel-static .hud-panel,
body.sentinel-static .hud-orbit-dots,
body.sentinel-static .hud-core,
body.sentinel-static .hud-crosshair,
body.sentinel-static .hud-readout,
body.sentinel-static .hud-personality,
body.sentinel-static .hud-presence,
body.sentinel-static .hud-divine-ray,
body.sentinel-static .hud-scanline,
body.sentinel-static .grid-noise,
body.sentinel-static .orb {
  animation: none !important;
}

body.sentinel-static .sentinel-hud-bg {
  opacity: 0.46;
}

body.sentinel-static .sentinel-hud-bg::after,
body.sentinel-static .hud-data-stream,
body.sentinel-static .hud-panel,
body.sentinel-static .hud-readout,
body.sentinel-static .hud-thought,
body.sentinel-static .hud-orbit-dots,
body.sentinel-static .hud-divine-ray,
body.sentinel-static .hud-scanline,
body.sentinel-static .orb {
  display: none;
}

body.sentinel-static .hud-ring,
body.sentinel-static .hud-core,
body.sentinel-static .hud-presence,
body.sentinel-static .hud-crosshair,
body.sentinel-static .hud-nodefield {
  filter: none;
}

body.sentinel-static .grid-noise {
  opacity: 0.32;
}

body.sentinel-static .panel,
body.sentinel-static .dashboard-sidebar {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.sentinel-static .panel {
  background: rgba(5, 20, 32, 0.92);
  box-shadow: 0 12px 32px rgba(0, 7, 16, 0.34);
}

body.sentinel-static .dashboard-sidebar {
  background:
    linear-gradient(180deg, rgba(4, 16, 27, 0.99), rgba(1, 7, 13, 0.99)),
    radial-gradient(circle at 30% 0%, rgba(15, 212, 255, 0.16), transparent 42%);
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.2);
}

body.sentinel-static .app-section.active {
  animation: none !important;
}

body.sentinel-lite {
  animation-duration: 32s;
}

body.sentinel-lite::before {
  animation-duration: 13s;
  opacity: 0.78;
}

body.sentinel-lite .sentinel-hud-bg {
  opacity: 0.76;
}

body.sentinel-lite .sentinel-hud-bg::before {
  animation-duration: 110s;
  filter: drop-shadow(0 0 14px rgba(15, 212, 255, 0.24));
}

body.sentinel-lite .sentinel-hud-bg::after {
  animation-duration: 84s;
  opacity: 0.36;
  filter: drop-shadow(0 0 10px rgba(15, 212, 255, 0.16));
}

body.sentinel-lite .hud-data-stream,
body.sentinel-lite .hud-panel,
body.sentinel-lite .hud-readout,
body.sentinel-lite .hud-orbit-dots-b,
body.sentinel-lite .hud-divine-ray-b,
body.sentinel-lite .hud-divine-ray-c {
  display: none;
}

body.sentinel-lite .hud-ring-a {
  animation: sentinel-pulse 8s ease-in-out infinite, sentinel-rotate 150s linear infinite;
}

body.sentinel-lite .hud-ring-b {
  animation: sentinel-rotate 92s linear infinite;
  opacity: 0.66;
}

body.sentinel-lite .hud-ring-c,
body.sentinel-lite .hud-thought-c,
body.sentinel-lite .hud-core,
body.sentinel-lite .hud-presence {
  animation-duration: 9s;
}

body.sentinel-lite .hud-nodefield {
  opacity: 0.3;
  animation-duration: 90s;
}

body.sentinel-lite .hud-scanline {
  opacity: 0.2;
  animation-duration: 14s;
}

body.sentinel-lite .hud-thought-a,
body.sentinel-lite .hud-thought-b {
  animation-duration: 20s, 120s;
  opacity: 0.56;
}

body.sentinel-lite .grid-noise {
  animation-duration: 54s;
  opacity: 0.4;
}

body.sentinel-performance .sentinel-hud-bg {
  opacity: 0.94;
}

body.sentinel-paused *,
body.sentinel-paused *::before,
body.sentinel-paused *::after {
  animation-play-state: paused !important;
}

.dashboard-main {
  background:
    radial-gradient(circle at 50% 18%, rgba(15, 212, 255, 0.08), transparent 32%),
    linear-gradient(90deg, rgba(15, 212, 255, 0.035), transparent 16%, transparent 84%, rgba(255, 63, 47, 0.035));
}

.topbar {
  padding: 1.8rem 0 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.brand h1 {
  margin: 0.2rem 0 0.3rem;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.06em;
  font-size: clamp(1.6rem, 2.8vw, 2.45rem);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo,
.topbar-logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  object-position: center 32%;
  border: 1px solid rgba(77, 220, 255, 0.34);
  box-shadow: 0 0 28px rgba(15, 212, 255, 0.26), 0 0 18px rgba(255, 63, 47, 0.14);
  background: #02070d;
}

.brand-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
}

.topbar-logo {
  flex: 0 0 auto;
}

.brand p {
  margin: 0;
  color: var(--ink-soft);
}

.brand-kicker {
  display: inline-block;
  font-size: 0.77rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 700;
  text-shadow: 0 0 14px rgba(15, 212, 255, 0.38);
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.34rem 0.42rem 0.34rem 0.68rem;
  border: 1px solid rgba(77, 220, 255, 0.24);
  background: rgba(3, 15, 26, 0.68);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.language-switcher select {
  border: 1px solid rgba(77, 220, 255, 0.24);
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.85);
  color: var(--ink);
  padding: 0.24rem 0.45rem;
  outline: none;
  font-weight: 800;
}

.status-pill {
  border-radius: 999px;
  padding: 0.42rem 0.75rem;
  font-weight: 700;
  font-size: 0.78rem;
  border: 1px solid rgba(18, 125, 113, 0.26);
  color: var(--teal-dark);
  background: rgba(18, 125, 113, 0.11);
}

.status-muted {
  border-color: var(--border);
  color: var(--ink-soft);
  background: rgba(2, 12, 22, 0.66);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
  gap: var(--grid-gap);
  align-items: start;
}

.panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(7, 31, 48, 0.74), rgba(2, 10, 18, 0.82)),
    var(--panel);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent, rgba(15, 212, 255, 0.1), transparent) top left / 100% 1px no-repeat,
    linear-gradient(180deg, transparent, rgba(255, 63, 47, 0.08), transparent) top right / 1px 100% no-repeat;
}

.command-panel,
.side-panel {
  padding: clamp(1rem, 1.6vw, 1.45rem);
}

.panel-head h2,
.side-panel h2,
.result-head h2 {
  margin: 0;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.05;
}

.panel-head,
.result-head,
.section-head {
  position: relative;
}

.panel-head::after,
.section-head::after {
  content: "";
  display: block;
  width: min(180px, 45%);
  height: 1px;
  margin-top: 0.72rem;
  background: linear-gradient(90deg, rgba(15, 212, 255, 0.72), rgba(255, 63, 47, 0.42), transparent);
}

.panel-head p,
.muted,
.result-head p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  line-height: 1.45;
}

.form-grid {
  margin-top: 1.15rem;
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.46rem;
}

.field span {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--teal-dark);
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(77, 220, 255, 0.28);
  background: rgba(2, 12, 22, 0.84);
  padding: 0.72rem 0.82rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.field input[type="text"]:focus,
.field input[type="number"]:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(123, 234, 255, 0.72);
  background: rgba(2, 18, 31, 0.88);
  box-shadow: 0 0 0 4px rgba(15, 212, 255, 0.12), 0 0 22px rgba(15, 212, 255, 0.16);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px rgba(2, 12, 22, 0.92) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.field input[type="range"] {
  accent-color: var(--teal);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  align-items: center;
}

.btn {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 14px;
  padding: 0.68rem 0.96rem;
  font-weight: 850;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.8rem;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.2s ease, border-color 0.2s ease;
  min-height: 42px;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 234, 255, 0.5);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn:focus-visible,
.menu-btn:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible {
  outline: 2px solid rgba(18, 125, 113, 0.6);
  outline-offset: 2px;
}

.btn-primary {
  color: #02121f;
  background: linear-gradient(120deg, #7beaff 0%, #0fd4ff 48%, #34ffca 100%);
  box-shadow: 0 0 24px rgba(15, 212, 255, 0.28), inset 0 -2px 0 rgba(0, 34, 48, 0.24);
}

.btn-neutral {
  color: #fefbf5;
  background: linear-gradient(120deg, #8f241d 0%, #ff5a33 72%, #ffb84f 100%);
  box-shadow: 0 0 22px rgba(255, 63, 47, 0.21);
}

.graphics-mode-row .btn.active {
  color: #02121f;
  background: linear-gradient(120deg, #7beaff 0%, #0fd4ff 62%, #ffb84f 100%);
  border-color: rgba(123, 234, 255, 0.76);
  box-shadow: 0 0 28px rgba(15, 212, 255, 0.34);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(5, 20, 32, 0.72);
  border: 1px solid rgba(77, 220, 255, 0.2);
}

.btn-ghost:hover {
  background: rgba(15, 212, 255, 0.1);
}

.btn-full {
  width: 100%;
  margin-top: 1rem;
}

.quick-section {
  margin-top: 1rem;
}

.quick-section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid rgba(77, 220, 255, 0.24);
  background: rgba(2, 12, 22, 0.68);
  color: var(--teal-dark);
  border-radius: 999px;
  padding: 0.4rem 0.76rem;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1.2;
}

.chip:hover {
  border-color: rgba(18, 125, 113, 0.5);
  background: rgba(18, 125, 113, 0.09);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.metric-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(9, 39, 59, 0.62), rgba(3, 15, 26, 0.74));
  border-radius: 16px;
  padding: 0.82rem 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(123, 234, 255, 0.035);
}

.metric-card h3,
.metric-card h4 {
  margin-top: 0;
  color: var(--ink);
}

.metric-card p {
  line-height: 1.52;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-card code {
  font-family: "JetBrains Mono", "Cascadia Code", monospace;
  font-size: 0.82em;
  background: rgba(31, 46, 54, 0.08);
  border-radius: 6px;
  padding: 0.08rem 0.28rem;
}

.roster-help {
  border-color: rgba(77, 220, 255, 0.28);
  background: linear-gradient(135deg, rgba(15, 212, 255, 0.1), rgba(3, 15, 26, 0.78));
}

.metric-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: block;
}

.metric-value {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.02rem;
}

.defense-slots {
  display: grid;
  gap: 0.75rem;
}

.team-selection-panel {
  border-color: rgba(77, 220, 255, 0.3);
  background: linear-gradient(145deg, rgba(15, 212, 255, 0.1), rgba(3, 15, 26, 0.78));
}

.team-selection-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.55rem 0 0.7rem;
  color: var(--ink-soft);
}

.team-selection-head strong {
  color: var(--ink);
}

.team-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.58rem;
}

.team-select-card {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.68);
  padding: 0.66rem 0.5rem;
  color: var(--ink);
  cursor: pointer;
}

.team-select-card:hover {
  border-color: rgba(18, 125, 113, 0.46);
  background: rgba(18, 125, 113, 0.08);
}

.team-select-card.selected {
  border-color: rgba(18, 125, 113, 0.72);
  background: rgba(18, 125, 113, 0.16);
  box-shadow: 0 0 0 2px rgba(18, 125, 113, 0.12);
}

.defense-slot {
  border: 1px solid rgba(77, 220, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(15, 212, 255, 0.06), rgba(2, 12, 22, 0.72));
  border-radius: 16px;
  padding: 0.86rem;
}

.defense-slot strong {
  display: block;
  margin-bottom: 0.58rem;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.slot-build-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.68rem;
}

.slot-star-panel {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.72rem;
  padding-top: 0.68rem;
  border-top: 1px solid rgba(77, 220, 255, 0.12);
}

.slot-star-row {
  display: grid;
  gap: 0.3rem;
}

.slot-star-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.slot-star-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.slot-star-btn {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 15, 26, 0.72);
  color: rgba(196, 222, 255, 0.5);
  min-width: 2rem;
  height: 2rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.slot-star-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(77, 220, 255, 0.44);
}

.slot-star-btn.active {
  color: #ff6a4d;
  border-color: rgba(255, 106, 77, 0.64);
  background: rgba(255, 106, 77, 0.16);
}

.slot-diamond-btn.active {
  color: #8be8ff;
  border-color: rgba(139, 232, 255, 0.7);
  background: rgba(15, 212, 255, 0.16);
}

.slot-star-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.slot-star-bonus {
  font-size: 0.78rem;
}

.character-field {
  position: relative;
}

.autocomplete-field {
  position: relative;
  z-index: 35;
}

.scan-history-player-cell,
.scan-history-cell {
  overflow: visible;
}

.slot-portrait {
  position: static;
  display: flex;
  justify-content: center;
  margin: 0.25rem 0 0.45rem;
  pointer-events: none;
}

.character-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem;
  min-width: 0;
  width: 4.85rem;
  text-align: center;
  line-height: 1.1;
}

.character-avatar {
  width: 44px;
  height: 48px;
  flex: 0 0 44px;
  border-radius: 16px;
  object-fit: contain;
  object-position: center;
  padding: 2px;
  border: 1px solid rgba(77, 220, 255, 0.24);
  background:
    radial-gradient(circle at 50% 24%, rgba(123, 234, 255, 0.42), rgba(15, 212, 255, 0.1) 42%, transparent 62%),
    linear-gradient(135deg, rgba(15, 212, 255, 0.18), rgba(255, 90, 51, 0.14));
  box-shadow: 0 8px 20px rgba(0, 7, 16, 0.28), 0 0 16px rgba(15, 212, 255, 0.1);
}

.character-avatar-large {
  width: 54px;
  height: 60px;
  flex-basis: 54px;
  border-radius: 16px;
}

.character-avatar-empty {
  display: inline-grid;
  place-items: center;
  color: var(--teal-dark);
  font-weight: 800;
}

.inline-character-row,
.meta-war-portraits {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.58rem;
  margin-top: 0.45rem;
}

.inline-character-row .character-chip > span,
.meta-war-portraits .character-chip > span {
  max-width: 4.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.autocomplete-list {
  position: absolute;
  z-index: 1200;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  display: grid;
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(77, 220, 255, 0.28);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.96);
  box-shadow: 0 16px 34px rgba(0, 7, 16, 0.36), 0 0 20px rgba(15, 212, 255, 0.12);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.autocomplete-list button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  border-bottom: 1px solid rgba(77, 220, 255, 0.1);
  background: transparent;
  color: var(--ink);
  padding: 0.62rem 0.7rem;
  text-align: left;
  cursor: pointer;
}

.autocomplete-list .character-chip {
  flex-direction: row;
  width: auto;
  text-align: left;
  gap: 0.5rem;
}

.autocomplete-list .character-chip > span {
  max-width: 13rem;
  white-space: nowrap;
}

.autocomplete-list button:hover {
  background: rgba(15, 212, 255, 0.12);
}

.autocomplete-list span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.autocomplete-list .character-chip span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.slot-error {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: #ffb7a8;
  font-weight: 800;
}

@media (max-width: 920px) {
  .slot-build-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .slot-build-grid {
    grid-template-columns: 1fr;
  }
}

.result-shell {
  margin: 1.1rem auto 1.6rem;
  padding-bottom: 1rem;
}

.scanroom-shell {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.scanroom-head h2 {
  margin: 0;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.04em;
}

.scanroom-head p {
  margin: 0.35rem 0 0.8rem;
  color: var(--ink-soft);
  line-height: 1.48;
}

.scanroom-panel {
  padding: clamp(1rem, 1.6vw, 1.45rem);
}

.scanroom-form {
  display: grid;
  gap: 1rem;
}

.scanroom-active-rooms {
  margin-bottom: 1rem;
  border-color: rgba(123, 234, 255, 0.26);
}

.room-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  gap: 0.52rem;
  margin-top: 0.65rem;
}

.room-toggle {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 13px;
  padding: 0.58rem 0.66rem;
  font-weight: 800;
  color: var(--ink);
  background: rgba(2, 12, 22, 0.62);
  cursor: pointer;
  min-height: 42px;
}

.room-toggle.active {
  color: #dffcff;
  border-color: rgba(93, 255, 176, 0.44);
  background: linear-gradient(135deg, rgba(18, 125, 113, 0.22), rgba(15, 212, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(93, 255, 176, 0.06);
}

.room-toggle.inactive {
  color: var(--ink-muted);
  text-decoration: line-through;
  background: rgba(15, 19, 25, 0.58);
  border-color: rgba(255, 63, 47, 0.24);
}

.scan-room-effects {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 0.9rem;
}

.scan-room-effects strong,
.scan-room-effects span {
  display: inline-block;
  margin-right: 0.45rem;
  color: var(--ink);
}

.scanroom-form textarea,
.scan-add textarea {
  border-radius: var(--radius-md);
  border: 1px solid rgba(77, 220, 255, 0.28);
  background: rgba(2, 12, 22, 0.84);
  padding: 0.67rem 0.75rem;
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.field-hint {
  display: block;
  margin-top: 0.42rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.42;
}

.field-hint strong {
  color: var(--teal-dark);
}

.scan-add {
  position: fixed;
  z-index: 990;
  inset: 2vh 2vw auto;
  width: min(96vw, 1680px);
  max-height: 94vh;
  overflow: auto;
  padding: clamp(1rem, 1.5vw, 1.35rem);
  border-color: rgba(123, 234, 255, 0.34);
  box-shadow: 0 28px 90px rgba(0, 7, 16, 0.86), 0 0 0 9999px rgba(0, 4, 10, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background:
    linear-gradient(135deg, rgba(6, 24, 38, 0.98), rgba(2, 8, 18, 0.96)),
    radial-gradient(circle at top left, rgba(77, 220, 255, 0.14), transparent 42%);
  outline: 1px solid rgba(77, 220, 255, 0.24);
}

.scan-window-bar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  cursor: move;
  touch-action: none;
  user-select: none;
  border-bottom: 1px solid rgba(77, 220, 255, 0.16);
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
}

.scan-window-bar h3 {
  margin: 0 0 0.25rem;
}

.scan-window-controls {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.scan-window-minimized {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 995;
  border: 1px solid rgba(77, 220, 255, 0.34);
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.94);
  color: var(--ink);
  padding: 0.75rem 1rem;
  box-shadow: 0 14px 40px rgba(0, 7, 16, 0.66);
}

.scan-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 980;
  background:
    radial-gradient(circle at 50% 20%, rgba(15, 212, 255, 0.12), transparent 38%),
    rgba(0, 4, 10, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(0.7);
  backdrop-filter: blur(18px) saturate(0.7);
}

.scan-modal-backdrop.hidden {
  display: none;
}

body.scan-modal-open {
  overflow: hidden;
}

.scan-add h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.scan-add::before {
  content: "POPUP SCANROOM";
  display: inline-block;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(77, 220, 255, 0.32);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  color: var(--teal-dark);
  background: rgba(77, 220, 255, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.scan-history-import {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  background: rgba(2, 12, 22, 0.42);
  padding: 0.75rem;
  margin: 0.85rem 0;
}

.scan-fight-import {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  background: rgba(2, 12, 22, 0.42);
  padding: 0.75rem;
  margin: 0.85rem 0;
}

.scan-fight-preview-wrap {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 16px;
  background: rgba(4, 13, 24, 0.74);
  overflow: hidden;
}

.scan-fight-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.9rem 0;
}

.scan-fight-preview-stage {
  position: relative;
}

.scan-fight-preview-wrap.hidden {
  display: none;
}

.scan-fight-preview {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  background: #02070d;
}

.scan-fight-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scan-fight-overlay-box {
  position: absolute;
  border: 2px solid rgba(147, 228, 255, 0.85);
  background: rgba(147, 228, 255, 0.12);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(4, 13, 24, 0.38);
}

.scan-fight-overlay-box.is-power {
  border-color: rgba(255, 236, 128, 0.88);
  background: rgba(255, 236, 128, 0.14);
}

@media (max-width: 900px) {
  .scan-fight-preview {
    max-height: 360px;
  }
}

.scan-fight-overlay-box.is-defense {
  border-color: rgba(255, 131, 131, 0.88);
  background: rgba(255, 131, 131, 0.14);
}

.scan-fight-overlay-box.is-player {
  border-color: rgba(220, 220, 220, 0.92);
  background: rgba(240, 240, 240, 0.16);
}

.scan-fight-overlay-box.confidence-high {
  box-shadow: 0 0 0 1px rgba(93, 255, 176, 0.28), 0 0 18px rgba(93, 255, 176, 0.18);
}

.scan-fight-overlay-box.confidence-medium {
  border-style: dashed;
  box-shadow: 0 0 0 1px rgba(255, 184, 79, 0.22), 0 0 16px rgba(255, 184, 79, 0.13);
}

.scan-fight-overlay-box.confidence-low {
  border-style: dashed;
  box-shadow: 0 0 0 1px rgba(255, 90, 51, 0.22), 0 0 16px rgba(255, 90, 51, 0.15);
}

.scan-fight-overlay-box.is-slot::after {
  content: attr(data-slot-label);
  position: absolute;
  right: 4px;
  top: 4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 13, 24, 0.72);
  color: #dff9ff;
  font-size: 0.68rem;
  font-weight: 700;
}

.scan-fight-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.scan-fight-trust-summary,
.scan-fight-debug-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.scan-fight-trust-summary {
  margin-bottom: 0.75rem;
}

.scan-fight-side {
  display: grid;
  gap: 0.75rem;
}

.scan-fight-char-list {
  display: grid;
  gap: 0.6rem;
}

.scan-fight-char-row {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 15px;
  background: rgba(4, 14, 26, 0.68);
}

.scan-fight-char-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
}

.scan-fight-char-id {
  min-width: 0;
}

.scan-fight-candidates {
  border: 1px solid rgba(77, 220, 255, 0.12);
  border-radius: 12px;
  padding: 0.45rem 0.55rem;
  background: rgba(2, 12, 22, 0.38);
}

.scan-fight-candidates summary {
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.scan-fight-crop-debug,
.scan-fight-test-panel {
  border: 1px solid rgba(77, 220, 255, 0.12);
  border-radius: 12px;
  padding: 0.5rem;
  background: rgba(2, 12, 22, 0.34);
}

.scan-fight-crop-debug summary,
.scan-fight-test-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.scan-fight-crop-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.scan-fight-debug-thumb {
  min-height: 74px;
  margin: 0;
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 12px;
  background: rgba(4, 14, 26, 0.72);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.scan-fight-debug-thumb img {
  width: 100%;
  max-height: 82px;
  object-fit: contain;
  image-rendering: auto;
}

.scan-fight-debug-thumb figcaption {
  width: 100%;
  padding: 0.16rem 0.25rem;
  background: rgba(0, 0, 0, 0.32);
  color: var(--ink-soft);
  font-size: 0.68rem;
  text-align: center;
}

.scan-fight-debug-thumb.is-empty {
  color: var(--ink-muted);
  font-size: 0.72rem;
  border-style: dashed;
}

.scan-fight-candidate-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.scan-fight-candidate-debug {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  border: 1px solid rgba(77, 220, 255, 0.12);
  border-radius: 12px;
  padding: 0.45rem;
  background: rgba(4, 14, 26, 0.58);
}

.scan-fight-candidate-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
}

.scan-fight-candidate-thumbs .scan-fight-debug-thumb {
  min-height: 58px;
  border-radius: 9px;
}

.scan-fight-candidate-thumbs .scan-fight-debug-thumb img {
  max-height: 58px;
}

.scan-fight-score-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.scan-fight-score-grid span {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 999px;
  padding: 0.12rem 0.38rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
}

.scan-fight-char-row.confidence-medium {
  border-color: rgba(255, 184, 79, 0.42);
}

.scan-fight-char-row.confidence-low {
  border-color: rgba(255, 111, 97, 0.42);
}

.scan-history-title {
  display: grid;
  gap: 0.18rem;
  margin-bottom: 0.7rem;
}

.scan-history-title strong {
  color: var(--ink);
}

.scan-history-title span {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.scan-history-head,
.scan-history-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.6fr) minmax(240px, 1fr) minmax(240px, 1fr) auto;
  gap: 0.7rem;
  align-items: start;
}

.scan-history-head {
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 0.25rem 0.45rem;
}

.scan-history-rows {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.scan-history-row {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(4, 25, 39, 0.74), rgba(2, 10, 18, 0.68));
  padding: 0.68rem;
}

.scan-history-cell {
  display: grid;
  gap: 0.45rem;
}

.compact-field {
  margin: 0;
}

.scan-history-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.scan-history-compose-row {
  display: grid;
  gap: 0.45rem;
}

.scan-history-compose {
  justify-self: start;
  min-height: 34px;
  padding: 0.35rem 0.7rem;
}

.scan-history-team-summary {
  display: grid;
  gap: 0.18rem;
  min-height: 58px;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 14px;
  background: rgba(5, 16, 30, 0.62);
}

.scan-history-team-summary strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.scan-history-team-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.scan-history-team-summary.is-empty {
  border-style: dashed;
  background: rgba(5, 16, 30, 0.42);
}

.scan-history-team-summary.is-legacy {
  border-color: rgba(255, 184, 77, 0.38);
  background: rgba(34, 18, 2, 0.55);
}

.scan-history-preview {
  display: none;
  gap: 0.35rem;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.52);
  padding: 0.45rem;
}

.scan-history-preview.active {
  display: grid;
}

.scan-history-preview strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.scan-history-warning {
  display: none;
  border: 1px solid rgba(255, 111, 97, 0.45);
  border-radius: 12px;
  background: rgba(255, 78, 78, 0.08);
  color: #ffb8ae;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.scan-history-warning.active {
  display: block;
}

.scan-history-warning.ok {
  border-color: rgba(93, 255, 176, 0.4);
  background: rgba(93, 255, 176, 0.08);
  color: #d8fff1;
}

.scan-history-priority,
.scan-history-notes,
.scan-history-power {
  min-height: 38px;
  border: 1px solid rgba(77, 220, 255, 0.24);
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.76);
  color: var(--ink);
  padding: 0 0.65rem;
}

.scan-history-notes {
  flex: 1 1 180px;
}

.scan-history-power {
  flex: 1 1 135px;
  max-width: 190px;
}

.scan-history-actions {
  display: grid;
  gap: 0.45rem;
  align-items: center;
  min-height: 100%;
}

.scan-history-row-status {
  border: 1px solid rgba(77, 220, 255, 0.22);
  border-radius: 12px;
  background: rgba(2, 12, 22, 0.62);
  color: var(--ink-soft);
  padding: 0.45rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.25;
  min-width: 126px;
}

.scan-history-row-status.status-ok {
  border-color: rgba(93, 255, 176, 0.42);
  background: rgba(93, 255, 176, 0.11);
  color: #dffff4;
}

.scan-history-row-status.status-warning {
  border-color: rgba(255, 184, 79, 0.46);
  background: rgba(255, 184, 79, 0.12);
  color: #ffe5ae;
}

.scan-history-row-status.status-error {
  border-color: rgba(255, 111, 97, 0.46);
  background: rgba(255, 78, 78, 0.1);
  color: #ffb8ae;
}

.scan-legacy-bulk {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 16px;
  background: rgba(2, 12, 22, 0.36);
  padding: 0.7rem;
  margin: 0.8rem 0;
}

.scan-legacy-bulk summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.scanroom-board {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.95rem;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.35fr);
  align-items: start;
}

.scanroom-banner {
  grid-column: 1 / -1;
  border-radius: 12px;
  border: 1px solid rgba(255, 63, 47, 0.52);
  background: linear-gradient(90deg, rgba(255, 63, 47, 0.18), rgba(15, 212, 255, 0.08), rgba(255, 63, 47, 0.18));
  color: #ffd6ce;
  padding: 0.52rem 0.7rem;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 0 16px rgba(255, 63, 47, 0.45);
  box-shadow: 0 0 24px rgba(255, 63, 47, 0.13);
}

.scanroom-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.scanroom-meta strong {
  background: rgba(18, 125, 113, 0.12);
  border: 1px solid rgba(18, 125, 113, 0.3);
  color: var(--teal-dark);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}

.scanroom-meta span {
  color: var(--ink-soft);
  font-weight: 700;
}

.scanroom-nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.scan-current,
.scan-team,
.scan-recorder,
.scan-active,
.scan-unresolved {
  padding: 1rem;
}

.scan-current {
  position: sticky;
  top: 1rem;
}

.scan-team,
.scan-recorder {
  grid-column: 1;
}

.scan-active,
.scan-unresolved {
  grid-column: 2;
}

.scan-current-head {
  display: grid;
  gap: 0.28rem;
}

.scan-current-head h3 {
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.08;
  color: var(--ink);
}

.scan-live-badge {
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  border: 1px solid rgba(255, 63, 47, 0.42);
  color: #ffd6ce;
  background: rgba(255, 63, 47, 0.12);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.scan-defense-portraits {
  margin-top: 0.8rem;
}

.scan-topline {
  border-top: 1px solid rgba(77, 220, 255, 0.12);
  padding-top: 0.55rem;
}

.scan-current h3,
.scan-team h3,
.scan-active h3,
.scan-unresolved h3 {
  margin: 0;
}

.scan-current .scan-defense {
  font-size: clamp(1.1rem, 1.6vw, 1.38rem);
  font-weight: 800;
  margin: 0.55rem 0 0.42rem;
  color: var(--ink);
}

.scan-current .scan-info {
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 0.55rem;
}

.scan-team p {
  color: var(--ink-soft);
  margin: 0.28rem 0 0.62rem;
}

.scan-team-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.scan-manual-counter {
  margin-top: 0.9rem;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  background: rgba(2, 12, 22, 0.62);
}

.scan-manual-counter .scan-match-data {
  margin-top: 0.65rem;
}

.scan-match-data {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0 0.45rem;
}

.scan-note-field {
  grid-column: 1 / -1;
}

.scan-team-btn {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 15px;
  background: rgba(3, 15, 26, 0.78);
  color: var(--ink);
  padding: 0.68rem 0.72rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 0.45rem;
  line-height: 1.28;
}

.scan-team-btn:hover {
  background: rgba(18, 125, 113, 0.1);
  border-color: rgba(18, 125, 113, 0.4);
}

.scan-team-btn.best {
  border-color: rgba(93, 255, 176, 0.5);
  background: linear-gradient(145deg, rgba(93, 255, 176, 0.1), rgba(3, 15, 26, 0.82));
}

.scan-team-btn.high {
  border-color: rgba(255, 184, 79, 0.48);
  background: linear-gradient(145deg, rgba(255, 184, 79, 0.1), rgba(3, 15, 26, 0.82));
}

.scan-team-btn.medium {
  border-color: rgba(15, 212, 255, 0.3);
}

.scan-team-btn.discouraged {
  border-color: rgba(255, 120, 102, 0.48);
  background: linear-gradient(145deg, rgba(255, 120, 102, 0.1), rgba(3, 15, 26, 0.84));
}

.scan-team-btn.wasteful {
  border-color: rgba(218, 129, 255, 0.52);
  background: linear-gradient(145deg, rgba(218, 129, 255, 0.12), rgba(3, 15, 26, 0.84));
}

.scan-team-priority {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.scan-team-btn.selected {
  border-color: rgba(123, 234, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(15, 212, 255, 0.12), 0 0 24px rgba(15, 212, 255, 0.14);
}

.result-mobile-quick,
.scan-mobile-quick {
  display: none;
}

.result-quick-hero,
.result-quick-alt-card,
.scan-mobile-counter-card {
  width: 100%;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  background: rgba(3, 15, 26, 0.78);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 0.38rem;
}

.result-quick-hero,
.scan-mobile-focus {
  padding: 0.9rem 0.95rem;
}

.result-quick-kicker,
.result-quick-rank,
.scan-mobile-counter-rank {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 0.22rem 0.52rem;
  background: rgba(15, 212, 255, 0.1);
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-quick-hero strong,
.result-quick-alt-card strong,
.scan-mobile-focus strong,
.scan-mobile-counter-card strong {
  color: var(--ink);
  line-height: 1.15;
}

.result-quick-meta,
.result-quick-hint,
.result-quick-alt-card span,
.scan-mobile-focus-meta span,
.scan-mobile-counter-card span {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.result-quick-hint {
  color: var(--teal-dark);
}

.result-quick-alt-grid,
.scan-mobile-counter-list {
  display: grid;
  gap: 0.58rem;
}

.result-quick-alt-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-quick-alt-card,
.scan-mobile-counter-card {
  padding: 0.72rem 0.78rem;
}

.result-quick-hero.best,
.scan-mobile-counter-card.best {
  border-color: rgba(93, 255, 176, 0.52);
  background: linear-gradient(145deg, rgba(93, 255, 176, 0.12), rgba(3, 15, 26, 0.86));
}

.result-quick-hero.high,
.scan-mobile-counter-card.high {
  border-color: rgba(255, 184, 79, 0.48);
  background: linear-gradient(145deg, rgba(255, 184, 79, 0.12), rgba(3, 15, 26, 0.86));
}

.result-quick-hero.discouraged,
.result-quick-alt-card.discouraged,
.scan-mobile-counter-card.discouraged {
  border-color: rgba(255, 120, 102, 0.48);
  background: linear-gradient(145deg, rgba(255, 120, 102, 0.12), rgba(3, 15, 26, 0.84));
}

.result-quick-hero.wasteful,
.result-quick-alt-card.wasteful,
.scan-mobile-counter-card.wasteful {
  border-color: rgba(218, 129, 255, 0.52);
  background: linear-gradient(145deg, rgba(218, 129, 255, 0.14), rgba(3, 15, 26, 0.84));
}

.scan-mobile-focus {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(15, 212, 255, 0.08), transparent 48%),
    rgba(3, 15, 26, 0.78);
  display: grid;
  gap: 0.42rem;
}

.scan-mobile-focus-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.scan-mobile-focus-meta span {
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  background: rgba(8, 25, 38, 0.78);
}

.scan-mobile-counter-card.selected {
  border-color: rgba(123, 234, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(15, 212, 255, 0.12), 0 0 22px rgba(15, 212, 255, 0.14);
}

.scan-mobile-empty {
  border: 1px dashed rgba(77, 220, 255, 0.18);
  border-radius: 14px;
  padding: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.84rem;
  background: rgba(2, 12, 22, 0.42);
}

.scan-recorder strong {
  display: block;
  margin-bottom: 0.6rem;
}

.scan-active-list {
  display: grid;
  gap: 0.85rem;
}

.scan-room-block {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  background: rgba(2, 12, 22, 0.42);
}

.scan-room-block-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
  margin-bottom: 0.62rem;
}

.scan-room-block-head strong {
  color: var(--teal-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scan-room-block-head span {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.scan-defense-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.65rem;
}

.scan-defense-card {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 17px;
  background:
    radial-gradient(circle at top left, rgba(15, 212, 255, 0.1), transparent 48%),
    rgba(3, 15, 26, 0.72);
  color: var(--ink);
  padding: 0.78rem;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 0.48rem;
  min-height: 158px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.scan-defense-card:hover,
.scan-defense-card.current {
  border-color: rgba(93, 255, 176, 0.55);
  box-shadow: 0 0 24px rgba(77, 220, 255, 0.12), inset 0 0 0 1px rgba(93, 255, 176, 0.08);
  transform: translateY(-1px);
}

.scan-defense-card.current {
  background:
    radial-gradient(circle at top left, rgba(93, 255, 176, 0.13), transparent 50%),
    linear-gradient(145deg, rgba(3, 15, 26, 0.9), rgba(6, 39, 52, 0.72));
}

.scan-card-kicker,
.scan-card-foot {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-defense-card strong {
  font-size: 1rem;
  line-height: 1.16;
}

.scan-card-counter {
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.scan-card-counter.warn {
  color: #ffb84f;
}

.scan-unresolved-item {
  border: 1px dashed rgba(31, 46, 54, 0.24);
  border-radius: 10px;
  padding: 0.45rem 0.58rem;
  margin-bottom: 0.5rem;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-inline: 0.1rem;
}

.empty-state,
.no-match {
  padding: 1rem;
  margin-top: 0.75rem;
}

.hidden {
  display: none !important;
}

.result-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(390px, 100%), 1fr));
  gap: 1rem;
}

.result-grid-details .mobile-panel-details-content {
  padding: 0;
}

.result-card {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(77, 220, 255, 0.2);
  background:
    radial-gradient(circle at top right, rgba(15, 212, 255, 0.12), transparent 42%),
    linear-gradient(160deg, rgba(6, 28, 44, 0.88), rgba(3, 12, 22, 0.9));
  padding: 1.05rem;
  box-shadow: 0 18px 42px rgba(0, 7, 16, 0.32);
  animation: rise 0.42s ease both;
}

.result-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.8rem;
}

.rank-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: var(--teal-dark);
  background: rgba(18, 125, 113, 0.13);
  border-radius: 999px;
  padding: 0.24rem 0.55rem;
}

.team-name {
  margin: 0.52rem 0 0;
  font-size: 1.18rem;
  line-height: 1.18;
  color: var(--ink);
}

.priority-badge {
  font-size: 0.72rem;
  font-weight: 850;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.priority-best {
  color: #dffff4;
  background: rgba(93, 255, 176, 0.14);
  border-color: rgba(93, 255, 176, 0.42);
}

.priority-high {
  color: #ffe5ae;
  background: rgba(255, 184, 79, 0.14);
  border-color: rgba(255, 184, 79, 0.38);
}

.priority-good {
  color: #d6ffe7;
  background: rgba(34, 197, 94, 0.13);
  border-color: rgba(34, 197, 94, 0.34);
}

.priority-medium {
  color: #ffd3c7;
  background: rgba(255, 90, 51, 0.13);
  border-color: rgba(255, 90, 51, 0.34);
}

.priority-discouraged {
  color: #ffd3c7;
  background: rgba(255, 90, 51, 0.13);
  border-color: rgba(255, 90, 51, 0.34);
}

.priority-unreliable {
  color: #d6dde7;
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.32);
}

.priority-wasteful {
  color: #f3dcff;
  background: rgba(183, 96, 255, 0.18);
  border-color: rgba(183, 96, 255, 0.34);
}

.counter-caution {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #ffd7cf;
}

.counter-punch-summary {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.35;
  font-weight: 700;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.42);
  padding: 0.62rem;
}

.counter-punch-summary strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.counter-punch-grid {
  display: grid;
  grid-template-columns: minmax(98px, 1fr) minmax(70px, 1fr);
  gap: 0.28rem 0.75rem;
}

.counter-punch-grid span {
  color: var(--muted);
  font-weight: 700;
}

.counter-punch-grid b {
  color: var(--teal);
  text-align: right;
}

.counter-discouraged-section,
.scan-discouraged-counters {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 120, 102, 0.28);
  border-radius: 18px;
  background: rgba(24, 7, 12, 0.45);
  padding: 0.8rem;
}

.counter-discouraged-section summary,
.scan-discouraged-counters summary {
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  color: #ffd7cf;
}

.counter-discouraged-section summary span,
.scan-discouraged-counters summary span {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.counter-discouraged-list,
.scan-discouraged-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
  margin-top: 0.75rem;
}

.score-wrap {
  margin-top: 0.9rem;
}

.score-label-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  color: var(--ink-soft);
}

.score-track {
  margin-top: 0.38rem;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.78);
  overflow: hidden;
}

.score-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(120deg, #5dffb0, #0fd4ff, #ffb84f);
  border-radius: 999px;
  transition: width 0.5s ease;
}

.meta-war-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.meta-war-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: baseline;
}

.meta-war-card p {
  margin: 0.65rem 0 0;
  color: var(--ink-soft);
}

.cta-row.compact {
  margin-top: 0.7rem;
  gap: 0.45rem;
}

@media (max-width: 820px) {
  .scanroom-board {
    grid-template-columns: 1fr;
  }

  .scan-history-head {
    display: none;
  }

  .scan-history-row {
    grid-template-columns: 1fr;
  }

  .scan-current,
  .scan-team,
  .scan-recorder,
  .scan-active,
  .scan-unresolved {
    grid-column: 1;
  }

  .scan-current {
    position: static;
  }

  .scan-team-buttons {
    grid-template-columns: 1fr;
  }

  .meta-war-grid {
    grid-template-columns: 1fr;
  }
}

.badge-row {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.soft-badge {
  font-size: 0.72rem;
  padding: 0.25rem 0.52rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(2, 12, 22, 0.66);
  color: var(--ink-soft);
}

.confidence-high,
.reliability-high {
  color: #dffff4;
  border-color: rgba(93, 255, 176, 0.38);
  background: rgba(93, 255, 176, 0.12);
}

.confidence-medium,
.reliability-medium {
  color: #ffe5ae;
  border-color: rgba(255, 184, 79, 0.34);
  background: rgba(255, 184, 79, 0.12);
}

.confidence-low,
.reliability-low {
  color: #ffd3c7;
  border-color: rgba(255, 90, 51, 0.32);
  background: rgba(255, 90, 51, 0.12);
}

.trend-positive {
  color: var(--green);
}

.trend-negative {
  color: #ff8b76;
}

.mini-metrics {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.mini-metrics > div {
  background: rgba(2, 12, 22, 0.58);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.55rem 0.62rem;
}

.mini-metrics span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.mini-metrics strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.detail-block {
  margin-top: 0.8rem;
}

.detail-block h4 {
  margin: 0;
  font-size: 0.81rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.detail-block p {
  margin: 0.34rem 0 0;
  line-height: 1.45;
  font-size: 0.92rem;
}

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  color: #fffaf4;
  font-weight: 700;
  background: linear-gradient(120deg, #1f7f72, #229d8f);
  box-shadow: 0 12px 30px rgba(12, 57, 51, 0.31);
  z-index: 30;
  animation: rise 0.28s ease both;
}

.toast-error {
  background: linear-gradient(120deg, #aa4035, #ca5b43);
}

.dashboard-app {
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 2;
  transition: grid-template-columns 0.17s ease;
}

body.sidebar-collapsed .dashboard-app {
  grid-template-columns: 92px minmax(0, 1fr);
}

.dashboard-sidebar {
  border-right: 1px solid rgba(77, 220, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(4, 16, 27, 0.98), rgba(1, 7, 13, 0.98)),
    radial-gradient(circle at 30% 0%, rgba(15, 212, 255, 0.24), transparent 40%),
    radial-gradient(circle at 115% 28%, rgba(255, 90, 51, 0.18), transparent 36%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  padding: 1rem 0.86rem;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 18px 0 58px rgba(0, 0, 0, 0.32);
  transition: width 0.22s ease, padding 0.22s ease;
}

.dashboard-sidebar::before {
  content: "COMMAND";
  position: absolute;
  top: 0.72rem;
  left: 1rem;
  color: rgba(123, 234, 255, 0.48);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  pointer-events: none;
}

.dashboard-sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(15, 212, 255, 0.7), rgba(255, 63, 47, 0.45), transparent);
  opacity: 0.75;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.78rem;
  min-height: 84px;
  padding: 2.25rem 0.2rem 0.9rem;
  border-bottom: 1px solid rgba(77, 220, 255, 0.18);
  position: relative;
}

.sidebar-toggle {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-content: center;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid rgba(77, 220, 255, 0.28);
  background: linear-gradient(145deg, rgba(9, 31, 47, 0.92), rgba(2, 10, 18, 0.92));
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 0 18px rgba(15, 212, 255, 0.12);
  z-index: 3;
}

.sidebar-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: rgba(123, 234, 255, 0.9);
  box-shadow: 0 0 8px rgba(15, 212, 255, 0.45);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.sidebar-toggle:hover {
  border-color: rgba(123, 234, 255, 0.62);
  background: rgba(15, 212, 255, 0.12);
}

.sidebar-brand h1 {
  margin: 0.15rem 0 0;
  font-size: 1.12rem;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.04em;
}

.sidebar-brand p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.dashboard-menu {
  display: grid;
  gap: 0.52rem;
}

.menu-subnav {
  display: grid;
  gap: 0.38rem;
  margin: -0.18rem 0 0.2rem 3.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(77, 220, 255, 0.22);
}

.menu-subbtn {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 999px;
  padding: 0.54rem 0.76rem;
  text-align: left;
  background: rgba(2, 12, 22, 0.5);
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.menu-subbtn:hover,
.menu-subbtn.active {
  border-color: rgba(77, 220, 255, 0.34);
  background: rgba(15, 212, 255, 0.09);
  color: var(--ink);
}

.menu-btn {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  padding: 0.62rem 0.68rem;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(7, 24, 38, 0.88), rgba(2, 10, 18, 0.78)),
    radial-gradient(circle at 0% 50%, rgba(15, 212, 255, 0.1), transparent 46%);
  color: var(--ink);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.015em;
  min-height: 62px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.menu-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 212, 255, 0.16), transparent 42%, rgba(255, 90, 51, 0.06));
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.menu-icon {
  width: 46px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(77, 220, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(15, 212, 255, 0.18), rgba(255, 90, 51, 0.08)),
    rgba(2, 12, 22, 0.72);
  color: #cfffff;
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
  position: relative;
  z-index: 1;
}

.menu-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
  position: relative;
  z-index: 1;
}

.menu-label {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.1;
}

.menu-hint {
  display: block;
  color: var(--ink-muted);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.18;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-btn:hover {
  border-color: rgba(77, 220, 255, 0.42);
  transform: translateX(2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22), inset 0 0 18px rgba(15, 212, 255, 0.06);
}

.menu-btn.active {
  border-color: rgba(77, 220, 255, 0.66);
  background:
    linear-gradient(135deg, rgba(15, 212, 255, 0.26), rgba(255, 90, 51, 0.12)),
    rgba(2, 12, 22, 0.78);
  color: var(--teal-dark);
  box-shadow: 0 16px 34px rgba(15, 212, 255, 0.12), inset 4px 0 0 rgba(255, 90, 51, 0.9);
}

.menu-btn:hover::before,
.menu-btn.active::before {
  opacity: 1;
}

.menu-btn.active .menu-icon {
  border-color: rgba(123, 234, 255, 0.7);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(15, 212, 255, 0.36), rgba(255, 90, 51, 0.18)),
    rgba(2, 12, 22, 0.88);
  box-shadow: 0 0 20px rgba(15, 212, 255, 0.2);
}

.menu-btn.active .menu-label {
  color: #eaffff;
}

.menu-btn.active .menu-hint {
  color: rgba(190, 242, 255, 0.78);
}

.dashboard-main {
  padding-bottom: 2rem;
  min-width: 0;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  min-height: 78px;
  padding: 2.45rem 0 0.65rem;
}

body.sidebar-collapsed .dashboard-sidebar {
  padding-inline: 0.62rem;
}

body.sidebar-collapsed .dashboard-sidebar::before {
  content: "CMD";
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.16em;
}

body.sidebar-collapsed .sidebar-brand > div {
  display: none;
}

body.sidebar-collapsed .brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

body.sidebar-collapsed .dashboard-menu {
  gap: 0.58rem;
}

body.sidebar-collapsed .menu-subnav {
  display: none;
}

body.sidebar-collapsed .menu-btn {
  min-height: 68px;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.16rem;
  padding: 0.48rem 0.32rem;
  text-align: center;
  border-radius: 20px;
}

body.sidebar-collapsed .menu-icon {
  width: 48px;
  height: 36px;
  border-radius: 14px;
  font-size: 0.72rem;
}

body.sidebar-collapsed .menu-copy {
  display: block;
}

body.sidebar-collapsed .menu-label {
  font-size: 0;
}

body.sidebar-collapsed .menu-btn::after {
  content: attr(data-menu-short);
  position: relative;
  z-index: 1;
  color: var(--ink-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
}

body.sidebar-collapsed .menu-hint {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.sidebar-collapsed .sidebar-toggle span:nth-child(2) {
  opacity: 0;
}

body.sidebar-collapsed .sidebar-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.dashboard-topbar {
  padding-top: 1.1rem;
  padding-bottom: 1.05rem;
}

.mobile-sidebar-backdrop,
.mobile-shell-toggle,
.mobile-current-view,
.mobile-bottom-nav {
  display: none;
}

.mobile-shell-toggle {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-content: center;
  gap: 4px;
  border-radius: 14px;
  border: 1px solid rgba(77, 220, 255, 0.28);
  background: rgba(2, 12, 22, 0.72);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 0 18px rgba(15, 212, 255, 0.12);
}

.mobile-shell-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: rgba(123, 234, 255, 0.9);
  box-shadow: 0 0 8px rgba(15, 212, 255, 0.45);
}

.mobile-current-view {
  margin-top: 0.45rem;
  width: fit-content;
  border-radius: 999px;
  padding: 0.24rem 0.6rem;
  border: 1px solid rgba(77, 220, 255, 0.18);
  background: rgba(3, 15, 26, 0.58);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.36rem;
  padding: 0.52rem 0.62rem calc(0.62rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(77, 220, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(1, 8, 15, 0.68), rgba(2, 10, 18, 0.98)),
    radial-gradient(circle at top left, rgba(15, 212, 255, 0.16), transparent 44%),
    radial-gradient(circle at top right, rgba(255, 90, 51, 0.12), transparent 44%);
  backdrop-filter: blur(18px);
  box-shadow: 0 -18px 34px rgba(0, 0, 0, 0.34);
}

.mobile-nav-btn {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  min-height: 62px;
  display: grid;
  gap: 0.18rem;
  place-items: center;
  padding: 0.42rem 0.22rem;
  background:
    linear-gradient(180deg, rgba(7, 23, 36, 0.9), rgba(2, 10, 18, 0.86));
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.mobile-nav-btn.active {
  color: #dffff4;
  border-color: rgba(123, 234, 255, 0.56);
  background:
    linear-gradient(180deg, rgba(15, 212, 255, 0.24), rgba(255, 90, 51, 0.1)),
    rgba(2, 12, 22, 0.92);
  box-shadow: 0 0 18px rgba(15, 212, 255, 0.16), inset 0 3px 0 rgba(255, 90, 51, 0.8);
}

.mobile-nav-icon {
  min-width: 28px;
  min-height: 22px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(77, 220, 255, 0.18);
  background: rgba(2, 12, 22, 0.56);
  color: #dffaff;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.03em;
  line-height: 1;
}

.mobile-nav-label {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-section {
  display: none;
}

.app-section.active {
  display: block;
  animation: rise 0.24s ease both;
}

.section-head {
  margin-bottom: 0.65rem;
}

.section-head h2 {
  margin: 0;
  font-family: "Eurostile", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  letter-spacing: 0.04em;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.section-panel {
  padding: clamp(1rem, 1.6vw, 1.45rem);
}

.status-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.82rem;
}

.status-card {
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 0 0, rgba(15, 212, 255, 0.12), transparent 44%),
    rgba(3, 15, 26, 0.74);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
}

.status-card span {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.status-card strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.02rem;
  line-height: 1.2;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.86rem;
}

.tool-result {
  margin-top: 0.92rem;
  display: grid;
  gap: 0.72rem;
  line-height: 1.5;
}

.sandbox-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
}

.sandbox-composer-form {
  margin-top: 0.82rem;
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 18px;
  padding: 0.82rem;
  background:
    radial-gradient(circle at 14% 0, rgba(15, 212, 255, 0.1), transparent 36%),
    rgba(2, 12, 22, 0.36);
}

.sandbox-chatbar {
  position: sticky;
  bottom: 0.75rem;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.62rem;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.sandbox-message-field {
  margin: 0;
}

.sandbox-message-field textarea {
  min-height: 3rem;
  max-height: 9rem;
  resize: vertical;
}

.sandbox-chatbar-actions {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding-bottom: 0.04rem;
}

.sandbox-chatbar .sandbox-context-details {
  grid-column: 1 / -1;
}

.sandbox-context-details {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 16px;
  background: rgba(2, 12, 22, 0.34);
  overflow: hidden;
}

.sandbox-context-details summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: 0.78rem 0.9rem;
  color: var(--teal-dark);
  font-weight: 900;
}

.sandbox-context-details summary small {
  color: var(--ink-soft);
  font-weight: 700;
  text-align: right;
}

.sandbox-context-grid {
  padding: 0 0.9rem 0.9rem;
}

.sandbox-chat {
  max-height: min(68vh, 780px);
  overflow: auto;
  padding-right: 0.18rem;
}

.sandbox-empty {
  border: 1px dashed rgba(77, 220, 255, 0.26);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(2, 12, 22, 0.42);
}

.sandbox-thread {
  display: grid;
  gap: 0.82rem;
}

.sandbox-active-context {
  border: 1px solid rgba(91, 255, 202, 0.18);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(5, 42, 45, 0.46), rgba(2, 12, 22, 0.62));
  overflow: hidden;
}

.sandbox-active-context summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0.78rem;
  color: #b9fff0;
  cursor: pointer;
  font-weight: 900;
}

.sandbox-active-context summary small {
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-align: right;
}

.sandbox-active-context-body {
  padding: 0 0.78rem 0.78rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.sandbox-active-context-body p {
  margin: 0;
}

.sandbox-context-suggestions {
  margin-top: 0.58rem;
}

.sandbox-message {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.6rem;
}

.sandbox-message-user {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sandbox-avatar {
  width: 2.1rem;
  height: 2.1rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(77, 220, 255, 0.32);
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.74);
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 900;
}

.sandbox-bubble {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  padding: 0.82rem 0.92rem;
  background: linear-gradient(145deg, rgba(9, 39, 59, 0.72), rgba(3, 15, 26, 0.82));
  box-shadow: inset 0 0 0 1px rgba(123, 234, 255, 0.035);
}

.sandbox-message-user .sandbox-bubble {
  background: linear-gradient(145deg, rgba(15, 212, 255, 0.16), rgba(6, 27, 41, 0.86));
  border-color: rgba(77, 220, 255, 0.28);
}

.sandbox-message-error .sandbox-bubble {
  border-color: rgba(255, 63, 47, 0.35);
  background: rgba(255, 63, 47, 0.1);
}

.sandbox-bubble p {
  margin: 0;
}

.sandbox-answer {
  white-space: pre-wrap;
  line-height: 1.58;
}

.sandbox-thinking {
  color: var(--ink-soft);
  font-style: italic;
}

.sandbox-mini-meta,
.sandbox-answer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.58rem;
}

.sandbox-mini-meta span,
.sandbox-answer-strip span {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  color: var(--ink-soft);
  background: rgba(2, 12, 22, 0.46);
  font-size: 0.76rem;
  font-weight: 800;
}

.sandbox-warning {
  margin-top: 0.62rem;
  border: 1px solid rgba(255, 184, 79, 0.28);
  border-radius: 12px;
  padding: 0.56rem 0.66rem;
  background: rgba(255, 184, 79, 0.1);
  color: #ffd99a;
  font-size: 0.88rem;
}

.sandbox-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.66rem;
}

.sandbox-details {
  margin-top: 0.66rem;
  border-top: 1px solid rgba(77, 220, 255, 0.12);
  padding-top: 0.56rem;
}

.sandbox-user-data {
  opacity: 0.94;
}

.sandbox-details summary {
  cursor: pointer;
  color: var(--teal-dark);
  font-weight: 850;
}

.sandbox-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.72rem;
  margin-top: 0.66rem;
}

.sandbox-details-grid > div {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.4);
  padding: 0.68rem;
}

.sandbox-details-grid strong {
  display: block;
  margin-bottom: 0.28rem;
}

.sandbox-details-grid p {
  margin: 0.22rem 0;
}

.sandbox-technical {
  grid-column: 1 / -1;
}

.sandbox-technical pre {
  max-height: 260px;
  overflow: auto;
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
  font-size: 0.76rem;
}

.sandbox-feedback {
  margin-top: 0.68rem;
}

.compact-result {
  margin-top: 0.55rem;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.dashboard-action-card {
  display: grid;
  gap: 0.45rem;
  text-align: left;
  border: 1px solid rgba(77, 220, 255, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(15, 212, 255, 0.12), transparent 48%),
    rgba(3, 15, 26, 0.78);
  color: var(--ink);
  padding: 1rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-action-card strong {
  font-size: 0.98rem;
}

.dashboard-action-card span {
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 0.88rem;
}

.dashboard-action-card:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 234, 255, 0.48);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

.dashboard-grid-gap {
  margin-top: var(--grid-gap);
}

.engine-tab-nav {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.engine-tab-btn {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  background: rgba(2, 12, 22, 0.62);
  color: var(--ink-soft);
  font-weight: 800;
  cursor: pointer;
}

.engine-tab-btn:hover,
.engine-tab-btn.active {
  border-color: rgba(77, 220, 255, 0.46);
  background: linear-gradient(90deg, rgba(15, 212, 255, 0.14), rgba(255, 63, 47, 0.08));
  color: var(--ink);
}

.engine-tab-panel {
  display: none;
  margin-top: 1rem;
}

.engine-tab-panel.active {
  display: block;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.war-tracker-filters {
  margin-top: 0.9rem;
}

.knowledge-center-shell {
  display: grid;
  gap: 1rem;
}

.knowledge-center-hero {
  display: grid;
  gap: 0.9rem;
}

.knowledge-center-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.knowledge-center-breadcrumb button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.knowledge-center-head {
  align-items: center;
}

.knowledge-center-topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(420px, 1.5fr);
  gap: 0.9rem;
  align-items: end;
}

.knowledge-center-search-field input {
  min-height: 44px;
}

.knowledge-center-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.45rem);
  left: 0;
  width: min(760px, 100%);
  max-height: 420px;
  overflow: auto;
  border: 1px solid rgba(15, 212, 255, 0.28);
  border-radius: 18px;
  background: rgba(4, 14, 26, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  padding: 0.85rem;
}

.knowledge-center-search-results section + section {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.knowledge-center-search-results strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.knowledge-center-search-results button {
  display: grid;
  width: 100%;
  gap: 0.15rem;
  margin: 0.22rem 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.knowledge-center-search-results button:hover {
  border-color: rgba(255, 193, 7, 0.34);
  background: rgba(255, 193, 7, 0.08);
}

.knowledge-center-search-results small {
  color: var(--muted);
}

.knowledge-center-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.knowledge-center-nav {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 1rem;
  padding: 0.9rem;
}

.knowledge-center-nav-group {
  display: grid;
  gap: 0.42rem;
}

.knowledge-center-nav-group > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.knowledge-center-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 0.62rem 0.72rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.knowledge-center-nav-btn.active {
  border-color: rgba(255, 193, 7, 0.52);
  background: rgba(255, 193, 7, 0.12);
  color: var(--accent);
}

.knowledge-center-nav-btn b {
  min-width: 1.4rem;
  border-radius: 999px;
  padding: 0.12rem 0.4rem;
  background: rgba(15, 212, 255, 0.16);
  color: var(--accent);
  font-size: 0.72rem;
  text-align: center;
}

.knowledge-center-nav-btn b:empty,
.knowledge-center-nav-btn b.hidden {
  display: none;
}

.knowledge-center-tools .btn {
  width: 100%;
  justify-content: center;
}

.knowledge-center-content {
  min-width: 0;
}

.knowledge-center-view {
  display: none;
  gap: 1rem;
}

.knowledge-center-view.active {
  display: grid;
}

.knowledge-center-view-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.knowledge-center-view-head h3,
.knowledge-center-view-head p {
  margin-top: 0;
}

.knowledge-center-kpi-grid {
  margin: 0;
}

.knowledge-center-todo-list,
.knowledge-center-inbox,
.knowledge-center-timeline {
  display: grid;
  gap: 0.55rem;
}

.knowledge-center-todo-item,
.knowledge-center-inbox-item,
.knowledge-center-timeline-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.72rem 0.78rem;
  background: rgba(255, 255, 255, 0.035);
}

.knowledge-center-todo-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.16rem 0.65rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.knowledge-center-todo-item span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(15, 212, 255, 0.14);
  color: var(--accent);
  font-weight: 900;
}

.knowledge-center-todo-item.warning span,
.knowledge-center-inbox-item.warning span {
  background: rgba(255, 193, 7, 0.16);
  color: var(--amber);
}

.knowledge-center-todo-item.danger span,
.knowledge-center-inbox-item.danger span {
  background: rgba(255, 92, 92, 0.16);
  color: var(--danger);
}

.knowledge-center-todo-item small,
.knowledge-center-inbox-item small {
  color: var(--muted);
}

.knowledge-center-empty {
  border: 1px dashed rgba(15, 212, 255, 0.24);
  border-radius: 14px;
  padding: 0.9rem;
  color: var(--muted);
  background: rgba(15, 212, 255, 0.045);
}

.knowledge-center-empty.ok {
  border-color: rgba(63, 222, 126, 0.25);
  background: rgba(63, 222, 126, 0.05);
  color: var(--success);
}

.knowledge-center-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.knowledge-center-quick-actions .dashboard-action-card {
  min-height: 92px;
}

.knowledge-center-timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
}

.knowledge-center-timeline-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 12px;
  background: rgba(15, 212, 255, 0.14);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.knowledge-center-timeline-item.save > span,
.knowledge-center-timeline-item.normalize > span {
  background: rgba(63, 222, 126, 0.14);
  color: var(--success);
}

.knowledge-center-timeline-item.warning > span,
.knowledge-center-timeline-item.screenshot > span {
  background: rgba(255, 193, 7, 0.16);
  color: var(--amber);
}

.knowledge-center-timeline-item.error > span {
  background: rgba(255, 92, 92, 0.16);
  color: var(--danger);
}

.knowledge-center-timeline-item em {
  display: block;
  margin-top: 0.14rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.knowledge-center-import-layout,
.knowledge-center-review-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
  align-items: start;
}

.knowledge-center-screenshot-preview {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px dashed rgba(15, 212, 255, 0.28);
  border-radius: 16px;
  background: rgba(2, 12, 22, 0.56);
  overflow: hidden;
}

.knowledge-center-screenshot-preview img {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.knowledge-center-screenshot-preview small {
  width: 100%;
  padding: 0.5rem 0.65rem;
  color: var(--muted);
  background: rgba(2, 12, 22, 0.72);
}

.knowledge-center-inbox-item {
  display: grid;
  gap: 0.18rem;
}

.knowledge-center-inbox-item span {
  justify-self: start;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  background: rgba(15, 212, 255, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.knowledge-center-inbox-item.ok span {
  background: rgba(63, 222, 126, 0.14);
  color: var(--success);
}

.knowledge-center-subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.knowledge-center-subtabs button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.46rem 0.8rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.knowledge-center-subtabs button.active {
  border-color: rgba(255, 193, 7, 0.48);
  background: rgba(255, 193, 7, 0.12);
  color: var(--accent);
}

.knowledge-center-history-panel {
  display: none;
}

.knowledge-center-history-panel.active {
  display: block;
}

@media (max-width: 1180px) {
  .knowledge-center-topbar,
  .knowledge-center-layout,
  .knowledge-center-import-layout,
  .knowledge-center-review-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-center-nav {
    position: static;
  }

  .knowledge-center-nav-group:first-child {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .knowledge-center-nav-group:first-child > span {
    grid-column: 1 / -1;
  }

  .knowledge-center-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .knowledge-center-tools > span {
    grid-column: 1 / -1;
  }

  .knowledge-center-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .knowledge-center-head,
  .knowledge-center-view-head {
    flex-direction: column;
  }

  .knowledge-center-global-filters,
  .knowledge-center-tools,
  .knowledge-center-nav-group:first-child,
  .knowledge-center-quick-actions {
    grid-template-columns: 1fr;
  }

  .knowledge-center-nav {
    overflow-x: auto;
  }

  .knowledge-center-nav-btn {
    min-height: 42px;
  }

  .knowledge-center-search-results {
    position: static;
    width: 100%;
    max-height: 340px;
    margin-top: 0.6rem;
  }

  .knowledge-center-screenshot-preview {
    min-height: 180px;
  }

  .knowledge-center-screenshot-preview img {
    max-height: 360px;
  }
}

.inline-checkbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.inline-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.wt-list-block strong {
  display: block;
  margin-bottom: 0.34rem;
}

.wt-list-block ul {
  margin: 0;
  padding-left: 1rem;
}

.wt-list-block li {
  margin-bottom: 0.12rem;
}

.wt-ocr-preview {
  display: grid;
  gap: 0.62rem;
}

.wt-ocr-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.7);
}

.wt-ocr-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.wt-ocr-table th,
.wt-ocr-table td {
  padding: 0.46rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.wt-ocr-table th {
  background: rgba(15, 212, 255, 0.1);
  color: var(--ink);
  font-weight: 800;
}

.wt-ocr-table tr:last-child td {
  border-bottom: 0;
}

.wt-ocr-table tr.needs-review td {
  background: rgba(247, 183, 49, 0.12);
}

.wt-ocr-table input {
  width: 100%;
  min-width: 64px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.44rem;
  background: rgba(2, 12, 22, 0.86);
  color: var(--ink);
}

.wt-ocr-table input[data-field="player"] {
  min-width: 160px;
}

.wt-player-report-wrap .wt-ocr-table {
  min-width: 1220px;
}

.wt-player-report-totals {
  margin-bottom: 0.75rem;
}

.wt-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.wt-performance-card {
  display: grid;
  gap: 0.55rem;
  height: 100%;
}

.wt-performance-card > strong {
  display: block;
  font-size: 0.98rem;
}

.wt-performance-card p {
  margin: 0;
}

.wt-performance-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.15rem;
}

.wt-performance-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.65rem;
  align-items: start;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(2, 12, 22, 0.5);
}

.wt-performance-list span,
.wt-performance-list small,
.wt-performance-list em {
  display: block;
}

.wt-performance-list small,
.wt-performance-list em {
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-style: normal;
}

.wt-performance-list b {
  color: var(--teal);
  font-size: 1.05rem;
}

.wt-performance-promotion .wt-performance-list b,
.wt-performance-good .wt-performance-list b,
.wt-performance-rising .wt-performance-list b {
  color: var(--success);
}

.wt-performance-watch .wt-performance-list b,
.wt-performance-declining .wt-performance-list b {
  color: var(--danger);
}

.wt-performance-list em {
  grid-column: 1 / -1;
}

.wt-ocr-cell-meta {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  font-size: 0.72rem;
}

.wt-ocr-cell-meta.warn {
  color: var(--warning);
  display: block;
  line-height: 1.35;
}

.trend-up {
  color: var(--success);
  font-weight: 800;
  text-shadow: 0 0 16px rgba(93, 255, 176, 0.28);
}

.trend-down {
  color: var(--danger);
  font-weight: 800;
  text-shadow: 0 0 16px rgba(255, 63, 47, 0.24);
}

.trend-flat {
  color: var(--muted);
  font-weight: 700;
}

.wt-trend-table small {
  color: inherit;
  opacity: 0.78;
  font-weight: 700;
}

.wt-trend-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.wt-ocr-actions {
  margin-top: 0.1rem;
}

.ai-trace {
  display: grid;
  gap: 0.5rem;
}

.trace-line {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  border-left: 3px solid var(--border);
  padding: 0.42rem 0.55rem;
  background: rgba(2, 12, 22, 0.58);
  border-radius: 12px;
}

.trace-line span {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.trace-line p {
  margin: 0;
}

.trace-decision {
  border-left-color: var(--teal);
}

.trace-warning {
  border-left-color: #c47f1f;
}

.ai-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  margin: 0.65rem 0;
}

.ai-role-grid > div {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.58);
  padding: 0.68rem;
}

.ai-role-grid strong,
.ai-role-grid span {
  display: block;
}

.ai-role-grid strong .character-chip {
  width: 100%;
}

.ai-role-grid span {
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-role-grid p {
  margin: 0.3rem 0 0;
}

.compact-list {
  margin: 0.35rem 0 0;
  padding-left: 1rem;
}

.compact-list li + li {
  margin-top: 0.18rem;
}

.execution-flow-grid {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.execution-flow-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.7rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.56);
  padding: 0.72rem;
}

.execution-flow-index {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(15, 212, 255, 0.12);
  color: var(--teal);
  font-weight: 900;
}

.execution-flow-step h4 {
  margin: 0 0 0.32rem;
}

.replay-log-card {
  display: grid;
  gap: 0.8rem;
}

.replay-log-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.replay-log-tools {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: end;
}

.replay-log-list {
  display: grid;
  gap: 0.55rem;
  max-height: 620px;
  overflow: auto;
  padding-right: 0.15rem;
}

.replay-log-entry {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.52);
  padding: 0.72rem;
}

.replay-log-entry.hidden {
  display: none;
}

.replay-log-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.replay-log-meta span {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--ink-muted);
}

.replay-log-entry p {
  margin: 0;
}

.replay-summary-log {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.2rem;
}

.replay-readable-report {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 14px;
  background: rgba(77, 220, 255, 0.07);
  padding: 0.72rem;
  margin-top: 0.55rem;
}

.replay-readable-report p {
  margin: 0.25rem 0 0;
}

.replay-compare-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.replay-compare-row {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 16px;
  background: rgba(2, 12, 22, 0.58);
  padding: 0.8rem;
  display: grid;
  gap: 0.6rem;
}

.replay-compare-row.replay-compare-match {
  border-color: rgba(77, 220, 120, 0.28);
}

.replay-compare-row.replay-compare-order_difference,
.replay-compare-row.replay-compare-order_mismatch,
.replay-compare-row.replay-compare-mismatch,
.replay-compare-row.replay-compare-confirmed_effect_mismatch {
  border-color: rgba(255, 194, 77, 0.32);
}

.replay-compare-row.replay-compare-replay_only,
.replay-compare-row.replay-compare-simulation_only,
.replay-compare-row.replay-compare-missing_simulation_event,
.replay-compare-row.replay-compare-missing_ocr_event,
.replay-compare-row.replay-compare-target_mismatch,
.replay-compare-row.replay-compare-ability_slot_mismatch {
  border-color: rgba(255, 111, 111, 0.26);
}

.replay-compare-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.replay-compare-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.replay-compare-side {
  border: 1px solid rgba(77, 220, 255, 0.12);
  border-radius: 14px;
  background: rgba(5, 18, 30, 0.66);
  padding: 0.72rem;
  display: grid;
  gap: 0.35rem;
}

.replay-compare-side-empty {
  opacity: 0.72;
  border-style: dashed;
}

.replay-compare-side p {
  margin: 0;
}

.replay-log-review {
  margin-top: 0.55rem;
}

.replay-notes textarea {
  min-height: 120px;
}

.replay-correction-report {
  border-top: 1px solid rgba(77, 220, 255, 0.12);
  padding-top: 0.65rem;
}

.replay-correction-report summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--ink);
}

.replay-ocr-analyzer {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(77, 220, 255, 0.12);
}

.replay-ocr-head {
  display: grid;
  gap: 0.25rem;
}

.replay-ocr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
  align-items: end;
}

.replay-crop-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 0.9rem;
}

.replay-crop-preview {
  position: relative;
  min-height: 220px;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(2, 12, 22, 0.62);
}

.replay-crop-video {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #02070d;
}

.replay-crop-video.hidden {
  display: none;
}

.replay-crop-overlay {
  position: absolute;
  border: 2px solid rgba(15, 212, 255, 0.88);
  box-shadow: 0 0 0 9999px rgba(2, 8, 18, 0.46);
  border-radius: 10px;
  pointer-events: none;
}

.replay-crop-overlay.hidden {
  display: none;
}

.replay-crop-controls {
  display: grid;
  gap: 0.6rem;
}

@media (max-width: 960px) {
  .replay-crop-panel {
    grid-template-columns: 1fr;
  }

  .replay-compare-columns {
    grid-template-columns: 1fr;
  }

  .scan-fight-review-grid {
    grid-template-columns: 1fr;
  }
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.settings-nav {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.settings-nav-btn {
  border: 1px solid rgba(77, 220, 255, 0.18);
  background: rgba(3, 15, 26, 0.76);
  color: var(--ink);
  border-radius: 14px;
  padding: 0.8rem 0.95rem;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.settings-nav-btn:hover,
.settings-nav-btn.active {
  border-color: rgba(77, 220, 255, 0.46);
  background: rgba(15, 212, 255, 0.14);
  transform: translateY(-1px);
}

.settings-content {
  min-width: 0;
}

body.settings-counter-editor-active [data-section-panel="settings"] > .section-panel {
  overflow: visible;
}

body.settings-counter-editor-active [data-section-panel="settings"].shell {
  width: 100%;
  max-width: none;
}

body.settings-counter-editor-active .settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

body.settings-counter-editor-active .settings-nav {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.8rem;
  padding: 0.55rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  background: rgba(2, 10, 18, 0.72);
}

body.settings-counter-editor-active .settings-nav-btn {
  flex: 0 0 auto;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

body.settings-counter-editor-active .settings-content,
body.settings-counter-editor-active .settings-subsection.active,
body.settings-counter-editor-active .counter-editor-full-card {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.settings-subsection {
  display: none;
  gap: 1rem;
}

.settings-subsection.active {
  display: grid;
}

.wt-history-grid,
.wt-recent-grid {
  display: grid;
  gap: 0.45rem;
}

.wt-history-item,
.wt-recent-item {
  border: 1px solid var(--border);
  background: rgba(2, 12, 22, 0.58);
  border-radius: 14px;
  padding: 0.62rem 0.7rem;
}

.wt-history-item strong,
.wt-recent-item strong {
  display: block;
}

.err {
  color: #ff9a86;
  font-weight: 700;
}

.dashboard-grid-gap {
  margin-top: 0.85rem;
}

.status-muted,
.chip,
.team-select-card,
.defense-slot,
.scan-team-btn,
.result-card,
.wt-ocr-table-wrap {
  border-color: rgba(77, 220, 255, 0.18);
  background: rgba(3, 15, 26, 0.72);
  color: var(--ink);
}

.chip {
  color: var(--teal-dark);
  box-shadow: inset 0 0 16px rgba(15, 212, 255, 0.05);
}

.chip:hover,
.team-select-card:hover,
.scan-team-btn:hover {
  border-color: rgba(77, 220, 255, 0.48);
  background: rgba(15, 212, 255, 0.12);
}

.team-selection-panel,
.roster-help {
  border-color: rgba(77, 220, 255, 0.28);
  background: linear-gradient(145deg, rgba(15, 212, 255, 0.1), rgba(3, 15, 26, 0.76));
}

.team-select-card.selected {
  border-color: rgba(123, 234, 255, 0.72);
  background: rgba(15, 212, 255, 0.18);
  box-shadow: 0 0 0 2px rgba(15, 212, 255, 0.12), 0 0 24px rgba(15, 212, 255, 0.14);
}

.result-card {
  box-shadow: 0 20px 45px rgba(0, 7, 16, 0.36);
}

.metric-card code {
  background: rgba(15, 212, 255, 0.12);
  color: #d9fbff;
}

*::-webkit-scrollbar-track {
  background: rgba(2, 12, 22, 0.58);
}

*::-webkit-scrollbar-thumb {
  background: rgba(77, 220, 255, 0.3);
  border-color: rgba(2, 12, 22, 0.78);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sentinel-rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes sentinel-pulse {
  0%,
  100% {
    opacity: 0.58;
    filter: drop-shadow(0 0 8px rgba(15, 212, 255, 0.24));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 24px rgba(15, 212, 255, 0.42));
  }
}

@keyframes sentinel-scan {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  16% {
    opacity: 0.55;
  }
  52% {
    opacity: 0.2;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes sentinel-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, 12px, 0) scale(1.05);
  }
}

@keyframes sentinel-background-drift {
  0% {
    background-position: 50% 26%, 18% 12%, 88% 24%, center;
  }
  35% {
    background-position: 54% 30%, 15% 16%, 84% 20%, center;
  }
  70% {
    background-position: 46% 24%, 22% 10%, 90% 30%, center;
  }
  100% {
    background-position: 52% 32%, 16% 18%, 82% 26%, center;
  }
}

@keyframes sentinel-grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 84px 42px, 42px 84px;
  }
}

@keyframes sentinel-think {
  0%,
  100% {
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(0.985) rotate(0deg);
  }
  38% {
    opacity: 0.58;
    transform: translate(-50%, -50%) scale(1.025) rotate(2deg);
  }
  64% {
    opacity: 0.34;
    transform: translate(-50%, -50%) scale(1.005) rotate(-1deg);
  }
}

@keyframes sentinel-neural-breathe {
  0%,
  100% {
    opacity: 0.18;
    transform: translate(-50%, -50%) scale(0.94);
  }
  45% {
    opacity: 0.68;
    transform: translate(-50%, -50%) scale(1.08);
  }
  72% {
    opacity: 0.28;
    transform: translate(-50%, -50%) scale(1.01);
  }
}

@keyframes sentinel-data-slide {
  0%,
  100% {
    opacity: 0;
    transform: translate3d(-18px, 0, 0) scaleX(0.45);
  }
  18% {
    opacity: 0.72;
  }
  48% {
    opacity: 0.22;
    transform: translate3d(44px, 0, 0) scaleX(1);
  }
  70% {
    opacity: 0.5;
    transform: translate3d(96px, 0, 0) scaleX(0.72);
  }
}

@keyframes sentinel-node-drift {
  from {
    background-position: 0 0, 30px 48px, 0 0, 0 0;
  }
  to {
    background-position: 192px 164px, -112px 172px, 220px 0, 0 260px;
  }
}

@keyframes sentinel-panel-flicker {
  0%,
  100% {
    opacity: 0.34;
    transform: translate3d(0, 0, 0);
  }
  35% {
    opacity: 0.58;
  }
  42% {
    opacity: 0.42;
  }
  48% {
    opacity: 0.66;
    transform: translate3d(0, -2px, 0);
  }
  72% {
    opacity: 0.46;
  }
}

@keyframes sentinel-core-think {
  0%,
  100% {
    opacity: 0.62;
    transform: translate(-50%, -50%) scale(0.98);
    filter: drop-shadow(0 0 10px rgba(15, 212, 255, 0.24));
  }
  42% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1.045);
    filter: drop-shadow(0 0 28px rgba(15, 212, 255, 0.42));
  }
  66% {
    opacity: 0.74;
    transform: translate(-50%, -50%) scale(1.01);
  }
}

@keyframes sentinel-grid-blink {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes sentinel-crosshair-focus {
  0%,
  100% {
    opacity: 0.28;
    transform: translate(-50%, -50%) scale(0.99);
  }
  50% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1.015);
  }
}

@keyframes sentinel-readout-flow {
  0%,
  100% {
    opacity: 0.32;
    background-position: 0 0, 0 0;
  }
  42% {
    opacity: 0.62;
    background-position: 28px 0, 0 18px;
  }
  70% {
    opacity: 0.44;
    background-position: 62px 0, 0 34px;
  }
}

@keyframes sentinel-label-glitch {
  0%,
  91%,
  100% {
    opacity: 0.88;
    filter: none;
  }
  92% {
    opacity: 0.42;
    filter: blur(0.8px);
  }
  93% {
    opacity: 1;
    transform: translateX(calc(-50% + 1px));
  }
  94% {
    opacity: 0.7;
    transform: translateX(calc(-50% - 1px));
  }
}

@keyframes sentinel-personality-pulse {
  0%,
  100% {
    opacity: 0.28;
    filter: drop-shadow(0 0 4px rgba(15, 212, 255, 0.18));
  }
  38% {
    opacity: 0.68;
    filter: drop-shadow(0 0 14px rgba(15, 212, 255, 0.38));
  }
  52% {
    opacity: 0.36;
  }
}

@keyframes sentinel-presence-breathe {
  0%,
  100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(0.98);
  }
  44% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(1.035);
  }
  66% {
    opacity: 0.64;
    transform: translate(-50%, -50%) scale(1.01);
  }
}

@keyframes sentinel-halo-ascend {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.96) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08) rotate(12deg);
  }
}

@keyframes sentinel-sigil-pulse {
  0%,
  100% {
    opacity: 0.74;
    transform: translate(-50%, -50%) scale(0.98);
  }
  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
  56% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(1.02);
  }
}

@keyframes sentinel-ray-blessing {
  0%,
  100% {
    opacity: 0.08;
    height: min(40vh, 360px);
  }
  38% {
    opacity: 0.34;
    height: min(58vh, 520px);
  }
  62% {
    opacity: 0.18;
  }
}

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .panel {
    background: rgba(5, 20, 32, 0.96);
  }

  .dashboard-sidebar {
    background: rgba(5, 20, 32, 0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:not(.sentinel-motion-on) *,
  body:not(.sentinel-motion-on) *::before,
  body:not(.sentinel-motion-on) *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  body:not(.sentinel-motion-on) .hud-data-stream,
  body:not(.sentinel-motion-on) .hud-thought {
    display: none;
  }
}

@media (max-width: 1060px) {
  .hud-readout,
  .hud-panel {
    opacity: 0.22;
  }

  .hud-core {
    width: min(46vw, 320px);
  }

  .hud-presence {
    width: min(58vw, 430px);
    opacity: 0.58;
  }

  body.sidebar-collapsed .dashboard-app,
  .dashboard-app {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  body.sidebar-collapsed .dashboard-sidebar {
    padding: 1rem 0.9rem;
  }

  body.sidebar-collapsed .dashboard-sidebar::before {
    content: "COMMAND";
    left: 1rem;
    transform: none;
    letter-spacing: 0.22em;
  }

  body.sidebar-collapsed .sidebar-brand {
    justify-content: flex-start;
    min-height: 84px;
    padding: 2.25rem 0.2rem 0.9rem;
  }

  body.sidebar-collapsed .sidebar-brand > div {
    display: block;
  }

  body.sidebar-collapsed .menu-btn::before {
    content: "";
  }

  body.sidebar-collapsed .brand-logo {
    width: 70px;
    height: 70px;
  }

  body.sidebar-collapsed .menu-subnav {
    display: grid;
  }

  body.sidebar-collapsed .menu-btn {
    min-height: 62px;
    grid-template-columns: 46px minmax(0, 1fr);
    justify-items: stretch;
    gap: 0.72rem;
    padding: 0.62rem 0.68rem;
    text-align: left;
    border-radius: 18px;
  }

  body.sidebar-collapsed .menu-icon {
    width: 46px;
    height: 42px;
    border-radius: 14px;
    font-size: 0.76rem;
  }

  body.sidebar-collapsed .menu-copy {
    display: grid;
  }

  body.sidebar-collapsed .menu-label {
    font-size: 0.94rem;
  }

  body.sidebar-collapsed .menu-hint {
    display: block;
  }

  body.sidebar-collapsed .menu-btn::after {
    content: none;
  }

  .dashboard-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-subnav,
  body.sidebar-collapsed .menu-subnav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: -0.1rem 0 0.35rem;
    padding-left: 0;
    border-left: 0;
  }

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

  .wt-performance-grid {
    grid-template-columns: 1fr;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .scan-team-buttons {
    grid-template-columns: 1fr;
  }

  .scan-match-data {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .status-cluster {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .hud-readout,
  .hud-panel,
  .hud-nodefield,
  .hud-personality {
    display: none;
  }

  .hud-core {
    width: min(72vw, 280px);
  }

  .hud-presence {
    width: min(86vw, 320px);
    opacity: 0.42;
  }

  .hud-presence-title {
    display: none;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .topbar-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }

  .brand-logo {
    width: 70px;
    height: 70px;
  }

  .dashboard-menu {
    grid-template-columns: 1fr;
  }

  .menu-subnav,
  body.sidebar-collapsed .menu-subnav {
    grid-template-columns: 1fr;
  }

  .status-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-row .btn {
    width: 100%;
  }

.result-head {
  flex-direction: column;
  align-items: flex-start;
}
}

.strategic-values-editor {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
  max-height: 520px;
  overflow: auto;
  padding-right: 0.25rem;
}

.strategic-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(3, 15, 26, 0.72), rgba(6, 27, 42, 0.54));
  padding: 0.55rem 0.65rem;
  box-shadow: inset 0 0 0 1px rgba(77, 220, 255, 0.05);
}

.strategic-value-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.strategic-value-name img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(2, 12, 22, 0.85);
  border: 1px solid rgba(77, 220, 255, 0.22);
  filter: drop-shadow(0 0 10px rgba(77, 220, 255, 0.18));
}

.strategic-value-name strong {
  display: block;
  color: var(--ink);
}

.strategic-value-name span {
  display: block;
  max-width: min(58vw, 720px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.strategic-value-name small {
  display: block;
  color: var(--teal-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.strategic-value-row input {
  width: 72px;
  border-radius: 10px;
  border: 1px solid rgba(77, 220, 255, 0.28);
  background: rgba(2, 12, 22, 0.78);
  color: var(--ink);
  padding: 0.42rem 0.5rem;
  font-weight: 800;
  text-align: center;
}

.strategic-value-row select {
  width: 120px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.strategic-value-row input[data-value-usage-roles] {
  width: min(230px, 32vw);
  text-align: left;
  font-weight: 600;
}

.compact-field {
  margin-top: 0.65rem;
}

.expert-rules-card {
  border-color: rgba(255, 83, 54, 0.24);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 83, 54, 0.1), transparent 36%),
    linear-gradient(145deg, rgba(9, 39, 59, 0.66), rgba(3, 15, 26, 0.78));
}

.expert-rules-editor {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.9rem;
  max-height: 720px;
  overflow: auto;
  padding-right: 0.25rem;
}

.expert-rule-card {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 212, 255, 0.075), rgba(255, 83, 54, 0.045)),
    rgba(2, 12, 22, 0.62);
  padding: 0.9rem;
}

.expert-rule-head {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.expert-rule-head strong {
  display: block;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.expert-rule-head span {
  display: block;
  margin-top: 0.16rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.expert-rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.expert-rule-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.expert-rule-assisted,
.expert-rule-advanced {
  margin-top: 0.72rem;
  border-top: 1px solid rgba(77, 220, 255, 0.14);
  padding-top: 0.72rem;
}

.expert-rule-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.78rem;
  padding: 0.72rem;
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 15px;
  background: rgba(2, 12, 22, 0.46);
}

.expert-rule-summary b {
  display: block;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-bottom: 0.32rem;
}

.expert-rule-summary p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin: 0;
}

.expert-rule-summary span {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 212, 255, 0.08);
  color: var(--ink);
  padding: 0.15rem 0.46rem;
  font-size: 0.72rem;
}

.expert-rule-assisted summary,
.expert-rule-advanced summary {
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.76rem;
  margin-bottom: 0.72rem;
}

.expert-assisted-block {
  display: grid;
  gap: 0.52rem;
  margin-bottom: 0.75rem;
}

.expert-assisted-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.expert-assisted-head b {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

.expert-assisted-head span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.expert-assisted-grid {
  display: grid;
  gap: 0.46rem;
}

.expert-assisted-row {
  display: grid;
  grid-template-columns: 0.75fr 1.4fr 0.42fr;
  gap: 0.48rem;
  border: 1px solid rgba(77, 220, 255, 0.12);
  border-radius: 12px;
  background: rgba(2, 12, 22, 0.38);
  padding: 0.5rem;
}

.expert-assisted-empty {
  border-style: dashed;
  opacity: 0.86;
}

.expert-assisted-row label {
  display: grid;
  gap: 0.2rem;
}

.expert-assisted-row label span {
  color: var(--ink-soft);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.expert-assisted-row input {
  width: 100%;
  border-radius: 9px;
  border: 1px solid rgba(77, 220, 255, 0.22);
  background: rgba(2, 12, 22, 0.78);
  color: var(--ink);
  padding: 0.42rem 0.5rem;
}

.expert-assisted-block[data-expert-assisted="penalties"] .expert-assisted-row {
  grid-template-columns: 0.9fr 0.36fr 1.35fr;
}

.mono-textarea {
  font-family: "JetBrains Mono", "Cascadia Code", monospace;
  font-size: 0.78rem;
}

.field-error {
  border-color: rgba(255, 83, 54, 0.8) !important;
  box-shadow: 0 0 0 4px rgba(255, 83, 54, 0.13) !important;
}

.counter-db-editor {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 0.9rem;
  margin-top: 0.85rem;
}

.counter-db-recent-wrap {
  margin-top: 0.9rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(15, 212, 255, 0.08), rgba(255, 83, 54, 0.045)),
    rgba(2, 12, 22, 0.42);
  padding: 0.82rem;
}

.counter-db-recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.62rem;
}

.counter-db-recent-head strong {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}

.counter-db-recent-head span {
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.counter-db-recent {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.52rem;
}

.counter-db-recent-item {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 15px;
  background: rgba(3, 15, 26, 0.72);
  color: var(--ink);
  padding: 0.66rem 0.72rem;
  text-align: left;
  display: grid;
  gap: 0.24rem;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.counter-db-recent-item:hover {
  transform: translateY(-1px);
  border-color: rgba(123, 234, 255, 0.62);
  background: rgba(15, 212, 255, 0.12);
}

.scan-history-saved-item {
  cursor: pointer;
}

.scan-history-saved-item .cta-row {
  margin-top: 0.45rem;
}

@media (max-width: 1040px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

.counter-db-recent-type,
.counter-db-recent-priority {
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(77, 220, 255, 0.22);
  color: var(--teal-dark);
  background: rgba(15, 212, 255, 0.08);
  padding: 0.12rem 0.42rem;
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.counter-db-recent-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counter-db-recent-item em {
  color: var(--ink-soft);
  font-style: normal;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counter-db-list {
  display: grid;
  gap: 0.7rem;
  max-height: 620px;
  overflow: auto;
  padding-right: 0.25rem;
}

.counter-db-entry {
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 16px;
  background: rgba(2, 12, 22, 0.52);
  padding: 0.58rem;
}

.counter-db-defense,
.counter-db-counter {
  width: 100%;
  border: 1px solid rgba(77, 220, 255, 0.18);
  background: rgba(3, 15, 26, 0.72);
  color: var(--ink);
  border-radius: 13px;
  cursor: pointer;
  text-align: left;
}

.counter-db-defense {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.62rem 0.7rem;
}

.counter-db-defense span,
.counter-db-counter em {
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.counter-db-counters {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.52rem;
  padding-left: 0.45rem;
}

.counter-db-counter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.5rem 0.58rem;
}

.counter-db-counter span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.counter-db-defense:hover,
.counter-db-counter:hover,
.counter-db-defense.selected,
.counter-db-counter.selected {
  border-color: rgba(123, 234, 255, 0.62);
  background: rgba(15, 212, 255, 0.12);
}

.counter-db-form {
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(15, 212, 255, 0.1), transparent 42%),
    rgba(2, 12, 22, 0.58);
  padding: 0.9rem;
  align-self: start;
}

.counter-db-form h4 {
  margin: 0 0 0.8rem;
  color: var(--ink);
}

.counter-db-composition {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(77, 220, 255, 0.14);
  padding-top: 0.75rem;
}

.counter-db-composition strong {
  display: block;
  color: var(--teal-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.counter-db-table-wrap {
  margin-top: 1rem;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  padding: 0.85rem;
  background:
    radial-gradient(circle at 0 0, rgba(15, 212, 255, 0.1), transparent 40%),
    rgba(2, 12, 22, 0.45);
}

.counter-db-table-wrap summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.quick-counter-intake {
  margin-top: 0.85rem;
  border: 1px solid rgba(77, 220, 255, 0.18);
  border-radius: 18px;
  padding: 0.8rem;
  background:
    radial-gradient(circle at 100% 0, rgba(90, 255, 204, 0.1), transparent 34%),
    rgba(2, 12, 22, 0.55);
}

.quick-counter-intake summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.quick-counter-intake summary span {
  display: grid;
  gap: 0.15rem;
}

.quick-counter-intake summary em {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
}

.quick-counter-intake-body {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.quick-counter-intake-rows,
.quick-counter-validation-list {
  display: grid;
  gap: 0.75rem;
}

.quick-counter-report-section {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.quick-counter-report-section h4 {
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-counter-report-section.saved {
  border: 1px solid rgba(90, 255, 204, 0.22);
  border-radius: 14px;
  padding: 0.65rem;
  background: rgba(90, 255, 204, 0.06);
}

.quick-counter-row,
.quick-counter-validation-item {
  border: 1px solid rgba(77, 220, 255, 0.14);
  border-radius: 16px;
  padding: 0.75rem;
  background: rgba(3, 15, 26, 0.72);
}

.quick-counter-validation-item.ready {
  border-color: rgba(90, 255, 204, 0.28);
}

.quick-counter-validation-item.needs-review {
  border-color: rgba(255, 191, 0, 0.28);
}

.quick-counter-row-head,
.quick-counter-row-head > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-counter-row-head {
  justify-content: space-between;
}

.quick-counter-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(260px, 0.85fr);
  gap: 0.75rem;
  align-items: start;
}

.quick-counter-team-panel,
.quick-counter-meta {
  display: grid;
  gap: 0.5rem;
}

.quick-counter-team-search {
  position: relative;
}

.quick-counter-slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

.quick-counter-slot {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 0.22rem;
}

.quick-counter-slot > span,
.quick-counter-team-panel label > span,
.quick-counter-meta label > span {
  color: var(--ink-soft);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quick-counter-slot-preview {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(77, 220, 255, 0.22);
  border-radius: 10px;
  background: rgba(2, 12, 22, 0.85);
  overflow: hidden;
}

.quick-counter-slot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-counter-slot-preview b {
  color: var(--teal);
  font-size: 0.62rem;
}

.quick-counter-slot input,
.quick-counter-meta input,
.quick-counter-meta select,
.quick-counter-meta textarea,
.quick-counter-team-panel input {
  width: 100%;
  min-width: 0;
  border-radius: 10px;
  font-size: 0.78rem;
}

.quick-counter-slot input {
  padding-inline: 0.35rem;
}

.quick-counter-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-counter-notes,
.quick-counter-row-validation {
  grid-column: 1 / -1;
}

.quick-counter-slot .autocomplete-list {
  left: 0;
  right: auto;
  min-width: 210px;
  max-height: 230px;
  z-index: 35;
}

.quick-counter-slot .autocomplete-list button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.5rem;
}

.quick-counter-slot .autocomplete-list img,
.quick-counter-team-choice-assets img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 7px;
}

.quick-counter-slot .autocomplete-list b,
.quick-counter-team-choice-assets b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(3, 15, 26, 0.9);
  color: var(--teal);
  font-size: 0.54rem;
}

.quick-counter-team-search .autocomplete-list {
  max-height: 270px;
}

.quick-counter-team-search .autocomplete-list button {
  padding: 0.48rem 0.55rem;
}

.quick-counter-team-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.quick-counter-team-choice-main {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.quick-counter-team-choice-main strong,
.quick-counter-team-choice-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-counter-team-choice-main strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.quick-counter-team-choice-main small {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.quick-counter-team-choice-assets {
  display: flex;
  align-items: center;
  gap: 0.12rem;
}

.quick-counter-team-choice em {
  color: #ffe58f;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-counter-row-validation ul,
.quick-counter-validation-item ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.ok-chip {
  border-color: rgba(90, 255, 204, 0.45);
  color: var(--teal);
}

.err-chip {
  border-color: rgba(255, 105, 97, 0.45);
  color: #ffb4a8;
}

.quick-counter-api-error {
  border: 1px solid rgba(255, 105, 97, 0.28);
  border-radius: 14px;
  padding: 0.75rem;
  background: rgba(255, 105, 97, 0.08);
}

.quick-counter-api-error dl {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 0.35rem 0.55rem;
  margin: 0.55rem 0;
}

.quick-counter-api-error dt {
  color: var(--ink-soft);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quick-counter-api-error dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.quick-counter-api-error code {
  white-space: pre-wrap;
}

.counter-editor-filters {
  margin-top: 0.75rem;
}

.counter-editor-table-wrap {
  margin-top: 0.75rem;
}

.counter-editor-full-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.counter-editor-pager {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.counter-editor-table-scroll {
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: min(68vh, 760px);
  border: 1px solid rgba(77, 220, 255, 0.15);
  border-radius: 16px;
}

.counter-editor-table {
  width: 100%;
  min-width: 2320px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.counter-editor-table th,
.counter-editor-table td {
  border-bottom: 1px solid rgba(77, 220, 255, 0.12);
  padding: 0.45rem;
  vertical-align: top;
}

.counter-editor-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(3, 15, 26, 0.97);
  color: var(--ink-soft);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.counter-editor-table th:nth-child(1),
.counter-editor-table td:nth-child(1),
.counter-editor-table th:nth-child(2),
.counter-editor-table td:nth-child(2),
.counter-editor-table th:nth-child(3),
.counter-editor-table td:nth-child(3) {
  position: sticky;
  background: rgba(3, 15, 26, 0.96);
}

.counter-editor-table th:nth-child(1),
.counter-editor-table td:nth-child(1) {
  left: 0;
  z-index: 3;
}

.counter-editor-table th:nth-child(2),
.counter-editor-table td:nth-child(2) {
  left: 46px;
  z-index: 3;
  width: 460px;
  min-width: 460px;
  max-width: 460px;
}

.counter-editor-table th:nth-child(3),
.counter-editor-table td:nth-child(3) {
  left: 506px;
  z-index: 3;
  width: 520px;
  min-width: 520px;
  max-width: 520px;
}

.counter-editor-table th:nth-child(1),
.counter-editor-table td:nth-child(1) {
  width: 46px;
  min-width: 46px;
  max-width: 46px;
}

.counter-editor-team-cell {
  overflow: hidden;
}

.counter-editor-team-cell textarea {
  min-width: 0;
  width: 100%;
  resize: vertical;
  line-height: 1.25;
  min-height: 46px;
  font-weight: 800;
}

.counter-editor-team-assets {
  display: flex;
  align-items: center;
  gap: 0.18rem;
  max-width: 100%;
  overflow: hidden;
  margin-top: 0.32rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: rgba(2, 12, 22, 0.45);
}

.counter-editor-team-assets.empty {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.counter-editor-mini-warning {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 191, 0, 0.4);
  color: #ffe58f;
  font-size: 0.68rem;
  font-weight: 900;
}

.counter-editor-mini {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(77, 220, 255, 0.22);
  background: rgba(3, 15, 26, 0.9);
  overflow: hidden;
}

.counter-editor-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.counter-editor-mini b {
  font-size: 0.58rem;
  color: var(--teal);
}

.counter-editor-mini-actions {
  margin-top: 0.32rem;
}

.counter-editor-mini-editor {
  margin-top: 0.45rem;
  padding: 0.45rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 14px;
  background: rgba(2, 12, 22, 0.72);
}

.counter-editor-mini-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.35rem;
}

.counter-editor-mini-slot {
  position: relative;
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.counter-editor-mini-slot > span {
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.counter-editor-mini-picked {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(77, 220, 255, 0.2);
  background: rgba(3, 15, 26, 0.92);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.counter-editor-mini-picked img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.counter-editor-mini-picked b {
  color: var(--teal);
  font-size: 0.62rem;
}

.counter-editor-mini-slot input {
  min-width: 0;
  font-size: 0.72rem;
  padding-inline: 0.35rem;
}

.counter-editor-mini-slot .autocomplete-list {
  left: 0;
  right: auto;
  min-width: 210px;
  max-height: 240px;
  z-index: 20;
}

.counter-editor-mini-slot .autocomplete-list button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
}

.counter-editor-mini-footer {
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.counter-editor-row-state {
  display: inline-flex;
  align-items: center;
  min-width: 86px;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.counter-editor-row-state.status-saving,
.counter-editor-row-state.status-dirty {
  color: #ffe58f;
}

.counter-editor-row-state.status-saved {
  color: var(--teal);
}

.counter-editor-row-state.status-error,
.counter-editor-table tr.autosave-error {
  color: #ffb4a8;
}

.counter-editor-table tr.autosave-error {
  background: rgba(255, 90, 51, 0.1);
}

.counter-editor-interpretation,
.counter-editor-override {
  display: grid;
  gap: 0.3rem;
  min-width: 170px;
}

.counter-editor-interpretation {
  padding: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(3, 15, 26, 0.66);
}

.counter-editor-interpretation.is-positive {
  border-color: rgba(93, 255, 176, 0.26);
}

.counter-editor-interpretation.is-secondary {
  border-color: rgba(255, 184, 79, 0.28);
}

.counter-editor-interpretation strong {
  color: var(--ink);
  font-size: 0.76rem;
}

.counter-editor-interpretation span,
.counter-editor-interpretation small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.counter-editor-interpretation em,
.counter-admin-override {
  color: #ffe58f;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.counter-editor-override input {
  min-width: 190px;
  font-size: 0.72rem;
}

.strategic-values-filters,
.strategic-values-pager {
  margin-top: 0.65rem;
}

.strategic-values-pager {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

.counter-editor-table input,
.counter-editor-table select,
.counter-editor-table textarea {
  width: 100%;
  min-width: 90px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.counter-editor-table input[type="checkbox"] {
  min-width: 0;
  width: auto;
}

.counter-editor-table textarea {
  min-width: 210px;
  resize: vertical;
}

.counter-editor-table tr.needs-review {
  background: rgba(255, 191, 0, 0.08);
}

.warn-chip {
  border-color: rgba(255, 191, 0, 0.45);
  color: #ffe58f;
}

@media (max-width: 1180px) {
  .quick-counter-main-grid {
    grid-template-columns: 1fr;
  }
}

.utility-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 540px;
}

.utility-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(77, 220, 255, 0.2);
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  background: rgba(15, 212, 255, 0.08);
  color: var(--ink);
  font-size: 0.76rem;
}

.utility-tag-chip input {
  width: auto;
  min-width: 0;
}

.scan-composer {
  position: fixed;
  z-index: 1000;
  inset: 4vh clamp(0.7rem, 4vw, 4rem);
  overflow: auto;
  padding: clamp(1rem, 1.5vw, 1.35rem);
  border-color: rgba(123, 234, 255, 0.34);
  box-shadow: 0 28px 90px rgba(0, 7, 16, 0.86), 0 0 0 9999px rgba(0, 4, 10, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  background:
    linear-gradient(135deg, rgba(6, 24, 38, 0.98), rgba(2, 8, 18, 0.96)),
    radial-gradient(circle at top left, rgba(77, 220, 255, 0.16), transparent 42%);
  outline: 1px solid rgba(77, 220, 255, 0.26);
}

.shared-composer-host {
  display: block;
  min-width: 0;
}

.shared-composer-host.composer-host-active {
  margin-top: 0.7rem;
}

.scan-composer.scan-composer-inline {
  position: relative;
  inset: auto;
  z-index: 4;
  width: 100%;
  max-height: min(72vh, 760px);
  margin: 0;
  border-radius: 16px;
  overflow: auto;
  box-shadow: 0 14px 34px rgba(0, 7, 16, 0.34);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(135deg, rgba(6, 24, 38, 0.98), rgba(2, 8, 18, 0.98));
}

.war-live-defense-builder {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgba(77, 220, 255, 0.2);
  border-radius: 14px;
  background: rgba(3, 16, 28, 0.58);
}

.war-live-defense-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.war-live-defense-builder-head > div,
.war-live-draft-copy {
  min-width: 0;
}

.war-live-defense-builder-head strong,
.war-live-defense-builder-head span,
.war-live-draft-copy strong,
.war-live-draft-copy small,
.war-live-draft-warning {
  display: block;
}

.war-live-defense-builder-head span,
.war-live-draft-copy small {
  margin-top: 0.12rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.war-live-defense-empty {
  margin: 0;
  padding: 0.65rem;
  color: var(--ink-soft);
  border: 1px dashed rgba(77, 220, 255, 0.2);
  border-radius: 10px;
}

.war-live-defense-draft-list {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.war-live-defense-draft {
  display: grid;
  grid-template-columns: 30px minmax(150px, 0.9fr) minmax(190px, 1.4fr) auto auto;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.5rem 0.58rem;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-left: 3px solid rgba(77, 220, 255, 0.3);
  border-radius: 10px;
  background: rgba(2, 12, 22, 0.68);
}

.war-live-defense-draft.is-valid {
  border-left-color: rgba(93, 255, 176, 0.78);
}

.war-live-defense-draft.is-pending,
.war-live-defense-draft.is-blocked {
  border-left-color: rgba(255, 184, 70, 0.82);
}

.war-live-draft-order {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--ink);
  background: rgba(77, 220, 255, 0.1);
  font-weight: 900;
}

.war-live-draft-portraits {
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
}

.war-live-draft-portraits .character-chip > span:last-child {
  display: none;
}

.war-live-draft-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.war-live-draft-warning {
  margin-top: 0.18rem;
  color: #ffc36c;
  font-size: 0.73rem;
}

.war-live-draft-status {
  white-space: nowrap;
  padding: 0.24rem 0.46rem;
  border: 1px solid rgba(77, 220, 255, 0.25);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.war-live-draft-status.is-valid {
  color: #9dffd1;
  border-color: rgba(93, 255, 176, 0.4);
  background: rgba(93, 255, 176, 0.08);
}

.war-live-draft-status.is-pending,
.war-live-draft-status.is-blocked {
  color: #ffd79b;
  border-color: rgba(255, 184, 70, 0.42);
  background: rgba(255, 184, 70, 0.08);
}

.war-live-draft-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.war-live-draft-actions .btn {
  min-height: 30px;
  padding: 0.28rem 0.44rem;
}

@media (max-width: 1100px) {
  .war-live-defense-draft {
    grid-template-columns: 28px minmax(130px, 0.8fr) minmax(160px, 1.2fr) auto;
  }

  .war-live-draft-status {
    grid-column: 3;
  }

  .war-live-draft-actions {
    grid-column: 4;
    grid-row: 1 / span 2;
  }
}

.scan-composer-suggestions,
.scan-composer-members {
  display: grid;
  gap: 0.55rem;
  margin: 0.7rem 0;
}

.scan-wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 1rem;
}

.scan-wizard-steps span {
  border: 1px solid rgba(77, 220, 255, 0.2);
  border-radius: 999px;
  padding: 0.34rem 0.7rem;
  color: var(--ink-soft);
  background: rgba(3, 16, 28, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-wizard-steps span.active {
  color: #dffcff;
  border-color: rgba(77, 220, 255, 0.62);
  box-shadow: 0 0 18px rgba(77, 220, 255, 0.14);
}

.scan-wizard-steps span.done {
  color: #dffff4;
  border-color: rgba(93, 255, 176, 0.46);
  background: rgba(93, 255, 176, 0.08);
}

.scan-composer-choice,
.scan-composer-member,
.scan-slot-suggestion,
.scan-slot-filled {
  border: 1px solid rgba(77, 220, 255, 0.22);
  background: linear-gradient(135deg, rgba(3, 16, 28, 0.88), rgba(4, 38, 58, 0.54));
  color: var(--ink);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.scan-composer-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.78rem 0.88rem;
  text-align: left;
}

.scan-composer-choice strong,
.scan-composer-choice small {
  display: block;
}

.scan-composer-choice small {
  color: var(--ink-soft);
  margin-top: 0.15rem;
}

.scan-composer-choice:hover,
.scan-composer-member:hover,
.scan-slot-suggestion:hover,
.scan-slot-filled:hover {
  border-color: rgba(77, 220, 255, 0.62);
  box-shadow: 0 0 18px rgba(77, 220, 255, 0.12);
  transform: translateY(-1px);
}

.scan-composer-picker-head {
  border: 1px solid rgba(255, 79, 55, 0.28);
  background: linear-gradient(135deg, rgba(255, 79, 55, 0.13), rgba(15, 212, 255, 0.06));
  border-radius: 16px;
  padding: 0.78rem 0.88rem;
}

.scan-composer-picker-head strong,
.scan-composer-picker-head span {
  display: block;
}

.scan-composer-picker-head span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.scan-composer-member-grid,
.scan-composer-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.78rem;
}

.scan-composer-member {
  padding: 0.65rem;
}

.scan-composer-member.selected {
  border-color: rgba(255, 79, 55, 0.75);
  box-shadow: 0 0 20px rgba(255, 79, 55, 0.16), inset 0 0 0 1px rgba(255, 79, 55, 0.24);
}

.scan-composer-slot {
  min-height: 146px;
  border: 1px solid rgba(77, 220, 255, 0.16);
  border-radius: 20px;
  padding: 0.78rem;
  background: radial-gradient(circle at top, rgba(77, 220, 255, 0.08), rgba(3, 14, 24, 0.82));
}

.scan-slot-label {
  display: block;
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.55rem;
}

.scan-slot-input {
  width: 100%;
  border: 1px solid rgba(77, 220, 255, 0.24);
  border-radius: 12px;
  background: rgba(2, 12, 22, 0.74);
  color: var(--ink);
  padding: 0.64rem 0.72rem;
}

.scan-slot-suggestions {
  display: grid;
  gap: 0.46rem;
  margin-top: 0.58rem;
  max-height: 230px;
  overflow: auto;
}

.scan-slot-suggestion,
.scan-slot-filled {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.55rem 0.58rem;
}

.scan-slot-suggestion small {
  color: var(--ink-soft);
  font-weight: 800;
}

.scan-slot-remove {
  color: var(--accent-red);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
}

.scan-composer-name {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(93, 255, 176, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(93, 255, 176, 0.1), transparent 40%),
    rgba(3, 16, 28, 0.72);
}

.scan-composer-name span,
.scan-composer-name strong {
  display: block;
}

.scan-composer-name span {
  color: var(--ink-soft);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.scan-composer-name strong {
  color: var(--ink);
  margin-top: 0.28rem;
  font-size: 1.08rem;
  line-height: 1.28;
}

.scan-composer-next-counter {
  margin-top: 0.9rem;
  border: 1px solid rgba(93, 255, 176, 0.18);
  border-radius: 16px;
  padding: 0.78rem 0.9rem;
  background: linear-gradient(135deg, rgba(93, 255, 176, 0.08), rgba(15, 212, 255, 0.05));
}

.scan-composer-counter-fields {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) repeat(2, minmax(220px, 1fr));
  gap: 0.86rem;
  margin-top: 0.9rem;
}

.scan-composer-counter-fields.hidden {
  display: none;
}

.scan-composer-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.scan-review-card {
  border: 1px solid rgba(77, 220, 255, 0.22);
  border-radius: 20px;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(15, 212, 255, 0.1), transparent 48%),
    rgba(3, 16, 28, 0.74);
  display: grid;
  gap: 0.58rem;
}

.scan-review-card span {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scan-review-card strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.scan-review-card small {
  color: var(--teal-dark);
  font-weight: 800;
}

.scan-review-card.muted-card {
  border-style: dashed;
  opacity: 0.86;
}

.mobile-compact-details {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.mobile-compact-details summary {
  display: none;
}

.mobile-compact-details summary::-webkit-details-marker {
  display: none;
}

.mobile-compact-details summary::after {
  content: none;
}

.mobile-compact-details[open] summary::after {
  content: none;
}

.mobile-compact-details summary span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.mobile-compact-details-content {
  display: grid;
  gap: 0.72rem;
  padding: 0;
}

.mobile-panel-details summary {
  display: none;
}

.mobile-panel-details summary::-webkit-details-marker {
  display: none;
}

.mobile-panel-details-content {
  display: grid;
  gap: 0.72rem;
}

.slot-mobile-toggle {
  display: none;
}

.slot-mobile-toggle strong {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.slot-mobile-meta {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.7rem;
}

.app-mode-hidden {
  display: none !important;
}

body:not([data-app-role="admin"]) [data-app-role="admin"],
body[data-app-role="admin"] [data-app-role="non-admin"],
body:not([data-advanced-beta="on"]) [data-app-beta="advanced"] {
  display: none !important;
}

.app-mode-disabled {
  opacity: 0.58;
}

.app-mode-disabled input,
.app-mode-disabled select,
.app-mode-disabled button {
  pointer-events: none;
}

body:not([data-app-role="admin"]) .dashboard-topbar .status-pill {
  backdrop-filter: blur(18px);
}

@media (max-width: 620px) {
  .strategic-value-row {
    align-items: flex-start;
  }

  .strategic-value-name span {
    max-width: 52vw;
  }

  .scan-composer-choice,
  .scan-slot-filled,
  .scan-slot-suggestion {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-composer-counter-fields {
    grid-template-columns: 1fr;
  }

  .scan-composer-review {
    grid-template-columns: 1fr;
  }

  .status-cluster {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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

@media (max-width: 920px) {
  .counter-db-editor {
    grid-template-columns: 1fr;
  }

  .expert-rule-grid,
  .expert-rule-grid.two,
  .expert-rule-summary,
  .expert-assisted-row,
  .expert-assisted-block[data-expert-assisted="penalties"] .expert-assisted-row {
    grid-template-columns: 1fr;
  }

  .scan-fight-preview {
    max-height: 360px;
  }
}

@media (max-width: 820px) {
  body.mobile-compact-mode .dashboard-app {
    grid-template-columns: 1fr;
    min-height: 100dvh;
  }

  body.mobile-compact-mode .dashboard-main {
    padding-bottom: calc(5.9rem + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, #04101a 0%, #071521 100%);
  }

  body.mobile-compact-mode .sentinel-hud-bg,
  body.mobile-compact-mode .orb,
  body.mobile-compact-mode .grid-noise {
    display: none;
  }

  body.mobile-compact-mode .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 360px);
    height: 100vh;
    height: 100dvh;
    z-index: 95;
    border-right: 1px solid var(--border);
    border-bottom: 0;
    transform: translateX(-108%);
    transition: transform 0.22s ease;
    padding: 1rem 0.9rem;
  }

  body.mobile-compact-mode .dashboard-sidebar::before {
    content: "NAV";
    left: 1rem;
    transform: none;
  }

  body.mobile-compact-mode .sidebar-brand {
    min-height: 78px;
    padding-top: 1.9rem;
  }

  body.mobile-compact-mode .brand-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
  }

  body.mobile-compact-mode .dashboard-menu {
    grid-template-columns: 1fr;
    gap: 0.48rem;
  }

  body.mobile-compact-mode .menu-subnav {
    grid-template-columns: 1fr;
    margin: -0.08rem 0 0.22rem 3.5rem;
    padding-left: 0.7rem;
    border-left: 1px solid rgba(77, 220, 255, 0.2);
  }

  body.mobile-compact-mode .menu-btn {
    min-height: 58px;
    border-radius: 17px;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.66rem;
  }

  body.mobile-compact-mode .menu-icon {
    width: 44px;
    height: 40px;
  }

  body.mobile-compact-mode .menu-label {
    font-size: 0.92rem;
  }

  body.mobile-compact-mode .menu-hint {
    font-size: 0.7rem;
  }

  body.mobile-compact-mode.mobile-sidebar-open .dashboard-sidebar {
    transform: translateX(0);
  }

  body.mobile-compact-mode .sidebar-toggle {
    display: none;
  }

  body.mobile-compact-mode.mobile-sidebar-open .mobile-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 6, 12, 0.72);
    backdrop-filter: blur(6px);
  }

  body.mobile-compact-mode .mobile-shell-toggle {
    display: grid;
  }

  body.mobile-compact-mode .mobile-current-view,
  body.mobile-compact-mode .mobile-bottom-nav {
    display: grid;
  }

  body.mobile-compact-mode .dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: 0.75rem;
    background: linear-gradient(180deg, rgba(2, 10, 18, 0.94), rgba(2, 10, 18, 0.7));
    backdrop-filter: blur(18px);
  }

  body.mobile-compact-mode .topbar {
    align-items: center;
    gap: 0.8rem;
  }

  body.mobile-compact-mode .brand-lockup {
    gap: 0.72rem;
  }

  body.mobile-compact-mode .brand h1 {
    margin: 0;
    font-size: clamp(1rem, 4.8vw, 1.2rem);
    letter-spacing: 0.04em;
  }

  body.mobile-compact-mode .brand p,
  body.mobile-compact-mode .topbar-version-pill,
  body.mobile-compact-mode #advancedBetaStatusPill,
  body.mobile-compact-mode .language-switcher {
    display: none;
  }

  body.mobile-compact-mode .topbar-logo {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  body.mobile-compact-mode .status-cluster {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  body.mobile-compact-mode .status-cluster::-webkit-scrollbar {
    display: none;
  }

  body.mobile-compact-mode .status-pill {
    white-space: nowrap;
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
  }

  body.mobile-compact-mode .section-panel,
  body.mobile-compact-mode .panel {
    border-radius: 18px;
  }

  body.mobile-compact-mode .section-panel {
    padding: 0.85rem;
  }

  body.mobile-compact-mode .panel-head::after,
  body.mobile-compact-mode .section-head::after {
    width: min(120px, 40%);
  }

  body.mobile-compact-mode .panel-head p,
  body.mobile-compact-mode .section-head p,
  body.mobile-compact-mode .metric-card p,
  body.mobile-compact-mode .metric-card .muted {
    font-size: 0.82rem;
    line-height: 1.34;
  }

  body.mobile-compact-mode .panel-head p,
  body.mobile-compact-mode .section-head p,
  body.mobile-compact-mode .field-hint,
  body.mobile-compact-mode .roster-help p,
  body.mobile-compact-mode .scan-history-title span {
    display: none;
  }

  body.mobile-compact-mode .dashboard-action-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    margin-top: 0.75rem;
  }

  body.mobile-compact-mode .dashboard-action-card {
    gap: 0.15rem;
    padding: 0.86rem 0.88rem;
    border-radius: 16px;
  }

  body.mobile-compact-mode .dashboard-action-card strong {
    font-size: 0.92rem;
  }

  body.mobile-compact-mode .dashboard-action-card span,
  body.mobile-compact-mode .dashboard-support-panel,
  body.mobile-compact-mode .dashboard-status-panel {
    display: none;
  }

  body.mobile-compact-mode .tool-grid,
  body.mobile-compact-mode .help-grid,
  body.mobile-compact-mode .grid-2,
  body.mobile-compact-mode .status-grid,
  body.mobile-compact-mode .scan-match-data {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  body.mobile-compact-mode .field {
    gap: 0.34rem;
  }

  body.mobile-compact-mode .field span {
    font-size: 0.74rem;
  }

  body.mobile-compact-mode .layout {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  body.mobile-compact-mode .section-head {
    margin-bottom: 0.45rem;
  }

  body.mobile-compact-mode .section-head h2,
  body.mobile-compact-mode .panel-head h2 {
    font-size: 1rem;
    line-height: 1.15;
  }

  body.mobile-compact-mode .field input[type="text"],
  body.mobile-compact-mode .field input[type="number"],
  body.mobile-compact-mode .field textarea,
  body.mobile-compact-mode .field select {
    padding: 0.64rem 0.72rem;
    font-size: 0.95rem;
  }

  body.mobile-compact-mode .sandbox-chat {
    max-height: 62vh;
  }

  body.mobile-compact-mode .sandbox-composer-form {
    margin-top: 0.62rem;
    padding: 0.64rem;
    border-radius: 16px;
  }

  body.mobile-compact-mode .sandbox-chatbar {
    bottom: 0.35rem;
    grid-template-columns: 1fr;
    gap: 0.48rem;
  }

  body.mobile-compact-mode .sandbox-message-field textarea {
    min-height: 2.75rem;
    font-size: 0.94rem;
  }

  body.mobile-compact-mode .sandbox-chatbar-actions {
    justify-content: stretch;
    padding-bottom: 0;
  }

  body.mobile-compact-mode .sandbox-chatbar-actions .btn {
    flex: 1;
    padding-inline: 0.62rem;
  }

  body.mobile-compact-mode .sandbox-chip-row {
    gap: 0.38rem;
  }

  body.mobile-compact-mode .sandbox-chip-row .chip {
    font-size: 0.72rem;
    padding: 0.34rem 0.58rem;
  }

  body.mobile-compact-mode .sandbox-context-details summary {
    flex-direction: column;
    gap: 0.22rem;
    padding: 0.66rem 0.72rem;
  }

  body.mobile-compact-mode .sandbox-context-details summary small {
    text-align: left;
    font-size: 0.72rem;
  }

  body.mobile-compact-mode .sandbox-context-grid {
    padding: 0 0.72rem 0.72rem;
  }

  body.mobile-compact-mode .sandbox-active-context summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.16rem;
    padding: 0.58rem 0.68rem;
  }

  body.mobile-compact-mode .sandbox-active-context-body {
    padding: 0 0.68rem 0.68rem;
    font-size: 0.82rem;
  }

  body.mobile-compact-mode .sandbox-message,
  body.mobile-compact-mode .sandbox-message-user {
    grid-template-columns: 1fr;
    gap: 0.34rem;
  }

  body.mobile-compact-mode .sandbox-message-user .sandbox-avatar {
    justify-self: end;
    order: -1;
  }

  body.mobile-compact-mode .sandbox-avatar {
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.66rem;
  }

  body.mobile-compact-mode .sandbox-bubble {
    padding: 0.72rem;
    border-radius: 15px;
  }

  body.mobile-compact-mode .sandbox-details-grid {
    grid-template-columns: 1fr;
    gap: 0.52rem;
  }

  body.mobile-compact-mode .mobile-compact-details {
    margin-top: 0.72rem;
  }

  body.mobile-compact-mode .mobile-compact-details summary {
    padding: 0.68rem 0.8rem;
  }

  body.mobile-compact-mode .mobile-compact-details-content {
    padding: 0 0.8rem 0.8rem;
    gap: 0.62rem;
  }

  body.mobile-compact-mode .mobile-war-counter-panel,
  body.mobile-compact-mode .mobile-panel-details {
    border: 1px solid rgba(77, 220, 255, 0.14);
    border-radius: 16px;
    background: rgba(2, 12, 22, 0.42);
    margin-top: 0.72rem;
    overflow: hidden;
  }

  body.mobile-compact-mode .mobile-panel-details summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.72rem 0.82rem;
    background: rgba(7, 23, 36, 0.88);
  }

  body.mobile-compact-mode .mobile-panel-details summary strong,
  body.mobile-compact-mode .mobile-war-counter-panel summary strong,
  body.mobile-compact-mode .result-mobile-details summary strong {
    display: block;
    font-size: 0.86rem;
    color: var(--ink);
  }

  body.mobile-compact-mode .mobile-panel-details summary span,
  body.mobile-compact-mode .mobile-war-counter-panel summary span,
  body.mobile-compact-mode .result-mobile-details summary span {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.72rem;
    color: var(--ink-soft);
    line-height: 1.3;
    font-weight: 700;
  }

  body.mobile-compact-mode .mobile-panel-details summary::after,
  body.mobile-compact-mode .mobile-war-counter-panel summary::after,
  body.mobile-compact-mode .result-mobile-details summary::after {
    content: "Apri";
    color: var(--teal-dark);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex: 0 0 auto;
  }

  body.mobile-compact-mode .mobile-panel-details[open] summary::after,
  body.mobile-compact-mode .mobile-war-counter-panel[open] summary::after,
  body.mobile-compact-mode .result-mobile-details[open] summary::after {
    content: "Chiudi";
  }

  body.mobile-compact-mode .mobile-panel-details-content {
    padding: 0.78rem 0.82rem 0.82rem;
    gap: 0.62rem;
  }

  body.mobile-compact-mode .mobile-panel-details h2,
  body.mobile-compact-mode .mobile-panel-details p.muted {
    display: none;
  }

  body.mobile-compact-mode .mobile-panel-details .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  body.mobile-compact-mode .mobile-panel-details .metric-card {
    padding: 0.72rem 0.74rem;
  }

  body.mobile-compact-mode .quick-section {
    margin-top: 0;
  }

  body.mobile-compact-mode .quick-section h3 {
    margin-bottom: 0.38rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
  }

  body.mobile-compact-mode .defense-slots {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 84vw);
    grid-template-columns: none;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
    scroll-snap-type: x proximity;
  }

  body.mobile-compact-mode .defense-slot {
    scroll-snap-align: start;
    padding: 0.74rem;
    border-radius: 16px;
  }

  body.mobile-compact-mode .defense-slot strong {
    margin-bottom: 0.45rem;
    font-size: 0.92rem;
  }

  body.mobile-compact-mode .slot-build-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  body.mobile-compact-mode .slot-mobile-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.58rem;
    border: 1px solid rgba(77, 220, 255, 0.16);
    border-radius: 12px;
    background: rgba(2, 12, 22, 0.62);
    color: var(--ink-soft);
    padding: 0.52rem 0.64rem;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
  }

  body.mobile-compact-mode .slot-mobile-toggle::after {
    content: "Apri";
    color: var(--teal-dark);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  body.mobile-compact-mode .defense-slot[data-mobile-meta-open="1"] .slot-mobile-toggle::after {
    content: "Chiudi";
  }

  body.mobile-compact-mode .defense-slot[data-mobile-meta-open="0"] .slot-mobile-meta {
    display: none;
  }

  body.mobile-compact-mode .defense-slot[data-mobile-meta-open="1"] .slot-mobile-meta {
    display: grid;
  }

  body.mobile-compact-mode .cta-row {
    gap: 0.5rem;
  }

  body.mobile-compact-mode .cta-row .btn {
    width: 100%;
  }

  body.mobile-compact-mode .result-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  body.mobile-compact-mode .result-head h2 {
    font-size: 1rem;
  }

  body.mobile-compact-mode #resultMeta {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  body.mobile-compact-mode .result-mobile-quick {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.72rem;
  }

  body.mobile-compact-mode .result-quick-hero,
  body.mobile-compact-mode .scan-mobile-focus {
    padding: 0.82rem 0.86rem;
    border-radius: 16px;
  }

  body.mobile-compact-mode .result-quick-hero strong,
  body.mobile-compact-mode .scan-mobile-focus strong {
    font-size: 0.98rem;
  }

  body.mobile-compact-mode .result-quick-alt-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-compact-mode .result-quick-alt-card {
    padding: 0.64rem 0.72rem;
    border-radius: 15px;
  }

  body.mobile-compact-mode .result-grid {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-top: 0;
  }

  body.mobile-compact-mode .result-card {
    border-radius: 16px;
    padding: 0.84rem;
  }

  body.mobile-compact-mode .result-card-head {
    gap: 0.55rem;
  }

  body.mobile-compact-mode .team-name {
    font-size: 1rem;
    margin-top: 0.42rem;
  }

  body.mobile-compact-mode .score-wrap {
    margin-top: 0.72rem;
  }

  body.mobile-compact-mode .badge-row {
    gap: 0.4rem;
  }

  body.mobile-compact-mode .soft-badge {
    font-size: 0.7rem;
  }

  body.mobile-compact-mode .mini-metrics {
    gap: 0.38rem;
  }

  body.mobile-compact-mode .mini-metrics div {
    padding: 0.54rem 0.5rem;
  }

  body.mobile-compact-mode .detail-block p {
    margin: 0.42rem 0;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  body.mobile-compact-mode .result-mobile-details {
    margin-top: 0.62rem;
    border-top: 1px solid rgba(77, 220, 255, 0.12);
    padding-top: 0.52rem;
  }

  body.mobile-compact-mode .engine-tab-nav {
    margin-top: 0.75rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  body.mobile-compact-mode .engine-tab-nav::-webkit-scrollbar {
    display: none;
  }

  body.mobile-compact-mode .engine-tab-btn {
    white-space: nowrap;
    padding: 0.54rem 0.82rem;
  }

  body.mobile-compact-mode .scanroom-head p {
    display: none;
  }

  body.mobile-compact-mode .scanroom-meta,
  body.mobile-compact-mode .scanroom-nav {
    gap: 0.5rem;
  }

  body.mobile-compact-mode .scan-mobile-quick {
    display: grid;
    gap: 0.62rem;
    margin-top: 0.72rem;
  }

  body.mobile-compact-mode .scan-current {
    padding: 0.82rem;
    border-radius: 16px;
  }

  body.mobile-compact-mode .scan-current-head h3 {
    font-size: 1rem;
  }

  body.mobile-compact-mode .scan-current .scan-info {
    font-size: 0.8rem;
    line-height: 1.38;
    margin-top: 0.42rem;
  }

  body.mobile-compact-mode .scan-room-reasoning {
    display: none;
  }

  body.mobile-compact-mode .scan-topline {
    margin-top: 0.58rem;
    padding-top: 0.45rem;
    font-size: 0.76rem;
  }

  body.mobile-compact-mode .scan-mobile-counter-list {
    grid-template-columns: 1fr;
  }

  body.mobile-compact-mode .scan-mobile-counter-card {
    border-radius: 15px;
    padding: 0.66rem 0.72rem;
  }

  body.mobile-compact-mode .scan-team.panel > p {
    display: none;
  }

  body.mobile-compact-mode .scan-team.panel > h3,
  body.mobile-compact-mode .scan-active.panel > h3,
  body.mobile-compact-mode .scan-unresolved.panel > h3 {
    font-size: 0.94rem;
  }

  body.mobile-compact-mode .scan-team-buttons {
    grid-template-columns: 1fr;
    gap: 0.54rem;
  }

  body.mobile-compact-mode .scan-team-btn {
    padding: 0.62rem 0.66rem;
    border-radius: 14px;
    gap: 0.32rem;
  }

  body.mobile-compact-mode .scan-active-list {
    gap: 0.62rem;
  }

  body.mobile-compact-mode .scan-room-block {
    padding: 0.58rem 0.62rem;
  }

  body.mobile-compact-mode .scan-defense-card-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-compact-mode .scan-defense-card {
    min-height: 0;
    padding: 0.7rem;
    border-radius: 15px;
  }

  body.mobile-compact-mode .scan-composer {
    inset: max(0.35rem, env(safe-area-inset-top)) 0 calc(5.8rem + env(safe-area-inset-bottom)) 0;
    border-radius: 26px 26px 0 0;
    padding: 0.85rem;
    overflow: auto;
    box-shadow: 0 18px 52px rgba(0, 7, 16, 0.78), 0 0 0 9999px rgba(0, 4, 10, 0.88);
  }

  body.mobile-compact-mode .scan-composer h3 {
    margin-right: 2.4rem;
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
  }

  body.mobile-compact-mode #scanComposerHelp {
    display: none;
  }

  body.mobile-compact-mode .scan-composer .field span {
    font-size: 0.72rem;
  }

  body.mobile-compact-mode .scan-composer .field input,
  body.mobile-compact-mode .scan-composer .field select,
  body.mobile-compact-mode .scan-composer .field textarea {
    font-size: 0.92rem;
  }

  body.mobile-compact-mode .scan-composer-suggestions,
  body.mobile-compact-mode .scan-composer-members {
    gap: 0.45rem;
    margin: 0.45rem 0;
  }

  body.mobile-compact-mode .scan-wizard-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0.55rem 0 0.75rem;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  body.mobile-compact-mode .scan-wizard-steps::-webkit-scrollbar {
    display: none;
  }

  body.mobile-compact-mode .scan-wizard-steps span {
    white-space: nowrap;
    padding: 0.3rem 0.62rem;
    font-size: 0.72rem;
  }

  body.mobile-compact-mode .scan-composer-choice,
  body.mobile-compact-mode .scan-slot-filled,
  body.mobile-compact-mode .scan-slot-suggestion {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 14px;
    padding: 0.5rem 0.56rem;
  }

  body.mobile-compact-mode .scan-composer-member-grid,
  body.mobile-compact-mode .scan-composer-slots {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(205px, 78vw);
    grid-template-columns: none;
    gap: 0.6rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.15rem;
    scroll-snap-type: x proximity;
  }

  body.mobile-compact-mode .scan-composer-member-grid::-webkit-scrollbar,
  body.mobile-compact-mode .scan-composer-slots::-webkit-scrollbar {
    height: 6px;
  }

  body.mobile-compact-mode .scan-composer-slot,
  body.mobile-compact-mode .scan-composer-member {
    scroll-snap-align: start;
  }

  body.mobile-compact-mode .scan-composer-slot {
    min-height: 0;
    padding: 0.62rem;
    border-radius: 16px;
  }

  body.mobile-compact-mode .scan-slot-input {
    padding: 0.58rem 0.66rem;
  }

  body.mobile-compact-mode .scan-slot-suggestions {
    max-height: 145px;
  }

  body.mobile-compact-mode .scan-composer-name {
    margin-top: 0.5rem;
    padding: 0.62rem 0.72rem;
    border-radius: 14px;
  }

  body.mobile-compact-mode .scan-composer-name strong {
    font-size: 0.96rem;
  }

  body.mobile-compact-mode .scan-composer-name span {
    font-size: 0.68rem;
  }

  body.mobile-compact-mode .scan-composer-next-counter {
    margin-top: 0.48rem;
    padding: 0.58rem 0.66rem;
    border-radius: 14px;
  }

  body.mobile-compact-mode .scan-composer-next-counter span {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  body.mobile-compact-mode .scan-composer-counter-fields,
  body.mobile-compact-mode .scan-composer-review {
    grid-template-columns: 1fr;
    gap: 0.62rem;
    margin-top: 0.72rem;
  }

  body.mobile-compact-mode .scan-composer-actions {
    position: sticky;
    bottom: calc(-0.85rem + env(safe-area-inset-bottom));
    margin-top: 0.8rem;
    padding-top: 0.72rem;
    background: linear-gradient(180deg, rgba(2, 10, 18, 0), rgba(2, 10, 18, 0.94) 32%);
  }

  body.mobile-compact-mode .scan-composer-actions .btn {
    min-height: 46px;
    border-radius: 14px;
  }

  body.mobile-compact-mode .scan-composer .inline-character-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.12rem;
    scrollbar-width: none;
  }

  body.mobile-compact-mode .scan-composer .inline-character-row::-webkit-scrollbar {
    display: none;
  }
}
