:root {
  color-scheme: dark;
  --bg: #131719;
  --panel: #1b2123;
  --line: #30393b;
  --text: #ebece5;
  --muted: #97a5a5;
  --accent: #b9e599;
  --gold: #e9c27a;
  --danger: #f1a694;
}
[hidden] { display: none !important; }
.file-filter { margin:0 0 12px; font-size:12px; }
.file-filter small { display:block; color:var(--muted); min-height:1.5em; }
.settings-option { display:block; padding:16px 0; }
.settings-option small { display:block; margin-top:6px; color:var(--muted); }
.save-location { margin-top:2px; padding:10px; border:1px solid var(--line); border-radius:6px; }
.save-location-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font-size:11px; }
.save-location-heading button { padding:4px 8px; font-size:11px; }
.save-location code { display:block; margin-top:8px; overflow-wrap:anywhere; font-size:11px; line-height:1.65; user-select:all; cursor:text; }
.save-location code:focus-visible { outline:1px solid var(--accent); outline-offset:3px; }
.draft-persistence { padding:0 0 12px; margin-bottom:8px; border-bottom:1px solid var(--line); }
.draft-persistence .text-button { margin-bottom:3px; }
#draft-status { display:block; font-size:11px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
#draft-status[data-phase="saved"] { color:var(--accent); }
#draft-status[data-phase="saving"],#draft-status[data-phase="loading"] { color:var(--gold); }
#draft-status[data-phase="error"],#draft-status[data-phase="blocked"],.draft-error { color:var(--danger); }
.draft-summary { display:flex; flex-wrap:wrap; gap:10px 24px; padding:14px; background:var(--bg); border:1px solid var(--line); border-radius:7px; }
.draft-summary b { color:var(--accent); margin-left:6px; }
.draft-actions { display:flex; gap:8px; flex-wrap:wrap; margin:20px 0; }
.draft-files { max-height:35vh; overflow:auto; overflow-wrap:anywhere; }
.workspace-transfer { border-top:1px solid var(--line); margin-top:24px; padding-top:8px; }
.workspace-transfer h3 { color:var(--accent); }
.workspace-transfer .draft-actions { margin:14px 0; }
#workspace-review-error { overflow-wrap:anywhere; }
button.danger { color:var(--danger); border-color:#78534a; }
.goal-seed-list { max-height:55vh; overflow:auto; margin-top:16px; }
.goal-seed-list table { width:100%; }
.goal-seed-list td { overflow-wrap:anywhere; }
.goal-seed-list small { display:block; }
.character-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:24px; padding:24px; border:1px solid #435c49; border-radius:10px; background:linear-gradient(110deg,#24382d,#1b2123); margin-bottom:22px; }
.character-summary h2 { margin:5px 0; font-size:26px; overflow-wrap:anywhere; }
.character-summary p { margin:0; color:var(--muted); }
.character-summary dl { display:flex; flex-wrap:wrap; gap:28px; margin:0; }
.character-summary dt { color:var(--muted); font-size:12px; }
.character-summary dd { margin:0; font-size:24px; color:var(--accent); }
.companion-files { display:flex; flex-wrap:wrap; gap:8px 20px; margin-top:18px; font-size:12px; overflow-wrap:anywhere; }
.companion-files .loaded { color:var(--accent); }
.shared-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.shared-mode { padding:16px; border:1px solid var(--line); border-radius:8px; min-width:0; }
.shared-mode.current { border-color:#5d745b; }
.shared-mode h4 { margin:0 0 12px; }
.shared-mode .fields { grid-template-columns:1fr; }
.preset-summary { display:flex; flex-wrap:wrap; align-items:center; gap:12px 22px; padding:16px; background:var(--panel); border-radius:8px; margin-bottom:18px; }
.preset-summary b { color:var(--accent); font-size:20px; margin-left:6px; }
.preset-summary .inline-actions { margin-left:auto; flex-wrap:wrap; }
.region-record { margin-bottom:10px; }
.skill-grid { margin-top:14px; }
.skill-grid > div { min-width:0; }
.quest-filter { margin-bottom:18px; }
.section-head > #loadout-picker { width:auto; min-width:220px; }
.field code { display:block; overflow-wrap:anywhere; }
@media (max-width:760px) { .shared-grid { grid-template-columns:1fr; } .character-summary { padding:18px; } .preset-summary .inline-actions { margin-left:0; } }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: 14px;
  line-height: 1.65;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #242d2f;
  color: var(--text);
  padding: 9px 15px;
  border-radius: 7px;
  transition: background 0.15s;
}
button:hover {
  background: #354143;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #182015;
  font-weight: 650;
}
button.primary:hover {
  background: #cfedb9;
}
button.quiet {
  background: transparent;
}
.full {
  width: 100%;
  margin-bottom: 9px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 246px;
  border-right: 1px solid var(--line);
  padding: 32px 22px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #171d1f;
}
.brand {
  display: flex;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  line-height: 1.25;
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 450;
}
.brand-mark {
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 31px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  transform: skew(-5deg);
}
.brand b {
  font-weight: 750;
}
.local-pill {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin: 22px 0 30px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.local-pill span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.sidebar-label {
  margin: 23px 0 12px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.4px;
}
.file-list {
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
}
.file-row {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid transparent;
  padding: 11px 9px;
  margin-bottom: 3px;
  line-height: 1.4;
  word-break: break-all;
}
.file-row.selected {
  border-color: #4e6050;
  background: #25302a;
}
.file-row strong {
  font-size: 12px;
  font-weight: 600;
}
.file-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
}
.file-row .dot {
  color: var(--gold);
  float: right;
}
.sidebar-bottom {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.sidebar-bottom small {
  display: block;
  font-size: 9px;
}
.text-button {
  background: none;
  border: 0;
  padding: 8px 0;
  text-align: left;
  color: var(--accent);
  font-size: 11px;
}
.sidebar-bottom .text-button { display:block; width:100%; }
.sidebar-bottom #catalog-state { display:block; }
.workspace {
  margin-left: 246px;
  min-height: 100vh;
}
header {
  height: 124px;
  padding: 31px 40px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
h1 {
  font-size: 23px;
  line-height: 1.4;
  font-weight: 550;
  margin: 7px 0 0;
  letter-spacing: -0.7px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 600;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
nav {
  display: flex;
  gap: 24px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  overflow: auto;
}
nav button {
  border: none;
  background: none;
  color: var(--muted);
  border-radius: 0;
  padding: 15px 0 14px;
  white-space: nowrap;
  font-size: 12px;
  border-bottom: 2px solid transparent;
}
nav button.active {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
nav button:hover {
  background: none;
  color: var(--text);
}
main {
  padding: 32px 40px 60px;
  max-width: 1500px;
}
.welcome {
  padding: 38px 0 0;
  position: relative;
}
.welcome h2 {
  font-size: clamp(32px, 3.9vw, 54px);
  font-weight: 450;
  letter-spacing: -2.5px;
  line-height: 1.25;
  margin: 22px 0;
}
.welcome h2 em {
  font-style: normal;
  color: var(--accent);
}
.welcome p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.9;
}
.large {
  padding: 13px 20px;
  min-width: 230px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}
.welcome-path {
  font-size: 11px;
  color: var(--muted);
  margin: 18px 0 40px;
}
.welcome-path code {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}
.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 48px;
}
.feature-row article {
  padding: 22px 25px 0 0;
}
.feature-row article + article {
  padding-left: 25px;
  border-left: 1px solid var(--line);
}
.feature-row span {
  font-size: 9px;
  color: var(--accent);
  letter-spacing: 1.5px;
}
.feature-row h3 {
  font-size: 16px;
  font-weight: 500;
}
.feature-row p {
  font-size: 12px;
}
.empty-small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  font-weight: 500;
  margin: 0;
}
.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 23px;
  margin-bottom: 20px;
}
.card h3 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
}
.fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.field {
  min-width: 0;
}
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  color: #c2cbca;
}
.field small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
input,
select,
textarea {
  background: #131a1c;
  border: 1px solid #3a4547;
  color: var(--text);
  padding: 9px 11px;
  border-radius: 6px;
  max-width: 100%;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
}
input,
select {
  width: 100%;
}
input[type="checkbox"] {
  width: 16px;
  accent-color: var(--accent);
}
textarea {
  width: 100%;
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
}
.badge {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #2d382d;
  color: var(--accent);
  white-space: nowrap;
}
.badge.amber {
  background: #42392a;
  color: var(--gold);
}
.notice {
  border-left: 2px solid var(--gold);
  background: #252720;
  padding: 13px 16px;
  font-size: 12px;
  color: #d5cbb1;
  margin-bottom: 20px;
}
.notice p {
  margin: 0;
}
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar select {
  width: auto;
  max-width: 300px;
}
.split {
  display: grid;
  grid-template-columns: minmax(250px, 0.85fr) minmax(350px, 1.65fr);
  gap: 20px;
  align-items: start;
}
.item-list {
  max-height: 72vh;
  overflow: auto;
}
.item-row {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 1px solid var(--line);
  padding: 13px 15px;
  margin-bottom: 7px;
  border-radius: 8px;
}
.item-row.active {
  background: #29332a;
  border-color: #718966;
}
.item-row strong {
  font-size: 13px;
  color: var(--gold);
}
.item-row small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.total-headers {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 16px 0;
}
.total-headers strong { margin-left: 10px; font-size: 1.4rem; color: var(--accent); }
.total-headers small { color: var(--muted); }
.total-breakdown { overflow-x: auto; }
.total-breakdown table { min-width: 620px; }
.total-preview details { margin-top: 16px; }
.game-tooltip {
  --item-purple: #a394ff;
  --item-gold: #f9dc91;
  --item-pink: #ff71be;
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 24px 22px;
  border: 1px solid #765436;
  border-top: 2px solid #be8e58;
  border-bottom: 2px solid #be8e58;
  border-radius: 3px;
  background: radial-gradient(ellipse at top, #30201c77, transparent 65%), #101012;
  box-shadow: inset 0 0 0 4px #201a17, 0 14px 32px #0003;
  text-align: center;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.tooltip-kicker { color: #ab9d89; font-size: 10px; letter-spacing: 1.3px; margin-bottom: 14px; }
.game-tooltip h3.tooltip-name { font-size: clamp(23px, 2.1vw, 34px); font-weight: 800; color: #eee4d2; margin: 0 0 5px; line-height: 1.25; }
.game-tooltip.rarity-runeword h3.tooltip-name, .game-tooltip.rarity-rare h3.tooltip-name { color: var(--item-gold); }
.game-tooltip.rarity-unique h3.tooltip-name { color: #ff6559; }
.tooltip-subtitle { color: #aba8a6; font-size: 14px; font-weight: 700; }
.tooltip-runes { color: #e2dfdb; font-size: 15px; font-weight: 650; margin-top: 5px; }
.tooltip-headers { border-top: 1px solid #66583b; border-bottom: 1px solid #66583b; margin: 22px auto; padding: 18px 0; font-size: 18px; line-height: 1.7; font-weight: 700; }
.tooltip-headers strong { color: var(--item-purple); font-size: 1.15em; }
.tooltip-headers span { color: #b8b3ac; }
.tooltip-options { margin: 25px 0 18px; }
.tooltip-option { color: var(--item-purple); font-size: clamp(16px, 1.25vw, 20px); line-height: 1.65; font-weight: 750; }
.tooltip-option.is-skill { color: var(--item-gold); }
.tooltip-option.is-corrupted { color: var(--item-pink); }
.tooltip-range { color: #aaa4a0; font-size: .86em; white-space: nowrap; }
.tooltip-tier { color: var(--item-gold); font-size: .75em; white-space: nowrap; display: inline-block; margin-inline-start: .35em; }
.corruption-tag { display: inline-block; color: var(--item-pink); border: 1px solid #71324e; border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: middle; font-size: 9px; line-height: 1.7; font-weight: 500; }
.tooltip-sockets { color: var(--item-purple); font-weight: 700; font-size: 17px; margin: 16px 0; }
.socket-dots { display: flex; justify-content: center; gap: 8px; margin-top: 11px; }
.socket-dots span { display: inline-grid; place-items: center; color: #625653; border: 1px solid #5e493a; width: 25px; height: 25px; border-radius: 50%; background: #1c1716; font-size: 12px; }
.socket-dots .filled { color: #e7c77c; border-color: #aa8653; background: #392d24; }
.tooltip-upgrade { font-size: 15px; color: var(--item-gold); margin: 20px 0; }
.tooltip-upgrade strong { color: var(--item-pink); letter-spacing: 4px; font-size: 22px; padding-left: 9px; }
.tooltip-luck { color: var(--item-gold); padding: 12px; border-top: 1px solid #473c2f; font-size: 14px; }
.game-tooltip footer { border-top: 1px solid #66583b; margin-top: 24px; padding-top: 18px; color: #bfb9b4; font-size: 16px; font-weight: 600; }
.game-tooltip footer strong { color: var(--item-gold); }
.game-tooltip.unsupported { color: #b7b2a9; font-size: 13px; }
.tooltip-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; font-size: 11px; margin: 17px 0; }
.tooltip-legend span::before { content: '●'; margin-right: 5px; font-size: 8px; }
.legend-base { color: #a394ff; }.legend-skill { color: #f9dc91; }.legend-corruption { color: #ff71be; }
.affix-summary { font-size: 12px; line-height: 1.7; color: var(--muted); }
.socket-summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; font-size: 13px; }
.socket-list { display: grid; gap: 8px; }
.socket-row { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 5px 12px; align-items: center; background: #151c1e; border: 1px solid #35423f; border-radius: 8px; padding: 13px; }
.socket-number { display: grid; place-items: center; border: 1px solid #92734c; color: var(--gold); background: #2d251f; width: 32px; height: 32px; border-radius: 50%; font-size: 13px; }
.socket-description strong { font-size: 13px; color: #ebd6a7; }
.socket-description small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; overflow-wrap: anywhere; }
.socket-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.socket-actions button { padding: 6px 10px; font-size: 11px; }
.socket-inactive { border-style: dashed; border-color: #67503c; }
.socket-inactive .socket-number { color: #a29485; border-style: dashed; }
.recipe-picker { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.recipe-picker label { display: block; font-size: 12px; margin-bottom: 8px; color: #c2cbca; }
.recipe-picker .inline-actions { align-items: stretch; }
.recipe-picker select { min-width: 0; flex: 1; width: 100%; }
.recipe-picker button { flex-shrink: 0; font-size: 11px; }
.socket-dialog-fields { grid-template-columns: 1fr 1fr; }
.socket-choice-field { grid-column: 1 / -1; }
#socket-edit-error:empty, #recipe-error:empty { display: none; }
#socket-draft-preview, #recipe-preview { margin-top: 20px; }
#modal:has(#socket-apply) .modal-actions, #modal:has(#recipe-apply) .modal-actions {
  position: sticky;
  bottom: -30px;
  background: #1c2426;
  border-top: 1px solid var(--line);
  padding: 15px 0 20px;
  z-index: 1;
}
@media (max-width: 600px) {
  .game-tooltip { padding: 22px 15px 18px; }
  .tooltip-option { font-size: 15px; }
  .tooltip-headers { font-size: 16px; }
  .socket-actions { grid-column: 1 / -1; }
  .recipe-picker .inline-actions { flex-direction: column; }
  .subtabs, .inline-actions { flex-wrap: wrap; }
}
.item-detail h2 {
  font-size: 25px;
  color: var(--gold);
  margin: 5px 0;
}
.item-detail .source {
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 400;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
}
td {
  border-bottom: 1px solid #293234;
  padding: 10px 8px;
  vertical-align: middle;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.value {
  color: var(--accent);
  font-weight: 600;
}
.search-conditions {
  max-height: 360px;
  overflow: auto;
}
.search-conditions input[type="number"] {
  width: 90px;
  padding: 5px 8px;
}
.subtabs {
  display: flex;
  gap: 6px;
  margin: 20px 0;
}
.subtabs button {
  font-size: 12px;
}
.subtabs button.active {
  border-color: var(--accent);
  color: var(--accent);
}
.results button {
  padding: 6px 12px;
  font-size: 11px;
}
.results td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.ranking-settings {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 16px;
}
.history-list {
  max-height: 55vh;
  overflow: auto;
  margin-top: 16px;
}
.history-entry {
  padding: 15px 0;
  border-bottom: 1px solid #334137;
}
.history-entry small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.check-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 600;
}
.check-label input {
  width: auto;
}
.search-conditions th:last-child {
  min-width: 70px;
}
.progress {
  height: 3px;
  background: #334137;
  margin: 12px 0;
}
.progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: var(--accent);
}
.tree-count {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 300;
  color: var(--accent);
  margin-bottom: 10px;
}
.inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.spaced {
  margin-top: 20px;
}
.raw-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 2fr;
  gap: 16px;
  margin-bottom: 10px;
  align-items: center;
}
.raw-row label {
  font-family: Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.raw-row input {
  font-family: Consolas, monospace;
  font-size: 12px;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  font-size: 12px;
}
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-state h2 {
  color: var(--text);
  font-weight: 500;
}
dialog {
  background: #1c2426;
  color: var(--text);
  border: 1px solid #4a5857;
  border-radius: 14px;
  width: min(800px, 90vw);
  max-height: 85vh;
  padding: 30px;
}
dialog::backdrop {
  background: #080e10c9;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 22px;
  margin-top: 0;
}
dialog p,
dialog li {
  font-size: 13px;
  color: #bbc6c3;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 25px;
}
.review-list {
  max-height: 45vh;
  overflow: auto;
}
.review-change {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  word-break: break-all;
}
.review-change del {
  color: var(--muted);
  display: block;
}
.review-change ins {
  color: var(--accent);
  text-decoration: none;
  display: block;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #dbe8d2;
  color: #182019;
  padding: 12px 24px;
  border-radius: 7px;
  max-width: 80vw;
  z-index: 10;
  font-size: 13px;
  box-shadow: 0 10px 50px #0006;
}
.danger {
  color: var(--danger);
}
.drop-active {
  outline: 2px dashed var(--accent);
  outline-offset: -14px;
}
.mono {
  font-family: Consolas, monospace;
}
details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}
details {
  margin-top: 18px;
}
.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 6px 0;
  font-size: 12px;
}
.footer-note {
  color: var(--muted);
  font-size: 11px;
  margin-top: 20px;
}
@media (min-width: 1600px) {
  main {
    padding: 40px 60px;
  }
  header,
  nav {
    padding-left: 60px;
    padding-right: 60px;
  }
}
@media (max-width: 1100px) {
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split {
    grid-template-columns: 1fr;
  }
  .item-list {
    max-height: 300px;
  }
  header {
    height: auto;
    align-items: start;
  }
  .header-actions {
    flex-direction: column;
    align-items: end;
    gap: 6px;
  }
  .header-actions .muted {
    font-size: 10px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: relative;
    width: auto;
    max-height: none;
    padding: 18px;
  }
  .brand {
    display: none;
  }
  .local-pill {
    margin: 0 0 12px;
  }
  .sidebar .full {
    display: inline-block;
    width: calc(50% - 7px);
  }
  .sidebar-label,
  .file-list {
    display: none;
  }
  .sidebar-bottom {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .sidebar-bottom small,
  .sidebar-bottom .text-button,
  .text-button {
    display: none;
  }
  .sidebar-bottom #settings-button,
  .sidebar-bottom #perfect-seeds-button,
  .sidebar-bottom #search-history-button {
    display: inline-flex;
    width: auto;
    margin-right: 12px;
  }
  .workspace {
    margin: 0;
  }
  header {
    padding: 22px 20px;
  }
  h1 {
    font-size: 19px;
  }
  nav {
    padding: 0 20px;
    gap: 20px;
  }
  main {
    padding: 24px 20px;
  }
  button {
    padding: 8px 12px;
  }
  .header-actions button {
    font-size: 11px;
  }
  .feature-row {
    grid-template-columns: 1fr;
  }
  .feature-row article + article {
    padding-left: 0;
    border-left: 0;
  }
  .fields {
    grid-template-columns: 1fr 1fr;
  }
  .raw-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .welcome h2 {
    letter-spacing: -1.5px;
  }
  .card {
    padding: 18px;
  }
  .sidebar-bottom > span {
    display: block;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

.workspace-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.file-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}
.file-switch select {
  width: auto;
  max-width: 350px;
}
.workspace-toolbar button {
  font-size: 11px;
  padding: 7px 10px;
}
.raw-row .field > label {
  display: none;
}
.raw-row .field small:empty {
  display: none;
}
.raw-row .field input {
  width: 100%;
}
.item-json {
  font-size: 11px;
  line-height: 1.65;
  max-height: 250px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #131a1c;
  padding: 12px;
  border-radius: 6px;
}
.changed {
  border-color: #809b6d;
}
progress {
  width: 100%;
  height: 5px;
  accent-color: var(--accent);
  margin-top: 15px;
}
.search-conditions td small {
  display: block;
  font-size: 10px;
}
pre {
  white-space: pre-wrap;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
}
@media (max-width: 760px) {
  .file-switch {
    width: 100%;
  }
  .file-switch select {
    max-width: 100%;
    flex: 1;
  }
  .workspace-toolbar .inline-actions {
    flex-wrap: wrap;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .card {
    overflow-x: auto;
  }
  .search-conditions input[type="number"] {
    width: 75px;
  }
  .header-actions {
    min-width: 145px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Two independent named Codex choices should use the available detail width. */
.fields.codex-extra-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media (max-width:760px) { .fields.codex-extra-fields { grid-template-columns:1fr; } }
.search-conditions table { min-width:620px; }
.search-conditions td:nth-child(2) { min-width:140px; }
/* Managed Turnstile runs without a prompt; an interactive request is deferred. */
.automatic-seed-challenge { position:fixed; right:16px; bottom:16px; z-index:1000; }
