:root {
  --bg: #171e29;
  --panel: rgba(20, 29, 43, 0.96);
  --panel-strong: #131d2b;
  --panel-soft: rgba(32, 43, 61, 0.96);
  --border: rgba(132, 160, 204, 0.18);
  --border-strong: rgba(14, 20, 31, 0.9);
  --text: #eef4ff;
  --muted: #9babca;
  --accent: #ffca28;
  --accent-rgb: 255, 202, 40;
  --accent-2: #64d2ff;
  --accent-3: #f36f45;
  --success: #7adf8a;
  --shadow: 0 26px 44px rgba(0, 0, 0, 0.34);
  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --hero-cut: 18px;
  --tile-cut: 14px;
  --panel-cut: 12px;
  --tag-cut: 10px;
  --app-shell-padding: 18px;
  --back-rail-size: 64px;
  --back-rail-gap: 20px;
  --edge-faint: rgba(148, 173, 216, 0.14);
  --edge-bright: rgba(119, 195, 255, 0.72);
  --edge-glow: rgba(100, 210, 255, 0.2);
  --team-edge: rgba(255, 106, 106, 0.64);
  --play-diagram:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 460 180' fill='none' stroke='%2394add8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' opacity='0.34'%3E%3Ccircle cx='68' cy='96' r='9'/%3E%3Ccircle cx='98' cy='96' r='9'/%3E%3Ccircle cx='128' cy='96' r='9'/%3E%3Ccircle cx='158' cy='96' r='9'/%3E%3Cpath d='M205 58l12 12m0-12-12 12'/%3E%3Cpath d='M235 58l12 12m0-12-12 12'/%3E%3Cpath d='M265 58l12 12m0-12-12 12'/%3E%3Cpath d='M295 58l12 12m0-12-12 12'/%3E%3Cpath d='M68 84V58'/%3E%3Cpath d='M98 84c0-18 16-26 34-26'/%3E%3Cpath d='M128 84c12-30 31-43 54-52'/%3E%3Cpath d='M158 84c25-8 40-24 50-47'/%3E%3Cpath d='M205 72c18 0 38-8 58-30'/%3E%3Cpath d='M236 72c2-18-10-28-32-36'/%3E%3Cpath d='M266 72c18 6 34 24 52 48'/%3E%3Cpath d='M297 72c24 10 44 8 74-18'/%3E%3Cpath d='M374 89c20 0 38-11 48-30'/%3E%3C/svg%3E");
  --draw-zoom: 1;
}

/* Navy Old Theme preset: saved snapshot of the original Turnover navy system. */
html.theme-navy-old {
  --bg: #171e29;
  --panel: rgba(20, 29, 43, 0.96);
  --panel-strong: #131d2b;
  --panel-soft: rgba(32, 43, 61, 0.96);
  --border: rgba(132, 160, 204, 0.18);
  --border-strong: rgba(14, 20, 31, 0.9);
  --text: #eef4ff;
  --muted: #9babca;
  --accent: #ffca28;
  --accent-rgb: 255, 202, 40;
  --accent-2: #64d2ff;
  --accent-3: #f36f45;
  --success: #7adf8a;
  --shadow: 0 26px 44px rgba(0, 0, 0, 0.34);
  --edge-faint: rgba(148, 173, 216, 0.14);
  --edge-bright: rgba(119, 195, 255, 0.72);
  --edge-glow: rgba(100, 210, 255, 0.2);
  --team-edge: rgba(255, 106, 106, 0.64);
}

html.theme-charcoal {
  --bg: #20242b;
  --panel: #242932;
  --panel-strong: #1d222b;
  --panel-soft: #282e38;
  --border: rgba(133, 145, 166, 0.26);
  --border-strong: rgba(4, 6, 10, 0.8);
  --text: #f1f4fb;
  --muted: #a5afbf;
  --accent: #c7b37a;
  --accent-rgb: 199, 179, 122;
  --accent-2: #9aa7bb;
  --accent-3: #c7b37a;
  --success: #79cf8b;
  --shadow: 0 20px 34px rgba(0, 0, 0, 0.3);
  --edge-faint: rgba(116, 128, 150, 0.18);
  --edge-bright: rgba(184, 195, 212, 0.36);
  --edge-glow: rgba(199, 179, 122, 0.16);
  --team-edge: rgba(199, 179, 122, 0.56);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(150, 168, 203, 0.12), transparent 22%),
    radial-gradient(circle at right, rgba(58, 74, 104, 0.16), transparent 22%),
    linear-gradient(180deg, #3b4352 0%, #252c38 18%, #1e2530 100%);
  color: var(--text);
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  pointer-events: none;
  opacity: 0.7;
}

html.theme-navy-old,
html.theme-navy-old body {
  background:
    radial-gradient(circle at top left, rgba(150, 168, 203, 0.12), transparent 22%),
    radial-gradient(circle at right, rgba(58, 74, 104, 0.16), transparent 22%),
    linear-gradient(180deg, #3b4352 0%, #252c38 18%, #1e2530 100%);
}

html.theme-charcoal,
html.theme-charcoal body {
  background:
    linear-gradient(180deg, #383d47 0%, #292e37 24%, #20242b 100%);
}

html.theme-charcoal body::before {
  background-image:
    linear-gradient(rgba(219, 226, 239, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 226, 239, 0.015) 1px, transparent 1px);
  opacity: 0.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

#app {
  position: relative;
}

.app-shell {
  min-height: 100vh;
  padding: var(--app-shell-padding);
}

.draw-sidebar,
.draw-inspector,
.toolbar,
.card,
.hero-panel,
.stat-card,
.status-bar {
  position: relative;
  background:
    linear-gradient(180deg, rgba(57, 70, 95, 0.3) 0%, rgba(18, 27, 40, 0) 16%),
    linear-gradient(180deg, rgba(33, 45, 64, 0.98), rgba(15, 23, 36, 0.98));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card,
.stat-card,
.session-stat-card,
.live-drive-card,
.session-breakdown,
.route-item,
.simple-row,
.generated-row,
.playbook-entry,
.report-card,
.cloud-account-card,
.organization-summary-card,
.organization-member-card,
.video-source-card,
.timestamp-video-card {
  border-radius: 0;
  clip-path: polygon(var(--panel-cut) 0, calc(100% - var(--panel-cut)) 0, 100% var(--panel-cut), 100% calc(100% - var(--panel-cut)), calc(100% - var(--panel-cut)) 100%, var(--panel-cut) 100%, 0 calc(100% - var(--panel-cut)), 0 var(--panel-cut));
}

.hero-panel,
.home-hero,
.home-tile,
.library-tile,
.tag-choice-tile,
.back-button,
.rail-reset {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.draw-sidebar::before,
.draw-inspector::before,
.toolbar::before,
.card::before,
.hero-panel::before,
.stat-card::before,
.status-bar::before,
.home-hero::before,
.home-tile::before,
.library-tile::before,
.library-asset-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(136, 161, 205, 0.12);
  pointer-events: none;
}

.draw-sidebar::after,
.draw-inspector::after,
.toolbar::after,
.card::after,
.hero-panel::after,
.stat-card::after,
.status-bar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  background: linear-gradient(180deg, rgba(98, 116, 150, 0.28), rgba(23, 33, 48, 0));
  pointer-events: none;
}

.brand-block {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, rgba(255, 202, 40, 0.18), rgba(100, 210, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-kicker,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--accent);
}

.brand-block h1,
.hero-panel h1 {
  margin: 8px 0 8px;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.03em;
  line-height: 0.96;
}

.brand-block p,
.hero-panel p,
.card-header p,
.muted {
  color: var(--muted);
}

.nav-list,
.nav-footer,
.stack,
.route-item-copy,
.simple-row,
.card,
.generated-row,
.playbook-entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-button,
.button,
.draft-item {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(121, 146, 189, 0.12);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(95, 116, 149, 0.18), rgba(21, 30, 43, 0.2)),
    rgba(23, 31, 45, 0.96);
  cursor: pointer;
  transition: 150ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.button {
  text-align: center;
}

.nav-button:hover,
.button:hover,
.draft-item:hover {
  border-color: rgba(100, 210, 255, 0.28);
  transform: translateY(-1px);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.35);
}

.button:disabled:hover,
.button[aria-disabled="true"]:hover {
  border-color: rgba(121, 146, 189, 0.12);
  transform: none;
}

.ai-placeholder-button {
  border-style: dashed;
}

.nav-button.active,
.button.active,
.tab-button.active,
.draft-item.active,
.tool-button.active {
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(14, 21, 31, 0.98);
  border-color: rgba(255, 202, 40, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(255, 202, 40, 0.24);
}

html.theme-charcoal .draw-sidebar,
html.theme-charcoal .draw-inspector,
html.theme-charcoal .toolbar,
html.theme-charcoal .card,
html.theme-charcoal .hero-panel,
html.theme-charcoal .stat-card,
html.theme-charcoal .status-bar,
html.theme-charcoal .home-hero,
html.theme-charcoal .home-tile,
html.theme-charcoal .library-tile,
html.theme-charcoal .library-asset-tile,
html.theme-charcoal .tag-choice-tile,
html.theme-charcoal .back-button,
html.theme-charcoal .rail-reset,
html.theme-charcoal .session-stat-card,
html.theme-charcoal .live-drive-card,
html.theme-charcoal .session-breakdown,
html.theme-charcoal .route-item,
html.theme-charcoal .simple-row,
html.theme-charcoal .generated-row,
html.theme-charcoal .playbook-entry,
html.theme-charcoal .report-card,
html.theme-charcoal .cloud-account-card,
html.theme-charcoal .organization-summary-card,
html.theme-charcoal .organization-member-card,
html.theme-charcoal .video-source-card,
html.theme-charcoal .timestamp-video-card,
html.theme-charcoal .session-save-panel,
html.theme-charcoal .live-drive-board,
html.theme-charcoal .live-drive-summary-panel,
html.theme-charcoal .live-play-wizard,
html.theme-charcoal .live-video-panel,
html.theme-charcoal .external-video-card,
html.theme-charcoal .video-sidebar-section,
html.theme-charcoal .calendar-day,
html.theme-charcoal .onboarding-tile,
html.theme-charcoal .draw-modal,
html.theme-charcoal .coach-modal,
html.theme-charcoal .overlay-modal {
  position: relative;
  border-color: var(--border-strong);
  background: var(--panel);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

html.theme-charcoal .home-tile,
html.theme-charcoal .library-tile,
html.theme-charcoal .library-asset-tile,
html.theme-charcoal .tag-choice-tile,
html.theme-charcoal .onboarding-tile,
html.theme-charcoal .calendar-day {
  background: var(--panel-strong);
}

html.theme-charcoal .card::before,
html.theme-charcoal .hero-panel::before,
html.theme-charcoal .stat-card::before,
html.theme-charcoal .status-bar::before,
html.theme-charcoal .home-hero::before,
html.theme-charcoal .home-tile::before,
html.theme-charcoal .library-tile::before,
html.theme-charcoal .library-asset-tile::before,
html.theme-charcoal .tag-choice-tile::before,
html.theme-charcoal .onboarding-tile::before,
html.theme-charcoal .back-button::before,
html.theme-charcoal .rail-reset::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--edge-faint);
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

html.theme-charcoal .draw-sidebar::after,
html.theme-charcoal .draw-inspector::after,
html.theme-charcoal .toolbar::after,
html.theme-charcoal .card::after,
html.theme-charcoal .hero-panel::after,
html.theme-charcoal .stat-card::after,
html.theme-charcoal .status-bar::after,
html.theme-charcoal .home-hero::after,
html.theme-charcoal .home-tile::after,
html.theme-charcoal .library-tile::after,
html.theme-charcoal .library-asset-tile::after,
html.theme-charcoal .onboarding-tile::after,
html.theme-charcoal .back-button::after,
html.theme-charcoal .rail-reset::after,
html.theme-charcoal .session-save-panel::after,
html.theme-charcoal .draw-modal::after,
html.theme-charcoal .coach-modal::after,
html.theme-charcoal .overlay-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 18px, rgba(var(--accent-rgb), 0.72) 18px 78px, transparent 78px) top left / 50% 2px no-repeat,
    linear-gradient(270deg, transparent 18px, rgba(4, 6, 10, 0.68) 18px 78px, transparent 78px) bottom right / 50% 2px no-repeat;
}

html.theme-charcoal .nav-button,
html.theme-charcoal .button,
html.theme-charcoal .draft-item,
html.theme-charcoal .position-chip,
html.theme-charcoal .turnover-tile {
  border-radius: 0;
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
  border-color: rgba(4, 6, 10, 0.82);
  background: var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    inset 0 -1px 0 rgba(0, 0, 0, 0.44);
}

html.theme-charcoal .nav-button:hover,
html.theme-charcoal .button:hover,
html.theme-charcoal .draft-item:hover,
html.theme-charcoal .position-chip:hover,
html.theme-charcoal .turnover-tile:hover,
html.theme-charcoal .home-tile:hover,
html.theme-charcoal .library-tile:hover,
html.theme-charcoal .library-tile.active,
html.theme-charcoal .onboarding-tile:hover {
  border-color: var(--border);
  background: var(--panel-soft);
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

html.theme-charcoal .nav-button.active,
html.theme-charcoal .button.active,
html.theme-charcoal .tab-button.active,
html.theme-charcoal .draft-item.active,
html.theme-charcoal .tool-button.active,
html.theme-charcoal .tag-choice-tile.active,
html.theme-charcoal .position-chip.active,
html.theme-charcoal .onboarding-tile.active {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.32);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.2), rgba(255, 255, 255, 0.02)),
    #282e38;
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -2px 0 rgba(var(--accent-rgb), 0.26);
}

html.theme-charcoal .button-primary {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.32);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.18), rgba(255, 255, 255, 0.018)),
    var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.1),
    inset 0 -2px 0 rgba(var(--accent-rgb), 0.24);
}

html.theme-charcoal .button-secondary {
  border-color: rgba(133, 145, 166, 0.24);
  background: var(--panel-strong);
}

html.theme-charcoal .danger-button {
  color: #ffd9ce;
  border-color: rgba(243, 111, 69, 0.42);
  background: #351f1d;
}

html.theme-charcoal .tile-icon,
html.theme-charcoal .film-tool-pictogram {
  border-color: rgba(4, 6, 10, 0.84);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.18),
    0 1px 0 rgba(0, 0, 0, 0.58);
}

html.theme-charcoal .home-tile:hover .tile-icon,
html.theme-charcoal .library-tile:hover .tile-icon,
html.theme-charcoal .library-tile.active .tile-icon {
  border-color: rgba(133, 145, 166, 0.36);
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.2),
    0 0 0 1px rgba(100, 210, 255, 0.12);
}

html.theme-charcoal .input,
html.theme-charcoal .input-row input,
html.theme-charcoal .input-row textarea,
html.theme-charcoal .input-row select,
html.theme-charcoal .title-input {
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  border-color: rgba(4, 6, 10, 0.82);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    inset 0 -1px 0 rgba(0, 0, 0, 0.44);
}

html.theme-charcoal .onboarding-tile {
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

html.theme-charcoal .draw-menu-trigger {
  position: relative;
  overflow: hidden;
  color: #dfe5ee;
  border-color: rgba(4, 6, 10, 0.86);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.18),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

html.theme-charcoal .draw-menu-trigger::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(116, 128, 150, 0.22);
  pointer-events: none;
}

html.theme-charcoal .draw-menu-trigger::after {
  content: "";
  position: absolute;
  top: 0;
  left: 11px;
  width: 24px;
  height: 2px;
  background: rgba(184, 195, 212, 0.34);
  pointer-events: none;
}

html.theme-charcoal .draw-menu-trigger:hover,
html.theme-charcoal .draw-action-tiles.is-open .draw-menu-trigger,
html.theme-charcoal .film-room-action-menu-shell.is-open .draw-menu-trigger {
  color: #f4f7fb;
  border-color: rgba(116, 128, 150, 0.36);
  background: #242932;
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.54),
    0 18px 32px rgba(0, 0, 0, 0.36);
}

html.theme-charcoal .draw-menu-lines {
  position: relative;
  z-index: 1;
}

html.theme-charcoal .draw-menu-lines span {
  height: 2px;
  border-radius: 0;
  background: currentColor;
  box-shadow: none;
  opacity: 0.94;
}

html.theme-charcoal .draw-menu-lines span:nth-child(2),
html.theme-charcoal .draw-menu-lines span:nth-child(3) {
  width: 19px;
}

html.theme-charcoal .draw-action-menu {
  isolation: isolate;
  border-color: rgba(4, 6, 10, 0.88);
  background: #242932;
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(116, 128, 150, 0.16);
}

html.theme-charcoal .draw-action-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 50%;
  height: 2px;
  background:
    linear-gradient(90deg, transparent 14px, rgba(184, 195, 212, 0.34) 14px 74px, transparent 74px);
  pointer-events: none;
}

html.theme-charcoal .draw-action-menu-group {
  border-color: rgba(4, 6, 10, 0.7);
  background: #20252d;
  box-shadow: inset 0 0 0 1px rgba(116, 128, 150, 0.13);
}

html.theme-charcoal .draw-action-menu-summary {
  color: #eef2f8;
}

html.theme-charcoal .draw-action-menu-summary::after {
  color: #c6cfdb;
  border-color: rgba(4, 6, 10, 0.78);
  background: #1d222b;
  box-shadow: inset 0 0 0 1px rgba(128, 139, 158, 0.13);
}

html.theme-charcoal .draw-action-menu-count {
  color: #aab4c3;
  border-color: rgba(4, 6, 10, 0.62);
  background: #1d222b;
}

html.theme-charcoal .draw-action-menu-option,
html.theme-charcoal .film-room-primary-menu-option {
  border-color: rgba(4, 6, 10, 0.72);
  background: #1d222b;
  box-shadow: inset 0 0 0 1px rgba(116, 128, 150, 0.12);
}

html.theme-charcoal .draw-action-menu-option:hover,
html.theme-charcoal .draw-action-menu-option.active,
html.theme-charcoal .film-room-primary-menu-option:hover,
html.theme-charcoal .film-room-primary-menu-option.active {
  border-color: rgba(133, 145, 166, 0.34);
  background: #282e38;
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.16),
    inset 3px 0 0 rgba(184, 195, 212, 0.22);
}

.button-primary {
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.2), rgba(255, 255, 255, 0.018)),
    rgba(14, 21, 31, 0.96);
  border-color: rgba(255, 202, 40, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22);
}

.button-secondary {
  background:
    linear-gradient(180deg, rgba(88, 103, 130, 0.34), rgba(22, 30, 44, 0.2)),
    rgba(23, 31, 45, 0.96);
  border-color: rgba(100, 210, 255, 0.18);
}

.danger-button {
  border-color: rgba(243, 111, 69, 0.32);
  color: #ffd9ce;
  background:
    linear-gradient(180deg, rgba(243, 111, 69, 0.2), rgba(69, 18, 14, 0.18)),
    rgba(23, 31, 45, 0.96);
}

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

.back-rail {
  position: absolute;
  left: calc(var(--app-shell-padding) + 4px);
  top: calc(var(--app-shell-padding) + 4px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.back-rail.is-hidden {
  display: none;
}

.back-button,
.rail-reset {
  min-width: 56px;
  padding: 12px 14px;
  border-radius: 0;
  clip-path: polygon(14px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 10px 100%, 0 calc(100% - 10px), 0 14px);
  background:
    linear-gradient(180deg, rgba(89, 107, 136, 0.22), rgba(18, 25, 37, 0.28)),
    rgba(15, 22, 33, 0.96);
  border: 1px solid rgba(121, 145, 187, 0.15);
  box-shadow: var(--shadow);
}

.back-button::before,
.rail-reset::before {
  content: none;
}

.back-button {
  font-size: 1.35rem;
}

.back-rail .back-button,
.live-step-rail .back-button,
.inline-actions > .back-button {
  width: var(--back-rail-size);
  min-width: var(--back-rail-size);
  flex: 0 0 var(--back-rail-size);
  height: var(--back-rail-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.9rem;
  line-height: 1;
}

.rail-reset {
  font-size: 0.78rem;
  white-space: nowrap;
}

.home-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 36px);
}

.home-hero,
.home-tile,
.splash-screen {
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
  border-radius: 0;
  clip-path: polygon(var(--hero-cut) 0, calc(100% - var(--hero-cut)) 0, 100% var(--hero-cut), 100% calc(100% - var(--hero-cut)), calc(100% - var(--hero-cut)) 100%, var(--hero-cut) 100%, 0 calc(100% - var(--hero-cut)), 0 var(--hero-cut));
  background:
    radial-gradient(circle at top right, rgba(101, 210, 255, 0.05), transparent 22%),
    linear-gradient(90deg, rgba(100, 210, 255, 0.025), transparent 40%),
    linear-gradient(180deg, rgba(35, 45, 62, 0.985), rgba(14, 21, 33, 0.985));
  background-repeat: no-repeat;
  background-position:
    top right,
    left center,
    center;
  background-size:
    auto,
    auto,
    auto;
}

.home-hero h1,
.home-tile h3,
.library-tile h3,
.card-header h3,
.live-square-tile h3,
.splash-mark h1 {
  margin: 8px 0 10px;
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.03em;
  line-height: 0.95;
}

html.os-windows .home-tile h3,
html.os-windows .library-tile h3,
html.os-windows .card-header h3,
html.os-windows .live-square-tile h3 {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: none;
}

.home-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  max-width: none;
  margin: 6px 0 2px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-greeting {
  max-width: 720px;
  margin: 8px 0 0;
  font-size: 1.02rem;
  color: var(--text);
}

.home-quote {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.home-quote-author {
  color: var(--muted);
}

.home-hero-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.home-hero-actions {
  margin-left: auto;
  justify-content: flex-end;
  flex-shrink: 0;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.depth-charts-tile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.live-mapping-grid {
  grid-template-columns: repeat(3, minmax(140px, 220px));
  justify-content: center;
}

.live-mode-grid {
  grid-template-columns: repeat(3, minmax(220px, 280px));
  justify-content: center;
}

.live-mode-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex-wrap: wrap;
}

.live-team-picker-tile {
  width: min(320px, 100%);
  min-height: 112px;
  cursor: default;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 18px;
}

.live-team-picker-tile:hover {
  transform: none;
  border-color: rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(11, 18, 29, 0.985);
}

.live-team-picker-tile strong,
.live-team-picker-tile select {
  width: 100%;
}

.live-team-picker-tile strong {
  color: var(--muted);
  font-size: 0.92rem;
}

.live-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 250px));
  justify-content: center;
  gap: 18px;
}

.live-past-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 240px));
  justify-content: center;
  gap: 16px;
}

.live-home-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  aspect-ratio: 1 / 1;
}

.live-past-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mapped-game-session-tile {
  min-height: 300px;
  gap: 18px;
  text-align: left;
}

.mapped-game-session-summary {
  display: grid;
  gap: 10px;
  width: 100%;
}

.mapped-game-session-kicker {
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mapped-game-session-title {
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 1.34rem;
  line-height: 1;
}

.mapped-game-session-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mapped-game-session-fact {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(7, 13, 22, 0.74);
}

.mapped-game-session-fact.play-count {
  color: var(--text);
  border-color: rgba(121, 145, 187, 0.24);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(15, 20, 28, 0.88);
}

.mapped-game-session-fact.mapping-status.complete {
  color: #bff7c9;
  border-color: rgba(122, 223, 138, 0.34);
  background:
    linear-gradient(180deg, rgba(122, 223, 138, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(15, 28, 20, 0.88);
}

.mapped-game-session-fact.mapping-status.incomplete {
  color: var(--muted);
  border-color: rgba(173, 186, 214, 0.2);
  background:
    linear-gradient(180deg, rgba(173, 186, 214, 0.1), rgba(255, 255, 255, 0.01)),
    rgba(16, 22, 32, 0.86);
}

.mapped-game-session-details {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.mapped-game-session-tile .inline-actions {
  width: 100%;
  margin-top: auto;
}

.mapped-play-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding-top: 72px;
}

.mapped-play-down-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  min-width: 58px;
  min-height: 52px;
  place-items: center;
  gap: 1px;
  padding: 6px 9px;
  border: 1px solid rgba(121, 145, 187, 0.28);
  border-radius: 8px;
  color: #f7f5ef;
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.18), rgba(255, 255, 255, 0.02)),
    rgba(10, 16, 26, 0.96);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 10px 20px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
}

.mapped-play-down-badge strong {
  margin: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.55rem;
  line-height: 0.9;
}

.mapped-play-down-badge span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mapped-play-down-badge:hover {
  border-color: rgba(121, 145, 187, 0.44);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.24), rgba(255, 255, 255, 0.03)),
    rgba(17, 23, 33, 0.98);
}

.teams-library-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  justify-content: start;
  align-items: stretch;
}

.team-container-tile {
  min-height: 260px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.team-container-heading {
  display: grid;
  gap: 8px;
}

.team-container-heading h3 {
  margin: 0;
  font-size: 1.52rem;
  line-height: 1;
}

.team-tag-code {
  width: fit-content;
  max-width: 100%;
  padding: 5px 8px;
  overflow: hidden;
  color: rgba(173, 186, 214, 0.86);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  border-left: 2px solid rgba(100, 210, 255, 0.36);
  background: rgba(100, 210, 255, 0.055);
}

.team-container-metrics {
  display: grid;
  gap: 8px;
  align-content: start;
}

.team-container-metric {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(7, 13, 22, 0.62);
}

.team-container-metric span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.team-container-metric strong {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.15;
}

.team-container-metric.complete,
.team-container-metric.ready {
  border-color: rgba(122, 223, 138, 0.22);
  background:
    linear-gradient(180deg, rgba(122, 223, 138, 0.095), rgba(255, 255, 255, 0.01)),
    rgba(7, 13, 22, 0.72);
}

.team-container-metric.date {
  border-color: rgba(100, 210, 255, 0.18);
}

.team-container-metric.incomplete,
.team-container-metric.empty {
  border-color: rgba(255, 202, 40, 0.18);
}

.team-container-tile .team-container-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 9px;
}

.team-container-actions .button {
  width: 100%;
}

.team-container-actions .button:last-child {
  grid-column: 1 / -1;
}

.mapped-play-tile p {
  min-height: 0;
}

.mapped-play-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  align-items: center;
  transform: translate(-5px, -10px);
  margin-bottom: -10px;
}

.session-stats-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 2fr);
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  overflow: hidden;
  border-radius: 0;
  clip-path: polygon(var(--panel-cut) 0, calc(100% - var(--panel-cut)) 0, 100% var(--panel-cut), 100% calc(100% - var(--panel-cut)), calc(100% - var(--panel-cut)) 100%, var(--panel-cut) 100%, 0 calc(100% - var(--panel-cut)), 0 var(--panel-cut));
  border: 1px solid var(--border-strong);
  background: var(--panel);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.36);
  isolation: isolate;
}

.session-stats-panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--edge-faint);
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.session-stats-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 18px, rgba(var(--accent-rgb), 0.72) 18px 78px, transparent 78px) top left / 50% 2px no-repeat,
    linear-gradient(270deg, transparent 18px, rgba(4, 6, 10, 0.68) 18px 78px, transparent 78px) bottom right / 50% 2px no-repeat;
}

.session-stats-panel > * {
  position: relative;
  z-index: 1;
}

.session-stats-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.session-stats-header h3 {
  margin: 0;
}

.session-setup-panel {
  grid-template-columns: 1fr;
}

.session-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.session-tendency-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.session-tendency-card {
  min-height: 106px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(4, 6, 10, 0.78);
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  background: var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.session-stat-card {
  padding: 12px;
  border-radius: 9px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(8, 15, 25, 0.74);
}

.session-stat-card span,
.session-tendency-card span,
.session-breakdown-row span {
  color: var(--muted);
}

.session-tendency-card span {
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
}

.session-stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 1.35rem;
}

.session-tendency-card strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.session-tendency-card.is-na strong {
  color: var(--muted);
}

.session-tendency-detail {
  color: #aeb8c7;
  font-size: 0.74rem;
  font-weight: 750;
  line-height: 1.2;
}

.session-tendency-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.session-breakdown {
  padding: 12px;
  border-radius: 9px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background: rgba(8, 15, 25, 0.64);
}

.session-breakdown-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 8px;
  overflow: hidden;
}

.session-breakdown-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--success));
}

.direction-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-height: 178px;
  margin-top: 12px;
  align-items: end;
}

.direction-chart-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.direction-chart-bar-wrap {
  display: flex;
  width: 100%;
  max-width: 46px;
  height: 110px;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.direction-chart-bar {
  display: block;
  width: 100%;
  min-height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--success));
}

.direction-chart-label {
  color: var(--text);
  font-weight: 800;
}

.position-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 8px;
}

.position-chip {
  min-height: 42px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  background: rgba(7, 12, 20, 0.68);
  cursor: pointer;
}

.position-chip.active,
.position-chip:hover {
  border-color: rgba(100, 210, 255, 0.58);
  background: rgba(100, 210, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(100, 210, 255, 0.18);
}

.live-session-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 240px));
  justify-content: start;
}

.live-drive-board {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(32, 45, 66, 0.22), rgba(255, 255, 255, 0.01)),
    rgba(5, 10, 18, 0.72);
}

.live-drive-board-header,
.live-drive-list {
  display: grid;
  gap: 12px;
}

.live-drive-board-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.live-drive-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(180deg, rgba(48, 65, 92, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 23, 0.84);
}

.live-drive-card.is-active {
  border-color: rgba(100, 210, 255, 0.28);
}

.live-drive-card.is-closed {
  border-color: rgba(255, 202, 40, 0.18);
}

.live-drive-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.live-drive-header h3 {
  margin: 0;
}

.live-drive-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.live-drive-number {
  position: relative;
  display: inline-flex;
  min-width: 34px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid rgba(121, 145, 187, 0.2);
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.18), rgba(255, 255, 255, 0.02)),
    rgba(9, 15, 24, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  isolation: isolate;
}

.live-drive-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.live-drive-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid rgba(121, 145, 187, 0.2);
  border-radius: 8px;
  color: #f7f5ef;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.18), rgba(255, 255, 255, 0.02)),
    rgba(9, 15, 24, 0.86);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  isolation: isolate;
}

.live-drive-context-label {
  border-color: rgba(100, 210, 255, 0.36);
  color: #dff5ff;
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(8, 16, 28, 0.92);
}

.live-drive-play-count-label {
  border-color: rgba(255, 202, 40, 0.32);
  color: #fff4ca;
  background:
    linear-gradient(180deg, rgba(255, 202, 40, 0.14), rgba(255, 255, 255, 0.02)),
    rgba(19, 16, 8, 0.82);
}

html.theme-charcoal .live-drive-number,
html.theme-charcoal .live-drive-label,
html.theme-charcoal .mapped-play-down-badge {
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  border-color: rgba(4, 6, 10, 0.82);
  color: var(--text);
  background: var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

html.theme-charcoal .mapped-play-down-badge {
  min-width: 60px;
  min-height: 54px;
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    inset 0 -1px 0 rgba(0, 0, 0, 0.54),
    0 12px 22px rgba(0, 0, 0, 0.28);
}

html.theme-charcoal .live-drive-context-label,
html.theme-charcoal .live-drive-play-count-label {
  border-color: rgba(4, 6, 10, 0.78);
  color: #e5eaf2;
  background: var(--panel-strong);
}

html.theme-charcoal .live-drive-play-count-label {
  color: #d7dde8;
}

html.theme-charcoal .mapped-play-down-badge span {
  color: #aeb8c7;
}

html.theme-charcoal .live-drive-number::after,
html.theme-charcoal .live-drive-label::after,
html.theme-charcoal .mapped-play-down-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  height: auto;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 9px, rgba(184, 195, 212, 0.42) 9px 46px, transparent 46px) top left / 72% 2px no-repeat,
    linear-gradient(270deg, transparent 9px, rgba(4, 6, 10, 0.64) 9px 42px, transparent 42px) bottom right / 58% 2px no-repeat;
}

html.theme-charcoal .mapped-play-down-badge:hover {
  border-color: rgba(133, 145, 166, 0.34);
  background: var(--panel-soft);
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.54),
    0 14px 24px rgba(0, 0, 0, 0.32);
}

.live-entry-context-label {
  width: fit-content;
  text-transform: none;
  font-size: 0.86rem;
}

.live-drive-summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, auto);
  gap: 14px;
  align-items: end;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 202, 40, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 202, 40, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 23, 0.72);
}

.live-drive-summary-panel h3,
.live-drive-summary-panel p {
  margin: 0;
  text-align: left;
}

.live-drive-summary-breakdowns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.live-drive-summary-breakdowns .session-breakdown {
  min-width: 0;
}

.live-play-wizard {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(79, 96, 126, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 33, 0.92);
}

.live-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.live-board-actions {
  position: absolute;
  top: 14px;
  right: 18px;
  justify-content: flex-end;
  margin: 0;
}

.compact-button {
  width: auto;
  min-width: 0;
  padding: 9px 14px;
}

.back-button {
  background:
    linear-gradient(180deg, rgba(243, 111, 69, 0.34), rgba(110, 46, 23, 0.18)),
    rgba(23, 31, 45, 0.96);
  border-color: rgba(243, 111, 69, 0.26);
}

.session-board-card .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 210px;
  min-height: 44px;
}

.session-save-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(79, 96, 126, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 33, 0.92);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-analysis-panel {
  flex: 0 0 auto;
  gap: 14px;
  overflow: visible;
}

html.theme-charcoal .ai-analysis-panel {
  overflow: visible;
}

.ai-analysis-settings-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.ai-analysis-prompt,
.ai-analysis-output,
.ai-analysis-debug-output {
  min-height: 220px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.84rem;
  line-height: 1.45;
}

.ai-analysis-output {
  min-height: 260px;
  white-space: pre-wrap;
}

.ai-analysis-debug-output {
  min-height: 170px;
  color: #c9d4e8;
}

.ai-analysis-error {
  margin: 0;
  color: #ffb199;
  font-weight: 800;
}

.live-formation-panel {
  width: min(460px, 100%);
  margin: 12px auto 0;
}

.live-video-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(360px, 560px);
  gap: 16px;
  align-items: center;
  margin: 12px 0 16px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(100, 210, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.1), rgba(255, 255, 255, 0.01)),
    rgba(12, 20, 31, 0.94);
}

.live-video-preview {
  width: 100%;
  height: 260px;
  max-height: none;
  object-fit: contain;
  border-radius: 8px;
  background: #050914;
  border: 1px solid rgba(121, 145, 187, 0.18);
}

.live-video-player-card {
  display: grid;
  gap: 10px;
}

.live-video-frame {
  height: 220px;
}

.external-video-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 202, 40, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(6, 10, 18, 0.78);
}

.video-timestamp-panel {
  width: 100%;
  margin: 0;
}

.video-timestamp-layout {
  width: min(1180px, calc(100vw - 220px));
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(420px, 1fr);
  align-items: start;
  gap: 20px;
}

.timestamp-video-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(100, 210, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(10, 17, 27, 0.92);
}

.timestamp-video-card .live-video-preview {
  height: 320px;
}

.video-player-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.video-hero {
  position: relative;
  overflow: hidden;
}

.video-hub-stack {
  display: grid;
  gap: 18px;
}

.video-session-grid,
.video-drive-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.video-source-grid {
  align-items: stretch;
}

.video-source-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(67, 86, 117, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(13, 20, 31, 0.9);
}

.video-source-card h3,
.video-sidebar-section h3,
.video-stage-header h3,
.video-drive-header h3 {
  margin: 0;
}

.video-source-card p,
.video-stage-header p,
.video-sidebar-section p,
.video-drive-header p {
  margin: 0;
}

.video-drive-panel {
  gap: 16px;
}

.video-drive-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.video-drive-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.video-drive-breadcrumbs {
  gap: 8px;
}

.video-player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.video-stage-card {
  display: grid;
  gap: 14px;
}

.video-stage-header {
  display: grid;
  gap: 6px;
}

.video-stage-frame {
  position: relative;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(3, 8, 16, 0.18), rgba(3, 8, 16, 0.4)),
    #02060d;
}

.video-stage-frame.is-drop-target {
  border-color: rgba(255, 202, 40, 0.7);
  box-shadow:
    0 0 0 2px rgba(255, 202, 40, 0.2),
    0 18px 46px rgba(0, 0, 0, 0.34);
}

.video-stage-frame.is-drop-target::after {
  content: "Drop media to open";
  position: absolute;
  inset: 14px;
  z-index: 5;
  display: grid;
  place-items: center;
  color: #ffe8a4;
  font-weight: 900;
  letter-spacing: 0;
  border: 1px dashed rgba(255, 202, 40, 0.62);
  background: rgba(6, 10, 18, 0.52);
  pointer-events: none;
}

.video-stage,
.video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.video-stage {
  object-fit: contain;
  background: #040913;
}

.video-overlay {
  z-index: 2;
  pointer-events: none;
}

.video-stage-frame.is-board-mode .video-overlay {
  pointer-events: auto;
}

.video-overlay .video-annotation {
  transition: opacity 120ms ease, filter 120ms ease;
}

.video-overlay .video-annotation.selected {
  filter: drop-shadow(0 0 10px rgba(100, 210, 255, 0.45));
}

.video-overlay .video-annotation.draft {
  opacity: 0.84;
}

.video-stage-placeholder {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(4, 8, 14, 0.22), rgba(4, 8, 14, 0.62));
}

.video-stage-placeholder strong,
.video-stage-placeholder p {
  margin: 0;
}

.video-transport {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.film-room-menu-bar {
  position: relative;
  z-index: 36;
  display: flex;
  align-items: center;
  width: max-content;
  margin: 4px 0 10px 72px;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
}

.app-shell.has-back-rail .video-player-page > .film-room-menu-bar,
.app-shell.has-back-rail .film-room-workspace > .film-room-menu-bar {
  min-height: 88px;
  width: 100%;
  margin: 0 0 16px;
  padding: 18px 20px 18px calc(20px + var(--back-rail-size) + var(--back-rail-gap));
  clip-path: polygon(var(--panel-cut) 0, calc(100% - var(--panel-cut)) 0, 100% var(--panel-cut), 100% calc(100% - var(--panel-cut)), calc(100% - var(--panel-cut)) 100%, var(--panel-cut) 100%, 0 calc(100% - var(--panel-cut)), 0 var(--panel-cut));
  background:
    linear-gradient(180deg, rgba(57, 70, 95, 0.3) 0%, rgba(18, 27, 40, 0) 18%),
    linear-gradient(180deg, rgba(33, 45, 64, 0.98), rgba(15, 23, 36, 0.98));
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

html.theme-charcoal .app-shell.has-back-rail .video-player-page > .film-room-menu-bar,
html.theme-charcoal .app-shell.has-back-rail .film-room-workspace > .film-room-menu-bar {
  background: var(--panel);
  border-color: var(--border-strong);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.36);
}

.film-room-action-menu-shell {
  position: relative;
  z-index: 36;
  pointer-events: auto;
}

.film-room-action-menu-shell.is-open {
  z-index: 60;
}

.film-room-menu-trigger {
  width: 54px;
  height: 50px;
}

.film-room-action-menu {
  z-index: 37;
  width: 286px;
}

.film-room-primary-menu-option {
  border-color: rgba(121, 145, 187, 0.2);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(15, 20, 28, 0.94);
}

.film-room-menu-left,
.film-room-menu-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.film-room-menu-right {
  justify-content: flex-end;
}

.film-room-menu-title {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.film-session-quote {
  margin: 0;
  color: rgba(209, 219, 241, 0.86);
  font-size: 0.9rem;
  line-height: 1.25;
}

.film-session-quote.header {
  max-width: 780px;
}

.film-session-quote.screen {
  color: #eef4ff;
  font-size: clamp(1rem, 1.8vw, 1.55rem);
  font-weight: 800;
  text-shadow: 0 0 16px rgba(100, 210, 255, 0.16);
}

.film-session-quote-author {
  color: rgba(255, 202, 40, 0.88);
  font-weight: 900;
}

.film-room-workspace {
  display: grid;
  gap: 12px;
}

.film-room-editor-grid {
  display: grid;
  grid-template-columns: minmax(210px, 0.78fr) minmax(540px, 3fr) minmax(220px, 0.86fr);
  grid-template-rows: minmax(0, auto) auto;
  gap: 12px;
  align-items: stretch;
}

.film-room-panel {
  min-width: 0;
}

.film-room-panel h3 {
  margin: 0;
}

.film-source-browser {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  align-content: start;
  gap: 10px;
}

.film-viewer-card {
  grid-column: 2;
  grid-row: 1;
}

.film-marker-browser {
  grid-column: 3;
  grid-row: 1;
  position: static;
  align-content: start;
  min-height: 100%;
  max-height: 72vh;
  overflow: auto;
}

.film-marker-tools-panel {
  grid-column: 1;
  grid-row: 2;
}

.film-resolve-timeline {
  grid-column: 2;
  grid-row: 2;
}

.film-editing-tools-panel {
  grid-column: 3;
  grid-row: 2;
}

.film-room-board-layout {
  align-items: start;
}

.film-room-stage-stack {
  display: grid;
  gap: 12px;
}

.video-player-page {
  --film-room-accent: #f47b20;
  --film-room-accent-rgb: 244, 123, 32;
  --film-room-cut: 12px;
  --film-room-panel: #172438;
  --film-room-panel-deep: #101a29;
  --film-room-control: #132033;
  --film-room-control-hover: #1a2a42;
  --film-room-control-active: #20314a;
  --film-room-edge: rgba(136, 163, 204, 0.32);
  --film-room-edge-soft: rgba(104, 134, 181, 0.2);
  --film-room-seam: rgba(3, 8, 16, 0.84);
}

/* Film Room theme presets: local variants plus global app themes. */
.video-player-page.film-room-theme-navy,
.video-player-page[data-film-room-theme="navy"],
html.theme-navy-old .video-player-page {
  --film-room-panel: #172438;
  --film-room-panel-deep: #101a29;
  --film-room-control: #132033;
  --film-room-control-hover: #1a2a42;
  --film-room-control-active: #20314a;
  --film-room-edge: rgba(136, 163, 204, 0.32);
  --film-room-edge-soft: rgba(104, 134, 181, 0.2);
  --film-room-seam: rgba(3, 8, 16, 0.84);
}

.video-player-page.film-room-theme-charcoal,
.video-player-page[data-film-room-theme="charcoal"],
html.theme-charcoal .video-player-page {
  --film-room-accent: #c7b37a;
  --film-room-accent-rgb: 199, 179, 122;
  --film-room-panel: #242932;
  --film-room-panel-deep: #1d222b;
  --film-room-control: #20252d;
  --film-room-control-hover: #282e38;
  --film-room-control-active: #2c3038;
  --film-room-edge: rgba(133, 145, 166, 0.3);
  --film-room-edge-soft: rgba(116, 128, 150, 0.18);
  --film-room-seam: rgba(4, 6, 10, 0.78);
}

.video-player-page .film-source-browser,
.video-player-page .film-viewer-card,
.video-player-page .film-marker-browser,
.video-player-page .film-marker-tools-panel,
.video-player-page .film-resolve-timeline,
.video-player-page .film-editing-tools-panel {
  isolation: isolate;
  clip-path: polygon(
    var(--film-room-cut) 0,
    calc(100% - var(--film-room-cut)) 0,
    100% var(--film-room-cut),
    100% calc(100% - var(--film-room-cut)),
    calc(100% - var(--film-room-cut)) 100%,
    var(--film-room-cut) 100%,
    0 calc(100% - var(--film-room-cut)),
    0 var(--film-room-cut)
  );
  border: 1px solid var(--film-room-seam);
  background: var(--film-room-panel);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(0, 0, 0, 0.36);
}

.video-player-page .film-source-browser::before,
.video-player-page .film-viewer-card::before,
.video-player-page .film-marker-browser::before,
.video-player-page .film-marker-tools-panel::before,
.video-player-page .film-resolve-timeline::before,
.video-player-page .film-editing-tools-panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  pointer-events: none;
  clip-path: inherit;
  border: 1px solid var(--film-room-edge-soft);
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.video-player-page .film-source-browser::after,
.video-player-page .film-viewer-card::after,
.video-player-page .film-marker-browser::after,
.video-player-page .film-marker-tools-panel::after,
.video-player-page .film-resolve-timeline::after,
.video-player-page .film-editing-tools-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 18px, rgba(var(--film-room-accent-rgb), 0.72) 18px 78px, transparent 78px) top left / 50% 2px no-repeat,
    linear-gradient(270deg, transparent 18px, rgba(4, 6, 10, 0.68) 18px 78px, transparent 78px) bottom right / 50% 2px no-repeat;
}

.video-player-page .film-source-browser > *,
.video-player-page .film-viewer-card > *,
.video-player-page .film-marker-browser > *,
.video-player-page .film-marker-tools-panel > *,
.video-player-page .film-resolve-timeline > *,
.video-player-page .film-editing-tools-panel > * {
  position: relative;
  z-index: 2;
}

.video-player-page .film-viewer-card {
  padding: 20px;
}

.video-player-page .video-stage-frame {
  border-radius: 0;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  border: 1px solid var(--film-room-seam);
  background: #050b14;
  box-shadow:
    inset 0 0 0 1px rgba(91, 118, 158, 0.14),
    0 10px 22px rgba(0, 0, 0, 0.28);
}

.video-player-page .video-stage-frame::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 4;
  pointer-events: none;
  clip-path: inherit;
  border: 1px solid rgba(105, 132, 174, 0.2);
  box-shadow: inset 0 0 0 1px rgba(2, 6, 12, 0.72);
}

.video-player-page .video-stage,
.video-player-page .film-idle-screen {
  background: #02060d;
}

.video-player-page .film-idle-quote {
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  border: 1px solid rgba(111, 139, 183, 0.24);
  background: rgba(7, 15, 27, 0.74);
  box-shadow: inset 0 0 0 1px rgba(2, 6, 12, 0.62);
}

.video-player-page .video-transport {
  padding: 10px;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  border: 1px solid rgba(3, 8, 16, 0.76);
  background: var(--film-room-panel-deep);
  box-shadow:
    inset 0 0 0 1px rgba(99, 124, 161, 0.16),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.video-player-page .film-icon-button,
.video-player-page .video-stroke-button {
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  border: 1px solid rgba(3, 8, 16, 0.82);
  background: var(--film-room-control);
  box-shadow:
    inset 0 0 0 1px var(--film-room-edge-soft),
    inset 0 -1px 0 rgba(0, 0, 0, 0.44);
}

.video-player-page .film-icon-button:hover,
.video-player-page .video-stroke-button:hover {
  border-color: var(--film-room-edge);
  background: var(--film-room-control-hover);
}

.video-player-page .film-icon-button.active,
.video-player-page .video-stroke-button.active {
  border-color: rgba(var(--film-room-accent-rgb), 0.74);
  background: var(--film-room-control-active);
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -2px 0 var(--film-room-accent);
}

.film-source-tile,
.film-tool-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(38, 54, 78, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 23, 0.86);
}

.video-player-page .film-source-tile,
.video-player-page .film-tool-tile {
  position: relative;
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  border: 1px solid var(--film-room-seam);
  background: var(--film-room-control);
  box-shadow:
    inset 0 0 0 1px var(--film-room-edge-soft),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.video-player-page .film-source-tile::after,
.video-player-page .film-tool-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 2px solid transparent;
  pointer-events: none;
}

.film-tool-pictogram {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(100, 210, 255, 0.24);
  background: rgba(100, 210, 255, 0.1);
  color: #eef4ff;
  font-size: 1.25rem;
  font-weight: 950;
  line-height: 1;
}

.video-player-page .film-tool-pictogram {
  clip-path: polygon(8px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 7px 100%, 0 calc(100% - 7px), 0 8px);
  border-color: rgba(6, 8, 13, 0.84);
  background: var(--film-room-panel-deep);
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.18),
    0 1px 0 rgba(0, 0, 0, 0.58);
}

.film-tool-label {
  min-width: 0;
  font-weight: 900;
}

.film-add-media-tile .film-tool-pictogram {
  border-color: rgba(121, 145, 187, 0.28);
  background: rgba(92, 112, 145, 0.14);
  color: #eef4ff;
  font-size: 1.7rem;
}

.video-player-page .film-add-media-tile .film-tool-pictogram {
  border-color: rgba(var(--film-room-accent-rgb), 0.62);
  background: rgba(var(--film-room-accent-rgb), 0.12);
  color: #f1c3c8;
}

.film-media-picker {
  margin: 0;
}

.film-source-tile:hover,
.film-tool-tile:hover {
  border-color: rgba(100, 210, 255, 0.36);
}

.video-player-page .film-source-tile:hover,
.video-player-page .film-tool-tile:hover {
  border-color: var(--film-room-edge);
  background: var(--film-room-control-hover);
}

.video-player-page .film-source-tile:hover::after,
.video-player-page .film-tool-tile:hover::after {
  border-left-color: rgba(var(--film-room-accent-rgb), 0.56);
}

.video-player-page .film-tool-tile:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.film-imported-media-tile {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
  min-height: 58px;
  padding-right: 42px;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.film-imported-media-tile:active {
  cursor: grabbing;
}

.film-imported-media-tile.is-dragging {
  opacity: 0.64;
  border-color: rgba(255, 202, 40, 0.48);
}

.film-imported-media-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.film-imported-media-main strong,
.film-imported-media-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-media-delete-button {
  position: absolute;
  top: 6px;
  right: 7px;
  z-index: 2;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  color: rgba(245, 247, 255, 0.86);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 0;
  clip-path: polygon(7px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 6px 100%, 0 calc(100% - 6px), 0 7px);
  border: 1px solid rgba(4, 6, 10, 0.78);
  background: #20252d;
  box-shadow: inset 0 0 0 1px rgba(128, 139, 158, 0.14);
}

.film-media-delete-button:hover {
  color: #ffd9d9;
  border-color: rgba(249, 113, 113, 0.42);
  background: rgba(92, 27, 36, 0.62);
}

.film-source-url {
  display: grid;
  gap: 8px;
}

.film-source-list {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(121, 145, 187, 0.12);
}

.draw-action-menu-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.film-tool-tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.film-browser-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.film-idle-screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 32px;
  background: #02060d;
  isolation: isolate;
}

.film-idle-field {
  position: absolute;
  inset: 0;
  opacity: 0.52;
  background:
    linear-gradient(90deg, transparent 0 9%, rgba(255,255,255,0.14) 9.2% 9.45%, transparent 9.65% 18%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 34px),
    radial-gradient(circle at center, rgba(100, 210, 255, 0.14), transparent 42%),
    linear-gradient(180deg, #10261b, #0b151d 48%, #070d14);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  filter: grayscale(0.45) contrast(1.18);
  animation: filmFrameJitter 2.8s steps(2, end) infinite;
}

.film-idle-static,
.film-idle-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.film-idle-static {
  opacity: 0.26;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.5) 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 72%, rgba(255,255,255,0.32) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 28%, rgba(255,255,255,0.28) 0 1px, transparent 1.5px),
    repeating-radial-gradient(circle at center, rgba(255,255,255,0.08) 0 1px, transparent 1px 4px);
  background-size: 36px 36px, 44px 44px, 52px 52px, 18px 18px;
  animation: filmStatic 340ms steps(3, end) infinite;
}

.film-idle-scanlines {
  opacity: 0.34;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.1) 0 1px, transparent 1px 5px);
  animation: filmScan 1.8s linear infinite;
}

.film-idle-quote {
  position: relative;
  z-index: 1;
  width: min(760px, 88%);
  padding: 18px 22px;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(245, 247, 255, 0.18);
  background: rgba(5, 10, 18, 0.62);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

@keyframes filmStatic {
  0% { transform: translate(0, 0); opacity: 0.2; }
  33% { transform: translate(-2px, 1px); opacity: 0.32; }
  66% { transform: translate(2px, -1px); opacity: 0.24; }
  100% { transform: translate(0, 0); opacity: 0.28; }
}

@keyframes filmScan {
  from { transform: translateY(-8px); }
  to { transform: translateY(8px); }
}

@keyframes filmFrameJitter {
  0%, 100% { transform: scale(1); }
  48% { transform: scale(1.005) translateX(-1px); }
  52% { transform: scale(1.004) translateX(1px); }
}

.film-room-picker {
  margin-bottom: 12px;
}

.film-room-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.film-editing-panel,
.film-board-toolbar {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(48, 65, 92, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 23, 0.84);
}

.film-icon-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.film-icon-button {
  width: auto;
  min-width: 44px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  text-align: center;
  font-weight: 900;
}

.film-icon-button.active {
  border-color: rgba(100, 210, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.18), rgba(255, 255, 255, 0.02)),
    rgba(11, 20, 31, 0.94);
}

.video-player-page .film-editing-panel,
.video-player-page .film-board-toolbar {
  border-color: var(--film-room-seam);
  background: var(--film-room-panel);
  box-shadow:
    inset 0 0 0 1px rgba(99, 124, 161, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.film-timeline-rail {
  position: relative;
  height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    rgba(3, 8, 15, 0.9);
  background-size: 8.333% 100%;
  overflow: hidden;
}

.film-resolve-timeline .film-timeline-rail {
  height: 118px;
  cursor: crosshair;
}

.video-player-page .film-timeline-rail {
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  border: 1px solid rgba(3, 8, 16, 0.84);
  background:
    linear-gradient(90deg, rgba(86, 112, 151, 0.18) 1px, transparent 1px),
    #040a12;
  background-size: 10% 100%, 100% 100%;
  box-shadow:
    inset 0 0 0 1px rgba(99, 124, 161, 0.1),
    inset 0 18px 0 rgba(8, 18, 32, 0.35);
}

.film-timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.film-timeline-ruler {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.film-timeline-tick {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  color: rgba(173, 186, 214, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.video-player-page .film-timeline-tick {
  color: rgba(157, 177, 207, 0.58);
}

.film-clip-segment {
  position: absolute;
  top: 14px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid rgba(100, 210, 255, 0.28);
  background: rgba(100, 210, 255, 0.28);
  cursor: pointer;
}

.film-resolve-timeline .film-clip-segment {
  top: 48px;
  height: 34px;
}

.video-player-page .film-clip-segment {
  border-radius: 0;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  border: 1px solid rgba(93, 149, 184, 0.5);
  background: rgba(19, 68, 92, 0.76);
  box-shadow: inset 0 0 0 1px rgba(3, 8, 16, 0.42);
}

.film-clip-segment.active {
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(15, 22, 32, 0.94);
  border-color: rgba(255, 202, 40, 0.34);
  box-shadow: inset 0 -2px 0 rgba(255, 202, 40, 0.24);
}

.video-player-page .film-clip-segment.active {
  border-color: rgba(var(--film-room-accent-rgb), 0.76);
  background: rgba(var(--film-room-accent-rgb), 0.28);
}

.film-clip-segment.highlight {
  box-shadow: 0 0 0 1px rgba(255, 202, 40, 0.24), 0 0 18px rgba(255, 202, 40, 0.22);
}

.film-marker-pin {
  position: absolute;
  top: 5px;
  width: 24px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.7);
  background: var(--marker-color, #64d2ff);
  color: #06101d;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}

.video-player-page .film-marker-pin {
  border-color: rgba(3, 8, 16, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(241, 247, 255, 0.28),
    0 2px 0 rgba(0, 0, 0, 0.42);
}

.film-resolve-timeline .film-marker-pin {
  top: 86px;
}

.film-marker-pin.in {
  --marker-color: #7adf8a;
}

.film-marker-pin.out {
  --marker-color: #f97171;
}

.film-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-1px);
  background: #f5f7ff;
  box-shadow: 0 0 12px rgba(245, 247, 255, 0.38);
  pointer-events: none;
}

.video-player-page .film-playhead {
  background: #d9e4f6;
  box-shadow: 0 0 0 1px rgba(3, 8, 16, 0.66);
}

.film-range-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.film-range-tile {
  min-height: 42px;
  min-width: 92px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1;
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 9px 100%, 0 calc(100% - 9px), 0 10px);
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(10, 17, 28, 0.9);
}

.film-range-tile.ice {
  border-color: rgba(100, 210, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(10, 24, 34, 0.94);
}

.film-range-tile.gold {
  border-color: rgba(255, 202, 40, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 202, 40, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(28, 26, 15, 0.94);
}

.video-player-page .film-range-tile {
  border-color: rgba(3, 8, 16, 0.82);
  background: var(--film-room-control);
  box-shadow:
    inset 0 0 0 1px var(--film-room-edge-soft),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.video-player-page .film-range-tile.ice {
  border-color: rgba(69, 159, 198, 0.48);
  background: #113142;
}

.video-player-page .film-range-tile.gold {
  border-color: rgba(var(--film-room-accent-rgb), 0.58);
  background: rgba(var(--film-room-accent-rgb), 0.16);
}

.video-time-label {
  min-width: 54px;
  font-size: 0.94rem;
  font-weight: 700;
  color: rgba(234, 240, 255, 0.9);
  text-align: center;
}

.video-timeline {
  width: 100%;
  accent-color: #64d2ff;
}

.video-player-page .video-timeline {
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  accent-color: #5fc6ef;
}

.video-player-page .video-timeline::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgba(3, 8, 16, 0.84);
  background: #050b14;
  box-shadow: inset 0 0 0 1px rgba(95, 128, 177, 0.14);
}

.video-player-page .video-timeline::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  -webkit-appearance: none;
  border: 1px solid rgba(3, 8, 16, 0.86);
  border-radius: 0;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  background: #5fc6ef;
  box-shadow: inset 0 0 0 1px rgba(241, 247, 255, 0.24);
}

.video-player-page .video-timeline::-moz-range-track {
  height: 8px;
  border: 1px solid rgba(3, 8, 16, 0.84);
  background: #050b14;
  box-shadow: inset 0 0 0 1px rgba(95, 128, 177, 0.14);
}

.video-player-page .video-timeline::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(3, 8, 16, 0.86);
  border-radius: 0;
  background: #5fc6ef;
}

.video-toolbar {
  display: grid;
  gap: 12px;
}

.video-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
}

.video-tool-button,
.video-stroke-button {
  min-height: 44px;
}

.video-tool-button.active,
.video-stroke-button.active {
  border-color: rgba(100, 210, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(100, 210, 255, 0.16) inset;
}

.video-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(8, 12, 22, 0.25);
}

.video-color-swatch.active {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow:
    0 0 0 2px rgba(100, 210, 255, 0.34),
    inset 0 0 0 1px rgba(8, 12, 22, 0.2);
}

.video-stroke-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-side-panel {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 24px;
}

.film-clip-bin {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.film-clip-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  gap: 4px 10px;
  padding: 10px;
  text-align: left;
  color: var(--text);
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background: rgba(7, 12, 20, 0.72);
  cursor: pointer;
}

.video-player-page .film-clip-row {
  position: relative;
  min-height: 76px;
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  border: 1px solid var(--film-room-seam);
  background: var(--film-room-control);
  box-shadow:
    inset 0 0 0 1px var(--film-room-edge-soft),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.video-player-page .film-clip-row::after {
  content: "";
  position: absolute;
  inset: 0;
  border-left: 2px solid transparent;
  pointer-events: none;
}

.film-clip-row strong {
  grid-column: 1 / -1;
}

.film-clip-row.active {
  border-color: rgba(100, 210, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(100, 210, 255, 0.12);
}

.video-player-page .film-clip-row.active {
  border-color: rgba(var(--film-room-accent-rgb), 0.74);
  background: var(--film-room-control-active);
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 3px 0 0 var(--film-room-accent);
}

.video-player-page .film-clip-row.active::after {
  border-left-color: var(--film-room-accent);
}

.film-status {
  justify-self: end;
  color: var(--muted);
  font-weight: 800;
}

.film-status.highlight {
  color: #ffe8a4;
}

.film-inspector textarea {
  resize: vertical;
}

.film-link-modal .library-tile {
  width: 100%;
  min-height: 92px;
}

.film-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 8, 15, 0.62);
  backdrop-filter: blur(5px);
}

.film-link-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.film-play-picker {
  max-height: 420px;
}

.video-sidebar-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(180deg, rgba(67, 86, 117, 0.12), rgba(255, 255, 255, 0.02)),
    rgba(11, 18, 28, 0.84);
}

.video-play-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.video-play-tile {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.15);
  background:
    linear-gradient(180deg, rgba(36, 50, 73, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(10, 15, 24, 0.9);
}

.video-play-tile.active {
  border-color: rgba(100, 210, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(100, 210, 255, 0.16) inset;
}

.video-clip-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.error-text {
  color: #ffb9ac;
}

.live-step-row {
  display: grid;
  grid-template-columns: 96px minmax(0, auto) 96px;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.live-step-row-centered {
  width: 100%;
}

.live-key-player-final-row {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.live-key-player-final-center {
  width: 100%;
  display: flex;
  justify-content: center;
}

.live-step-rail {
  display: flex;
  align-items: center;
}

.live-step-rail.left {
  justify-content: flex-start;
}

.live-step-rail.right {
  justify-content: flex-end;
}

.impact-meter {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.impact-segment {
  min-width: 0;
  padding: 10px 0;
}

.impact-slider {
  width: 100%;
}

.yardage-slider {
  accent-color: var(--success);
}

.impact-scale {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.turnover-tile-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.turnover-tile {
  min-width: 132px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background: rgba(9, 15, 25, 0.74);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.turnover-tile:hover,
.turnover-tile.active {
  border-color: rgba(243, 111, 69, 0.38);
  background:
    linear-gradient(180deg, rgba(243, 111, 69, 0.18), rgba(255, 255, 255, 0.01)),
    rgba(24, 14, 16, 0.92);
  transform: translateY(-1px);
}

.live-square-tile {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 14px;
  overflow: visible;
}

.live-square-tile h3,
.live-square-tile p {
  width: 100%;
  text-align: center;
}

.live-square-tile h3 {
  margin: 0;
}

.formation-bank-feedback {
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(11, 18, 29, 0.36);
}

.formation-bank-feedback.success {
  color: #e8f1ff;
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.1);
}

.formation-bank-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 2px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(255, 255, 255, 0.035);
}

.formation-bank-status.active {
  color: #eef5ff;
  border-color: rgba(121, 145, 187, 0.34);
  background: rgba(92, 112, 145, 0.14);
}

.mapped-formation-tile-actions {
  width: 100%;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}

.mapped-formation-tile-actions .button {
  width: min(200px, 100%);
  justify-content: center;
}

html.theme-charcoal .library-tile.active {
  border-color: rgba(133, 145, 166, 0.4);
  background: #2b313b;
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.2),
    inset 4px 0 0 rgba(100, 210, 255, 0.22),
    0 18px 34px rgba(0, 0, 0, 0.36);
}

.live-mapping-grid.live-compact-mapping-grid {
  grid-template-columns: repeat(4, minmax(96px, 118px));
  gap: 10px;
}

.live-centered-mapping-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.live-centered-mapping-grid > .live-square-tile {
  width: min(220px, 100%);
}

.live-choice-strip {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.live-choice-strip > .live-square-tile {
  width: min(220px, 26vw);
  min-width: 180px;
}

.live-choice-skip {
  align-self: center;
}

.live-compact-square-tile {
  padding: 8px;
}

.live-compact-square-tile h3 {
  font-size: 0.82rem;
  line-height: 1.15;
}

.live-drive-summary-tile {
  aspect-ratio: auto;
  min-height: 340px;
  align-items: stretch;
  justify-content: space-between;
  text-align: left;
  cursor: default;
  overflow: visible;
}

.live-drive-summary-tile h3,
.live-drive-summary-tile p {
  width: auto;
  text-align: left;
}

.live-drive-summary-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.live-drive-summary-actions .button {
  width: 100%;
}

.pass-zone-board {
  position: relative;
  width: min(940px, 100%);
  min-height: 390px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(245, 247, 255, 0.18);
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(245, 247, 255, 0.26) 50%, transparent 50.3%),
    repeating-linear-gradient(0deg, transparent 0 9.5%, rgba(245, 247, 255, 0.18) 9.75% 10%),
    linear-gradient(180deg, rgba(62, 115, 92, 0.92), rgba(28, 84, 51, 0.96));
  box-shadow: inset 0 0 0 2px rgba(2, 7, 18, 0.26), inset 0 22px 46px rgba(4, 12, 24, 0.18);
}

.pass-zone-board::before,
.pass-zone-board::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(245, 247, 255, 0.12);
  pointer-events: none;
}

.pass-zone-board::before {
  left: 4%;
}

.pass-zone-board::after {
  right: 4%;
}

.pass-zone-field-line,
.pass-zone-band-label,
.pass-zone-los-label {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.pass-zone-field-line-los {
  left: 0;
  right: 0;
  top: 88%;
  border-top: 3px solid rgba(245, 247, 255, 0.58);
  box-shadow: 0 0 10px rgba(245, 247, 255, 0.2);
}

.pass-zone-field-line-left-hash,
.pass-zone-field-line-right-hash,
.pass-zone-field-line-numbers-left,
.pass-zone-field-line-numbers-right {
  top: 4%;
  bottom: 10%;
  border-left: 1px dashed rgba(245, 247, 255, 0.2);
}

.pass-zone-field-line-left-hash {
  left: 38%;
}

.pass-zone-field-line-right-hash {
  left: 62%;
}

.pass-zone-field-line-numbers-left {
  left: 18%;
}

.pass-zone-field-line-numbers-right {
  left: 82%;
}

.pass-zone-band-label {
  left: 12px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(8, 14, 24, 0.38);
  color: rgba(245, 247, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.pass-zone-band-deep {
  top: 10%;
}

.pass-zone-band-intermediate {
  top: 49%;
}

.pass-zone-band-short {
  top: 74%;
}

.pass-zone-los-label {
  right: 12px;
  top: calc(88% + 5px);
  color: rgba(245, 247, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 900;
}

.pass-zone-tile {
  --zone-stroke: #64d2ff;
  --zone-fill: rgba(100, 210, 255, 0.14);
  position: absolute;
  z-index: 2;
  min-height: 0;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--zone-stroke);
  border-radius: 8px;
  background: var(--zone-fill);
  color: #f5f7ff;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.08;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.54);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(245, 247, 255, 0.08), 0 8px 18px rgba(2, 7, 18, 0.22);
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.pass-zone-tile span {
  pointer-events: none;
}

.pass-zone-asset-deep-half,
.pass-zone-asset-deep-third {
  --zone-stroke: #64d2ff;
  --zone-fill: rgba(100, 210, 255, 0.14);
}

.pass-zone-asset-flat,
.pass-zone-asset-out,
.pass-zone-asset-hook-curl {
  --zone-stroke: #7adf8a;
  --zone-fill: rgba(122, 223, 138, 0.13);
}

.pass-zone-asset-middle {
  --zone-stroke: #ffca28;
  --zone-fill: rgba(255, 202, 40, 0.14);
}

.pass-zone-asset-sack {
  --zone-stroke: #f36f45;
  --zone-fill: rgba(92, 22, 24, 0.72);
}

.pass-zone-tile:hover,
.pass-zone-tile.active {
  border-color: rgba(255, 202, 40, 0.34);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.2), rgba(255, 255, 255, 0.02)),
    rgba(15, 22, 32, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(245, 247, 255, 0.14),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22),
    0 10px 24px rgba(2, 7, 18, 0.28);
  transform: translateY(-1px);
}

.mobile-capture-body .mobile-pass-zone-board {
  width: 100%;
  min-height: 430px;
  aspect-ratio: 9 / 12;
}

.mobile-capture-body .pass-zone-tile {
  padding: 4px;
  font-size: 0.62rem;
}

.mobile-capture-body .pass-zone-band-label,
.mobile-capture-body .pass-zone-los-label {
  font-size: 0.66rem;
}

.target-player-board {
  width: min(760px, 100%);
  display: grid;
  gap: 10px;
}

.target-player-field {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(245, 247, 255, 0.38) 50%, transparent 50.2%),
    repeating-linear-gradient(0deg, transparent 0 16.5%, rgba(245, 247, 255, 0.16) 16.8% 17%),
    linear-gradient(180deg, #183c28, #245936);
}

.target-player-marker {
  position: absolute;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid rgba(9, 17, 31, 0.9);
  background: #f7f5ef;
  color: #09111f;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.target-player-marker:hover,
.target-player-marker.active {
  border-color: #ffca28;
  box-shadow: 0 0 0 4px rgba(255, 202, 40, 0.22), 0 10px 18px rgba(0, 0, 0, 0.24);
}

.live-quick-save {
  justify-content: flex-end;
  margin-top: 14px;
}

.overlay-modal-host {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.overlay-modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 9, 16, 0.44);
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

.overlay-modal {
  width: min(960px, 100%);
  max-height: calc(100dvh - 48px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(62, 80, 108, 0.24), rgba(18, 27, 40, 0.16)),
    rgba(12, 19, 30, 0.97);
  border: 1px solid rgba(121, 145, 187, 0.15);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

.overlay-modal > * {
  flex-shrink: 0;
}

.overlay-modal-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overlay-modal-header h2 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.1;
}

.overlay-modal-header p {
  margin: 0;
}

.drive-summary-modal .session-tendency-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.drive-summary-modal {
  width: min(1120px, 100%);
}

.drive-summary-modal .report-action-bar {
  align-self: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
}

.drive-summary-modal .session-tendency-row .session-breakdown:only-child {
  grid-column: 1 / -1;
}

.endgame-report-modal {
  gap: 10px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 16px 18px 24px;
}

html.theme-charcoal .overlay-modal {
  overflow: auto;
}

.endgame-report-modal .overlay-modal-header {
  gap: 4px;
}

.endgame-report-modal .overlay-modal-header h2 {
  font-size: 1.34rem;
}

.endgame-report-modal .report-action-bar {
  margin-top: -2px;
}

.endgame-report-sequence {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.endgame-report-group-title {
  grid-column: 1 / -1;
  margin: 2px 0 -2px;
  color: var(--text);
}

.endgame-report-sequence .session-breakdown:first-child,
.endgame-report-group-title + .session-breakdown {
  grid-column: 1 / -1;
}

.endgame-report-sequence .session-breakdown {
  padding: 10px;
}

.endgame-report-sequence .session-breakdown-row {
  margin-top: 7px;
  padding-bottom: 7px;
}

.live-formation-preview-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 35;
  width: min(280px, calc(100vw - 48px));
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  pointer-events: none;
  transform: translateX(-50%);
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.22);
  background:
    linear-gradient(180deg, rgba(42, 55, 76, 0.98), rgba(12, 19, 30, 0.98));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.live-formation-preview-popover strong,
.live-formation-preview-popover span {
  width: 100%;
  text-align: left;
}

.live-formation-preview-card {
  width: 100%;
  height: 150px;
  border-radius: 8px;
}

.report-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background: rgba(255, 255, 255, 0.025);
}

.key-player-summary {
  width: min(100%, 490px);
  margin: 0;
}

.center-note {
  width: 100%;
  text-align: center;
  margin: 0;
}

.live-add-slot h3 {
  font-size: 2.4rem;
  margin: 0 0 8px;
}

.live-empty-slot {
  opacity: 0.78;
}

.home-tile {
  min-height: 176px;
  padding: 24px 24px 22px;
  border-radius: 0;
  clip-path: polygon(var(--tile-cut) 0, calc(100% - var(--tile-cut)) 0, 100% var(--tile-cut), 100% calc(100% - var(--tile-cut)), calc(100% - var(--tile-cut)) 100%, var(--tile-cut) 100%, 0 calc(100% - var(--tile-cut)), 0 var(--tile-cut));
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(11, 18, 29, 0.985);
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(0, 0, 0, 0.28);
}

.home-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(100, 210, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.1), rgba(255, 255, 255, 0.01)),
    rgba(13, 20, 31, 0.99);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(100, 210, 255, 0.18),
    0 18px 34px rgba(0, 0, 0, 0.34);
}

.home-tile.is-locked {
  opacity: 0.64;
  cursor: not-allowed;
}

.home-tile.is-locked:hover {
  transform: none;
  border-color: var(--border);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(11, 18, 29, 0.985);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(0, 0, 0, 0.28);
}

.home-tile-lock-note {
  width: fit-content;
  margin-top: 2px;
  padding: 5px 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background: rgba(var(--accent-rgb), 0.09);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 850;
}

.home-tile-top,
.home-tile-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-tile p {
  margin: 0;
  min-height: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tactical-tile-header {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.tile-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tile-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: rgba(229, 238, 255, 0.96);
  clip-path: polygon(12px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 10px 100%, 0 calc(100% - 10px), 0 12px);
  background:
    linear-gradient(180deg, rgba(109, 129, 167, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(12, 18, 28, 0.8);
  border: 1px solid rgba(146, 171, 215, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 20px rgba(0, 0, 0, 0.2);
}

.tile-icon svg {
  width: 40px;
  height: 40px;
  display: block;
}

.home-tile:hover .tile-icon,
.library-tile:hover .tile-icon,
.library-tile.active .tile-icon {
  color: #f3f8ff;
  border-color: rgba(108, 193, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(100, 210, 255, 0.14),
    0 12px 24px rgba(0, 0, 0, 0.24);
}

.home-tile-footer {
  flex-direction: row;
  flex-wrap: wrap;
  margin-top: 18px;
}

.library-tile {
  padding: 22px;
  border-radius: 0;
  clip-path: polygon(var(--tile-cut) 0, calc(100% - var(--tile-cut)) 0, 100% var(--tile-cut), 100% calc(100% - var(--tile-cut)), calc(100% - var(--tile-cut)) 100%, var(--tile-cut) 100%, 0 calc(100% - var(--tile-cut)), 0 var(--tile-cut));
  text-align: left;
  color: var(--text);
  cursor: pointer;
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(11, 18, 29, 0.985);
  border: 1px solid rgba(121, 145, 187, 0.12);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(0, 0, 0, 0.28);
}

.library-tile:hover,
.library-tile.active {
  transform: translateY(-3px);
  border-color: rgba(100, 210, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.1), rgba(255, 255, 255, 0.01)),
    rgba(13, 20, 31, 0.99);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(100, 210, 255, 0.24),
    0 0 22px rgba(100, 210, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.36);
}

.library-tile p {
  margin: 0;
  min-height: 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-hero::before,
.hero-panel::before,
.home-tile::before,
.library-tile::before,
.tag-choice-tile::before,
.back-button::before,
.rail-reset::before {
  pointer-events: none;
}

.home-hero::after,
.hero-panel::after {
  content: none;
}

.library-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.library-asset-tile {
  position: relative;
  min-height: 218px;
  padding: 16px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.13), rgba(255, 255, 255, 0.012)),
    rgba(12, 20, 32, 0.92);
  border: 1px solid rgba(121, 145, 187, 0.12);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.library-asset-tile:hover {
  border-color: rgba(100, 210, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(12, 20, 32, 0.96);
}

.library-asset-header {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.library-asset-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.library-asset-copy h4 {
  margin: 0;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.library-asset-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.library-card-tags,
.library-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.library-card-actions {
  margin-top: auto;
}

.library-play-groups {
  display: grid;
  gap: 18px;
}

.library-play-group {
  padding: 18px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.11), rgba(255, 255, 255, 0.01)),
    rgba(10, 18, 29, 0.76);
  border: 1px solid rgba(121, 145, 187, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.library-play-group-header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.library-play-group-header h4,
.library-play-group-header p {
  margin: 0;
}

.library-play-group-header h4 {
  font-size: 1.05rem;
}

.depth-inline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.depth-lineup-tile {
  min-height: 0;
  padding: 16px;
  gap: 10px;
}

.depth-lineup-tile.is-active {
  border-color: rgba(100, 210, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(100, 210, 255, 0.14),
    0 18px 34px rgba(0, 0, 0, 0.34);
}
.depth-lineup-tile h3 {
  margin: 0;
}

.library-inline-create {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.7);
  border: 1px solid rgba(121, 145, 187, 0.09);
}

.organization-overview {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) auto minmax(220px, 0.8fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(12, 20, 32, 0.74);
  border: 1px solid rgba(121, 145, 187, 0.1);
}

.organization-summary-card,
.organization-member-card {
  padding: 14px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(9, 15, 24, 0.86);
  border: 1px solid rgba(100, 210, 255, 0.12);
}

.organization-summary-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.organization-summary-card p {
  margin: 0;
}

.organization-summary-action {
  align-self: flex-start;
  margin-top: 4px;
}

.organization-plan-grid,
.organization-member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 240px));
  gap: 14px;
}

.organization-plan-tile {
  min-height: 170px;
}

.organization-member-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organization-member-panel.active-management-panel {
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(var(--accent-rgb), 0.18) inset;
}

.organization-invite-row {
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) minmax(140px, 0.6fr) auto;
  padding-inline: 0;
}

.organization-member-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.organization-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 36px);
}

.organization-hero .home-greeting {
  max-width: 560px;
}

.organization-api-input {
  width: min(280px, 100%);
  border-radius: 7px;
  border: 1px solid rgba(120, 145, 187, 0.13);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(14, 21, 33, 0.92);
  color: var(--text);
  padding: 10px 12px;
}

.organization-connection-pill {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--success);
  border: 1px solid rgba(122, 223, 138, 0.18);
  background: rgba(8, 35, 20, 0.44);
  font-size: 0.86rem;
  white-space: nowrap;
}

.organization-auth-card {
  max-width: 620px;
}

.auth-gate-host {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.auth-gate-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 9, 11, 0.72);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.auth-gate-card {
  width: min(620px, 100%);
}

.auth-gate-tabs {
  margin-bottom: 4px;
}

.auth-gate-status {
  min-height: 20px;
}

.auth-gate-status.error {
  color: var(--danger);
}

.auth-gate-license {
  display: grid;
  gap: 14px;
}

.organization-dashboard,
.organization-form,
.organization-member-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organization-account-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.organization-tabs {
  justify-content: flex-start;
}

.organization-switcher {
  max-width: 460px;
}

.organization-setup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.organization-setup-grid {
  display: grid;
  gap: 6px;
}

.organization-plan-controls {
  display: grid;
  grid-template-columns: minmax(240px, 360px) auto;
  gap: 12px;
  align-items: end;
}

.organization-plan-actions {
  justify-content: flex-start;
  align-items: end;
  gap: 8px;
}

.organization-profile-sync {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}

.organization-invite-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) minmax(150px, 220px) auto;
  gap: 12px;
  align-items: end;
}

.organization-invite-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.organization-invite-link input {
  width: 100%;
  border-radius: 7px;
  border: 1px solid rgba(100, 210, 255, 0.18);
  background: rgba(9, 15, 24, 0.86);
  color: var(--text);
  padding: 11px 12px;
}

.organization-members-table {
  margin-top: 4px;
}

.organization-role-editor {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(150px, 220px) auto;
  gap: 8px;
  align-items: center;
}

.organization-role-editor input,
.organization-role-editor select {
  width: 100%;
}

.organization-invitations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.organization-asset-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.organization-asset-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  border-radius: 0;
  clip-path: polygon(var(--panel-cut) 0, calc(100% - var(--panel-cut)) 0, 100% var(--panel-cut), 100% calc(100% - var(--panel-cut)), calc(100% - var(--panel-cut)) 100%, var(--panel-cut) 100%, 0 calc(100% - var(--panel-cut)), 0 var(--panel-cut));
  border: 1px solid rgba(4, 6, 10, 0.82);
  background: var(--panel);
  box-shadow:
    inset 0 0 0 1px var(--edge-faint),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.organization-asset-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 18px, rgba(var(--accent-rgb), 0.68) 18px 78px, transparent 78px) top left / 50% 2px no-repeat,
    linear-gradient(270deg, transparent 18px, rgba(4, 6, 10, 0.72) 18px 78px, transparent 78px) bottom right / 50% 2px no-repeat;
}

.organization-asset-section-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.organization-asset-section-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.organization-asset-section-copy h4,
.organization-asset-section-copy p {
  margin: 0;
}

.organization-asset-section-copy h4 {
  color: #f3f8ff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.organization-asset-section-actions {
  justify-content: flex-end;
}

.organization-asset-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.organization-asset-tile {
  position: relative;
  min-height: 186px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0;
  clip-path: polygon(var(--tile-cut) 0, calc(100% - var(--tile-cut)) 0, 100% var(--tile-cut), 100% calc(100% - var(--tile-cut)), calc(100% - var(--tile-cut)) 100%, var(--tile-cut) 100%, 0 calc(100% - var(--tile-cut)), 0 var(--tile-cut));
  border: 1px solid rgba(121, 145, 187, 0.12);
  background: var(--panel-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 30px rgba(0, 0, 0, 0.28);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.organization-asset-tile::before {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: -1;
  border: 1px solid var(--edge-faint);
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

.organization-asset-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 18px, rgba(var(--accent-rgb), 0.52) 18px 78px, transparent 78px) top left / 55% 2px no-repeat,
    linear-gradient(270deg, transparent 18px, rgba(4, 6, 10, 0.72) 18px 78px, transparent 78px) bottom right / 55% 2px no-repeat;
}

.organization-asset-tile.shared {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: var(--panel-strong);
}

.organization-asset-tile:hover {
  transform: translateY(-2px);
  border-color: var(--border);
  background: var(--panel-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 1px rgba(var(--accent-rgb), 0.14),
    0 18px 34px rgba(0, 0, 0, 0.36);
}

.organization-asset-tile-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.organization-asset-tile-header input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  accent-color: var(--success);
}

.organization-asset-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.organization-asset-title strong {
  color: #f3f8ff;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 1.34rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
}

.organization-asset-title span {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.organization-asset-title strong,
.organization-asset-title span,
.organization-asset-description {
  overflow-wrap: anywhere;
}

.organization-asset-description {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.organization-asset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.organization-asset-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background:
    linear-gradient(180deg, rgba(116, 128, 150, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(11, 13, 17, 0.44);
}

.organization-asset-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-top: auto;
}

.organization-asset-controls .input-row {
  min-width: 150px;
  margin: 0;
}

.organization-contextual-assets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(180deg, rgba(116, 128, 150, 0.07), rgba(255, 255, 255, 0.01)),
    rgba(11, 13, 17, 0.42);
}

.organization-contextual-assets ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.organization-table-actions {
  justify-content: flex-start;
  gap: 8px;
}

.organization-table-actions .button {
  min-width: 0;
}

.organization-error,
.organization-success,
.organization-status {
  margin: 0;
}

.organization-error {
  color: #ffd2c6;
}

.organization-success {
  color: var(--success);
}

.organization-status-spacer {
  display: none;
}

@media (max-width: 900px) {
  .organization-account-bar,
  .organization-plan-controls,
  .organization-setup-card,
  .organization-invite-row,
  .organization-invite-link,
  .organization-asset-section-header,
  .organization-role-editor {
    grid-template-columns: 1fr;
  }

  .organization-api-input,
  .organization-hero .button {
    width: 100%;
  }
}

.library-formation-preview,
.library-path-preview,
.library-coverage-preview,
.library-blitz-preview,
.library-play-preview {
  position: relative;
  width: 96px;
  height: 60px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(100, 210, 255, 0.08), transparent 62%),
    rgba(7, 13, 22, 0.82);
  border: 1px solid rgba(121, 145, 187, 0.1);
  overflow: hidden;
}

.library-play-preview {
  width: 118px;
  height: 72px;
}

.library-formation-preview {
  width: 118px;
  height: 72px;
}

.library-formation-preview,
.library-path-preview,
.library-coverage-preview,
.library-blitz-preview,
.library-play-preview {
  flex: 0 0 auto;
}

.library-formation-preview svg,
.library-path-preview svg,
.library-coverage-preview svg,
.library-blitz-preview svg,
.library-play-preview svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.library-editor-card {
  max-width: min(1180px, 100%);
}

.library-asset-editor {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.library-asset-editor-preview {
  aspect-ratio: 1;
  width: min(360px, 100%);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(100, 210, 255, 0.18);
  background:
    radial-gradient(circle at 50% 30%, rgba(100, 210, 255, 0.1), transparent 42%),
    rgba(7, 13, 22, 0.88);
  box-shadow: var(--shadow);
}

.library-asset-editor-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.formation-editor-preview {
  display: grid;
  place-items: center;
  padding: 18px;
}

.formation-editor-preview .library-formation-preview {
  width: min(320px, 100%);
  height: auto;
  aspect-ratio: 118 / 72;
}

.library-asset-editor-form {
  display: grid;
  gap: 12px;
}

.library-asset-editor-form .color-input {
  min-height: 44px;
  padding: 5px;
}

.library-asset-editor-form .checkbox-input {
  width: auto;
  min-width: 22px;
  min-height: 22px;
  justify-self: start;
}

.library-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(10, 18, 29, 0.72);
}

.library-drill-preview {
  width: 118px;
  height: 72px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  gap: 0;
  border-radius: 10px;
  border: 1px solid rgba(100, 210, 255, 0.16);
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 202, 40, 0.12), transparent 46%),
    linear-gradient(135deg, rgba(100, 210, 255, 0.08), rgba(122, 223, 138, 0.06)),
    rgba(7, 13, 22, 0.84);
}

.library-drill-preview .eyebrow {
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.54rem;
  letter-spacing: 0.13em;
}

.library-drill-preview strong {
  font-size: 1.35rem;
  line-height: 1;
}

.library-point-list {
  display: grid;
  gap: 8px;
}

.library-point-row {
  display: grid;
  grid-template-columns: 42px repeat(2, minmax(72px, 1fr)) auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  background: rgba(7, 13, 22, 0.5);
  border: 1px solid rgba(121, 145, 187, 0.09);
}

.playbook-tile-grid {
  align-items: stretch;
}

.playbook-library-stack {
  display: grid;
  gap: 28px;
}

.playbook-library-section {
  display: grid;
  gap: 14px;
}

.playbook-library-heading {
  display: grid;
  gap: 4px;
}

.playbook-library-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1;
}

.playbook-container-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px));
  justify-content: start;
  align-items: stretch;
}

.playbook-container-tile {
  min-height: 278px;
}

.playbook-container-tile .team-container-metric strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playbook-phase-code {
  border-left-color: rgba(255, 202, 40, 0.4);
  background: rgba(255, 202, 40, 0.07);
}

.playbook-empty-note {
  max-width: 520px;
  align-self: center;
}

.playbook-create-tile {
  min-height: 278px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.playbook-create-tile .playbook-plus {
  margin-top: auto;
}

.playbook-create-card {
  width: min(560px, 100%);
}

.playbook-create-form {
  display: grid;
  gap: 14px;
  max-width: 480px;
}

.playbook-create-actions {
  justify-content: flex-start;
  margin-top: 4px;
}

.playbook-create-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(121, 145, 187, 0.34);
}

.playbook-create-tile h4,
.playbook-create-tile p {
  margin: 0;
}

.playbook-create-tile p {
  color: var(--muted);
  line-height: 1.35;
}

.playbook-plus {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 2.2rem;
  line-height: 1;
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.18), rgba(255, 255, 255, 0.02)),
    rgba(9, 16, 26, 0.82);
  border: 1px solid rgba(121, 145, 187, 0.24);
}

.playbook-tile-header {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}

.playbook-count-badge {
  min-height: 72px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(7, 13, 22, 0.82);
  border: 1px solid rgba(100, 210, 255, 0.14);
}

.playbook-count-badge strong {
  font-size: 1.8rem;
  line-height: 1;
  font-family: Impact, "Arial Black", sans-serif;
}

.playbook-count-badge span {
  color: var(--muted);
  font-size: 0.8rem;
}

.playbook-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) repeat(2, auto);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.playbook-entry-grid {
  display: grid;
  gap: 10px;
}

.playbook-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.86);
  border: 1px solid rgba(121, 145, 187, 0.09);
}

.playbook-board-card {
  overflow: hidden;
}

.playbook-play-grid,
.playbook-library-browser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  justify-content: start;
  align-items: stretch;
  gap: 14px;
}

.playbook-play-tile {
  width: 220px;
  min-height: 190px;
  padding: 16px;
  border-radius: 12px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.13), rgba(255, 255, 255, 0.012)),
    rgba(12, 20, 32, 0.92);
  border: 1px solid rgba(121, 145, 187, 0.12);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

button.playbook-play-tile {
  cursor: pointer;
}

.playbook-play-tile:hover,
.library-play-choice:hover {
  border-color: rgba(100, 210, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(12, 20, 32, 0.96);
}

.add-play-tile {
  align-items: flex-start;
  justify-content: center;
  border-color: rgba(255, 202, 40, 0.18);
}

.playbook-browser-backdrop {
  position: fixed;
  z-index: 70;
}

.draw-modal.playbook-browser-modal {
  width: min(920px, calc(100vw - 56px));
  max-height: min(740px, calc(100vh - 72px));
  overflow: auto;
  position: relative;
}

.playbook-browser-modal .draw-modal-header {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 34px;
}

.playbook-browser-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(9, 15, 24, 0.94);
  border-color: rgba(121, 145, 187, 0.2);
  color: var(--text);
}

.playbook-browser-grid {
  display: grid;
  grid-template-columns: repeat(2, 220px);
  justify-content: center;
  gap: 14px;
}

.playbook-browser-choice {
  min-height: 180px;
}

.draw-modal.playbook-export-modal {
  width: min(1040px, calc(100vw - 48px));
  min-height: 0;
  max-height: min(88dvh, 760px);
  aspect-ratio: auto;
  overflow: auto;
}

.playbook-export-controls {
  display: grid;
  gap: 12px;
}

.playbook-export-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.playbook-export-type-row {
  display: grid;
  grid-template-columns: repeat(2, 180px);
  gap: 14px;
  justify-content: center;
}

.playbook-export-format-row,
.playbook-export-orientation-row,
.draw-export-choice-row {
  grid-template-columns: repeat(2, minmax(180px, 220px));
}

.playbook-mini-choice {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
}

.playbook-export-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

.draw-modal.draw-export-modal {
  width: min(720px, calc(100vw - 48px));
}

.tag-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-choice-tile {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 0;
  clip-path: polygon(var(--tag-cut) 0, calc(100% - var(--tag-cut)) 0, 100% var(--tag-cut), 100% calc(100% - var(--tag-cut)), calc(100% - var(--tag-cut)) 100%, var(--tag-cut) 100%, 0 calc(100% - var(--tag-cut)), 0 var(--tag-cut));
  text-transform: capitalize;
  color: rgba(238, 244, 255, 0.96);
  border-color: rgba(121, 145, 187, 0.24);
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(9, 15, 24, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 18px rgba(0, 0, 0, 0.18);
}

.tag-choice-tile::before {
  content: none;
}

.tag-choice-tile.active {
  border-color: rgba(100, 210, 255, 0.52);
  color: #f4fbff;
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(11, 20, 31, 0.94);
  box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.16),
    0 12px 26px rgba(100, 210, 255, 0.12);
}

.tag-choice-tile.active::before {
  content: none;
}

.tag-choice-tile.team-tag {
  border-color: rgba(255, 92, 92, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 92, 92, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(30, 12, 18, 0.82);
  color: #ffeceb;
}

.tag-choice-tile.team-tag.active {
  border-color: rgba(255, 92, 92, 0.68);
  color: #fff5f3;
  box-shadow: 0 0 0 1px rgba(255, 92, 92, 0.2), 0 12px 26px rgba(255, 92, 92, 0.12);
}

.tag-choice-tile.team-tag::before,
.tag-choice-tile.team-tag.active::before {
  content: none;
}

.tag-choice-tile.new-tag {
  border-style: dashed;
  color: var(--accent-2);
  border-color: rgba(100, 210, 255, 0.3);
}

.calendar-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
}

.calendar-month-title {
  min-width: 190px;
  text-align: center;
  font-size: 1.05rem;
}

.calendar-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.8fr);
  align-items: start;
}

.calendar-board-card,
.calendar-detail-card {
  min-width: 0;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-day-head {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-day {
  min-height: 122px;
  padding: 10px;
  border-radius: 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  border: 1px solid rgba(121, 145, 187, 0.11);
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(9, 15, 24, 0.78);
  transition: 150ms ease;
}

.calendar-day:hover {
  border-color: rgba(100, 210, 255, 0.28);
  transform: translateY(-1px);
}

.calendar-day.muted-month {
  opacity: 0.46;
}

.calendar-day-number {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.calendar-event-chip {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background: rgba(100, 210, 255, 0.12);
}

.calendar-event-chip.game {
  border-color: rgba(243, 111, 69, 0.25);
  background: rgba(243, 111, 69, 0.13);
}

.calendar-event-chip.practice {
  border-color: rgba(122, 223, 138, 0.22);
  background: rgba(122, 223, 138, 0.12);
}

.calendar-list,
.calendar-summary-grid,
.practice-block-list,
.practice-drill-grid {
  display: grid;
  gap: 12px;
}

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

.calendar-summary-card {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(8, 15, 25, 0.72);
}

.calendar-summary-card span {
  color: var(--muted);
}

.calendar-summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
}

.compact-event-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.calendar-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calendar-detail-pair {
  padding: 12px;
  border-radius: 9px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background: rgba(8, 15, 25, 0.68);
}

.calendar-detail-pair span,
.calendar-detail-pair strong {
  display: block;
}

.calendar-detail-pair strong {
  margin-top: 5px;
}

.calendar-subpanel,
.practice-block-card {
  padding: 14px;
  border-radius: 11px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.1), rgba(255, 255, 255, 0.01)),
    rgba(8, 15, 25, 0.72);
}

.practice-block-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.practice-drill-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.practice-drill-tile {
  min-height: 176px;
}

.calendar-modal {
  width: min(1040px, calc(100vw - 56px));
}

.calendar-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.weekday-chip-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-drill-browser-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: start;
}

.calendar-drill-choice {
  min-height: 168px;
}

.playbook-workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.playbook-workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(100, 210, 255, 0.1), transparent 28%),
    linear-gradient(180deg, rgba(45, 56, 77, 0.96), rgba(17, 26, 39, 0.98));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.app-shell.has-back-rail .playbook-workspace > .playbook-workspace-header {
  padding-left: calc(26px + var(--back-rail-size) + var(--back-rail-gap));
}

.playbook-workspace-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  font-family: Impact, "Arial Black", sans-serif;
  letter-spacing: 0.03em;
}

.playbook-phase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 260px));
  gap: 16px;
  justify-content: center;
}

.playbook-phase-tile {
  min-height: 190px;
}

.playbook-section-layer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.phase-back-button {
  align-self: flex-start;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(199, 179, 122, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(56, 61, 71, 0.98), rgba(32, 36, 43, 0.98));
}

body.booting #app {
  visibility: hidden;
}

.splash-screen.is-exiting {
  animation: splashFadeOut 650ms ease forwards;
}

.splash-mark {
  text-align: center;
  padding: 42px 54px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(52, 58, 69, 0.86), rgba(28, 32, 39, 0.92)),
    rgba(36, 41, 50, 0.76);
  border: 1px solid rgba(133, 145, 166, 0.24);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(241, 244, 251, 0.05);
  animation: splashLift 1300ms ease;
}

.splash-mark h1 {
  font-size: clamp(1.6rem, 4.2vw, 3rem);
  margin-bottom: 8px;
  color: #f1f4fb;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.splash-logo {
  display: block;
  width: min(58vw, 640px);
  max-height: 180px;
  object-fit: contain;
  margin: 0 auto 18px;
  filter:
    drop-shadow(0 18px 26px rgba(0, 0, 0, 0.48))
    drop-shadow(0 0 18px rgba(199, 179, 122, 0.12));
}

.splash-mark .brand-kicker {
  display: block;
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0.1em;
  font-family: Impact, "Arial Black", sans-serif;
  color: var(--text);
  margin-bottom: 16px;
}

.splash-mark p {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.splash-subline {
  display: inline-block;
  margin-top: 16px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-capture-body {
  min-height: 100vh;
}

.mobile-capture-body::before {
  opacity: 0.42;
}

.mobile-adversaries-app {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.mobile-capture-shell {
  display: grid;
  gap: 14px;
}

.mobile-capture-hero {
  display: grid;
  gap: 14px;
}

.adversaries-hero-actions {
  margin-top: 16px;
}

.mobile-session-tile {
  display: grid;
  gap: 8px;
}

.mobile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mobile-stat-card {
  min-width: 0;
}

.mobile-drive-board {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(26, 38, 58, 0.24), rgba(255, 255, 255, 0.01)),
    rgba(3, 8, 15, 0.7);
}

.mobile-drive-board-header,
.mobile-drive-list {
  display: grid;
  gap: 10px;
}

.mobile-drive-board-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.mobile-drive-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(180deg, rgba(48, 65, 92, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 23, 0.84);
}

.mobile-drive-card.is-closed {
  border-color: rgba(255, 202, 40, 0.18);
}

.mobile-drive-card.is-active {
  border-color: rgba(100, 210, 255, 0.28);
}

.mobile-drive-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.mobile-drive-header h3 {
  margin: 0;
}

.mobile-drive-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.mobile-play-tile {
  position: relative;
  min-height: 0;
  padding-top: 72px;
}

.mobile-play-down-badge {
  cursor: default;
}

.mobile-drive-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 202, 40, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 202, 40, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 23, 0.72);
}

.mobile-drive-summary p {
  margin: 0;
  color: var(--muted);
}

.mobile-run-pass-breakdown {
  display: grid;
  gap: 8px;
}

.mobile-run-pass-card {
  grid-column: 1 / -1;
}

.mobile-run-pass-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding-bottom: 8px;
  overflow: hidden;
}

.mobile-run-pass-row span {
  color: var(--muted);
}

.mobile-run-pass-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--success));
}

.mobile-wizard-summary {
  margin-bottom: 4px;
}

.mobile-yards-step {
  align-items: center;
  text-align: center;
}

.mobile-yards-value {
  font-size: 2rem;
}

.mobile-yards-rail {
  display: grid;
  grid-template-rows: auto minmax(220px, 34vh) auto;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 800;
}

.mobile-yard-slider {
  width: 220px;
  height: 48px;
  transform: rotate(-90deg);
  accent-color: var(--accent);
}

.hero-panel {
  border-radius: 0;
  clip-path: polygon(var(--hero-cut) 0, calc(100% - var(--hero-cut)) 0, 100% var(--hero-cut), 100% calc(100% - var(--hero-cut)), calc(100% - var(--hero-cut)) 100%, var(--hero-cut) 100%, 0 calc(100% - var(--hero-cut)), 0 var(--hero-cut));
  padding: 30px 32px;
  background-image:
    linear-gradient(90deg, rgba(100, 210, 255, 0.025), transparent 42%),
    radial-gradient(circle at 80% 24%, rgba(100, 210, 255, 0.055), transparent 24%),
    linear-gradient(180deg, rgba(32, 42, 58, 0.985), rgba(13, 20, 31, 0.985));
  background-repeat: no-repeat;
  background-position:
    left center,
    top right,
    center;
  background-size:
    auto,
    auto,
    auto;
}

.app-shell.has-back-rail .page-shell > .hero-panel,
.app-shell.has-back-rail .organization-page > .organization-hero {
  padding-left: calc(32px + var(--back-rail-size) + var(--back-rail-gap));
}

.content-grid {
  display: grid;
  gap: 18px;
}

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

.content-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 20px;
}

.tactical-card-header {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.card-header-copy {
  min-width: 0;
}

.tactical-card-header .tile-icon {
  width: 54px;
  height: 54px;
  clip-path: polygon(9px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 8px 100%, 0 calc(100% - 8px), 0 9px);
  color: rgba(229, 238, 255, 0.88);
}

.tactical-card-header .tile-icon svg {
  width: 28px;
  height: 28px;
}

.card-header h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.input,
.input-row input,
.input-row textarea,
.input-row select,
.title-input {
  width: 100%;
  border-radius: 7px;
  border: 1px solid rgba(120, 145, 187, 0.13);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.14), rgba(255, 255, 255, 0.01)),
    rgba(14, 21, 33, 0.92);
  color: var(--text);
  padding: 11px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24);
}

.title-input {
  min-width: 220px;
  font-size: 1rem;
  font-weight: 700;
  padding: 9px 12px;
}

.draw-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: calc(100vh - 36px);
}

.toolbar {
  border-radius: var(--radius-xl);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.draw-toolbar {
  position: sticky;
  top: 18px;
  z-index: 5;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.draw-toolbar .draw-toolbar-title {
  flex: 0 1 600px;
  min-width: 0;
  align-self: center;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
}

.draw-toolbar-title-stack {
  min-width: 0;
  width: min(540px, 100%);
  display: grid;
  align-content: center;
  gap: 7px;
}

.draw-toolbar-title-stack .title-input {
  min-height: 38px;
  min-width: 0;
  padding: 8px 14px;
  font-size: 0.96rem;
  border-color: rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.18), rgba(255, 255, 255, 0.015)),
    rgba(12, 19, 30, 0.94);
}

.draw-toolbar-shortcuts {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.draw-toolbar-shortcut {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.draw-toolbar-meta {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.draw-mode-switch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.draw-mode-button {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  color: rgba(224, 231, 245, 0.66);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.draw-mode-button:hover,
.draw-mode-button.active {
  border-color: rgba(133, 145, 166, 0.24);
  background: #1d222b;
  color: var(--text);
}

.draw-mode-button.active {
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.14),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22);
}

.draw-toolbar-meta::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(173, 186, 218, 0.58);
  border-bottom: 2px solid rgba(173, 186, 218, 0.58);
  pointer-events: none;
  transform: translateY(-62%) rotate(45deg);
}

.draw-toolbar-play-side-select {
  appearance: none;
  width: 100%;
  min-height: 38px;
  padding: 8px 42px 8px 14px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid rgba(133, 145, 166, 0.24);
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 9px 100%, 0 calc(100% - 9px), 0 10px);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.draw-toolbar-play-side-select:focus {
  outline: none;
  border-color: rgba(133, 145, 166, 0.24);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.14),
    inset 0 -2px 0 rgba(255, 202, 40, 0.18);
}

.draw-toolbar-play-side-select option {
  background: #1d222b;
  color: var(--text);
}

.draw-board-tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 8px;
}

.draw-board-tool {
  min-height: 58px;
  padding: 8px 6px;
  display: grid;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(12, 19, 30, 0.78);
  color: var(--muted);
}

.draw-board-tool span {
  font-size: 0.74rem;
  font-weight: 900;
}

.draw-board-tool strong {
  font-size: 0.68rem;
  line-height: 1;
}

.draw-board-tool.active {
  border-color: rgba(100, 210, 255, 0.46);
  background: rgba(100, 210, 255, 0.14);
  color: var(--text);
}

.draw-inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.draw-inspector-tab,
.draw-animation-duration {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(12, 19, 30, 0.72);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.draw-inspector-tab.active,
.draw-animation-duration.active {
  border-color: rgba(255, 202, 40, 0.28);
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(15, 22, 32, 0.94);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22);
}

.draw-animation-inspector {
  display: grid;
  gap: 10px;
}

.draw-data-inspector {
  display: grid;
  gap: 10px;
}

.draw-data-value {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(12, 19, 30, 0.72);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.draw-metadata-dump {
  display: grid;
  gap: 12px;
}

.draw-metadata-section {
  display: grid;
  gap: 8px;
}

.draw-metadata-section h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.draw-metadata-list {
  display: grid;
  gap: 6px;
}

.draw-metadata-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.95fr) minmax(0, 1.35fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background: rgba(12, 19, 30, 0.52);
}

.draw-metadata-row span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.draw-metadata-row strong {
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.draw-metadata-json {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(8, 13, 22, 0.86);
  color: var(--text);
  padding: 10px;
  font: 0.72rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.draw-animation-duration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.draw-animation-progress {
  position: relative;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 7px 10px;
  border: 1px solid rgba(121, 145, 187, 0.16);
  background: rgba(12, 19, 30, 0.76);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
}

.draw-animation-progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--animation-progress, 0%);
  background: linear-gradient(90deg, rgba(100, 210, 255, 0.34), rgba(255, 202, 40, 0.28));
}

.draw-animation-progress span {
  position: relative;
  z-index: 1;
}

.draw-checkbox-control {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.draw-checkbox-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-2);
}

.draw-toolbar .draw-toolbar-actions {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: repeat(2, 53px);
  grid-auto-flow: column;
  grid-auto-columns: 65px;
  align-self: center;
  align-content: center;
  justify-content: end;
  gap: 8px 10px;
}

.draw-toolbar-actions .toolbar-icon {
  width: 65px;
  min-width: 65px;
  height: 53px;
  padding: 5px 6px;
  gap: 3px;
}

.draw-toolbar-actions .toolbar-icon-glyph {
  font-size: 1.12rem;
}

.draw-toolbar-actions .toolbar-icon-label {
  font-size: 0.6rem;
}

.draw-action-tiles {
  position: absolute;
  top: 77px;
  left: 42px;
  z-index: 7;
  width: max-content;
  max-width: min(340px, calc(100% - 84px));
  transform: scale(var(--draw-menu-scale, 1));
  transform-origin: top left;
  overflow: visible;
  isolation: isolate;
}

.draw-menu-trigger {
  width: 54px;
  height: 50px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  border-radius: 0;
  clip-path: polygon(11px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 11px), calc(100% - 11px) 100%, 10px 100%, 0 calc(100% - 10px), 0 11px);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(11, 18, 29, 0.985);
  border: 1px solid rgba(121, 145, 187, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 28px rgba(0, 0, 0, 0.32);
}

.draw-menu-trigger:hover,
.draw-action-tiles.is-open .draw-menu-trigger {
  border-color: rgba(100, 210, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(13, 20, 31, 0.99);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(100, 210, 255, 0.22),
    0 16px 32px rgba(0, 0, 0, 0.38);
}

.draw-menu-lines {
  width: 24px;
  display: grid;
  gap: 4px;
}

.draw-menu-lines span {
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: 0 0 10px rgba(100, 210, 255, 0.28);
}

.draw-action-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 286px;
  max-height: min(62vh, 520px);
  padding: 10px;
  display: grid;
  gap: 9px;
  overflow: auto;
  border-radius: 0;
  clip-path: polygon(14px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 12px 100%, 0 calc(100% - 12px), 0 14px);
  background:
    linear-gradient(180deg, rgba(62, 80, 108, 0.26), rgba(18, 27, 40, 0.18)),
    rgba(10, 17, 28, 0.97);
  border: 1px solid rgba(121, 145, 187, 0.18);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42);
}

.draw-action-menu-group {
  border: 1px solid rgba(121, 145, 187, 0.13);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.11), rgba(255, 255, 255, 0.01)),
    rgba(8, 15, 26, 0.7);
  clip-path: polygon(10px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 9px 100%, 0 calc(100% - 9px), 0 10px);
}

.draw-action-menu-summary {
  min-height: 44px;
  padding: 10px 12px 10px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.draw-action-menu-summary::-webkit-details-marker {
  display: none;
}

.draw-action-menu-summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: var(--accent-2);
  border: 1px solid rgba(100, 210, 255, 0.2);
  background: rgba(100, 210, 255, 0.06);
}

.draw-action-menu-group[open] .draw-action-menu-summary::after {
  content: "-";
}

.draw-action-menu-count {
  min-width: 24px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  border: 1px solid rgba(121, 145, 187, 0.13);
  background: rgba(255, 255, 255, 0.04);
}

.draw-action-menu-items {
  padding: 0 8px 8px;
  display: grid;
  gap: 7px;
}

.draw-action-menu-option {
  min-height: 40px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 9px 100%, 0 calc(100% - 9px), 0 10px);
  background:
    linear-gradient(180deg, rgba(78, 94, 120, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 35, 0.96);
  border: 1px solid rgba(121, 145, 187, 0.14);
}

.draw-action-menu-option:hover,
.draw-action-menu-option.active {
  border-color: rgba(100, 210, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.13), rgba(255, 255, 255, 0.01)),
    rgba(15, 24, 38, 0.99);
  box-shadow: inset 0 0 0 1px rgba(100, 210, 255, 0.12);
}

.toolbar-group,
.inline-actions,
.stat-grid,
.tab-strip,
.shape-grid,
.zone-buttons,
.theme-list,
.pill-cloud {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-icon {
  width: 52px;
  min-width: 52px;
  height: 42px;
  padding: 3px 4px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  gap: 1px;
}

.toolbar-icon.is-primary {
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.18), rgba(255, 255, 255, 0.018)),
    rgba(14, 21, 31, 0.96);
  border-color: rgba(255, 202, 40, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(255, 202, 40, 0.2);
}

.toolbar-icon.is-active {
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(15, 22, 32, 0.98);
  border-color: rgba(255, 202, 40, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22);
}

.toolbar-icon-glyph {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1;
}

.toolbar-icon-label {
  font-size: 0.52rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.toolbar-back-button {
  width: 64px;
  min-width: 64px;
  height: 64px;
  padding: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  clip-path: polygon(14px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 10px 100%, 0 calc(100% - 10px), 0 14px);
  background:
    linear-gradient(180deg, rgba(182, 96, 74, 0.34), rgba(72, 29, 27, 0.2)),
    rgba(84, 43, 39, 0.96);
  border: 1px solid rgba(214, 111, 76, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 28px rgba(0, 0, 0, 0.24);
}

.toolbar-back-button .toolbar-icon-label {
  display: none;
}

.toolbar-back-button .toolbar-icon-glyph {
  font-size: 1.9rem;
  line-height: 1;
  transform: translateY(1px);
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shape-preview-grid,
.style-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-preset-tile {
  min-height: 104px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background:
    linear-gradient(180deg, rgba(75, 92, 119, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.88);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  cursor: pointer;
}

.player-preset-tile.active {
  border-color: rgba(100, 210, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(100, 210, 255, 0.16);
}

.player-preset-tile.create-preset {
  border-color: rgba(255, 202, 40, 0.18);
}

.player-preset-preview {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-builder-horizontal {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.78fr) minmax(230px, 0.62fr);
  gap: 14px;
  align-items: stretch;
}

.player-builder-section {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(79, 96, 126, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 33, 0.92);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.player-builder-section .shape-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-builder-section .style-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.player-builder-preview {
  min-height: 100%;
  justify-content: space-between;
}

html.theme-charcoal .player-builder-section,
html.theme-charcoal .player-preview-panel {
  border-radius: 0;
  clip-path: polygon(12px 0, calc(100% - 11px) 0, 100% 11px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 11px 100%, 0 calc(100% - 11px), 0 12px);
  border-color: rgba(4, 6, 10, 0.78);
  background: var(--panel-strong);
  box-shadow:
    inset 0 0 0 1px rgba(116, 128, 150, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.54);
}

html.theme-charcoal .shape-preview-card,
html.theme-charcoal .style-preview-card,
html.theme-charcoal .player-preset-tile {
  border-radius: 0;
  clip-path: polygon(10px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 9px 100%, 0 calc(100% - 9px), 0 10px);
  border-color: rgba(4, 6, 10, 0.72);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(116, 128, 150, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.48);
}

html.theme-charcoal .shape-preview-card:hover,
html.theme-charcoal .style-preview-card:hover,
html.theme-charcoal .player-preset-tile:hover {
  border-color: rgba(133, 145, 166, 0.32);
  background: #242932;
  box-shadow:
    inset 0 0 0 1px rgba(184, 195, 212, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52);
}

html.theme-charcoal .shape-preview-card.active,
html.theme-charcoal .style-preview-card.active,
html.theme-charcoal .player-preset-tile.active {
  border-color: rgba(var(--accent-rgb), 0.36);
  background: #282e38;
  box-shadow:
    inset 0 0 0 1px rgba(4, 6, 10, 0.62),
    inset 0 -2px 0 rgba(var(--accent-rgb), 0.28);
}

html.theme-charcoal .player-preview-stage {
  border-color: rgba(4, 6, 10, 0.6);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 100, 54, 0.74), rgba(14, 78, 43, 0.8));
  box-shadow: inset 0 0 0 1px rgba(116, 128, 150, 0.12);
}

.equipment-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.equipment-palette-tile {
  min-height: 142px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.88);
  color: var(--text);
  display: grid;
  grid-template-rows: 58px auto auto;
  justify-items: center;
  align-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
}

.equipment-palette-tile:hover {
  border-color: rgba(100, 210, 255, 0.32);
  transform: translateY(-1px);
}

.equipment-preview {
  width: 84px;
  height: 54px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(10, 17, 27, 0.86);
  border: 1px solid rgba(121, 145, 187, 0.08);
  display: grid;
  place-items: center;
}

.equipment-preview svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.scrimmage-preview-panel {
  min-height: 90px;
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: center;
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(12, 19, 30, 0.68);
  background-size: 18px 18px, 18px 18px, auto;
}

.scrimmage-preview-line {
  display: block;
  width: 100%;
  border-top: 5px solid #ffca28;
  border-radius: 999px;
  box-shadow: 0 0 14px rgba(255, 202, 40, 0.22);
}

.draw-range-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.draw-range-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent-2);
}

.draw-range-value {
  min-width: 58px;
  text-align: right;
  color: var(--text);
  font-size: 0.84rem;
}

.draw-color-control {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.draw-color-control .color-input {
  width: 44px;
  min-width: 44px;
  height: 38px;
  padding: 4px;
  border-radius: 8px;
}

.draw-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.draw-color-swatch {
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: var(--swatch, #64d2ff);
  cursor: pointer;
}

.draw-color-swatch.active {
  border-color: #f7f5ef;
  box-shadow: 0 0 0 2px rgba(100, 210, 255, 0.24);
}

@media (max-width: 980px) {
  .player-builder-horizontal {
    grid-template-columns: 1fr;
  }
}

.shape-preview-card,
.style-preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 88px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background:
    linear-gradient(180deg, rgba(75, 92, 119, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.88);
  cursor: pointer;
  min-width: 0;
}

.shape-preview-card.active,
.style-preview-card.active {
  border-color: rgba(100, 210, 255, 0.34);
  box-shadow: inset 0 0 0 1px rgba(100, 210, 255, 0.16);
}

.shape-preview-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.marker-preview {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(19, 107, 51, 0.9), rgba(12, 79, 38, 0.94));
  background-size: 11px 11px, 11px 11px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.marker-preview.large {
  width: 118px;
  height: 88px;
}

.marker-preview svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.shape-preview {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eef4ff;
}

.shape-preview.large {
  width: 72px;
  height: 72px;
}

.shape-preview::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 3px solid #eef4ff;
  background: transparent;
}

.shape-preview.large::before {
  inset: 10px;
}

.shape-preview.style-filled::before {
  background: rgba(238, 244, 255, 0.9);
}

.shape-preview.style-filled .shape-preview-text {
  color: #09111f;
}

.shape-preview.style-dashed::before {
  border-style: dashed;
}

.shape-preview.shape-circle::before {
  border-radius: 999px;
}

.shape-preview.shape-square::before {
  border-radius: 6px;
}

.shape-preview.shape-diamond::before {
  inset: 9px;
  transform: rotate(45deg);
}

.shape-preview.shape-octagon::before {
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}

.shape-preview.shape-triangle::before {
  inset: auto;
  width: 0;
  height: 0;
  left: 50%;
  top: 8px;
  transform: translateX(-50%);
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 31px solid #eef4ff;
  border-top: 0;
  background: transparent;
}

.shape-preview.shape-triangle.style-outline::before,
.shape-preview.shape-triangle.style-dashed::before {
  width: 30px;
  height: 26px;
  left: 50%;
  top: 9px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  border: 3px solid #eef4ff;
  background: transparent;
}

.shape-preview.shape-triangle.style-dashed::before {
  border-style: dashed;
}

.shape-preview-text {
  position: relative;
  z-index: 1;
  font-size: 0.76rem;
  font-weight: 800;
}

.shape-preview.shape-triangle .shape-preview-text {
  transform: translateY(6px);
}

.shape-preview.shape-triangle.large .shape-preview-text {
  transform: translateY(9px);
}

.player-preview-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background:
    linear-gradient(180deg, rgba(79, 96, 126, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(14, 22, 33, 0.92);
}

.player-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border-radius: 8px;
  border: 1px dashed rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18, 103, 50, 0.72), rgba(10, 76, 37, 0.78));
  background-size: 18px 18px, 18px 18px, auto;
}

.player-preview-stage .marker-preview {
  background: transparent;
  box-shadow: none;
}

.line-style-preview {
  width: 100%;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line-style-swatch {
  display: block;
  width: 70%;
  height: 0;
  border-top: 4px solid #eef4ff;
}

.line-style-preview.line-dashed .line-style-swatch {
  border-top-style: dashed;
}

.line-style-preview.line-filled .line-style-swatch {
  border-top-width: 6px;
}

.tool-button.compact {
  padding: 10px 12px;
}

.mini-segment {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-chip {
  padding: 8px 10px;
  font-size: 0.84rem;
}

.mini-chip.active {
  background:
    linear-gradient(180deg, rgba(92, 112, 145, 0.22), rgba(255, 255, 255, 0.02)),
    rgba(15, 22, 32, 0.94);
  border-color: rgba(255, 202, 40, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22);
}

.drawer-details {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 4px 12px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.drawer-summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  list-style: none;
  padding: 10px 0;
}

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

.draw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1;
}

.draw-layout.has-side-panel {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.draw-sidebar,
.draw-inspector {
  border-radius: var(--radius-xl);
  padding: 16px;
  overflow: auto;
}

.draw-sidebar {
  margin-top: 4px;
  max-height: 260px;
}

.draw-center {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.draw-play-data {
  min-width: 0;
}

.draw-play-data .card {
  position: static;
}

.card-divider {
  height: 1px;
  background: rgba(121, 145, 187, 0.12);
  margin: 2px 0 4px;
}

.draw-workspace {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 0;
}

.draw-animation-controls {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 6;
  width: min(640px, calc(100% - 48px));
  transform: translateX(-50%);
  pointer-events: none;
}

.draw-animation-controls[hidden] {
  display: none;
}

.draw-animation-control-shell {
  min-height: 54px;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  pointer-events: auto;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.22), rgba(255, 255, 255, 0.025)),
    rgba(8, 12, 18, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 42px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}

.draw-animation-control-buttons {
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 7px;
}

.draw-animation-control-button {
  width: 40px;
  height: 38px;
  min-width: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.draw-animation-control-button:hover,
.draw-animation-control-button.active {
  border-color: rgba(133, 145, 166, 0.34);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.16),
    inset 0 -2px 0 rgba(255, 202, 40, 0.24);
}

.draw-field-mode-shell {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto auto minmax(160px, 1fr);
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  pointer-events: auto;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.draw-field-mode-shell-board {
  width: max-content;
  max-width: 100%;
  grid-template-columns: auto auto;
  margin: 0 auto;
}

.draw-field-mode-group {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.draw-field-mode-button,
.draw-field-mode-icon-button {
  height: 32px;
  min-height: 32px;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  color: rgba(224, 231, 245, 0.72);
  font-weight: 850;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.draw-field-mode-button {
  min-width: 58px;
  padding: 0 11px;
  font-size: 0.7rem;
}

.draw-field-mode-icon-button {
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 0.86rem;
  line-height: 1;
}

.draw-field-mode-button:hover,
.draw-field-mode-button.active,
.draw-field-mode-icon-button:hover,
.draw-field-mode-icon-button.active {
  border-color: rgba(133, 145, 166, 0.34);
  background: #1d222b;
  color: var(--text);
}

.draw-field-mode-button.active,
.draw-field-mode-icon-button.active {
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.16),
    inset 0 -2px 0 rgba(255, 202, 40, 0.24);
}

.draw-field-duration-group .draw-field-mode-button {
  min-width: 42px;
}

.draw-field-style-group {
  min-width: 266px;
}

.draw-field-color-input {
  width: 32px;
  height: 32px;
  padding: 3px;
  cursor: pointer;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.draw-field-style-select {
  appearance: none;
  width: 92px;
  height: 32px;
  min-height: 32px;
  padding: 0 24px 0 9px;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  color: rgba(224, 231, 245, 0.86);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5);
}

.draw-field-style-select:focus {
  outline: none;
  border-color: rgba(133, 145, 166, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(128, 139, 158, 0.16),
    inset 0 -2px 0 rgba(255, 202, 40, 0.22);
}

.draw-field-style-select option {
  background: #1d222b;
  color: var(--text);
}

.draw-field-width-range {
  width: 86px;
  accent-color: #64d2ff;
}

.draw-field-width-value {
  width: 34px;
  color: rgba(224, 231, 245, 0.72);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: right;
}

.draw-field-mode-shell .draw-animation-floating-progress {
  min-height: 32px;
  padding: 6px 10px;
}

.draw-field-mode-shell .draw-animation-floating-fill {
  background:
    linear-gradient(90deg, rgba(100, 210, 255, 0.26), rgba(121, 145, 187, 0.18)),
    rgba(100, 210, 255, 0.06);
  box-shadow: 10px 0 18px rgba(100, 210, 255, 0.12);
}

.draw-animation-floating-progress {
  position: relative;
  min-height: 38px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 12px;
  border: 1px solid rgba(133, 145, 166, 0.24);
  background: #1d222b;
  box-shadow: inset 0 0 0 1px rgba(128, 139, 158, 0.12);
}

.draw-animation-floating-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--animation-progress, 0%);
  background:
    linear-gradient(90deg, rgba(100, 210, 255, 0.36), rgba(255, 202, 40, 0.32)),
    rgba(100, 210, 255, 0.08);
  box-shadow: 12px 0 24px rgba(100, 210, 255, 0.18);
}

.draw-animation-floating-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  background-size: 22px 100%, auto;
  pointer-events: none;
}

.draw-animation-floating-label {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.draw-overlay-host {
  position: absolute;
  inset: 18px 18px auto 18px;
  z-index: 3;
  pointer-events: none;
}

.draw-modal-host {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.draw-selected-player-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  left: auto;
  z-index: 4;
  width: min(320px, calc(100% - 36px));
  pointer-events: none;
}

.draw-selected-player-overlay.anchor-left {
  right: auto;
  left: 18px;
}

.draw-selected-player-overlay.anchor-right {
  right: 18px;
  left: auto;
}

.draw-selected-player-overlay.is-visible {
  pointer-events: auto;
}

.draw-selected-player-overlay .card {
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

.draw-floating-panel {
  width: min(420px, 100%);
  max-height: 72vh;
  overflow: auto;
  pointer-events: auto;
  border-radius: 12px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(62, 80, 108, 0.18), rgba(18, 27, 40, 0.16)),
    rgba(12, 19, 30, 0.94);
  border: 1px solid rgba(121, 145, 187, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.draw-floating-panel-wide {
  width: min(1280px, 100%);
}

.draw-context-menu {
  position: absolute;
  z-index: 8;
  min-width: 156px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(62, 80, 108, 0.2), rgba(18, 27, 40, 0.16)),
    rgba(12, 19, 30, 0.96);
  border: 1px solid rgba(121, 145, 187, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.draw-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 9, 16, 0.48);
  backdrop-filter: blur(3px);
  pointer-events: auto;
}

.draw-modal {
  width: min(440px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(62, 80, 108, 0.22), rgba(18, 27, 40, 0.16)),
    rgba(12, 19, 30, 0.97);
  border: 1px solid rgba(121, 145, 187, 0.15);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.4);
}

.draw-notes-modal {
  width: min(560px, 100%);
}

.draw-save-play-modal {
  width: min(560px, 100%);
  max-height: min(92dvh, 860px);
  overflow: hidden;
}

.draw-save-play-body {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.draw-save-play-modal > .inline-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(121, 145, 187, 0.16);
}

.draw-save-play-modal .tag-choice-grid {
  max-height: 180px;
  overflow-y: auto;
}

.draw-load-play-modal {
  width: min(720px, 100%);
  max-height: min(86dvh, 820px);
  overflow: hidden;
}

.draw-load-play-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.draw-load-play-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px solid rgba(121, 146, 189, 0.16);
  border-radius: 0;
  clip-path: polygon(var(--panel-cut) 0, calc(100% - var(--panel-cut)) 0, 100% var(--panel-cut), 100% calc(100% - var(--panel-cut)), calc(100% - var(--panel-cut)) 100%, var(--panel-cut) 100%, 0 calc(100% - var(--panel-cut)), 0 var(--panel-cut));
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.86);
}

.draw-load-play-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.draw-load-play-copy strong,
.draw-load-play-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-load-play-list .button {
  width: auto;
  min-width: 92px;
  text-align: center;
}

.draw-notes-input {
  min-height: 168px;
  resize: vertical;
}

.draw-modal-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coach-modal-host {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.update-modal-host {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
}

.update-modal-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(7, 9, 11, 0.66);
  backdrop-filter: blur(5px);
  pointer-events: auto;
}

.update-modal {
  width: min(520px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #15181b;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.38);
  color: #f4f0e8;
  padding: 22px;
}

.update-modal-header h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.update-modal-header p,
.update-status {
  margin: 0;
  color: rgba(244, 240, 232, 0.7);
}

.update-release-notes {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.update-notes-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  margin: 0;
  padding-left: 20px;
  overflow: auto;
  color: rgba(244, 240, 232, 0.82);
}

.update-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.coach-modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 9, 16, 0.44);
  backdrop-filter: blur(5px);
  pointer-events: auto;
  overflow-y: auto;
}

.coach-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  margin: auto 0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(180deg, rgba(62, 80, 108, 0.24), rgba(18, 27, 40, 0.16)),
    rgba(12, 19, 30, 0.97);
  border: 1px solid rgba(121, 145, 187, 0.15);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

.coach-onboarding-modal {
  width: min(680px, 100%);
}

.coach-modal-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coach-modal-header h2 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.1;
}

.coach-modal-header p {
  margin: 0;
  color: var(--muted);
}

.coach-profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
}

.coach-profile-form .input-row:last-child {
  grid-column: 1 / -1;
}

.coach-onboarding-body .coach-profile-form .input-row:last-child {
  grid-column: auto;
}

.coach-profile-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.coach-modal-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.coach-onboarding-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboarding-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.onboarding-tile-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-tile {
  min-height: 150px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  text-align: left;
  color: var(--text);
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(86, 105, 134, 0.16), rgba(255, 255, 255, 0.01)),
    rgba(10, 17, 27, 0.94);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.26);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.onboarding-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(100, 210, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.12), rgba(255, 255, 255, 0.012)),
    rgba(12, 21, 34, 0.96);
}

.onboarding-tile.active {
  border-color: rgba(100, 210, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.18), rgba(255, 255, 255, 0.012)),
    rgba(12, 21, 34, 0.98);
  box-shadow:
    0 0 0 1px rgba(100, 210, 255, 0.14),
    0 16px 28px rgba(0, 0, 0, 0.3);
}

.onboarding-tile strong {
  font-size: 1.12rem;
}

.onboarding-tile span {
  color: var(--muted);
  line-height: 1.35;
}

.coach-welcome-grid .onboarding-tile {
  min-height: 132px;
}

.coach-logo-preview {
  max-width: 220px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(121, 145, 187, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.coach-logo-preview img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.cloud-account-card {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(100, 210, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.08), rgba(255, 255, 255, 0.01)),
    rgba(13, 21, 32, 0.9);
}

.asset-bundle-card .inline-actions {
  align-items: stretch;
}

.onboarding-cloud-card {
  max-width: 640px;
}

.cloud-provider-row {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(180px, 1.4fr);
  gap: 12px;
  align-items: center;
}

.cloud-provider-row.google-provider-row {
  grid-template-columns: auto minmax(180px, 1fr) auto;
}

.cloud-oauth-hint,
.cloud-dev-details {
  grid-column: 2 / -1;
}

.cloud-provider-row.google-provider-row .cloud-oauth-status {
  grid-column: 2 / -1;
}

.cloud-oauth-status {
  grid-column: 2 / -1;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(121, 145, 187, 0.1);
}

.cloud-oauth-status.pending {
  color: #dbeafe;
  border-color: rgba(100, 210, 255, 0.24);
  background: rgba(100, 210, 255, 0.08);
}

.cloud-oauth-status.success {
  color: #d6f8dd;
  border-color: rgba(122, 223, 138, 0.25);
  background: rgba(122, 223, 138, 0.08);
}

.cloud-oauth-status.warning {
  color: #ffe8a4;
  border-color: rgba(255, 202, 40, 0.28);
  background: rgba(255, 202, 40, 0.08);
}

.cloud-oauth-status.error {
  color: #ffd6ca;
  border-color: rgba(243, 111, 69, 0.28);
  background: rgba(243, 111, 69, 0.08);
}

.google-connect-button {
  min-width: 190px;
  padding: 11px 14px;
  border-color: rgba(100, 210, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(100, 210, 255, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(13, 21, 32, 0.96);
}

.cloud-dev-details {
  border-radius: 8px;
  border: 1px solid rgba(121, 145, 187, 0.1);
  background: rgba(255, 255, 255, 0.025);
  padding: 10px 12px;
}

.cloud-dev-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.cloud-dev-details .input {
  margin-top: 10px;
}

.cloud-dev-details .button {
  margin-top: 10px;
}

.drive-browser-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(5, 10, 18, 0.72);
  backdrop-filter: blur(8px);
}

.drive-browser-modal {
  width: min(1040px, 100%);
  max-height: min(84vh, 920px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(121, 145, 187, 0.18);
  background:
    linear-gradient(180deg, rgba(32, 50, 78, 0.94), rgba(12, 20, 33, 0.98)),
    rgba(12, 20, 33, 0.98);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.drive-browser-header {
  align-items: flex-start;
}

.drive-browser-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
}

.drive-browser-path {
  flex-wrap: wrap;
}

.drive-browser-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.drive-browser-tile {
  text-align: left;
  min-height: 132px;
}

.drive-browser-tile h3 {
  font-size: 1.02rem;
  line-height: 1.3;
}

@media (max-width: 860px) {
  .drive-browser-controls {
    grid-template-columns: 1fr;
  }
}

.coach-modal-actions {
  justify-content: flex-end;
}

.draw-floating-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.draw-floating-header .button {
  width: auto;
  min-width: 96px;
  padding-inline: 18px;
  flex: 0 0 auto;
}

.draw-canvas {
  --draw-zoom: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  overflow: auto;
  order: 1;
}

.draw-stage {
  position: relative;
  padding: 24px;
  transform: scale(var(--draw-zoom));
  transform-origin: center center;
}

.field-svg {
  width: min(100%, 972px);
  min-width: 972px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 8px solid rgba(15, 22, 33, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(160, 184, 220, 0.12),
    0 16px 30px rgba(0, 0, 0, 0.28);
}

.canvas-object {
  cursor: pointer;
}

.field-svg .resize-handle {
  cursor: nwse-resize;
}

.field-svg .coverage-link-anchor {
  cursor: crosshair;
}

.status-bar {
  border-radius: 9px;
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  order: 3;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.82rem;
  border: 1px solid rgba(121, 145, 187, 0.11);
}

.pill.gold,
.stat-card.gold {
  background: rgba(255, 202, 40, 0.14);
}

.pill.ice,
.stat-card.ice {
  background: rgba(100, 210, 255, 0.14);
}

.pill.orange,
.stat-card.orange {
  background: rgba(243, 111, 69, 0.14);
}

.pill.team {
  background: rgba(255, 92, 92, 0.16);
  border-color: rgba(255, 92, 92, 0.28);
  color: #ffb3a8;
}

.pill.green,
.pill.success,
.stat-card.green {
  background: rgba(122, 223, 138, 0.14);
}

.pill.neutral {
  background: rgba(121, 145, 187, 0.1);
  color: var(--muted);
}

.pill.field {
  background: rgba(255, 255, 255, 0.14);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-value {
  font-size: 2rem;
  font-family: Impact, "Arial Black", sans-serif;
}

.route-list,
.simple-list,
.draft-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-item,
.simple-row,
.generated-row,
.playbook-entry,
.report-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.12), rgba(255, 255, 255, 0.01)),
    rgba(15, 22, 34, 0.86);
  border: 1px solid rgba(121, 145, 187, 0.09);
}

.route-preview,
.block-preview,
.coverage-preview,
.blitz-preview,
.read-preview {
  position: relative;
  width: 68px;
  min-width: 68px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(74, 92, 121, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(10, 17, 27, 0.86);
  border: 1px solid rgba(121, 145, 187, 0.08);
}

.route-preview svg,
.block-preview svg,
.coverage-preview svg,
.blitz-preview svg,
.read-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.route-preview.route {
  border-color: rgba(255, 202, 40, 0.16);
}

.read-preview {
  width: 112px;
  min-width: 112px;
}

.route-preview.run {
  border-color: rgba(122, 223, 138, 0.16);
}

.route-preview.motion {
  border-color: rgba(100, 210, 255, 0.18);
}

.block-preview-stroke,
.block-preview-head {
  position: absolute;
  display: block;
  background: #f36f45;
}

.block-preview-stroke {
  left: 12px;
  top: 19px;
  width: 38px;
  height: 5px;
  border-radius: 999px;
}

.block-preview-head {
  width: 0;
  height: 0;
  background: transparent;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #f36f45;
  left: 48px;
  top: 13px;
}

.block-preview.zone-left .block-preview-stroke {
  left: 18px;
  width: 34px;
}

.block-preview.zone-left .block-preview-head {
  left: 8px;
  border-left: 0;
  border-right: 11px solid #f36f45;
}

.block-preview.drive-block .block-preview-stroke {
  left: 31px;
  top: 10px;
  width: 5px;
  height: 22px;
}

.block-preview.drive-block .block-preview-head {
  left: 28px;
  top: 3px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid #f36f45;
  border-top: 0;
}

.block-preview.pull .block-preview-stroke {
  width: 34px;
  top: 24px;
  left: 17px;
  transform: rotate(-25deg);
  transform-origin: left center;
}

.block-preview.pull .block-preview-head {
  left: 6px;
  top: 19px;
  border-left: 0;
  border-right: 11px solid #f36f45;
}

.block-preview.crack-block .block-preview-stroke {
  width: 28px;
  top: 22px;
  left: 19px;
  transform: rotate(-38deg);
  transform-origin: left center;
}

.block-preview.crack-block .block-preview-head {
  left: 12px;
  top: 8px;
  border-left: 0;
  border-right: 11px solid #f36f45;
}

.text-editor-input {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid rgba(121, 145, 187, 0.12);
  background: rgba(9, 16, 26, 0.88);
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
}

.compact-note {
  margin: 0;
}

.simple-row {
  align-items: flex-start;
}

.stack.compact,
.route-item-copy {
  gap: 6px;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(121, 145, 187, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.bar-label,
.bar-value {
  font-size: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(121, 145, 187, 0.08);
  vertical-align: top;
}

.data-table thead th {
  background: rgba(66, 82, 108, 0.18);
  color: #dce7fb;
  font-weight: 700;
}

.icon-button {
  width: 44px;
}

@media (max-width: 1280px) {
  .draw-layout,
  .content-grid.two-col,
  .content-grid.three-col,
  .stat-grid,
  .home-grid,
  .library-grid,
  .home-hero {
    grid-template-columns: 1fr;
  }

  .home-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-hero-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .playbook-editor-form {
    grid-template-columns: 1fr;
  }

  .playbook-workspace-header {
    flex-direction: column;
  }

  .playbook-phase-grid {
    grid-template-columns: 1fr;
  }

  .playbook-play-grid,
  .playbook-library-browser-grid,
  .library-asset-editor,
  .calendar-layout,
  .calendar-form-grid,
  .library-filter-row {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar,
  .practice-block-header {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-month-grid {
    min-width: 760px;
  }

  .calendar-board-card {
    overflow-x: auto;
  }

  .calendar-detail-meta,
  .calendar-summary-grid,
  .weekday-chip-grid {
    grid-template-columns: 1fr;
  }

  .playbook-play-tile {
    width: 100%;
  }

  .playbook-browser-grid {
    grid-template-columns: 1fr;
  }

  .playbook-export-scope-grid,
  .playbook-export-type-row {
    grid-template-columns: 1fr;
  }

  .draw-action-tiles {
    top: 63px;
    left: 32px;
    max-width: min(300px, calc(100% - 64px));
  }

  .draw-action-menu {
    width: min(286px, calc(100vw - 72px));
    max-height: 58vh;
  }

  .draw-toolbar .draw-toolbar-title {
    flex: 1 1 100%;
  }

  .draw-toolbar .draw-toolbar-actions {
    justify-content: start;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .live-mapping-grid {
    grid-template-columns: 1fr;
  }

  .live-mapping-grid.live-compact-mapping-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .live-home-grid,
  .live-session-grid,
  .impact-meter {
    grid-template-columns: 1fr;
  }

  .live-video-panel,
  .video-timestamp-layout,
  .video-player-layout,
  .film-room-editor-grid,
  .film-room-menu-bar,
  .session-stats-panel,
  .session-stat-grid,
  .session-tendency-grid,
  .session-tendency-row,
  .ai-analysis-settings-grid,
  .cloud-provider-row {
    grid-template-columns: 1fr;
  }

  .video-timestamp-layout {
    width: 100%;
  }

  .video-drive-controls,
  .video-transport,
  .video-clip-actions,
  .film-room-menu-left,
  .film-room-menu-right {
    grid-template-columns: 1fr;
  }

  .film-room-menu-left,
  .film-room-menu-right {
    justify-content: stretch;
  }

  .film-room-menu-left .button,
  .film-room-menu-right .button {
    width: 100%;
  }

  .film-source-browser,
  .film-viewer-card,
  .film-marker-browser,
  .film-marker-tools-panel,
  .film-resolve-timeline,
  .film-editing-tools-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .video-stage-frame {
    min-height: 320px;
  }

  .field-svg {
    min-width: 720px;
  }

  .draw-play-data .card {
    position: relative;
    top: auto;
  }

  .coach-profile-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .adversaries-page {
    gap: 12px;
  }

  .adversaries-page .hero-panel {
    padding: 20px 16px;
    clip-path: none;
    border-radius: 10px;
  }

  .adversaries-page .hero-panel h1 {
    font-size: 2rem;
    line-height: 1;
  }

  .adversaries-page .hero-panel p,
  .adversaries-page .library-tile p,
  .adversaries-page .compact-note {
    line-height: 1.45;
  }

  .adversaries-page .card {
    padding: 14px;
  }

  .adversaries-page .card-header {
    display: grid;
    gap: 10px;
  }

  .adversaries-page .session-board-card .card-header {
    padding-right: 0;
    min-height: 0;
  }

  .adversaries-page .live-board-actions {
    position: static;
    width: 100%;
    justify-content: stretch;
  }

  .adversaries-page .library-grid,
  .adversaries-page .live-home-grid,
  .adversaries-page .live-mode-grid,
  .adversaries-page .live-past-grid,
  .adversaries-page .live-session-grid,
  .adversaries-page .live-mapping-grid,
  .adversaries-page .live-mapping-grid.live-compact-mapping-grid,
  .adversaries-page .drive-browser-grid {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .adversaries-page .library-tile,
  .adversaries-page .live-home-tile,
  .adversaries-page .live-past-tile,
  .adversaries-page .live-square-tile,
  .adversaries-page .live-drive-summary-tile {
    width: 100%;
    min-height: 84px;
    aspect-ratio: auto;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }

  .adversaries-page .live-home-tile {
    min-height: 112px;
  }

  .adversaries-page .live-drive-board-header,
  .adversaries-page .live-drive-header,
  .adversaries-page .live-drive-summary-panel {
    grid-template-columns: 1fr;
  }

  .adversaries-page .live-drive-header {
    display: grid;
  }

  .adversaries-page .live-drive-meta {
    justify-content: flex-start;
  }

  .adversaries-page .live-drive-summary-tile {
    min-height: 0;
  }

  .adversaries-page .live-drive-summary-breakdowns {
    grid-template-columns: 1fr;
  }

  .adversaries-page .live-square-tile h3,
  .adversaries-page .live-square-tile p {
    text-align: left;
  }

  .adversaries-page .live-centered-mapping-grid > .live-square-tile {
    width: 100%;
  }

  .adversaries-page .mapped-play-tags {
    transform: none;
    margin-bottom: 0;
  }

  .adversaries-page .inline-actions,
  .adversaries-page .toolbar-group,
  .adversaries-page .pill-cloud,
  .adversaries-page .live-drive-summary-actions {
    width: 100%;
    gap: 8px;
  }

  .adversaries-page .inline-actions .button,
  .adversaries-page .live-step-rail .button,
  .adversaries-page .live-drive-summary-actions .button,
  .adversaries-page .report-action-bar .button {
    width: 100%;
  }

  .adversaries-page .inline-actions > .back-button,
  .adversaries-page .live-step-rail .back-button {
    width: var(--back-rail-size);
    min-width: var(--back-rail-size);
    flex-basis: var(--back-rail-size);
  }

  .adversaries-page .live-step-row,
  .adversaries-page .live-key-player-final-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .adversaries-page .live-step-row > :nth-child(2) {
    order: 1;
  }

  .adversaries-page .live-step-row > :first-child {
    order: 2;
  }

  .adversaries-page .live-step-row > :last-child {
    order: 3;
  }

  .adversaries-page .live-step-rail,
  .adversaries-page .live-key-player-final-center {
    width: 100%;
    justify-content: stretch;
  }

  .adversaries-page .live-play-wizard {
    padding: 12px;
  }

  .adversaries-page .live-entry-header {
    align-items: stretch;
    flex-direction: column;
  }

  .adversaries-page .impact-scale {
    gap: 4px;
    font-size: 0.72rem;
  }

  .adversaries-page .turnover-tile {
    flex: 1 1 140px;
  }

  .adversaries-page .pass-zone-board {
    min-height: 430px;
    aspect-ratio: 9 / 12;
  }

  .adversaries-page .pass-zone-tile {
    padding: 4px;
    font-size: 0.62rem;
  }

  .adversaries-page .pass-zone-band-label,
  .adversaries-page .pass-zone-los-label {
    font-size: 0.66rem;
  }

  .adversaries-page .target-player-field {
    min-height: 220px;
  }

  .adversaries-page .position-chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .adversaries-page .live-video-panel,
  .adversaries-page .video-timestamp-layout,
  .adversaries-page .ai-analysis-settings-grid,
  .adversaries-page .drive-browser-controls {
    grid-template-columns: 1fr;
  }

  .adversaries-page .live-video-preview,
  .adversaries-page .timestamp-video-card .live-video-preview {
    height: 210px;
  }

  .adversaries-page .drive-browser-backdrop {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .adversaries-page .drive-browser-modal {
    max-height: calc(100vh - 20px);
    overflow: auto;
  }

  .adversaries-page .input,
  .adversaries-page .input-row input,
  .adversaries-page .input-row textarea,
  .adversaries-page .input-row select {
    min-height: 44px;
    font-size: 16px;
  }

  .mobile-adversaries-app {
    padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  }

  .mobile-capture-hero {
    padding: 20px 16px;
    clip-path: none;
    border-radius: 10px;
  }

  .mobile-capture-hero h1 {
    font-size: 2rem;
    line-height: 1;
  }

  .mobile-capture-shell .card {
    padding: 14px;
  }

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

  .mobile-drive-board-header {
    grid-template-columns: 1fr;
  }

  .mobile-drive-header {
    display: grid;
  }

  .mobile-drive-meta {
    justify-content: flex-start;
  }

  .mobile-capture-shell .inline-actions,
  .mobile-capture-shell .button {
    width: 100%;
  }

  .mobile-capture-shell .input,
  .mobile-capture-shell .input-row input,
  .mobile-capture-shell .input-row textarea,
  .mobile-capture-shell .input-row select {
    min-height: 44px;
    font-size: 16px;
  }
}

@keyframes splashFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes splashFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes splashLift {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  45% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* Auth modal overlay animations */
.auth-gate-backdrop {
  opacity: 0;
  animation: fadeIn 0.3s forwards ease;
}

.auth-gate-card {
  transform: scale(0.95);
  animation: scaleIn 0.3s forwards cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes scaleIn {
  to { transform: scale(1); }
}

/* ── Auth Gate Modal Overlay ── */
.auth-gate-host:has(.auth-gate-modal-backdrop) {
  pointer-events: auto;
}

.auth-gate-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 9, 11, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
  animation: fadeIn 0.25s ease forwards;
}

.auth-gate-modal-backdrop .auth-gate-card {
  position: relative;
  width: min(480px, 90vw);
  animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.auth-gate-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  z-index: 5;
}

.auth-gate-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
