:root {
  --bg: #04070f;
  --bg-deep: #02050a;
  --panel: rgba(6, 14, 25, 0.78);
  --panel-strong: rgba(5, 11, 21, 0.94);
  --line: rgba(111, 222, 255, 0.18);
  --line-bright: rgba(111, 222, 255, 0.42);
  --line-soft: rgba(111, 222, 255, 0.09);
  --text: #e8faff;
  --muted: #7e9caf;
  --dim: #526a78;
  --cyan: #5ff7ff;
  --cyan-strong: #22d3ee;
  --amber: #ffd166;
  --red: #ff5c7a;
  --green: #7dffb0;
  --font-display: 'Bahnschrift', 'DIN Alternate', 'Segoe UI Variable Display', 'Microsoft YaHei', sans-serif;
  --font-cn: 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', 'Segoe UI', sans-serif;
  --font-mono: 'Cascadia Mono', 'JetBrains Mono', 'Consolas', 'Microsoft YaHei', monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-cn);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button {
  padding: 0;
  color: inherit;
  font: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 60% 20%, rgba(20, 46, 74, 0.35), transparent 55%),
    var(--bg);
}

#battlefield {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
}

.fx-vignette,
.fx-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.fx-vignette {
  z-index: 4;
  background:
    radial-gradient(ellipse at center, transparent 42%, rgba(1, 4, 9, 0.5) 100%),
    linear-gradient(180deg, rgba(1, 4, 9, 0.25), transparent 18%, transparent 82%, rgba(1, 4, 9, 0.4));
}

.fx-scan {
  z-index: 3;
  opacity: 0.3;
  background: repeating-linear-gradient(
    to bottom,
    rgba(186, 245, 255, 0.035) 0,
    rgba(186, 245, 255, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: soft-light;
}

.hud {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  animation: hudIn 0.45s ease both;
}

.panel-edge {
  position: relative;
  background:
    linear-gradient(165deg, rgba(8, 19, 33, 0.84), rgba(4, 10, 19, 0.72));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  backdrop-filter: blur(9px);
}

.panel-edge::before {
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  content: '';
  background: linear-gradient(90deg, transparent, rgba(95, 247, 255, 0.55), transparent);
  opacity: 0.55;
}

.hud-top {
  position: absolute;
  top: calc(16px + var(--safe-top));
  right: 24px;
  left: 24px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(300px, 1.28fr) auto;
  gap: 14px;
  align-items: stretch;
}

.hud-sector {
  padding: 12px 16px 11px;
  overflow: hidden;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--muted);
  font: 500 9px/1.3 var(--font-mono);
  letter-spacing: 0.2em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.eyebrow b {
  color: var(--cyan);
  font-weight: 600;
}

.eyebrow-code {
  color: var(--dim);
  letter-spacing: 0.08em;
}

.sector-row {
  display: flex;
  gap: 9px;
  align-items: baseline;
  margin-top: 4px;
}

.sector-row h1 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font: 600 21px/1.25 var(--font-cn);
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-tag {
  flex: 0 0 auto;
  padding: 1px 5px;
  color: var(--dim);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.12em;
  border: 1px solid rgba(111, 222, 255, 0.14);
}

.hud-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  color: var(--muted);
  font: 500 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
}

#hud-timer {
  color: var(--text);
  letter-spacing: 0.12em;
}

#hud-threat {
  color: var(--amber);
}

.meta-divider {
  width: 1px;
  height: 8px;
  background: var(--line);
}

.hud-live {
  display: flex;
  gap: 5px;
  align-items: center;
  color: rgba(125, 255, 176, 0.75);
}

.hud-live i {
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 7px var(--green);
  animation: blink 2s ease-in-out infinite;
}

.hud-objective {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 18px 10px;
}

.objective-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--muted);
  font: 500 9px var(--font-mono);
  letter-spacing: 0.16em;
}

.objective-head b {
  color: var(--text);
  font: 600 15px var(--font-mono);
  letter-spacing: 0.06em;
}

.objective-bar {
  position: relative;
  height: 3px;
  margin: 7px 0 6px;
  overflow: hidden;
  background: rgba(95, 247, 255, 0.08);
}

.objective-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan-strong), var(--cyan));
  box-shadow: 0 0 12px rgba(95, 247, 255, 0.55);
  transition: width 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.objective-sub {
  color: var(--dim);
  font: 400 9px var(--font-cn);
  letter-spacing: 0.08em;
}

.hud-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: rgba(6, 14, 26, 0.82);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.icon-btn:hover {
  color: var(--cyan);
  background: rgba(9, 22, 38, 0.95);
  border-color: var(--line-bright);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn .sound-on,
.icon-btn .sound-off {
  grid-area: 1 / 1;
}

.icon-btn .sound-off,
.icon-btn.is-muted .sound-on {
  display: none;
}

.icon-btn.is-muted .sound-off {
  display: block;
}

.help-glyph {
  color: inherit;
  font: 500 15px var(--font-mono);
}

.speed-group {
  display: flex;
  align-items: stretch;
  height: 36px;
  border: 1px solid var(--line);
  background: rgba(6, 14, 26, 0.82);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
}

.speed-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 100%;
  padding: 0 9px;
  color: var(--muted);
  font: 600 10px var(--font-mono);
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(111, 222, 255, 0.1);
  transition: color 0.15s, background 0.15s;
}

.speed-btn:last-child {
  border-right: 0;
}

.speed-btn:hover {
  color: var(--text);
}

.speed-btn.active {
  color: #031014;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(95, 247, 255, 0.35);
}

.pause-btn {
  color: var(--text);
}

.faction-strip {
  position: absolute;
  top: calc(105px + var(--safe-top));
  right: 24px;
  left: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  pointer-events: none;
}

.faction-chip {
  --faction-color: var(--cyan);
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 5px 10px 5px 8px;
  background: rgba(5, 12, 22, 0.72);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--faction-color);
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  backdrop-filter: blur(6px);
}

.faction-chip.player {
  background: rgba(7, 21, 34, 0.82);
  border-color: rgba(95, 247, 255, 0.2);
  border-left-color: var(--cyan);
  box-shadow: 0 0 18px rgba(95, 247, 255, 0.07);
}

.faction-chip.eliminated {
  opacity: 0.36;
  filter: grayscale(1);
}

.faction-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--faction-color);
  border-radius: 50%;
  box-shadow: 0 0 7px var(--faction-color);
}

.faction-name {
  color: var(--text);
  font: 500 10px var(--font-cn);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.faction-role {
  padding: 1px 3px;
  color: var(--faction-color);
  font: 600 7px var(--font-mono);
  letter-spacing: 0.08em;
  border: 1px solid color-mix(in srgb, var(--faction-color) 28%, transparent);
}

.faction-data {
  display: flex;
  gap: 4px;
  align-items: baseline;
  padding-left: 3px;
  margin-left: auto;
  color: var(--dim);
  font: 500 8px var(--font-mono);
  white-space: nowrap;
}

.faction-data b {
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}

.faction-data em {
  color: var(--dim);
  font-style: normal;
  font-size: 8px;
}

.faction-data i {
  color: rgba(111, 222, 255, 0.25);
  font-style: normal;
}

.hint-panel {
  position: absolute;
  bottom: calc(20px + var(--safe-bottom));
  left: 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  color: var(--muted);
  font: 400 10px var(--font-cn);
  letter-spacing: 0.06em;
  background: rgba(5, 12, 22, 0.6);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
}

.pulse-dot {
  width: 4px;
  height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cyan);
  animation: pulseDot 2s ease-in-out infinite;
}

.selection-panel {
  position: absolute;
  bottom: calc(20px + var(--safe-bottom));
  left: 50%;
  display: flex;
  gap: 18px;
  align-items: center;
  width: max-content;
  max-width: min(660px, calc(100vw - 48px));
  min-width: 430px;
  padding: 9px 42px 9px 16px;
  transform: translateX(-50%);
  pointer-events: auto;
  animation: selectionIn 0.2s ease both;
}

.selection-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(95, 247, 255, 0.65);
}

.selection-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  min-width: 124px;
}

.selection-tag {
  color: var(--dim);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.12em;
}

.selection-head strong {
  color: var(--text);
  font: 600 15px var(--font-cn);
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.selection-owner {
  color: var(--cyan);
  font: 400 8px var(--font-cn);
  white-space: nowrap;
}

.selection-stats {
  display: flex;
  gap: 17px;
}

.selection-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.selection-stats span {
  color: var(--dim);
  font: 400 8px var(--font-cn);
  letter-spacing: 0.1em;
}

.selection-stats b {
  color: var(--text);
  font: 600 14px var(--font-mono);
  letter-spacing: 0.02em;
}

.selection-preview {
  max-width: 195px;
  margin-left: auto;
  color: var(--muted);
  font: 400 10px/1.45 var(--font-cn);
  text-align: right;
}

.selection-preview.attack {
  color: #ffb1bf;
}

.selection-preview.reinforce {
  color: var(--cyan);
}

.selection-preview.warn {
  color: var(--red);
}

.selection-close {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--dim);
  font: 300 16px var(--font-mono);
  border: 1px solid transparent;
  transform: translateY(-50%);
  transition: color 0.15s, border-color 0.15s;
}

.selection-close:hover {
  color: var(--text);
  border-color: var(--line);
}

.toast-area {
  position: absolute;
  top: calc(148px + var(--safe-top));
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  padding: 6px 13px;
  color: var(--text);
  font: 400 10px var(--font-cn);
  letter-spacing: 0.06em;
  background: rgba(4, 10, 19, 0.9);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--cyan);
  backdrop-filter: blur(8px);
  animation: toastIn 0.25s ease both;
}

.toast.danger {
  color: #ffd4dd;
  border-left-color: var(--red);
}

.toast.gold {
  color: #ffeaad;
  border-left-color: var(--amber);
}

.toast.fade {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s, transform 0.3s;
}

.tooltip {
  position: fixed;
  z-index: 22;
  width: max-content;
  min-width: 190px;
  max-width: 265px;
  padding: 9px 11px;
  pointer-events: none;
  background: rgba(4, 10, 19, 0.94);
  border: 1px solid rgba(111, 222, 255, 0.25);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
}

.tooltip-head {
  display: flex;
  gap: 6px;
  align-items: center;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}

.tooltip-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.tooltip-head b {
  color: var(--text);
  font: 600 12px var(--font-cn);
  letter-spacing: 0.08em;
}

.tooltip-tag {
  margin-left: auto;
  color: var(--dim);
  font: 400 8px var(--font-mono);
  letter-spacing: 0.08em;
}

.tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font: 400 9px/1.5 var(--font-cn);
}

.tooltip-body b {
  color: var(--text);
  font: 500 10px var(--font-mono);
}

.tooltip-body .incoming-hostile {
  color: #ff9fb0;
}

.tooltip-body .incoming-friendly {
  color: var(--cyan);
}

.tooltip-preview {
  padding-top: 6px;
  margin-top: 6px;
  color: var(--muted);
  font: 400 9px/1.5 var(--font-cn);
  border-top: 1px solid var(--line-soft);
}

.tooltip-preview:empty {
  display: none;
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  padding: 30px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 38%, rgba(15, 49, 68, 0.35), transparent 58%),
    rgba(2, 5, 10, 0.79);
  backdrop-filter: blur(13px);
}

.screen::-webkit-scrollbar {
  width: 5px;
}

.screen::-webkit-scrollbar-thumb {
  background: rgba(95, 247, 255, 0.18);
}

.modal-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.modal-panel {
  position: relative;
  width: min(780px, 100%);
  padding: 24px 30px 20px;
  overflow: hidden;
  background:
    linear-gradient(150deg, rgba(8, 18, 31, 0.97), rgba(3, 8, 16, 0.97));
  border: 1px solid rgba(111, 222, 255, 0.22);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  animation: panelIn 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-panel::before {
  position: absolute;
  top: 0;
  right: 10%;
  left: 10%;
  height: 1px;
  content: '';
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.6;
}

.modal-panel::after {
  position: absolute;
  inset: 8px;
  content: '';
  pointer-events: none;
  border: 1px solid rgba(111, 222, 255, 0.045);
}

.modal-panel > * {
  position: relative;
  z-index: 1;
}

.modal-topline {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 17px;
  color: var(--dim);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.23em;
  border-bottom: 1px solid var(--line-soft);
}

.modal-topline span:last-child {
  color: rgba(95, 247, 255, 0.45);
}

.modal-panel h2 {
  margin: 0;
  color: var(--text);
  font: 600 38px/1.15 var(--font-cn);
  letter-spacing: 0.1em;
  text-shadow: 0 0 34px rgba(95, 247, 255, 0.14);
}

.modal-lead,
.briefing-lead {
  color: var(--muted);
  font: 400 11px/1.8 var(--font-cn);
  letter-spacing: 0.04em;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 22px;
}

.modal-actions.column {
  flex-direction: column;
  align-items: stretch;
}

.modal-actions.column .btn {
  width: 100%;
}

.modal-foot {
  margin-top: 14px;
  color: var(--dim);
  font: 400 8px var(--font-mono);
  letter-spacing: 0.1em;
  text-align: right;
}

.btn {
  position: relative;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 22px;
  overflow: hidden;
  color: var(--text);
  font: 600 12px var(--font-cn);
  letter-spacing: 0.14em;
  border: 1px solid transparent;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.primary {
  color: #031014;
  background: linear-gradient(110deg, #a2fcff, #47e1ee 58%, #8ffbff);
  box-shadow: 0 0 30px rgba(95, 247, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn.primary:hover {
  background: linear-gradient(110deg, #d0feff, #6ef9ff 60%, #c5ffff);
  box-shadow: 0 0 42px rgba(95, 247, 255, 0.34);
}

.btn.ghost {
  color: var(--text);
  background: rgba(8, 18, 30, 0.55);
  border-color: rgba(111, 222, 255, 0.22);
}

.btn.ghost:hover {
  background: rgba(12, 28, 45, 0.8);
  border-color: var(--line-bright);
}

.btn.text {
  min-height: 34px;
  color: var(--dim);
  font-size: 10px;
  font-weight: 400;
}

.btn.text:hover {
  color: var(--muted);
}

.btn.wide {
  min-width: 214px;
}

.btn-arrow {
  font: 400 16px var(--font-mono);
  letter-spacing: 0;
  transition: transform 0.18s;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.title-screen {
  z-index: 28;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 72% 48%, rgba(5, 20, 35, 0.05) 0%, rgba(3, 8, 15, 0.35) 48%, rgba(3, 6, 13, 0.9) 100%),
    linear-gradient(90deg, rgba(3, 6, 13, 0.96) 0%, rgba(3, 6, 13, 0.78) 38%, rgba(3, 6, 13, 0.08) 70%, rgba(3, 6, 13, 0.38) 100%);
  backdrop-filter: none;
}

.title-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(95, 247, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 247, 255, 0.04) 1px, transparent 1px);
  background-size: 92px 92px;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse at 26% 54%, black 0%, transparent 68%);
  -webkit-mask-image: radial-gradient(ellipse at 26% 54%, black 0%, transparent 68%);
}

.title-content {
  position: relative;
  z-index: 2;
  width: min(760px, 62vw);
  margin-left: clamp(26px, 8vw, 142px);
  padding: 44px 0;
  animation: titleIn 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.title-eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(143, 246, 255, 0.55);
  font: 500 9px var(--font-mono);
  letter-spacing: 0.24em;
}

.eyebrow-line {
  display: inline-block;
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.eyebrow-slash {
  color: rgba(95, 247, 255, 0.24);
}

.title-main {
  display: flex;
  gap: 0.06em;
  margin: 20px 0 0;
  color: var(--text);
  font: 700 clamp(58px, 8.4vw, 106px)/0.98 var(--font-cn);
  letter-spacing: 0.12em;
  text-shadow: 0 0 60px rgba(80, 225, 255, 0.16);
}

.title-main .accent {
  color: var(--cyan);
  text-shadow: 0 0 28px rgba(95, 247, 255, 0.35), 0 0 80px rgba(56, 182, 255, 0.25);
}

.title-en {
  margin-top: 15px;
  color: rgba(232, 250, 255, 0.42);
  font: 400 clamp(13px, 1.55vw, 20px) var(--font-display);
  letter-spacing: 0.5em;
}

.title-en span {
  color: rgba(95, 247, 255, 0.58);
}

.title-sub {
  margin: 24px 0 0;
  color: rgba(158, 192, 207, 0.86);
  font: 300 clamp(13px, 1.15vw, 15px)/1.85 var(--font-cn);
  letter-spacing: 0.15em;
}

.title-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 30px;
}

.title-actions .btn.primary {
  min-width: 202px;
}

.link-btn {
  display: block;
  margin-top: 15px;
  color: var(--dim);
  font: 400 9px var(--font-cn);
  letter-spacing: 0.08em;
  text-decoration: none;
  border-bottom: 1px solid rgba(111, 222, 255, 0.14);
  transition: color 0.15s, border-color 0.15s;
}

.link-btn:hover {
  color: var(--muted);
  border-color: rgba(111, 222, 255, 0.32);
}

.title-record {
  display: flex;
  gap: 20px;
  align-items: center;
  max-width: 610px;
  padding: 14px 16px;
  margin-top: 42px;
  background: linear-gradient(90deg, rgba(7, 18, 30, 0.55), rgba(7, 18, 30, 0));
  border-top: 1px solid rgba(111, 222, 255, 0.16);
  border-bottom: 1px solid rgba(111, 222, 255, 0.06);
}

.record-item {
  min-width: 0;
}

.record-item span {
  display: block;
  margin-bottom: 4px;
  color: var(--dim);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.record-item b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font: 400 11px var(--font-cn);
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-ok {
  display: flex !important;
  gap: 6px;
  align-items: center;
  color: var(--green) !important;
}

.status-ok i {
  width: 4px;
  height: 4px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
}

.record-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 24px;
  background: rgba(111, 222, 255, 0.12);
}

.title-side {
  position: absolute;
  top: 50%;
  right: 30px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  transform: translateY(-50%);
}

.side-line {
  width: 1px;
  height: 62px;
  background: linear-gradient(transparent, rgba(111, 222, 255, 0.35), transparent);
}

.side-copy {
  color: rgba(135, 230, 255, 0.32);
  font: 400 8px var(--font-mono);
  line-height: 1.9;
  letter-spacing: 0.22em;
  text-align: center;
  writing-mode: vertical-rl;
}

.title-foot {
  position: absolute;
  bottom: calc(22px + var(--safe-bottom));
  left: clamp(26px, 8vw, 142px);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font: 400 8px var(--font-mono);
  letter-spacing: 0.12em;
}

.briefing-panel {
  width: min(1000px, 100%);
}

.briefing-head {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.briefing-head .eyebrow {
  color: var(--muted);
  font-size: 9px;
}

.briefing-head .eyebrow b {
  font-size: 11px;
}

.briefing-head h2 {
  margin-top: 7px;
  font-size: clamp(30px, 3.6vw, 46px);
}

.threat-block {
  flex: 0 0 auto;
  padding-left: 18px;
  text-align: right;
  border-left: 1px solid var(--line-soft);
}

.threat-block > span {
  display: block;
  color: var(--dim);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.18em;
}

.threat-block > b {
  display: block;
  margin: 4px 0 6px;
  color: var(--amber);
  font: 600 25px/1 var(--font-display);
  letter-spacing: 0.08em;
}

.threat-bars {
  display: flex;
  gap: 3px;
  justify-content: flex-end;
}

.threat-bars i {
  display: block;
  width: 17px;
  height: 3px;
  background: rgba(255, 209, 102, 0.13);
}

.threat-bars i.active {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.4);
}

.briefing-lead {
  max-width: 780px;
  margin: 15px 0 20px;
}

.briefing-columns {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.briefing-section h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  color: var(--muted);
  font: 500 10px var(--font-cn);
  letter-spacing: 0.12em;
}

.briefing-section h3 span {
  color: rgba(95, 247, 255, 0.55);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.08em;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(111, 222, 255, 0.07);
  border: 1px solid rgba(111, 222, 255, 0.07);
}

.param {
  min-width: 0;
  padding: 9px 11px;
  background: rgba(4, 10, 19, 0.7);
}

.param span {
  display: block;
  margin-bottom: 3px;
  color: var(--dim);
  font: 400 8px var(--font-cn);
  letter-spacing: 0.08em;
}

.param b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font: 500 11px var(--font-mono);
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 196px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(95, 247, 255, 0.18) transparent;
}

.roster-row {
  --faction-color: var(--cyan);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 9px;
  background: rgba(4, 10, 19, 0.54);
  border: 1px solid transparent;
  border-left: 2px solid var(--faction-color);
}

.roster-row:first-child {
  background: rgba(7, 22, 34, 0.64);
  border-color: rgba(95, 247, 255, 0.1);
  border-left-color: var(--faction-color);
}

.roster-name {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
  color: var(--text);
  font: 500 10px var(--font-cn);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.roster-name em {
  padding: 1px 4px;
  color: var(--cyan);
  font: 600 7px var(--font-mono);
  font-style: normal;
  letter-spacing: 0.08em;
  border: 1px solid rgba(95, 247, 255, 0.24);
}

.roster-meta {
  margin-left: auto;
  color: var(--dim);
  font: 400 8px var(--font-mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.rule-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 20px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.rule-strip > div {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 11px;
  background: rgba(5, 12, 22, 0.75);
}

.rule-strip b {
  color: rgba(95, 247, 255, 0.5);
  font: 500 8px var(--font-mono);
}

.rule-strip span {
  color: var(--muted);
  font: 400 9px var(--font-cn);
  letter-spacing: 0.04em;
}

.pause-panel,
.result-panel {
  width: min(520px, 100%);
}

.pause-panel h2 {
  margin-top: 6px;
  font-size: 32px;
}

.pause-panel .modal-lead {
  margin: 9px 0 17px;
}

.pause-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 18px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.pause-summary > div {
  padding: 10px 13px;
  background: rgba(4, 10, 19, 0.7);
}

.pause-summary span {
  display: block;
  margin-bottom: 3px;
  color: var(--dim);
  font: 400 8px var(--font-cn);
  letter-spacing: 0.1em;
}

.pause-summary b {
  color: var(--text);
  font: 600 15px var(--font-mono);
}

.result-panel {
  width: min(640px, 100%);
  padding-top: 30px;
  text-align: center;
}

.result-panel::before {
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

.result-panel.is-loss::before {
  background: linear-gradient(90deg, transparent, var(--red), transparent);
}

.result-kicker {
  color: var(--cyan);
  font: 500 9px var(--font-mono);
  letter-spacing: 0.34em;
}

.result-panel.is-loss .result-kicker {
  color: var(--red);
}

.result-panel h2 {
  margin-top: 9px;
  font-size: clamp(32px, 4.4vw, 48px);
}

.result-sub {
  margin: 10px 0 22px;
  color: var(--muted);
  font: 300 11px/1.7 var(--font-cn);
  letter-spacing: 0.08em;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  text-align: left;
}

.result-stat {
  padding: 11px 13px;
  background: rgba(4, 10, 19, 0.72);
}

.result-stat span {
  display: block;
  margin-bottom: 4px;
  color: var(--dim);
  font: 400 8px var(--font-cn);
  letter-spacing: 0.1em;
}

.result-stat b {
  display: block;
  color: var(--text);
  font: 600 16px var(--font-mono);
  letter-spacing: 0.02em;
}

.result-next {
  padding: 12px 4px 0;
  margin-top: 17px;
  color: var(--dim);
  font: 400 9px/1.6 var(--font-cn);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--line-soft);
}

.result-next b {
  color: var(--amber);
  font-weight: 500;
}

.result-panel .modal-actions {
  justify-content: center;
  margin-top: 20px;
}

.help-screen {
  z-index: 42;
  background: rgba(2, 5, 10, 0.84);
}

.help-panel {
  width: min(900px, 100%);
}

.help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.help-head h2 {
  font-size: 30px;
}

.close-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  font: 300 22px var(--font-mono);
  border: 1px solid var(--line-soft);
  transition: color 0.15s, border-color 0.15s;
}

.close-btn:hover {
  color: var(--text);
  border-color: var(--line-bright);
}

.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 17px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.help-grid article {
  position: relative;
  padding: 15px 17px 15px;
  background: rgba(4, 10, 19, 0.66);
}

.help-num {
  color: rgba(95, 247, 255, 0.36);
  font: 500 8px var(--font-mono);
  letter-spacing: 0.1em;
}

.help-grid h3 {
  margin: 5px 0 6px;
  color: var(--text);
  font: 600 12px var(--font-cn);
  letter-spacing: 0.08em;
}

.help-grid p {
  margin: 0;
  color: var(--muted);
  font: 300 10px/1.75 var(--font-cn);
  letter-spacing: 0.03em;
}

.help-note {
  padding: 13px 16px;
  margin-top: 14px;
  color: var(--muted);
  font: 300 10px/1.8 var(--font-cn);
  letter-spacing: 0.03em;
  background: rgba(8, 22, 35, 0.6);
  border-left: 2px solid rgba(95, 247, 255, 0.4);
}

.help-note b {
  color: var(--cyan);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.help-panel .modal-actions {
  margin-top: 16px;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--text);
  background: var(--bg-deep);
  font: 400 14px var(--font-cn);
}

@keyframes hudIn {
  from {
    opacity: 0;
    transform: translateY(-7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes selectionIn {
  from {
    opacity: 0;
    transform: translate(-50%, 7px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(13px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .hint-panel {
    display: none;
  }

  .hud-top {
    grid-template-columns: minmax(210px, 0.9fr) minmax(280px, 1.2fr) auto;
  }
}

@media (max-width: 900px) {
  .hud-top {
    top: calc(8px + var(--safe-top));
    right: 10px;
    left: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    align-items: start;
  }

  .hud-sector {
    grid-row: 1;
    grid-column: 1;
    padding: 8px 12px;
  }

  .hud-controls {
    grid-row: 1;
    grid-column: 2;
    gap: 5px;
    align-self: center;
  }

  .hud-objective {
    grid-row: 2;
    grid-column: 1 / -1;
    padding: 7px 12px 8px;
  }

  .hud-objective .objective-sub {
    display: none;
  }

  .objective-bar {
    margin: 5px 0 0;
  }

  .sector-row h1 {
    font-size: 16px;
    letter-spacing: 0.06em;
  }

  .sector-row {
    margin-top: 2px;
  }

  .hud-meta {
    gap: 6px;
    margin-top: 4px;
    font-size: 9px;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .eyebrow-code,
  .sector-tag,
  .hud-live {
    display: none;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .speed-group {
    height: 32px;
  }

  .speed-btn {
    min-width: 28px;
    padding: 0 6px;
    font-size: 9px;
  }

  .faction-strip {
    top: calc(121px + var(--safe-top));
    right: 10px;
    left: 10px;
    flex-wrap: nowrap;
    gap: 5px;
    padding-bottom: 2px;
    overflow-x: auto;
    pointer-events: auto;
    scrollbar-width: none;
  }

  .faction-strip::-webkit-scrollbar {
    display: none;
  }

  .faction-chip {
    flex: 0 0 auto;
    padding: 4px 8px;
  }

  .faction-data {
    display: none;
  }

  .faction-role {
    display: inline;
  }

  .hint-panel {
    display: none;
  }

  .selection-panel {
    bottom: calc(12px + var(--safe-bottom));
    flex-wrap: wrap;
    gap: 8px 13px;
    width: calc(100vw - 20px);
    min-width: 0;
    max-width: none;
    padding: 8px 34px 8px 12px;
  }

  .selection-head {
    min-width: 0;
  }

  .selection-stats {
    gap: 13px;
    margin-left: auto;
  }

  .selection-preview {
    width: 100%;
    max-width: none;
    margin-left: 0;
    font-size: 9px;
    text-align: left;
  }

  .toast-area {
    top: calc(151px + var(--safe-top));
  }

  .title-screen {
    align-items: flex-start;
    background:
      linear-gradient(180deg, rgba(3, 6, 13, 0.5) 0%, rgba(3, 6, 13, 0.78) 36%, rgba(3, 6, 13, 0.97) 64%, rgba(3, 6, 13, 0.99) 100%);
  }

  .title-grid {
    opacity: 0.35;
    mask-image: radial-gradient(ellipse at 50% 34%, black, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 34%, black, transparent 70%);
  }

  .title-content {
    width: auto;
    max-width: 560px;
    margin: 0 22px;
    padding: calc(38vh + var(--safe-top)) 0 78px;
  }

  .title-main {
    margin-top: 14px;
    font-size: clamp(52px, 15vw, 78px);
    letter-spacing: 0.09em;
  }

  .title-en {
    margin-top: 11px;
    letter-spacing: 0.38em;
  }

  .title-sub {
    margin-top: 19px;
    font-size: 12px;
  }

  .title-actions {
    margin-top: 24px;
  }

  .title-actions .btn {
    flex: 1;
    min-width: 130px;
  }

  .title-actions .btn.primary {
    min-width: 160px;
  }

  .title-record {
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 28px;
    padding: 12px 12px;
  }

  .record-sep {
    display: none;
  }

  .record-item {
    flex: 1 1 40%;
  }

  .title-foot {
    right: 22px;
    bottom: calc(18px + var(--safe-bottom));
    left: 22px;
    gap: 6px;
    font-size: 7px;
  }

  .title-side {
    display: none;
  }

  .screen {
    padding: 12px;
  }

  .modal-shell {
    align-items: flex-start;
    min-height: 100%;
    padding: 8px 0;
  }

  #pause-screen .modal-shell,
  #result-screen .modal-shell {
    align-items: center;
  }

  .modal-panel {
    padding: 18px 16px 16px;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  }

  .modal-panel::after {
    inset: 5px;
  }

  .modal-panel h2 {
    font-size: 30px;
  }

  .briefing-head {
    align-items: flex-start;
  }

  .briefing-head h2 {
    font-size: 27px;
  }

  .threat-block {
    padding-left: 12px;
  }

  .threat-block > b {
    font-size: 21px;
  }

  .threat-bars i {
    width: 10px;
  }

  .briefing-lead {
    margin: 12px 0 16px;
    font-size: 10px;
  }

  .briefing-columns {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 14px;
  }

  .roster {
    max-height: 170px;
  }

  .rule-strip {
    grid-template-columns: 1fr;
    margin-top: 14px;
  }

  .rule-strip > div {
    padding: 7px 10px;
  }

  .modal-actions {
    gap: 8px;
    margin-top: 16px;
  }

  .modal-actions .btn.primary.wide {
    flex: 1;
    min-width: 150px;
  }

  .modal-foot {
    text-align: left;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .help-grid article {
    padding: 12px 14px;
  }

  .result-stats {
    grid-template-columns: 1fr 1fr;
  }

  .result-panel {
    margin: auto;
  }
}

@media (max-width: 560px) {
  .hud-sector .eyebrow-code {
    display: none;
  }

  .sector-row h1 {
    font-size: 15px;
  }

  .hud-controls {
    gap: 4px;
  }

  .hud-controls .icon-btn {
    width: 30px;
    height: 30px;
  }

  .speed-btn {
    min-width: 26px;
    padding: 0 5px;
  }

  .faction-strip {
    top: calc(117px + var(--safe-top));
  }

  .toast-area {
    top: calc(146px + var(--safe-top));
  }

  .selection-head strong {
    font-size: 13px;
  }

  .selection-tag,
  .selection-owner {
    display: none;
  }

  .selection-stats {
    gap: 10px;
  }

  .selection-stats b {
    font-size: 12px;
  }

  .title-content {
    padding-top: calc(34vh + var(--safe-top));
  }

  .title-eyebrow {
    font-size: 7px;
    letter-spacing: 0.16em;
  }

  .title-record {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .record-item:last-child {
    display: none;
  }

  .briefing-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .threat-block {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    padding: 8px 0 0;
    text-align: left;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .threat-block > span {
    margin-right: auto;
  }

  .threat-block > b {
    margin: 0;
  }

  .threat-bars i {
    width: 12px;
  }

  .param-grid {
    grid-template-columns: 1fr 1fr;
  }

  .result-panel h2 {
    font-size: 34px;
  }

  .result-panel .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .screen {
    padding: 9px;
  }

  .modal-panel {
    padding: 16px 13px 14px;
  }

  .modal-topline {
    letter-spacing: 0.14em;
  }

  .help-head h2 {
    font-size: 23px;
  }
}

@media (max-height: 560px) and (min-width: 600px) {
  .hud-top {
    top: calc(6px + var(--safe-top));
    right: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    align-items: stretch;
  }

  .hud-sector {
    flex: 0 1 282px;
    min-width: 180px;
    padding: 6px 11px;
  }

  .hud-sector .eyebrow {
    font-size: 7px;
    letter-spacing: 0.12em;
  }

  .hud-sector .eyebrow-code,
  .hud-sector .sector-tag,
  .hud-sector .hud-live {
    display: none;
  }

  .hud-sector h1 {
    margin: 1px 0 2px;
    font-size: 14px;
  }

  .hud-sector .sector-row {
    margin-top: 1px;
  }

  .hud-meta {
    gap: 5px;
    margin-top: 2px;
    font-size: 8px;
  }

  .hud-objective {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    padding: 6px 12px;
  }

  .objective-head {
    font-size: 8px;
  }

  .objective-head b {
    font-size: 13px;
  }

  .objective-bar {
    height: 2px;
    margin: 4px 0 0;
  }

  .objective-sub {
    display: none;
  }

  .hud-controls {
    flex: 0 0 auto;
    align-self: center;
    gap: 5px;
  }

  .hud-controls .icon-btn {
    width: 30px;
    height: 30px;
  }

  .hud-controls #btn-help {
    display: none;
  }

  .speed-group {
    height: 30px;
  }

  .speed-btn {
    min-width: 26px;
    padding: 0 5px;
    font-size: 9px;
  }

  .faction-strip,
  .hint-panel {
    display: none;
  }

  .toast-area {
    top: calc(74px + var(--safe-top));
  }

  .selection-panel {
    bottom: calc(6px + var(--safe-bottom));
    width: min(680px, calc(100vw - 24px));
    min-width: 0;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .screen {
    padding: 6px;
  }

  .modal-shell {
    align-items: flex-start;
    min-height: 100%;
    padding: 2px 0;
  }

  #pause-screen .modal-shell,
  #result-screen .modal-shell {
    align-items: center;
  }

  .briefing-panel {
    padding: 12px 18px;
  }

  .modal-topline {
    padding-bottom: 7px;
    margin-bottom: 9px;
  }

  .briefing-head h2 {
    margin-top: 3px;
    font-size: 26px;
  }

  .briefing-head .eyebrow {
    font-size: 8px;
  }

  .briefing-lead {
    margin: 8px 0 10px;
    overflow: hidden;
    font-size: 9px;
    line-height: 1.55;
  }

  .briefing-columns {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 8px;
  }

  .briefing-section h3 {
    margin-bottom: 6px;
    font-size: 9px;
  }

  .param {
    padding: 5px 8px;
  }

  .param span {
    margin-bottom: 1px;
    font-size: 7px;
  }

  .param b {
    font-size: 9px;
  }

  .roster {
    max-height: 100px;
  }

  .roster-row {
    padding: 3px 7px;
  }

  .roster-name {
    font-size: 9px;
  }

  .roster-meta {
    font-size: 7px;
  }

  .rule-strip {
    display: none;
  }

  .modal-actions {
    margin-top: 10px;
  }

  .modal-actions .btn {
    min-height: 36px;
    font-size: 10px;
  }

  .modal-foot {
    display: none;
  }

  .pause-panel {
    margin: auto;
  }

  .pause-panel h2 {
    font-size: 26px;
  }

  .pause-panel .modal-lead {
    margin: 6px 0 12px;
    font-size: 9px;
  }

  .pause-summary {
    margin-bottom: 12px;
  }

  .pause-summary > div {
    padding: 7px 10px;
  }

  .pause-summary b {
    font-size: 13px;
  }

  .help-grid {
    grid-template-columns: 1fr 1fr;
    max-height: 47vh;
    overflow-y: auto;
  }

  .help-grid article {
    padding: 9px 12px;
  }

  .help-note {
    margin-top: 9px;
    padding: 8px 11px;
    font-size: 9px;
  }

  .help-panel .modal-actions {
    margin-top: 9px;
  }
}

@media (hover: none) {
  .tooltip {
    display: none !important;
  }
}

@media (max-width: 900px) and (max-height: 760px) {
  .title-content {
    padding-top: calc(23vh + var(--safe-top));
    padding-bottom: 58px;
  }

  .title-main {
    margin-top: 11px;
    font-size: clamp(44px, 12vw, 66px);
  }

  .title-sub {
    margin-top: 13px;
    font-size: 11px;
  }

  .title-actions {
    margin-top: 17px;
  }

  .title-record {
    margin-top: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .title-foot {
    display: none;
  }
}

@media (max-width: 900px) and (max-height: 650px) {
  .title-record {
    display: none;
  }

  .title-en {
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}