/* ═══════════════════════════════════════════════════════
   Awards — Page Styles
   Uses CSS variables from /theme.css
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* scrollbar-gutter + thin scrollbar styling come from shared/components.css */

body {
  font-family: var(--body-font, 'DM Sans', system-ui, -apple-system, sans-serif);
  font-size: 15px;
  background: var(--dt-bg, #03091a);
  color: var(--text, #c0d0ff);
  min-height: 100vh;
}

/* ── Header (extends shared/nav.css #site-header) ────── */

#header-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #7a99dd);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main layout ──────────────────────────────────────── */

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 68px 24px 120px;
}

/* ── Ceremony header ──────────────────────────────────── */

.ceremony-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 32px 0 24px;
}

.ceremony-icon {
  font-size: 44px;
  margin-bottom: 12px;
  display: block;
  opacity: 0.85;
}

.ceremony-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  color: var(--text, #c0d0ff);
  line-height: 1.2;
  margin-bottom: 6px;
}

.ceremony-sub {
  font-size: 14px;
  color: var(--text-muted, #7a99dd);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.info-btn {
  background: none;
  border: none;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  color: var(--text-muted, #7a99dd);
  opacity: 0.45;
  cursor: pointer;
  transition: opacity 0.15s;
}
.info-btn:hover { opacity: 1; }

/* ── Info drawer content ──────────────────────────────── */

.ip-venue {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 20px;
}

.ip-note {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Year navigation (Feature A) ────────────────────── */
/* Arrows & label use .btn-header from shared/components.css       */

.year-nav {
  --year-nav-h: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

#year-prev,
#year-next {
  width: var(--year-nav-h);
  height: var(--year-nav-h);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.year-nav-current { position: relative; height: var(--year-nav-h); }

#year-label {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 6px;
  padding: 0 16px;
  font-size: 16px;
  font-weight: 700;
}

.year-nav-caret {
  font-size: 10px;
  color: var(--text-muted, #7a99dd);
}

/* Year dropdown */
.year-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  max-width: calc(100vw - 32px);
  max-height: 360px;
  overflow-y: auto;
  background: var(--win-bg, #060d28);
  border: 1px solid var(--div-top, rgba(0,42,255,0.18));
  border-radius: var(--win-radius, 8px);
  padding: 12px;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.dd-decade-group { margin-bottom: 12px; }
.dd-decade-group:last-child { margin-bottom: 0; }

.dd-decade-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #7a99dd);
  opacity: 0.6;
  margin-bottom: 6px;
}

.dd-year-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.dd-year-btn {
  padding: 5px 4px;
  font-size: 12px;
  text-align: center;
}
.dd-year-btn.active {
  background: var(--btn-active-bg);
  color: var(--btn-active-fg);
  border-color: var(--btn-active-fg);
  font-weight: 600;
}

#view-toggle { margin-bottom: 20px; }

/* ── Winner flat row ────────────────────────────────── */

.winner-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--div-top, rgba(0,42,255,0.08));
  transition: background 0.15s;
}
.winner-row:last-child { border-bottom: none; }
.winner-row:hover {
  background: var(--hover-bg, rgba(0,42,255,0.04));
}

.winner-row-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #7a99dd);
  width: 200px;
  flex-shrink: 0;
  line-height: 1.4;
}

.winner-row-detail {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.winner-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.winner-row-people {
  font-size: 12px;
  color: var(--text-muted, #7a99dd);
}

.winner-row-sep {
  font-size: 12px;
  color: var(--text-muted, #7a99dd);
  opacity: 0.5;
}

/* Right-side KP slot in a winner-row. Pushed to the row's edge by
   margin-left:auto so it stays aligned even if the title wraps short. */
.winner-row-kps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
}
/* When .kp-link is a direct child of a row (not inside .nominee-title or
   .winner-row-detail), pull it flush right too. */
.nominee > .kp-link,
.winner-row > .kp-link {
  margin-left: auto;
  align-self: center;
}

/* ── Search results (page-specific) ──────────────────── */

.sr-item { flex-direction: column; gap: 2px; }

.sr-cat {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.7;
}

.sr-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sr-people {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Category card ────────────────────────────────────── */

.category {
  margin-bottom: 20px;
  border: 1px solid var(--div-top, rgba(0,42,255,0.12));
  border-radius: var(--win-radius, 8px);
  background: var(--win-bg, #060d28);
  overflow: hidden;
  transition: border-color 0.2s;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.category-header:hover {
  background: var(--hover-bg, rgba(0,42,255,0.07));
}
.category-header:focus-visible {
  outline: 2px solid var(--nav-active);
  outline-offset: -2px;
}

.category-arrow {
  font-size: 10px;
  color: var(--text-muted, #7a99dd);
  transition: transform 0.2s;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}
.category.open .category-arrow {
  transform: rotate(90deg);
}

.category-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #c0d0ff);
  flex: 1;
}

.category-winner-badge {
  font-size: 11px;
  color: var(--text-muted, #7a99dd);
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.category-body {
  display: none;
  padding: 0 18px 14px;
}
.category.open .category-body {
  display: block;
}

/* ── Nominee row ──────────────────────────────────────── */

.nominee {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--div-top, rgba(0,42,255,0.06));
}
.nominee:last-child {
  border-bottom: none;
}

.nominee-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 1px;
}

.nominee.is-winner .nominee-icon {
  color: #d4a84b;
}

.nominee-info {
  flex: 1;
  min-width: 0;
}

.nominee-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #c0d0ff);
  line-height: 1.3;
}
.nominee.is-winner .nominee-title {
  color: #d4a84b;
}

.nominee-people {
  font-size: 12px;
  color: var(--text-muted, #7a99dd);
  margin-top: 2px;
  line-height: 1.4;
}

.winner-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d4a84b;
  background: rgba(212,168,75,0.12);
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 8px;
  white-space: nowrap;
  vertical-align: middle;
}

/* Kinopoisk inline link — chip with paperclip icon + ru/en localised label
   ('кп' / 'kp') sitting after a film title. Visible only when nominee.kpId
   is set. Click opens kinopoisk.ru/{film|series}/<id>/ in a new tab; the
   click is stopped from bubbling so the surrounding category accordion
   doesn't toggle.                                                        */
.kp-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--hover-bg);
  border: 1px solid var(--div-top);
  border-radius: 3px;
  text-decoration: none;
  vertical-align: middle;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.kp-link-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  /* SVG inherits color from currentColor via stroke=currentColor */
  opacity: 0.7;
  transition: opacity 0.15s;
}
.kp-link-label { line-height: 1; }
.kp-link:hover {
  color: var(--text);
  border-color: var(--nav-active);
}
.kp-link:hover .kp-link-icon { opacity: 1; }
.kp-link:focus-visible {
  outline: 2px solid var(--nav-active);
  outline-offset: 2px;
}

/* GoT theme — slightly stronger contrast on the chip border */
html[data-style="got"] .kp-link {
  border-color: var(--header-btn-border);
  letter-spacing: 0.14em;
  font-family: var(--body-font, 'Cinzel', serif);
}
html[data-style="got"] .kp-link:hover { border-color: var(--header-text); }

/* Win95 — pixel font, square 3D bevel chip */
html[data-style="win95"] .kp-link {
  border-radius: 0;
  letter-spacing: 0;
  font-family: var(--body-font, 'W95FA', sans-serif);
  background: var(--win-bg, #c0c0c0);
  color: var(--text, #000);
  border: 2px solid;
  border-top-color: var(--btn-lt, #dfdfdf);
  border-left-color: var(--btn-lt, #dfdfdf);
  border-right-color: var(--btn-dk, #404040);
  border-bottom-color: var(--btn-dk, #404040);
  padding: 0px 5px;
}
html[data-style="win95"] .kp-link:hover { color: var(--nav-active, #000080); }
html[data-style="win95"] .kp-link:active {
  border-top-color: var(--btn-dk, #404040);
  border-left-color: var(--btn-dk, #404040);
  border-right-color: var(--btn-lt, #dfdfdf);
  border-bottom-color: var(--btn-lt, #dfdfdf);
}

/* Term — bracket-style chip, transparent bg + 1px frame */
html[data-style="term"] .kp-link {
  background: transparent;
  border: 1px solid var(--header-btn-border);
  border-radius: 0;
  color: var(--text);
  letter-spacing: 0.06em;
}
html[data-style="term"] .kp-link:hover {
  background: var(--btn-active-bg);
  color: var(--btn-active-fg);
  border-color: var(--btn-active-bg);
}

/* Brutal — soft pill with 2px frame, no fill */
html[data-style="brutal"] .kp-link {
  background: var(--win-bg);
  border: 2px solid var(--header-btn-border);
  border-radius: var(--win-radius, 6px);
  color: var(--text);
  font-weight: 500;
}
html[data-style="brutal"] .kp-link:hover {
  background: var(--hover-bg);
  border-color: var(--header-btn-border);
  color: var(--text);
}

/* ── Governors Awards section ─────────────────────────── */

.governors {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--div-top, rgba(0,42,255,0.12));
}

.governors-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #c0d0ff);
  margin-bottom: 20px;
}

.gov-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #7a99dd);
  opacity: 0.6;
  margin: 20px 0 10px;
}
.gov-section-label:first-child { margin-top: 0; }

.gov-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.gov-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.gov-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #c0d0ff);
}

.gov-desc {
  font-size: 12px;
  color: var(--text-muted, #7a99dd);
  margin-top: 2px;
}

/* ── Awards sidebar ──────────────────────────────────── */

#awards-sidebar {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 100;
  width: 210px;
}

#sidebar-toggle-btn {
  display: none;
}

.side-panel {
  background: var(--win-bg, #060d28);
  border: 1px solid var(--div-top, rgba(0,42,255,0.12));
  border-radius: var(--win-radius, 8px);
  padding: 10px 12px;
  backdrop-filter: blur(6px);
}

.side-panel-toggle {
  font-family: inherit;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted, #7a99dd);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.side-panel-toggle:hover { color: var(--text, #c0d0ff); }
.side-panel-toggle .arrow {
  font-size: 7px;
  color: var(--text-muted, #7a99dd);
}

.side-panel.collapsed .side-panel-body { display: none; }
.side-panel.collapsed .side-panel-toggle { margin-bottom: 0; }

.award-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--win-radius, 6px);
  color: var(--text-muted, #7a99dd);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-align: left;
}
.award-btn:hover {
  background: var(--hover-bg, rgba(0,42,255,0.07));
  color: var(--text, #c0d0ff);
}
.award-btn.active {
  background: var(--btn-active-bg, rgba(0,42,255,0.18));
  color: var(--btn-active-fg, #99b3ff);
  border-color: var(--btn-active-fg, #99b3ff);
}
.award-btn:focus-visible {
  outline: 2px solid var(--nav-active);
  outline-offset: 2px;
}

.award-icon { font-size: 16px; flex-shrink: 0; }
.award-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Theme switcher (position) ────────────────────────── */

#theme-switcher {
  position: fixed;
  bottom: 20px;
  left: 16px;
  z-index: 200;
  background: var(--header-btn-bg, rgba(6,0,0,0.7));
  border: 1px solid var(--header-btn-border, rgba(0,42,255,0.15));
  border-radius: var(--win-radius, 8px);
  padding: 6px 8px;
  backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════════════════════
   GOT overrides (page-specific only)
   ═══════════════════════════════════════════════════════ */

html[data-style="got"] #header-title {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.08em;
  font-size: 11px;
}
html[data-style="got"] .ceremony-title {
  letter-spacing: 0.04em;
}
html[data-style="got"] .category-name {
  letter-spacing: 0.04em;
  font-size: 12px;
}
html[data-style="got"] .category,
html[data-style="got"] .side-panel,
html[data-style="got"] .award-btn {
  border-radius: 0;
}
html[data-style="got"] .category-header:hover .category-name,
html[data-style="got"] .category-header:hover .category-winner-badge,
html[data-style="got"] .category-header:hover .category-arrow {
  color: var(--hover-fg, #f0e6d0);
}
html[data-style="got"] .award-btn:hover {
  color: var(--hover-fg, #f0e6d0);
}


/* ═══════════════════════════════════════════════════════
   WIN95 overrides (page-specific only)
   ═══════════════════════════════════════════════════════ */

html[data-style="win95"] #header-title {
  font-family: "W95FA", "MS Sans Serif", Arial, sans-serif;
  font-size: 12px; letter-spacing: 0;
}

html[data-style="win95"] main {
  background: var(--win-bg, #c0c0c0);
  border: 2px solid;
  border-top-color: var(--btn-lt, #dfdfdf);
  border-left-color: var(--btn-lt, #dfdfdf);
  border-right-color: var(--btn-dk, #404040);
  border-bottom-color: var(--btn-dk, #404040);
  box-shadow: var(--win-shadow);
}

html[data-style="win95"] .category,
html[data-style="win95"] .side-panel {
  border-radius: 0;
  border: 2px solid;
  border-top-color: var(--btn-dk, #404040);
  border-left-color: var(--btn-dk, #404040);
  border-right-color: var(--btn-lt, #dfdfdf);
  border-bottom-color: var(--btn-lt, #dfdfdf);
}
html[data-style="win95"] .award-btn {
  border-radius: 0;
  font-family: "W95FA", "MS Sans Serif", Arial, sans-serif;
  font-size: 11px; letter-spacing: 0;
}
html[data-style="win95"] .side-panel-toggle {
  font-family: "W95FA", "MS Sans Serif", Arial, sans-serif;
  letter-spacing: 0; font-size: 11px;
}

/* ── Win95 row hover: Explorer list-box selection ─────────
   Win95's Explorer / file-list selection style: royal-navy bar + white
   text + 1px dotted focus rectangle inside. The dotted outline is the
   defining Win95 mannerism — reads as "this row is selected" instantly. */
html[data-style="win95"] .winner-row:hover,
html[data-style="win95"] .category-header:hover {
  background: var(--hover-bg, #000080);
  outline: 1px dotted var(--hover-fg, #fff);
  outline-offset: -3px;
}
html[data-style="win95"] .winner-row:hover,
html[data-style="win95"] .winner-row:hover .winner-row-cat,
html[data-style="win95"] .winner-row:hover .winner-row-title,
html[data-style="win95"] .winner-row:hover .winner-row-people,
html[data-style="win95"] .winner-row:hover .winner-row-sep,
html[data-style="win95"] .category-header:hover .category-name,
html[data-style="win95"] .category-header:hover .category-winner-badge,
html[data-style="win95"] .category-header:hover .category-arrow {
  color: var(--hover-fg, #fff);
  /* Drop the 0.5 alpha on the em-dash so it stays readable on navy. */
  opacity: 1;
}
html[data-style="win95"] .award-btn:hover {
  background: var(--hover-bg, #000080);
  color: var(--hover-fg, #fff);
  outline: 1px dotted var(--hover-fg, #fff);
  outline-offset: -3px;
}

html[data-style="win95"] .ceremony-title {
  font-family: "W95FA", "MS Sans Serif", Arial, sans-serif;
  font-size: clamp(16px, 3vw, 22px);
}

/* ═══════════════════════════════════════════════════════
   MODERN overrides (page-specific only)
   ═══════════════════════════════════════════════════════ */

html[data-style="modern"] #header-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Manrope', system-ui, sans-serif;
  font-weight: 600; font-size: 13px; letter-spacing: 0;
}
html[data-style="modern"] .category,
html[data-style="modern"] .side-panel {
  border-radius: 16px;
  background: var(--win-bg);
  border: 1px solid var(--header-btn-border);
  box-shadow: var(--win-shadow);
}
html[data-style="modern"] .award-btn {
  border-radius: 10px;
  font-weight: 500;
}
html[data-style="modern"] .side-panel-toggle {
  font-family: -apple-system, BlinkMacSystemFont, 'Manrope', system-ui, sans-serif;
  letter-spacing: 0.04em; font-weight: 600;
}
html[data-style="modern"] .ceremony-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}
/* year-label / year-prev / year-next inherit .btn-header — no per-button
   backdrop-filter (see shared/components.css comment). */
html[data-style="modern"] .year-dropdown {
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  background: var(--panel-bg);
  border-radius: 18px;
  box-shadow: var(--win-shadow), 0 20px 48px rgba(0,0,0,0.12);
}
/* Modern pills are wide; year-grid needs tight padding and softer radius
   so 5 columns fit even on narrow viewports. */
html[data-style="modern"] .dd-year-btn {
  padding: 5px 4px;
  border-radius: 10px;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 900px) {
  #awards-sidebar {
    display: none;
    position: fixed;
    top: 44px;
    right: 0;
    left: auto;
    bottom: auto;
    width: 240px;
    padding: 12px;
    z-index: 450;
  }
  #awards-sidebar.open {
    display: block;
  }
  #sidebar-toggle-btn {
    display: inline-flex;
  }
}

@media (max-width: 600px) {
  main { padding: 64px 14px 100px; }
  .ceremony-header { padding: 20px 0 16px; }
  .ceremony-title { font-size: 22px; }
  .category-winner-badge { display: none; }
  .ceremony-meta { flex-direction: column; gap: 4px; }
  .year-nav { --year-nav-h: 34px; }
  #year-label { font-size: 14px; padding: 0 12px; }
  .year-dropdown { width: 280px; }
  .winner-row { flex-direction: column; gap: 4px; }
  .winner-row-cat { width: auto; }
  #awards-sidebar { width: auto; left: 14px; right: 14px; }
}

/* ── Edit mode (?edit) ─────────────────────────────────── */

/* Pencil button next to KP chip on each row */
.edit-pencil {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--div-top);
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  opacity: 0.7;
  transition: color 0.15s, border-color 0.15s, opacity 0.15s;
}
.edit-pencil:hover {
  color: var(--nav-active);
  border-color: var(--nav-active);
  opacity: 1;
}
.edit-pencil:focus-visible {
  outline: 2px solid var(--nav-active);
  outline-offset: 2px;
}
.edit-pencil.is-patched {
  color: var(--nav-active);
  border-color: var(--nav-active);
  opacity: 1;
}

/* Visual flag on rows that carry a pending patch */
.is-patched .nominee-title,
.winner-row-title.is-patched {
  text-decoration: underline dotted var(--nav-active);
  text-underline-offset: 3px;
}

/* ── Edit drawer ───────────────────────────────────────── */
#edit-drawer {
  z-index: 700;
}
#edit-drawer .edit-drawer-header {
  margin-bottom: 18px;
}
#edit-drawer .edit-ctx {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}
#edit-drawer #edit-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#edit-drawer .edit-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#edit-drawer .edit-label {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
#edit-drawer input[type="text"],
#edit-drawer input[type="number"],
#edit-drawer select {
  background: var(--win-bg);
  color: var(--text);
  border: 1px solid var(--div-top);
  border-radius: var(--win-radius, 4px);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  box-sizing: border-box;
}
#edit-drawer input:focus,
#edit-drawer select:focus {
  outline: 2px solid var(--nav-active);
  outline-offset: -1px;
  border-color: var(--nav-active);
}
#edit-drawer .edit-orig {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.7;
  font-style: italic;
}
#edit-drawer .edit-orig:empty { display: none; }
#edit-drawer .edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}
#edit-drawer .edit-save {
  background: var(--nav-active);
  color: var(--btn-active-fg, #fff);
  border-color: var(--nav-active);
}

/* Header "Export patches (N)" button — active when N > 0, muted when 0. */
#edit-export-btn {
  background: var(--nav-active);
  color: var(--btn-active-fg, #fff);
  border-color: var(--nav-active);
}
#edit-export-btn.empty {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--btn-border);
  cursor: default;
}
#edit-export-btn.copied {
  background: #2ea846;
  border-color: #2ea846;
}

/* Persistent bottom-right "Edit mode" indicator (mirror of westeros). */
#edit-badge {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 600;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  opacity: 0.5;
}
