.swr-root {
  --swr-bg: #111318;
  --swr-panel: #191c23;
  --swr-line: #2b313c;
  --swr-text: #e9edf2;
  --swr-muted: #8e9aa8;
  --swr-accent: #e6c46a;
  --swr-good: #5fd39a;
  --swr-bad: #ff7b80;
  --swr-warn: #f6bd60;
  /* The host tab is a fixed-height flex column that scrolls; never shrink below the content. */
  flex: 0 0 auto;
  min-height: 100%;
  padding: 22px;
  color: var(--swr-text);
  background: radial-gradient(circle at 92% 0%, rgba(230, 196, 106, .10), transparent 32%), var(--swr-bg);
  box-sizing: border-box;
  font-family: Inter, "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 13px;
}
.swr-root * { box-sizing: border-box; }
.swr-root h1 { margin: 2px 0 6px; font-size: 26px; letter-spacing: -.03em; }
.swr-root h2 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.swr-root h3 { margin: 0 0 8px; font-size: 13px; color: var(--swr-accent); }
.swr-header { max-width: 1280px; margin: 0 auto 14px; }
.swr-eyebrow { margin: 0; color: var(--swr-accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.swr-muted { color: var(--swr-muted); margin: 0; }
.swr-small { font-size: 12px; font-weight: 400; }
.swr-panel { max-width: 1280px; margin: 0 auto 12px; padding: 14px 16px; border: 1px solid var(--swr-line); border-radius: 12px; background: var(--swr-panel); }
.swr-row { display: flex; align-items: center; gap: 8px; }
.swr-wrap { flex-wrap: wrap; }
.swr-grow { flex: 1; }
.swr-field { display: grid; gap: 4px; color: var(--swr-muted); font-size: 11px; }
.swr-root select, .swr-root input[type="date"], .swr-root input[type="number"], .swr-input {
  height: 32px; padding: 0 8px; border: 1px solid var(--swr-line); border-radius: 7px; color: var(--swr-text); background: #10131a; font: inherit;
}
.swr-root input[type="number"] { width: 64px; }
.swr-input { min-width: 220px; }
.swr-btn { height: 32px; padding: 0 12px; border: 1px solid #3a4250; border-radius: 7px; color: var(--swr-text); background: #232833; font: inherit; cursor: pointer; white-space: nowrap; }
.swr-btn:hover:not(:disabled) { border-color: var(--swr-accent); }
.swr-btn:disabled { opacity: .45; cursor: default; }
.swr-primary { border-color: #c9a64c; color: #1b1606; background: var(--swr-accent); font-weight: 700; }
.swr-ghost { background: transparent; }
.swr-small-btn { height: 28px; padding: 0 10px; font-size: 12px; }
.swr-accounts .swr-small { margin-top: 8px; }
.swr-add { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--swr-line); }
.swr-results { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.swr-results li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px; border: 1px solid var(--swr-line); border-radius: 8px; }
.swr-busy { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--swr-accent); }
.swr-spinner { width: 14px; height: 14px; border: 2px solid rgba(230, 196, 106, .3); border-top-color: var(--swr-accent); border-radius: 50%; animation: swr-spin .8s linear infinite; }
@keyframes swr-spin { to { transform: rotate(360deg); } }
.swr-notice { max-width: 1280px; margin: 10px auto 0; padding: 8px 12px; border-radius: 8px; background: #1d2633; color: #cfe0f2; }
.swr-root > .swr-notice { margin-bottom: 12px; }
.swr-warn { background: #33290f; color: #f6d48b; }
.swr-error { background: #3a1a1d; color: #ffb3b6; }
.swr-seg { display: inline-flex; border: 1px solid var(--swr-line); border-radius: 8px; overflow: hidden; }
.swr-seg button, .swr-tabs button { height: 30px; padding: 0 12px; border: 0; color: var(--swr-muted); background: transparent; font: inherit; cursor: pointer; }
.swr-seg button.on { color: #1b1606; background: var(--swr-accent); font-weight: 700; }
.swr-tabs { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--swr-line); }
.swr-tabs button { border-radius: 7px; }
.swr-tabs button.on { color: var(--swr-text); background: #2a303c; font-weight: 700; }
.swr-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--swr-muted); font-size: 12px; }
.swr-total { color: var(--swr-muted); }
.swr-total b { color: var(--swr-text); }
.swr-split { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: minmax(300px, 1fr) minmax(420px, 1.4fr); gap: 12px; }
.swr-split > .swr-panel { margin: 0 0 12px; min-width: 0; }
.swr-table-wrap { overflow-x: auto; }
.swr-table { width: 100%; border-collapse: collapse; }
.swr-table th, .swr-table td { padding: 6px 8px; border-bottom: 1px solid #232833; text-align: left; white-space: nowrap; }
.swr-table th { color: var(--swr-muted); font-weight: 600; font-size: 12px; position: sticky; top: 0; background: var(--swr-panel); }
.swr-table th.sortable { cursor: pointer; user-select: none; }
.swr-table th.sortable:hover { color: var(--swr-text); }
.swr-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.swr-table tr.clickable { cursor: pointer; }
.swr-table tr.clickable:hover td { background: #1f242d; }
.swr-good { color: var(--swr-good); }
.swr-bad { color: var(--swr-bad); }
.swr-sel { color: var(--swr-accent); }
.swr-mon { display: inline-flex; align-items: center; gap: 5px; }
.swr-hidden { margin-left: 6px; padding: 1px 5px; border-radius: 4px; color: var(--swr-warn); background: #2a2412; font-size: 11px; }
.swr-mon-origin { color: var(--swr-muted); font-size: 12px; }
.swr-el { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #777; }
.swr-el-water { background: #4aa3ff; }
.swr-el-fire { background: #ff6a4d; }
.swr-el-wind { background: #f2c94c; }
.swr-el-light { background: #f4f1e6; }
.swr-el-dark { background: #a66bff; }
.swr-combo { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.swr-detail { border-color: #5b4d27; }
.swr-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 8px 0 14px; }
.swr-mini { padding: 10px; border: 1px solid var(--swr-line); border-radius: 8px; }
.swr-mini-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.swr-mini-row span:last-child { color: var(--swr-muted); font-variant-numeric: tabular-nums; }
.swr-empty p { margin: 4px 0; }
@media (max-width: 900px) {
  .swr-split, .swr-minis { grid-template-columns: 1fr; }
}

/* global statistics bar */
.swr-global { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--swr-line); }

/* ban/pick simulator */
.swr-sim-team { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.swr-sim-label { min-width: 110px; color: var(--swr-accent); font-weight: 700; }
.swr-pick { position: relative; display: inline-flex; align-items: center; }
.swr-pick-input { min-width: 0; width: 150px; }
.swr-pick-set { gap: 6px; height: 32px; padding: 0 6px 0 10px; border: 1px solid #3a4250; border-radius: 7px; background: #1d222b; }
.swr-x { width: 22px; height: 22px; border: 0; border-radius: 5px; color: var(--swr-muted); background: transparent; cursor: pointer; }
.swr-x:hover { color: var(--swr-bad); background: #2a1d20; }
.swr-pick-list { position: absolute; top: 36px; left: 0; z-index: 20; min-width: 240px; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--swr-line); border-radius: 8px; background: #151820; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.swr-pick-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.swr-pick-list li:hover { background: #232833; }
.swr-sim-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.swr-sim-summary > div { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--swr-line); border-radius: 8px; }
.swr-sim-summary b { font-size: 20px; }
.swr-badge { margin-left: 8px; padding: 1px 7px; border-radius: 999px; color: #1b1606; background: var(--swr-accent); font-size: 11px; font-weight: 800; }
.swr-matrix td, .swr-matrix th { text-align: center; }
.swr-matrix tr.swr-best td { background: rgba(230, 196, 106, .08); }
.swr-pairs { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; white-space: normal; }
@media (max-width: 900px) { .swr-sim-summary { grid-template-columns: 1fr; } }

/* hand-picked bans */
.swr-ban-toggle { height: 22px; padding: 0 7px; border: 1px solid #3a4250; border-radius: 5px; color: var(--swr-muted); background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.swr-ban-toggle:hover { border-color: var(--swr-bad); color: var(--swr-text); }
.swr-ban-toggle.on { border-color: var(--swr-bad); color: #fff; background: #6b2a30; }
.swr-pick-banned .swr-mon { text-decoration: line-through; opacity: .6; }
.swr-pick-banned { border-color: #6b2a30; }
.swr-chosen { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #5b4d27; border-radius: 8px; background: rgba(230, 196, 106, .05); }
.swr-chosen-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin: 8px 0 4px; }
.swr-chosen-result b { font-size: 18px; }
.swr-hint { margin: 0 0 10px; }
.swr-cell { cursor: pointer; }
.swr-cell:hover { background: #232833; }
.swr-matrix td.swr-cell-sel { outline: 2px solid var(--swr-accent); outline-offset: -2px; background: rgba(230, 196, 106, .12); }

/* recommendations */
.swr-recs td { vertical-align: middle; }
.swr-recs td:nth-child(2) { white-space: normal; }

/* owned monsters */
.swr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.swr-core .swr-mon::before { content: '★'; margin-right: 2px; color: var(--swr-accent); }

/* weak opponents and partial simulator */
.swr-weak-grid { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.swr-weak-grid > .swr-panel { margin: 0; min-width: 0; }
.swr-weak-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.swr-weak-card .swr-row { gap: 10px; }
.swr-fixed .swr-mon { text-decoration: underline dotted var(--swr-accent); text-underline-offset: 3px; }
.swr-warn-text { color: var(--swr-warn); }
@media (max-width: 1100px) { .swr-weak-grid, .swr-weak-cols { grid-template-columns: 1fr; } }

/* monster search */
.swr-search { display: inline-flex; align-items: center; gap: 6px; }
.swr-search .swr-input { min-width: 220px; }

/* match history */
.swr-picks { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; white-space: normal; max-width: 520px; }
.swr-pick-cell { display: inline-flex; align-items: center; gap: 3px; }
.swr-pick-cell.swr-banned .swr-mon { text-decoration: line-through; opacity: .5; }
.swr-leader { display: inline-block; width: 14px; height: 14px; border-radius: 3px; color: #1b1606; background: var(--swr-accent); font-size: 10px; font-style: normal; font-weight: 800; line-height: 14px; text-align: center; }

/* phone width (web version and exported HTML opened on a phone) */
.swr-seg button, .swr-tabs button { white-space: nowrap; }
@media (max-width: 640px) {
  .swr-root { padding: 12px; }
  .swr-root h1 { font-size: 22px; }
  .swr-panel { padding: 12px; }
  .swr-seg { display: flex; flex-wrap: wrap; width: 100%; }
  .swr-seg button { flex: 1 1 auto; padding: 0 8px; }
  .swr-tabs { flex-wrap: wrap; }
  .swr-tabs button { padding: 0 9px; }
  .swr-tabs .swr-grow { display: none; }
  .swr-search { display: flex; width: 100%; }
  .swr-search .swr-input { flex: 1 1 auto; min-width: 0; }
  .swr-table th, .swr-table td { padding: 6px 5px; }
  .swr-picks { display: grid; gap: 2px; min-width: 120px; max-width: none; }
  .swr-pick-cell { white-space: nowrap; }
  .swr-picks .swr-mon-origin { display: none; }
}

/* Web-only layout on top of the plugin styles (plugins/sw-rta-tracker/styles.css). */
html, body { margin: 0; min-height: 100%; background: #111318; }
.web-root { min-height: 100vh; }
.web-loading { color: #8e9aa8; padding: 24px; }
.web-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.web-file { position: relative; display: inline-flex; align-items: center; }
.web-file input { display: none; }
.web-help summary { cursor: pointer; list-style: none; }
.web-help summary::-webkit-details-marker { display: none; }
.web-help summary::before { content: '▸ '; color: var(--swr-accent); }
.web-help[open] summary::before { content: '▾ '; }
.web-help-body { margin-top: 10px; line-height: 1.7; }
.web-help-body ol { padding-left: 22px; }
.web-help-body li { margin-bottom: 10px; }
.web-help kbd { padding: 1px 6px; border: 1px solid #3a4250; border-bottom-width: 2px; border-radius: 4px; background: #1d222b; font: inherit; font-size: 12px; }
.web-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.web-step { display: grid; align-content: start; gap: 8px; padding: 10px 12px; border: 1px solid var(--swr-line); border-radius: 8px; }
.web-step h3 { margin: 0; }
.web-step .swr-row { gap: 6px; }
.web-step .swr-input { min-width: 0; width: 100%; }
.web-season { max-width: 90px; }
.web-step a.swr-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.web-paste { margin-top: 12px; }
.web-paste-box { width: 100%; height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; }
.swr-embedded { padding: 0; background: transparent; min-height: 0; }
@media (max-width: 1000px) { .web-steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .web-steps { grid-template-columns: 1fr; } }
