/* openindex.css — Editor UI (2026 refresh)
   Warm off-white palette, DM Sans, terracotta accent.
   Architecture: untouched. Aesthetic only.
*/

/* =========================
   Variables
   ========================= */
:root {
  --orange-primary: #c84b2f;
  --orange-light:   #e07844;
  --orange-gradient: none;

  --brown-dark:   #1a1814;
  --brown-medium: #1a1814;
  --brown-light:  rgba(26,24,20,.70);
  --leather-gradient: none;

  --cloud-bg:    #f5f2ed;
  --cloud-white: #faf8f4;
  --cloud-cream: #f5f2ed;

  --text-main:    #1a1814;
  --text-muted:   rgba(26,24,20,.55);
  --text-inverse: #ffffff;

  --shadow-soft:   none;
  --shadow-medium: none;
  --shadow-float:  none;
  --glow-orange:   none;

  --od-line:  #e2ddd6;
  --od-line2: #d4cfc8;
  --od-muted: #f0ece6;

  --radius-soft: 0px;
}

/* =========================
   Reset + Base
   ========================= */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--cloud-bg);
  color: var(--text-main);
  overflow: hidden;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
:focus-visible { outline: none; }

/* =========================
   Layout
   ========================= */
.app {
  display: flex;
  height: 100%;
  width: 100%;
}

/* =========================
   Sidebar
   ========================= */
.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--cloud-white);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
  border-right: 1px solid var(--od-line);
  box-shadow: none;
  overflow-y: auto;
  position: relative;
  z-index: 10;
  opacity: 0;
  animation: odInRight 0.46s ease-out 0.06s forwards;
}

.sidebar::before { display: none; }
.sidebar > * { position: relative; z-index: 1; }

.brandBanner {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
}

.logo {
  width: 21px;
  height: 21px;
  border-radius: 0;
  background: var(--text-main);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.brandText { display: flex; flex-direction: column; }

.brandName {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-main);
}

.brandSub {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 3px;
}

/* =========================
   Panels
   ========================= */
.panel {
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  border-radius: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: none;
  backdrop-filter: none;
  margin-bottom: 2px;
}

.panel.grow { flex: 1; }

.panelTitle {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
  text-shadow: none;
}

.sidebar .panel + .panel { margin-top: 4px; }

.hint {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

.hint.subtle {
  color: rgba(26,24,20,.40);
  padding: 2px;
}

/* =========================
   Tools
   ========================= */
.toolList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.toolItem {
  background: var(--cloud-white);
  border: 1px solid var(--od-line2);
  color: var(--text-main);
  padding: 9px 0;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  text-align: center;
  box-shadow: none;
}

.toolItem:hover {
  background: var(--od-muted);
  border-color: rgba(26,24,20,.3);
}

.toolItem.active {
  background: var(--cloud-white);
  color: var(--text-main);
  border-color: rgba(26,24,20,.5);
  font-weight: 600;
}

.toolItem.danger {
  border-color: rgba(200,75,47,.3);
  color: #a83520;
}

.toolItem.danger:hover {
  background: rgba(200,75,47,.05);
  border-color: rgba(200,75,47,.45);
}

/* =========================
   Icon grid
   ========================= */
.iconGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.iconBtn,
.iconGrid button {
  width: 100%;
  aspect-ratio: 1;
  background: var(--cloud-white);
  border: 1px solid var(--od-line2);
  border-radius: 0;
  padding: 0.5px;
  cursor: pointer;
  opacity: 1;
  transition: background 0.12s ease, border-color 0.12s ease;
  box-shadow: none;
  scrollbar-width: thin;
}

.iconBtn:hover,
.iconGrid button:hover {
  background: var(--od-muted);
  border-color: rgba(26,24,20,.3);
}

.iconBtn.active,
.iconGrid button.active {
  border-color: rgba(26,24,20,.6);
}

.iconBtn.cta,
.iconGrid button.cta {
  border-color: var(--orange-primary);
}

.iconGrid button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* =========================
   Sidebar buttons
   ========================= */
.sidebarActions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.btn {
  background: var(--cloud-white);
  border: 1px solid var(--od-line2);
  color: var(--text-main);
  padding: 9px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  box-shadow: none;
  backdrop-filter: none;
}

.btn:hover {
  background: var(--od-muted);
  border-color: rgba(26,24,20,.35);
}

.btn.cta {
  background: var(--orange-primary);
  border-color: var(--orange-primary);
  color: var(--text-inverse);
  font-weight: 500;
}

.btn.cta:hover {
  filter: brightness(0.95);
}

.btn.ghost {
  background: transparent;
  border-color: var(--od-line);
  color: var(--text-muted);
}

.btn.ghost:hover {
  background: var(--od-muted);
  border-color: rgba(26,24,20,.25);
  color: var(--text-main);
}

/* =========================
   Main area
   ========================= */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--cloud-bg);
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: odInUp 0.52s ease-out 0.12s forwards;
}

/* =========================
   Fields
   ========================= */
.field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field.grow { flex: 1; }

.field label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* Inputs */
input, select {
  background: var(--cloud-white);
  border: 1px solid var(--od-line2);
  padding: 8px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.12s ease;
  box-shadow: none;
}

input:focus, select:focus {
  border-color: rgba(26,24,20,.45);
  background: var(--cloud-white);
  box-shadow: none;
}

#playName {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  border: none;
  background: transparent;
  border-bottom: 1px solid var(--od-line);
  border-radius: 0;
  padding-left: 0;
  transition: border-color 0.15s;
}

#playName:focus {
  border-bottom-color: var(--orange-primary);
  box-shadow: none;
}

.chk {
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-main);
}

.chk input {
  accent-color: var(--orange-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* =========================
   Toolbar
   ========================= */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--cloud-white);
  border-bottom: 1px solid var(--od-line);
  backdrop-filter: none;
}

/* Topbar */
.topbar {
  padding: 10px 18px;
  background: var(--cloud-white);
  border-bottom: 1px solid var(--od-line);
  opacity: 0;
  animation: odInDown 0.42s ease-out forwards;
}

.topbarRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.topbarRow .field {
  flex: 1 1 520px;
  min-width: 320px;
}

.topbarRow .chk {
  flex: 0 0 auto;
  white-space: nowrap;
  margin-left: auto;
}

#newPlayBtn, #renamePlayBtn { flex: 0 0 auto; }

/* =========================
   Toolbar buttons (tbtn)
   ========================= */
.tbtn {
  appearance: none;
  border: 1px solid var(--orange-primary);
  background: var(--orange-primary);
  color: #fff;
  height: 32px;
  padding: 0 14px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.tbtn:hover  { filter: brightness(0.94); }
.tbtn:active { transform: translateY(1px); filter: brightness(0.90); }

.tbtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(200,75,47,.35);
}

.tbtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

/* Toolbar hint pill */
.toolbarHint {
  margin-left: auto;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  padding: 5px 12px;
  border-radius: 0;
  white-space: nowrap;
}

/* =========================
   Workspace
   ========================= */
.workspace {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  background: var(--cloud-bg);
}

/* Frames header */
.framesHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--od-line);
}

.title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-main);
  text-transform: uppercase;
  line-height: 1.05;
  text-align: left;
}

.logoMini {
  width: 33px;
  height: 33px;
  display: block;
}

.brand {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 6px;
}

.brandInner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.framesTitle {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
  background: none;
  -webkit-text-fill-color: initial;
  color: var(--text-main);
}

.framesMeta {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  padding: 4px 10px;
  border-radius: 0;
  box-shadow: none;
}

/* =========================
   Frames grid
   ========================= */
.framesGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  padding-bottom: 40px;
}

.frameCard {
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.frameCard:hover {
  box-shadow: none;
  border-color: var(--od-line2);
}

.frameCard.selected {
  border: 2px solid var(--orange-primary);
  box-shadow: none;
}

.frameTop {
  padding: 10px 14px;
  background: var(--cloud-white);
  border-bottom: 1px solid var(--od-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.frameLabel {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}

.frameActions { display: flex; gap: 6px; }

.pill {
  background: var(--cloud-white);
  color: var(--text-main);
  border: 1px solid var(--od-line);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 0;
  box-shadow: none;
  line-height: 1;
}

.frameDelBtn {
  background: var(--cloud-white);
  color: var(--text-muted);
  border: 1px solid var(--od-line);
  border-radius: 0;
  width: 26px;
  height: 22px;
  padding: 0;
  line-height: 1;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.frameDelBtn:hover {
  border-color: var(--od-line2);
  background: var(--od-muted);
  color: var(--text-main);
}

.frameCanvasWrap {
  position: relative;
  background: var(--cloud-bg);
}

.frameCanvas {
  width: 100%;
  display: block;
}

.frameItem {
  transform: scale(0.85);
  transform-origin: top left;
  width: calc(100% / 0.85);
  height: calc(100% / 0.85);
}

input.frameDesc,
.frameDesc {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  border-bottom: 0 !important;
}

input.frameDesc:focus,
.frameDesc:focus {
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  border-bottom: 0 !important;
}

/* =========================
   Statusbar
   ========================= */
.statusbar {
  background: var(--cloud-white);
  color: var(--text-muted);
  padding: 7px 20px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--od-line);
  box-shadow: none;
}

#statusRight {
  color: rgba(26,24,20,.6);
  font-weight: 500;
}

#statusLeft.odSavedPulse {
  animation: savedPulse 500ms ease-out;
}

@keyframes savedPulse {
  0%, 100% { color: var(--text-muted); }
  50%       { color: var(--orange-primary); }
}

/* =========================
   Scrollbar
   ========================= */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cloud-white); border-radius: 0; }
::-webkit-scrollbar-thumb { background: rgba(26,24,20,.18); border-radius: 0; box-shadow: none; }
::-webkit-scrollbar-thumb:hover { background: rgba(26,24,20,.28); }

/* =========================
   Path mode switch
   ========================= */
#lineModePanel { margin-top: 1px; }

#lineModePanel .hint.subtle {
  margin: 0 0 4px 0;
  opacity: 0.7;
}

#lineModePanel .pathSwitch {
  margin: 0 auto;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 120px;
  height: 44px;
  padding: 4px;
  border-radius: 2px;
  border: 1px solid rgba(26,24,20,.25);
  background: rgba(26,24,20,.35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  user-select: none;
}

#lineModePanel .pathThumb {
  position: absolute;
  top: 4px; left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 0;
  background: rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 4px 12px rgba(0,0,0,.2);
  transform: translateX(0);
  transition: transform 0.18s ease;
}

#lineModePanel .pathSwitch.isStraight .pathThumb {
  transform: translateX(calc(100% + 4px));
}

#lineModePanel .pathOpt {
  position: relative;
  z-index: 1;
  height: 30px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

#lineModePanel .pathOpt:hover  { opacity: 0.9; }
#lineModePanel .pathOpt.active { opacity: 1; }
#lineModePanel .pathOpt:active { transform: translateY(1px); }
#lineModePanel .pathOpt:focus  { outline: none; }

#lineModePanel .pathOpt:focus-visible {
  border-radius: 3px;
  box-shadow: 0 0 0 2px rgba(200,75,47,.6);
}

#lineModePanel .pathOpt canvas {
  width: 28px;
  height: 15px;
  display: block;
  opacity: 0.9;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.3));
}

/* =========================
   Pill / smart btn variants
   ========================= */
.btn.pill {
  border-radius: 0;
  padding: 9px 12px;
  font-weight: 500;
  line-height: 1;
}

.btn.smart {
  background: var(--cloud-white);
  color: var(--text-main);
  border: 1px solid var(--od-line2);
}

.btn.smart:hover {
  background: var(--od-muted);
  border-color: rgba(26,24,20,.35);
  filter: none;
}

/* =========================
   Add to organizer CTA
   ========================= */
.btnAddOrganizer {
  background: var(--orange-primary);
  color: #fff;
  border: 1px solid var(--orange-primary);
  border-radius: 0;
  box-shadow: none;
  margin-left: 0;
  transform: none;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition: filter 0.15s;
}

.btnAddOrganizer:hover  { filter: brightness(0.94); }
.btnAddOrganizer:active { filter: brightness(0.88); }

#newPlayBtn.btnAddOrganizer,
#renamePlayBtn.btnAddOrganizer {
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-left: 0 !important;
  transform: none !important;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: var(--orange-primary);
  border: 1px solid var(--orange-primary);
  color: #fff;
}

#newPlayBtn.btnAddOrganizer:hover,
#renamePlayBtn.btnAddOrganizer:hover { filter: brightness(0.94); }

/* =========================
   Modals
   ========================= */
.odModalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(26,24,20,.28);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.odModalOverlay.show { display: flex; }

.odModal {
  width: min(560px, 92vw);
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  border-radius: 0;
  padding: 18px;
  box-shadow: none;
}

.odModalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--od-line);
}

.odModalTitle {
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.odModalClose {
  border: 1px solid var(--od-line2);
  background: var(--cloud-white);
  font-size: 14px;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 0;
  color: var(--text-muted);
  transition: background 0.12s;
}

.odModalClose:hover {
  background: var(--od-muted);
  color: var(--text-main);
}

.odModalBody  { margin-top: 6px; }
.odModalRow   { margin: 12px 0; }

.odModalLabel {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.odModalCtrl {
  display: flex;
  gap: 10px;
  align-items: center;
}

#odTeamSelect,
#odSeasonSelect,
#odTeamInput,
#odSeasonInput {
  flex: 1;
  padding: 9px 10px;
  border-radius: 0;
  border: 1px solid var(--od-line2);
  font-weight: 400;
  background: var(--cloud-white);
  color: var(--text-main);
  transition: border-color 0.12s;
}

#odTeamSelect:focus,
#odSeasonSelect:focus,
#odTeamInput:focus,
#odSeasonInput:focus {
  border-color: rgba(26,24,20,.45);
  outline: none;
}

.odMiniBtn {
  padding: 9px 10px;
  border-radius: 0;
  border: 1px solid var(--od-line2);
  background: var(--cloud-white);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-main);
  transition: background 0.12s, border-color 0.12s;
}

.odMiniBtn:hover    { background: var(--od-muted); border-color: rgba(26,24,20,.3); }
.odMiniBtn:disabled { opacity: 0.45; cursor: not-allowed; }

.odModalHint {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.6;
  min-height: 16px;
  color: var(--text-main);
}

.odModalFooter {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

#odModalAdd.btn { font-weight: 600; }

/* =========================
   Suggestions dropdown
   ========================= */
.odSuggest {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  background: var(--cloud-white);
  border: 1px solid var(--od-line2);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  z-index: 10000;
}

.odSuggest.hidden { display: none; }

.odSugItem {
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-main);
  transition: background 0.1s;
}

.odSugItem:hover { background: var(--od-muted); }

.odSugMuted {
  opacity: 0.55;
  font-weight: 400;
}

/* =========================
   Save As New modal
   ========================= */
#odSaveAsNewOverlay[hidden] { display: none !important; }

#odSaveAsNewOverlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26,24,20,.25);
  z-index: 999999;
}

#odSaveAsNewOverlay .odModal95 {
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  border-radius: 0;
  padding: 16px;
  width: min(520px, calc(100vw - 32px));
  box-shadow: none;
}

#odSaveAsNewOverlay .odModalActions95 {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}

/* =========================
   Loader
   ========================= */
.main.isLoading .workspace,
.main.isLoading .toolbar,
.main.isLoading .framesHeader,
.main.isLoading .statusbar {
  opacity: 0;
  pointer-events: none;
}

.odMainLoader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  background: var(--cloud-bg);
  z-index: 50;
}

.main.isLoading .odMainLoader { display: flex; }

.odLoadBar {
  width: min(340px, 70%);
  height: 2px;
  background: var(--od-line);
  overflow: hidden;
}

.odLoadBarFill {
  height: 100%;
  width: 40%;
  background: var(--orange-primary);
  animation: odBarMove 0.9s ease-in-out infinite;
}

@keyframes odBarMove {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(260%); }
}

.odLoadText {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

canvas { touch-action: none; }

/* =========================
   Editor nav bar
   ========================= */
.editorNavBar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-right: auto;
}

.editorSelect {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--od-line2);
  background: var(--cloud-white);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-main);
  transition: border-color 0.12s;
}

.editorSelect:focus { border-color: rgba(26,24,20,.4); outline: none; }

.editorPlaySelect {
  min-width: 220px;
  font-weight: 500;
}

/* =========================
   Court popup
   ========================= */
.court-popup {
  position: fixed;
  top: 50%; left: 50%;
  right: auto; bottom: auto;
  width: min(560px, calc(100vw - 24px));
  background: var(--cloud-white);
  border: 1px solid var(--od-line);
  border-radius: 0;
  box-shadow: 0 20px 50px rgba(26,24,20,.14);
  z-index: 99999;
  /* JS muestra con style.display="block" + quita .hidden
     No usamos opacity/pointer-events para no romper ese mecanismo */
  transform: translate(-50%, -50%);
  display: none; /* estado base: oculto */
}

/* El JS hace classList.remove("hidden") + style.display="block" para abrir */
/* y classList.add("hidden") para cerrar — sin clase .show */
.court-popup.hidden { display: none !important; }

.court-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px 14px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--od-line);
  color: var(--text-muted);
}

#closeCourtPopup {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--od-line2);
  background: var(--cloud-white);
  border-radius: 0;
  font-weight: 400;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s;
}

#closeCourtPopup:hover {
  background: var(--od-muted);
  color: var(--text-main);
}

.court-popup-content {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  padding: 12px 14px 14px;
  height: auto;
  min-height: 0;
}

.court-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  border: 1px solid var(--od-line);
  border-radius: 0;
  background: var(--cloud-bg);
}

@media (max-width: 520px) {
  .court-popup-content { grid-template-columns: 1fr; }
  .court-preview img { max-height: 140px; }
}

/* =========================
   Entrance animations
   ========================= */
@keyframes odInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes odInRight {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes odInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes odModalIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.odModalOverlay.show { animation: odModalIn 0.2s ease-out forwards; }

.odModalOverlay.show .odModal,
#odSaveAsNewOverlay:not([hidden]) .odModal95 {
  animation: odModalIn 0.24s ease-out forwards;
}

#odSaveAsNewOverlay:not([hidden]) {
  animation: odModalIn 0.2s ease-out forwards;
}

/* =========================
   Accessibility
   ========================= */
@media (prefers-reduced-motion: reduce) {
  .topbar, .sidebar, .main,
  .odModalOverlay.show,
  #odSaveAsNewOverlay:not([hidden]),
  .odModalOverlay.show .odModal,
  #odSaveAsNewOverlay:not([hidden]) .odModal95 {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}