:root { color-scheme: dark; font-family: "Segoe UI", "Malgun Gothic", sans-serif; background: var(--theme-page); color: var(--theme-text); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.review-notice { position: fixed; z-index: 1000; top: 50%; left: 50%; width: min(560px, calc(100vw - 32px)); padding: 18px 22px; transform: translate(-50%, calc(-50% + 12px)); border: 1px solid #e17b7b; border-radius: 10px; background: rgb(72 43 50 / 82%); box-shadow: 0 12px 40px rgb(0 0 0 / 55%); color: #fff0f0; font-size: 15px; font-weight: 700; line-height: 1.6; text-align: center; opacity: 0; transition: opacity 220ms ease, transform 220ms ease; pointer-events: none; backdrop-filter: blur(5px); }
.review-notice.visible { transform: translate(-50%, -50%); opacity: 1; }
.review-notice[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .review-notice { transition: none; }
}
header { padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--theme-border); }
.header-actions { display: flex; align-items: center; gap: 10px; }
h1 { margin: 0; font-size: 25px; letter-spacing: .03em; }
h2 { font-size: 16px; margin: 12px 0; }
header p { color: var(--theme-muted); margin: 8px 0 0; }
main { padding: 18px 24px; }
.panel { background: var(--theme-panel); border: 1px solid var(--theme-border); border-radius: 10px; padding: 14px; }
.actions, .controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 12px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--theme-soft-text); }
button, select, input, .upload { background: var(--theme-control); border: 1px solid var(--theme-border-strong); border-radius: 6px; padding: 8px 10px; color: var(--theme-text); font: inherit; font-size: 13px; min-height: 35px; }
button, .upload { cursor: pointer; }
button:hover, .upload:hover { background: var(--theme-surface-hover); }
button:disabled, fieldset:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--theme-accent); }
.upload { background: var(--theme-accent-strong); }
.upload input { display: none; }
.secondary { background: var(--theme-control); }
.danger { border-color: #e25b63; background: #8f2933; color: #fff; }
.danger:hover { background: #b8323f; }
input[type=number] { width: 80px; }
#images { max-width: 230px; }
#templates { max-width: 180px; }
.badge { border: 1px solid var(--theme-border-strong); color: var(--theme-muted); border-radius: 20px; padding: 7px 12px; font-size: 12px; align-self: center; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; }
.viewer-panel { padding: 10px; min-width: 0; }
#viewer { height: 560px; overflow: auto; background: var(--theme-page); border-radius: 5px; }
canvas { display: block; touch-action: none; }
.hint { font-size: 12px; color: var(--theme-muted); line-height: 1.7; }
fieldset { border: 1px solid var(--theme-border-strong); border-radius: 6px; margin: 12px 0; padding: 10px; }
fieldset label { margin: 8px 0; }
.check { flex-direction: row; align-items: center; }
.check input { min-height: auto; }
.table-scroll { max-height: 240px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; position: sticky; top: 0; background: var(--theme-control); }
td, th { padding: 7px; border-bottom: 1px solid var(--theme-border); }
tr.selected { background: #54402b; }
.column-button { background: none; border: 0; min-height: 0; padding: 0; text-align: left; }
#boundaries { width: 100%; }
#delete-boundary { margin-top: 8px; }
#status { margin-top: 12px; font-size: 13px; }
#status.error { border-color: #e17b7b; color: #ffd0d0; }
#zoom { min-width: 45px; text-align: center; padding-bottom: 8px; font-size: 13px; }
.footer { margin-bottom: 0; }
.ocr-panel { margin-top: 14px; }
.batch-panel { margin-top: 12px; }
.batch-progress { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr); align-items: center; gap: 12px; margin: 12px 0; }
.batch-progress progress { width: 100%; height: 18px; accent-color: var(--theme-accent); }
.batch-progress .hint { margin: 0; }
.current-image-progress progress { accent-color: #72d6a0; }
.batch-panel tr.active { background: var(--theme-surface-hover); }
.batch-panel .batch-select { text-align: left; }
.batch-panel td { vertical-align: top; }
.batch-image-list { max-height: 210px; }
.batch-row-navigation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; padding: 10px; border: 1px solid var(--theme-border-strong); border-radius: 8px; background: var(--theme-surface); }
.batch-row-navigation button:last-child { background: var(--theme-accent-strong); border-color: var(--theme-accent); font-weight: 700; }
.batch-row-navigation button:last-child:disabled { background: var(--theme-control); }
.row-review #ocr-results { display: block; width: 100%; }
.row-review #ocr-results thead { display: none; }
.row-review #ocr-results tbody, .row-review #ocr-results tbody tr { display: grid; width: 100%; }
.row-review #ocr-results tbody tr { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.row-review #ocr-results tbody th { grid-column: 1 / -1; position: static; padding: 10px; color: #fff; font-size: 15px; }
.row-review #ocr-results td { position: relative; min-width: 0; padding: 10px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); }
.row-review #ocr-results input { width: 100%; }
.guild-name-candidates { width: 100%; margin-top: 7px; }
.guild-name-candidates:disabled { opacity: .72; }
.row-review #ocr-results .source-cell-preview-wrap { position: relative; width: max-content; max-width: 100%; margin: 6px 0; }
.row-review #ocr-results .source-cell-preview { display: block; max-width: 100%; max-height: 82px; image-rendering: pixelated; background: var(--theme-page); }
.row-review #ocr-results .source-cell-preview-details { position: absolute; z-index: 5; top: 0; left: 0; display: none; width: max-content; max-width: min(900px, calc(100vw - 40px)); max-height: calc(100vh - 40px); gap: 12px; padding: 12px; overflow: auto; border: 1px solid var(--theme-accent); border-radius: 8px; background: rgb(12 16 25 / 96%); box-shadow: 0 8px 24px rgb(0 0 0 / 75%); }
.row-review #ocr-results .source-cell-preview-wrap:hover .source-cell-preview-details,
.row-review #ocr-results .source-cell-preview-wrap:focus-within .source-cell-preview-details { display: flex; }
.row-review #ocr-results .source-cell-preview-details > div { display: grid; align-content: start; gap: 6px; min-width: 0; }
.row-review #ocr-results .source-cell-preview-details strong { color: var(--theme-text); font-size: 12px; }
.row-review #ocr-results .source-cell-preview-large,
.row-review #ocr-results .processed-cell-preview-large { display: block; width: auto; height: auto; max-width: min(420px, calc(50vw - 50px)); max-height: calc(100vh - 100px); image-rendering: pixelated; background: #fff; }
.row-review .ocr-scroll { max-height: none; overflow: visible; }
.duplicate-review { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--theme-border); }
.duplicate-review h3 { font-size: 14px; }
.duplicate-review td { vertical-align: top; }
.duplicate-review select { min-width: 240px; max-width: 100%; }
.page-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.site-nav { display: flex; gap: 8px; margin-bottom: 14px; }
.site-nav button[aria-current="page"] { background: var(--theme-accent-strong); border-color: var(--theme-accent); }
.outside-records-view h2 { margin-top: 0; }
.outside-records-filters { margin-top: 14px; }
.outside-records-filters input { min-width: 240px; }
.outside-records-view #outside-records-table { width: 100%; }
.outside-records-view #outside-records-table th,
.outside-records-view #outside-records-table td { text-align: left; vertical-align: middle; }
.outside-records-view #outside-records-table th:not(:last-child),
.outside-records-view #outside-records-table td:not(:last-child) { border-right: 1px solid var(--theme-border-strong); }
.outside-records-view #outside-records-table th:first-child { width: 190px; min-width: 170px; }
.outside-records-view #outside-records-table select { min-width: 145px; max-width: 210px; }
.outside-records-view #outside-records-table input { min-width: 150px; max-width: 210px; }
.outside-records-view #outside-records-table input:disabled { opacity: .55; cursor: not-allowed; }
.outside-records-view #outside-records-table td:nth-child(5),
.outside-records-view #outside-records-table td:nth-child(6) { text-align: right; }
.outside-record-row { cursor: pointer; }
.outside-record-row:hover { background: var(--theme-surface-hover); }
.outside-records-view #outside-records-table .user-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 2px 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-accent);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outside-records-view #outside-records-table .user-link:hover { background: transparent; }
.guild-info-view h2,
.guild-info-view h3 { margin-top: 0; }
.guild-info-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.guild-info-grid { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.5fr); gap: 14px; margin-top: 14px; }
.guild-info-section { min-width: 0; padding: 14px; border: 1px solid var(--theme-border); border-radius: 8px; background: #172234; }
.guild-info-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.guild-info-section-heading h3 { margin-bottom: 4px; font-size: 16px; }
.guild-info-section-heading p { margin: 0; }
.guild-info-section-heading label { min-width: min(210px, 50%); }
.guild-info-section-heading input { width: 100%; }
.guild-roster-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 6px; max-height: 620px; margin: 0; padding: 0 5px 0 0; overflow: auto; list-style: none; }
.guild-roster-list li { min-width: 0; padding: 7px 9px; overflow-wrap: anywhere; border: 1px solid #334b68; border-radius: 6px; background: var(--theme-surface); color: #dce8f7; font-size: 12px; }
.guild-roster-list li.temporary-guild-member { border-color: #a87831; color: #ffdb88; }
.guild-roster-list li.guild-roster-empty { grid-column: 1 / -1; border: 0; background: transparent; color: var(--theme-muted); }
.guild-history-section .records-table-scroll { max-height: 620px; overflow: auto; }
.guild-history-section #guild-history-table { width: 100%; }
.guild-history-section #guild-history-table td:first-child { white-space: nowrap; }
.guild-event-left { color: #ffc2c6; }
.guild-event-joined { color: #a8e3c3; }
.guild-event-unknown { color: var(--theme-soft-text); }
@media (max-width: 760px) {
  .guild-info-grid { grid-template-columns: minmax(0, 1fr); }
  .guild-info-section-heading { align-items: stretch; flex-direction: column; }
  .guild-info-section-heading label { min-width: 0; }
}
.view-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.view-heading h2 { margin: 0; }
.view-heading p { margin: 7px 0 0; }
.users-filters { align-items: end; margin-top: 14px; }
.users-filters input { min-width: 240px; }
.users-metric-filter { margin: 4px 0 10px; padding: 8px 10px; border: 1px solid var(--theme-border); border-radius: 6px; background: var(--theme-surface); }
.users-metric-filter > summary { cursor: pointer; color: var(--theme-soft-text); font-size: 12px; font-weight: 700; }
.users-metric-options { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 9px; }
.users-metric-option { flex-direction: row; align-items: center; gap: 6px; }
.users-metric-option input { min-height: 0; accent-color: var(--theme-accent); }
.users-view-toggle { display: flex; justify-content: flex-end; gap: 6px; margin: 4px 0 10px; }
.users-view-toggle button[aria-pressed="true"], .class-filter-button[aria-pressed="true"] { background: var(--theme-accent-strong); border-color: var(--theme-accent); }
.users-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.user-card { display: grid; gap: 12px; min-width: 0; padding: 13px; text-align: left; background: var(--theme-surface); border-color: var(--theme-border); }
.user-card-heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.user-card-heading > strong { min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.user-card-details { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.user-card-details .user-primary-class { min-width: 0; padding: 3px 8px; border: 1px solid #46617f; border-radius: 999px; background: #293e57; color: #c3ddf7; font-size: 10px; line-height: 1.4; }
.user-primary-class { display: block; color: var(--theme-muted); font-size: 11px; font-weight: 400; }
.guild-status { flex: 0 0 auto; padding: 3px 7px; border: 1px solid var(--theme-border-strong); border-radius: 999px; color: var(--theme-soft-text); font-size: 10px; font-weight: 700; line-height: 1.4; }
.guild-status.participant { border-color: #35765a; background: #203c35; color: #a8e3c3; }
.guild-status.not_participated { border-color: #93763a; background: #423921; color: #ffe09b; }
.guild-status.battle_only { border-color: #a14b55; background: #482c36; color: #ffc2c6; }
.users-view .user-link { display: inline-grid; justify-items: start; gap: 2px; }
.user-card-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.user-card-metrics > span { display: grid; gap: 3px; min-width: 0; }
.user-card-metrics > span > span { color: var(--theme-muted); font-size: 11px; }
.user-card-metrics strong { overflow-wrap: anywhere; font-size: 13px; font-variant-numeric: tabular-nums; }
.users-view[data-user-view="grid"] .records-table-scroll { display: none; }
.users-view[data-user-view="list"] .users-grid { display: none; }
.users-view #users-table { width: 100%; white-space: nowrap; }
.users-view #users-table thead th:nth-child(n+2), .users-view #users-table tbody td { text-align: right; }
.users-view[data-user-view="list"] #users-table th:not(:last-child),
.users-view[data-user-view="list"] #users-table td:not(:last-child) { border-right: 1px solid var(--theme-border-strong); }
.users-view #users-table tbody tr { cursor: pointer; }
.users-view #users-table tbody tr.guild-only-row { cursor: default; }
.users-view .user-link:disabled { opacity: 1; color: #d6e0ee; text-decoration: none; }
.users-view #users-table tbody tr:hover { background: var(--theme-surface-hover); }
.user-link { min-height: 0; padding: 3px 6px; border: 0; background: transparent; color: var(--theme-accent); text-decoration: underline; }
.user-link:hover { background: var(--theme-surface-hover); }
.users-view .user-link { min-height: 32px; padding: 2px 0; text-decoration: none; font-weight: 700; }
.users-view .user-link > span:first-child { font-size: 16px; }
.users-view[data-user-view="list"] .user-link { display: inline-flex; max-width: 100%; align-items: center; flex-wrap: nowrap; gap: 8px 12px; }
.users-view[data-user-view="list"] .user-link > span:first-child { flex: 0 0 auto; white-space: nowrap; }
.users-view[data-user-view="list"] .user-link .user-primary-class { display: inline; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-heading > strong { font-size: 18px; }
.page-tabs button[aria-selected="true"] { background: var(--theme-accent-strong); border-color: var(--theme-accent); }
.records-view h2 { margin-top: 0; }
.records-view > h2 { margin-bottom: 6px; font-size: 20px; }
.records-view > .hint { max-width: 1000px; margin: 0 0 16px; }
.records-filters { align-items: end; padding: 12px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); }
.records-filters input { min-width: 220px; }
.records-filters select { min-width: 260px; max-width: min(420px, 70vw); }
.records-date-editor { align-items: center; padding: 10px 12px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); }
.records-date-editor label { flex-direction: row; align-items: center; gap: 10px; }
.records-table-scroll { max-height: min(68vh, 760px); overflow: auto; border: 1px solid var(--theme-border); border-radius: 6px; }
#records-table { width: max-content; min-width: 100%; white-space: nowrap; }
#records-table th { position: sticky; top: 0; z-index: 1; }
#records-table td, #records-table th { text-align: right; }
#records-table td:nth-child(-n+3), #records-table th:nth-child(-n+3) { text-align: left; }
#records-table td.editable-finalized-record { position: relative; cursor: text; }
#records-table td.editable-finalized-record:hover { outline: 1px solid var(--theme-accent); outline-offset: -1px; }
#records-table td.editable-finalized-record .finalized-record-edit-placeholder { visibility: hidden; }
#records-table td.editable-finalized-record input { position: absolute; inset: 0; min-width: 0; width: 100%; height: 100%; padding: 5px 7px; text-align: inherit; }
#records-table tbody tr:nth-child(even) { background: var(--theme-surface); }
#records-table .records-empty { padding: 24px; text-align: center; color: var(--theme-muted); }
.records-pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 12px; }
.records-pagination .hint { margin: 0; }
.records-empty { padding: 24px; text-align: center; color: var(--theme-muted); }
.user-trend-panel { width: 100%; min-width: 0; margin: 0; padding: 10px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-panel); color: var(--theme-text); }
.user-trend-heading { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; }
.user-trend-heading h3 { margin: 0 auto 0 0; font-size: 15px; }
.user-trend-heading label { min-width: 120px; }
.user-trend-heading select { min-height: 30px; padding: 5px 8px; }
.user-trend-chart { min-width: 0; margin-top: 6px; }
.user-trend-svg { display: block; width: 100%; height: auto; overflow: visible; }
.user-trend-gridline { stroke: var(--theme-border); stroke-width: 1; }
.user-trend-axis-label { fill: var(--theme-muted); font-family: inherit; font-size: 10px; }
.user-trend-line { fill: none; stroke: var(--theme-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.user-trend-point { fill: var(--theme-accent); stroke: var(--theme-panel); stroke-width: 2; }
.user-trend-summary { margin: 0; font-size: 11px; }
.users-view .records-table-scroll { max-height: min(68vh, 680px); }
.users-view #users-table th { position: sticky; top: 0; z-index: 1; }
.users-view #users-table thead th:first-child, .users-view #users-table tbody th { position: sticky; left: 0; z-index: 2; width: 300px; min-width: 300px; max-width: 300px; text-align: left; background: var(--theme-panel); }
.users-view[data-user-view="list"] #users-table thead th:first-child,
.users-view[data-user-view="list"] #users-table tbody th { width: 350px; min-width: 350px; max-width: 350px; }
.users-view #users-table thead th:first-child { z-index: 4; background: var(--theme-control); }
.users-view #users-table tbody tr:nth-child(even) { background: var(--theme-surface); }
.users-view #users-table tbody tr:nth-child(even) th { background: var(--theme-surface); }
.users-view #users-table tbody tr:hover { background: var(--theme-surface-hover); }
.users-view #users-table tbody tr:hover th { background: var(--theme-surface-hover); }
.users-view #users-table td, .users-view #users-table th { padding: 10px 12px; }
#user-detail-title { font-size: 24px; overflow-wrap: anywhere; }
.user-detail-heading-main { min-width: 0; }
.user-detail-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.user-detail-participation { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; padding: 6px 10px; border: 1px solid var(--theme-border); border-radius: 7px; background: var(--theme-surface); color: var(--theme-text); }
.user-detail-participation > span, .user-detail-participation > small { color: var(--theme-muted); font-size: 11px; }
.user-detail-participation > strong { color: var(--theme-accent); font-size: 15px; }
#user-records-state { margin: 6px 0; }
.user-class-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 12px; }
.class-filter-button { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.user-detail-view { padding: 12px; }
.user-statistics { margin: 10px 0 14px; padding: 11px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); }
.user-statistics > h3, .statistics-section-title { margin: 0 0 9px; font-size: 15px; }
.daily-statistics { margin-top: 18px; }
.daily-statistics > summary { cursor: pointer; color: var(--theme-text); font-size: 15px; font-weight: 700; }
.daily-statistics[open] > summary { margin-bottom: 10px; }
.statistics-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
.daily-record-group { margin-top: 8px; padding: 10px; border: 1px solid var(--theme-border); border-radius: 7px; background: var(--theme-panel); }
.daily-record-group > h4 { margin: 0 0 10px; color: var(--theme-text); font-size: 13px; }
.daily-record-group > .metric-grid { margin-bottom: 10px; }
.daily-record-page-note { margin: -4px 0 8px; }
.user-performance { display: grid; gap: 7px; margin: 6px 0 10px; }
.class-performance { display: grid; gap: 5px; padding: 8px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-panel); }
.class-performance-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 10px; }
.class-performance-title { margin: 0; color: var(--theme-text); font-size: 15px; }
.class-performance-battle-count { color: var(--theme-muted); font-size: 11px; }
.participation-card { margin-bottom: 2px; }
.performance-overview { display: grid; grid-template-columns: minmax(340px, 0.85fr) minmax(0, 1.6fr); align-items: start; gap: 7px; }
.performance-persona-column { display: grid; align-content: start; gap: 7px; min-width: 0; }
.performance-statistics { display: grid; align-content: start; gap: 7px; min-width: 0; }
.performance-statistics > .statistics-section-title { margin-bottom: 0; }
.participation-card { align-content: start; align-self: start; }
.participation-card .metric-item { grid-template-columns: auto auto minmax(0, 1fr); align-items: center; column-gap: 12px; }
.participation-card .metric-item .metric-ranking { justify-self: end; text-align: right; }
.performance-profile { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: 12px; width: 100%; min-height: 0; margin: 0; padding: 12px 16px; background: var(--theme-surface); border: 1px solid var(--theme-border); border-radius: 8px; }
.performance-profile h3, .performance-card h3 { margin: 0; font-size: 14px; }
.performance-profile p { margin: 5px 0 0; }
.persona-radar-card, .persona-role-card { min-width: 0; }
.persona-radar-card { display: grid; justify-items: center; gap: 2px; }
.persona-radar-card h3, .persona-radar-card .hint { justify-self: start; }
.persona-radar-card h3, .persona-role-card h3 { font-size: 14px; }
.persona-radar { display: block; width: min(100%, 360px); overflow: visible; }
.persona-radar-card > .hint { font-size: 10px; line-height: 1.4; }
.radar-grid { fill: none; stroke: var(--theme-border-strong); stroke-width: 1; }
.radar-axis { stroke: var(--theme-border-strong); stroke-width: 1; }
.radar-area { fill: rgb(108 185 255 / 28%); stroke: var(--theme-accent); stroke-width: 2; }
.radar-line { fill: none; stroke: var(--theme-accent); stroke-width: 2; }
.radar-point { fill: #ffdb88; stroke: var(--theme-panel); stroke-width: 2; }
.radar-label { fill: var(--theme-soft-text); font-size: 12px; }
.persona-role-card { display: grid; align-content: start; justify-items: start; gap: 7px; padding-top: 26px; }
.persona-badges { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 5px; }
.persona-badge { flex: 0 0 auto; border: 1px solid #d1a54f; border-radius: 18px; padding: 6px 9px; color: #ffdb88; font-size: 12px; font-weight: 700; }
.persona-summary { margin: -5px 0 0; color: #b8c9df; font-size: 13px; }
.ranking-note { margin: -8px 0 0; }
.performance-core { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(200px, 1fr); align-items: start; gap: 6px; }
.performance-card { min-width: 0; padding: 8px; background: var(--theme-surface); border: 1px solid var(--theme-border); border-radius: 8px; }
.performance-card h3 { margin-bottom: 6px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; }
.metric-item { position: relative; display: grid; gap: 4px; padding: 7px; background: var(--theme-panel); border-radius: 6px; }
.contribution-grid .metric-item, .performance-core > .performance-card:first-child .metric-item { min-height: 88px; align-content: start; gap: 7px; padding: 11px; }
.contribution-grid .metric-item strong, .performance-core > .performance-card:first-child .metric-item strong { font-size: 17px; }
.metric-item span { color: var(--theme-muted); font-size: 11px; }
.metric-item strong { color: var(--theme-text); font-size: 15px; overflow-wrap: anywhere; }
.metric-ranking { color: var(--theme-accent); font-size: 11px; line-height: 1.45; }
.ranking-hover { position: relative; display: inline-block; width: max-content; max-width: 100%; cursor: help; }
.ranking-hover:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 2px; }
.ranking-tooltip { display: none; position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 10; width: min(320px, calc(100vw - 48px)); padding: 11px; border: 1px solid #6b83a5; border-radius: 8px; background: var(--theme-page); box-shadow: 0 8px 24px rgb(0 0 0 / 45%); color: var(--theme-text); cursor: default; }
.ranking-hover:hover .ranking-tooltip, .ranking-hover:focus .ranking-tooltip, .ranking-hover:focus-within .ranking-tooltip { display: grid; gap: 8px; }
.ranking-tooltip > strong { font-size: 12px; }
.distribution-chart { display: flex; align-items: end; gap: 3px; height: 90px; padding: 5px; border-bottom: 1px solid var(--theme-border-strong); background: var(--theme-panel); }
.distribution-bin { position: relative; display: flex; flex: 1; height: 100%; flex-direction: column; justify-content: end; align-items: center; gap: 3px; color: var(--theme-muted); font-size: 10px; }
.distribution-bar { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: #6483ab; }
.distribution-bin.current-bin { color: #ffdb88; font-weight: 700; }
.distribution-bin.current-bin .distribution-bar { background: #e1ad48; }
.distribution-marker-track { position: relative; height: 8px; margin: 0 5px; border-top: 2px solid var(--theme-border-strong); }
.distribution-marker { position: absolute; top: -6px; width: 3px; height: 12px; transform: translateX(-50%); border-radius: 2px; background: #ffdb88; }
.distribution-axis { display: flex; justify-content: space-between; gap: 6px; color: var(--theme-muted); font-size: 10px; }
.distribution-axis span:nth-child(2) { color: #ffdb88; font-weight: 700; text-align: center; }
.time-card { display: grid; align-content: start; gap: 5px; }
.time-card h3 { width: 100%; }
.time-split { display: flex; width: 100%; min-height: 38px; overflow: hidden; border-radius: 6px; background: var(--theme-border-strong); }
.time-split span { min-width: 0; }
.time-split-survival { background: var(--theme-time-survival); }
.time-split-absence { background: var(--theme-time-absence); }
.time-split-legend { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; }
.time-split-legend span { overflow-wrap: anywhere; }
.time-card .hint { margin: 2px 0; overflow-wrap: anywhere; }
.time-card .chart-ranks { color: var(--theme-accent); }
.contribution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 6px; }
.contribution-grid > .performance-card .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-note { margin: 0; }
.dated-records { margin-top: 12px; }
.dated-records > h3 { font-size: 15px; }
.dated-record-group { margin: 6px 0; padding: 8px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); }
.dated-record-group > summary { cursor: pointer; color: var(--theme-text); font-weight: 700; }
.dated-table-scroll { margin-top: 10px; max-height: 400px; }
.dated-table-scroll table { width: max-content; min-width: 100%; white-space: nowrap; }
.dated-table-scroll th { position: sticky; top: 0; z-index: 1; }
.dated-table-scroll th:first-child { left: 0; z-index: 2; }
.dated-table-scroll tbody td:first-child { position: sticky; left: 0; background: var(--theme-surface); }
.record-image-button { max-width: 240px; min-height: 0; padding: 3px 6px; overflow: hidden; color: var(--theme-accent); text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.record-image-dialog { width: min(1000px, 92vw); max-height: 92vh; padding: 16px; color: var(--theme-text); background: var(--theme-panel); border: 1px solid var(--theme-border-strong); border-radius: 10px; }
.battle-input-actions{margin:12px 0 20px;}.battle-import-dialog{box-sizing:border-box;width:min(1500px,calc(100vw - 32px));max-height:92vh;padding:20px;border:1px solid var(--theme-border);border-radius:14px;background:var(--theme-panel);color:var(--theme-text);overflow:auto;}.battle-import-dialog::backdrop{background:rgba(0,0,0,.72);}.battle-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:var(--theme-panel);z-index:12;padding:12px 0;}.battle-dialog-heading h2{margin:0;}.battle-import-dialog .gear-modal-close{width:44px;height:44px;flex:none;padding:0;color:#ff7575;background:#c7353520;border:1px solid #ed595980;border-radius:10px;font-size:32px;line-height:1;}.battle-import-dialog .controls{margin:16px 0;}.battle-sheet-review{max-height:500px;margin:16px 0;}.battle-sheet-review td input:not([type=checkbox]){width:125px;box-sizing:border-box;}.battle-sheet-review td input[type=checkbox]{width:22px;height:22px;accent-color:var(--theme-accent);}.battle-sheet-excluded{opacity:.45;}.record-sheet-source{color:var(--theme-muted);}@media(max-width:600px){.battle-import-dialog{padding:12px;width:calc(100vw - 12px);}.battle-dialog-heading{top:-12px;}.battle-input-actions{gap:8px;}}
.record-image-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.rename-family-dialog { width: min(480px, 92vw); padding: 18px; color: var(--theme-text); background: var(--theme-panel); border: 1px solid var(--theme-border-strong); border-radius: 10px; }
.rename-family-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.rename-family-dialog form { display: grid; gap: 12px; }
.rename-family-dialog .hint { margin: 0; }
.rename-family-dialog label input { width: 100%; }
.guild-settings-dialog { width: min(480px, 92vw); padding: 18px; color: var(--theme-text); background: var(--theme-panel); border: 1px solid var(--theme-border-strong); border-radius: 10px; }
.guild-settings-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.guild-settings-dialog form { display: grid; gap: 12px; }
.guild-settings-dialog .hint { margin: 0; }
.guild-settings-dialog label input { width: 100%; }
.user-settings-dialog { width: min(420px, 92vw); padding: 18px; color: var(--theme-text); background: var(--theme-panel); border: 1px solid var(--theme-border-strong); border-radius: 10px; }
.user-settings-dialog::backdrop { background: rgb(0 0 0 / 75%); }
.user-settings-dialog label { margin: 12px 0; }
.user-settings-dialog select { width: 100%; }
.user-settings-dialog .hint { margin-bottom: 0; }
:root {
  --theme-page: #071528;
  --theme-panel: #102943;
  --theme-surface: #183854;
  --theme-surface-raised: #214668;
  --theme-surface-hover: #2c5375;
  --theme-tooltip: #071528;
  --theme-control: #193c5d;
  --theme-border: #305777;
  --theme-border-strong: #427397;
  --theme-text: #e4eaf2;
  --theme-muted: #9eafc7;
  --theme-accent: #67d2ff;
  --theme-accent-strong: #126397;
  --theme-accent-border: #67d2ff;
  --theme-hover: #2c5375;
  --theme-soft-text: #c6d5e8;
  --theme-danger: #8f2933;
  --theme-danger-border: #e25b63;
  --theme-danger-text: #fff0f0;
  --theme-success-surface: #17372f;
  --theme-success-text: #bfe9da;
  --theme-warning-surface: #49391f;
  --theme-warning-text: #ffe1a3;
  --theme-time-survival: #55c98b;
  --theme-time-absence: #aebbd0;
  background: var(--theme-page);
  color: var(--theme-text);
}
:root[data-color-theme="forest"] {
  --theme-page: #071c16;
  --theme-panel: #10372a;
  --theme-surface: #184a37;
  --theme-surface-raised: #225d45;
  --theme-surface-hover: #2d7052;
  --theme-tooltip: #071c16;
  --theme-control: #194f3b;
  --theme-border: #326c50;
  --theme-border-strong: #458967;
  --theme-text: #e4f1e9;
  --theme-muted: #a2c0ae;
  --theme-accent: #70efaa;
  --theme-accent-strong: #187441;
  --theme-accent-border: #70efaa;
  --theme-hover: #2d7052;
  --theme-soft-text: #c4e2d0;
  --theme-danger: #7d3436;
  --theme-danger-border: #e17b7b;
  --theme-danger-text: #fff0f0;
  --theme-success-surface: #203c35;
  --theme-success-text: #a8e3c3;
  --theme-warning-surface: #49401f;
  --theme-warning-text: #ffe09b;
  --theme-time-survival: #78d6a0;
  --theme-time-absence: #d6ae54;
}
:root[data-color-theme="violet"] {
  --theme-page: #170d2b;
  --theme-panel: #302047;
  --theme-surface: #402c60;
  --theme-surface-raised: #513a75;
  --theme-surface-hover: #62498a;
  --theme-tooltip: #170d2b;
  --theme-control: #463063;
  --theme-border: #655084;
  --theme-border-strong: #8262a6;
  --theme-text: #eee8f7;
  --theme-muted: #b9a9cf;
  --theme-accent: #d1a0ff;
  --theme-accent-strong: #7940aa;
  --theme-accent-border: #d1a0ff;
  --theme-hover: #62498a;
  --theme-soft-text: #dacdf0;
  --theme-danger: #853b52;
  --theme-danger-border: #e58cac;
  --theme-danger-text: #fff0f5;
  --theme-success-surface: #263b37;
  --theme-success-text: #b8e3d0;
  --theme-warning-surface: #483c29;
  --theme-warning-text: #f5dfa9;
  --theme-time-survival: #aa83ee;
  --theme-time-absence: #ed8ca6;
}
:root[data-color-theme="sunset"] {
  --theme-page: #28100e;
  --theme-panel: #47201b;
  --theme-surface: #5b2d24;
  --theme-surface-raised: #703c2d;
  --theme-surface-hover: #854b36;
  --theme-tooltip: #28100e;
  --theme-control: #633127;
  --theme-border: #865343;
  --theme-border-strong: #a46c50;
  --theme-text: #f5e9e2;
  --theme-muted: #d0ad9c;
  --theme-accent: #ffbd8c;
  --theme-accent-strong: #a34722;
  --theme-accent-border: #ffbd8c;
  --theme-hover: #854b36;
  --theme-soft-text: #f0d0bd;
  --theme-danger: #963c32;
  --theme-danger-border: #f08d76;
  --theme-danger-text: #fff2ee;
  --theme-success-surface: #2b4437;
  --theme-success-text: #c4e4c9;
  --theme-warning-surface: #55401f;
  --theme-warning-text: #ffe1a3;
  --theme-time-survival: #ff9a62;
  --theme-time-absence: #80b9d6;
}
:root[data-color-theme="light"] {
  color-scheme: light;
  --theme-page: #edf2fc;
  --theme-panel: #ffffff;
  --theme-surface: #e4ecfa;
  --theme-surface-raised: #d7e3f8;
  --theme-surface-hover: #c9dcf5;
  --theme-tooltip: #edf2fc;
  --theme-control: #f2f6ff;
  --theme-border: #b6c9e4;
  --theme-border-strong: #829fc9;
  --theme-text: #1e2938;
  --theme-muted: #596b80;
  --theme-accent: #1459ac;
  --theme-accent-strong: #c1d8fb;
  --theme-accent-border: #1459ac;
  --theme-hover: #c9dcf5;
  --theme-soft-text: #38516c;
  --theme-danger: #fbe8e8;
  --theme-danger-border: #c43d4b;
  --theme-danger-text: #7c1824;
  --theme-success-surface: #e2f3eb;
  --theme-success-text: #205e46;
  --theme-warning-surface: #fff2d6;
  --theme-warning-text: #795313;
  --theme-time-survival: #2584c7;
  --theme-time-absence: #e8a24a;
}
:root[data-color-theme="gray"] {
  --theme-page: #10151d;
  --theme-panel: #232d39;
  --theme-surface: #303e4e;
  --theme-surface-raised: #3c4d5e;
  --theme-surface-hover: #4a5d70;
  --theme-tooltip: #10151d;
  --theme-control: #334454;
  --theme-border: #53687a;
  --theme-border-strong: #6a8195;
  --theme-text: #e7e9ec;
  --theme-muted: #b3bdca;
  --theme-accent: #d3e4f4;
  --theme-accent-strong: #4a657c;
  --theme-accent-border: #d3e4f4;
  --theme-hover: #4a5d70;
  --theme-soft-text: #d0d4da;
  --theme-danger: #633b3f;
  --theme-danger-border: #b8787e;
  --theme-danger-text: #ffe8e8;
  --theme-success-surface: #303c37;
  --theme-success-text: #c4d8cc;
  --theme-warning-surface: #4a4333;
  --theme-warning-text: #e9dfc2;
  --theme-time-survival: #aab4c0;
  --theme-time-absence: #6f7b89;
}
:root[data-color-theme="teal"] {
  --theme-page: #061b22;
  --theme-panel: #0e3440;
  --theme-surface: #164a56;
  --theme-surface-raised: #205d68;
  --theme-surface-hover: #2d707a;
  --theme-tooltip: #061b22;
  --theme-control: #17505b;
  --theme-border: #33717b;
  --theme-border-strong: #4795a0;
  --theme-text: #e4f2f1;
  --theme-muted: #a2c4c2;
  --theme-accent: #62f0e4;
  --theme-accent-strong: #14776e;
  --theme-accent-border: #62f0e4;
  --theme-hover: #2d707a;
  --theme-soft-text: #c4e4e1;
  --theme-danger: #7d343c;
  --theme-danger-border: #e17b87;
  --theme-danger-text: #fff0f1;
  --theme-success-surface: #203c39;
  --theme-success-text: #a8e3d8;
  --theme-warning-surface: #49401f;
  --theme-warning-text: #ffe09b;
  --theme-time-survival: #49c9ad;
  --theme-time-absence: #e6a65e;
}
:root[data-color-theme="rose"] {
  --theme-page: #240c1e;
  --theme-panel: #432036;
  --theme-surface: #582d48;
  --theme-surface-raised: #6c3b59;
  --theme-surface-hover: #804c6b;
  --theme-tooltip: #240c1e;
  --theme-control: #5c304c;
  --theme-border: #855270;
  --theme-border-strong: #a76b8c;
  --theme-text: #f3e7ed;
  --theme-muted: #c9a8b8;
  --theme-accent: #ffa5d3;
  --theme-accent-strong: #a0396c;
  --theme-accent-border: #ffa5d3;
  --theme-hover: #804c6b;
  --theme-soft-text: #ead0dc;
  --theme-danger: #963c48;
  --theme-danger-border: #f08d9a;
  --theme-danger-text: #fff1f2;
  --theme-success-surface: #2c4038;
  --theme-success-text: #c4e4d2;
  --theme-warning-surface: #55401f;
  --theme-warning-text: #ffe1a3;
  --theme-time-survival: #eb82a9;
  --theme-time-absence: #7bc6d1;
}
:root[data-color-theme="amber"] {
  --theme-page: #241a08;
  --theme-panel: #403116;
  --theme-surface: #544120;
  --theme-surface-raised: #68522a;
  --theme-surface-hover: #7b6435;
  --theme-tooltip: #241a08;
  --theme-control: #594622;
  --theme-border: #816b3d;
  --theme-border-strong: #a28a50;
  --theme-text: #f3eddf;
  --theme-muted: #c9b98f;
  --theme-accent: #ffdc78;
  --theme-accent-strong: #926615;
  --theme-accent-border: #ffdc78;
  --theme-hover: #7b6435;
  --theme-soft-text: #e9dbb8;
  --theme-danger: #8f3b32;
  --theme-danger-border: #e68c72;
  --theme-danger-text: #fff1eb;
  --theme-success-surface: #283d32;
  --theme-success-text: #c4e4c9;
  --theme-warning-surface: #55401f;
  --theme-warning-text: #ffe1a3;
  --theme-time-survival: #edb94e;
  --theme-time-absence: #72bdc7;
}
:root[data-color-theme="dark"] {
  --theme-page: #080b10;
  --theme-panel: #141c27;
  --theme-surface: #1d2938;
  --theme-surface-raised: #273548;
  --theme-surface-hover: #334458;
  --theme-tooltip: #080b10;
  --theme-control: #233246;
  --theme-border: #35465e;
  --theme-border-strong: #50657f;
  --theme-text: #ededed;
  --theme-muted: #aaaaaa;
  --theme-accent: #96bfff;
  --theme-accent-strong: #34588d;
  --theme-accent-border: #96bfff;
  --theme-hover: #334458;
  --theme-soft-text: #d0d0d0;
  --theme-danger: #633b3f;
  --theme-danger-border: #b8787e;
  --theme-danger-text: #ffe8e8;
  --theme-success-surface: #303c37;
  --theme-success-text: #c4d8cc;
  --theme-warning-surface: #4a4333;
  --theme-warning-text: #e9dfc2;
  --theme-time-survival: #d0d0d0;
  --theme-time-absence: #666666;
}
body { background: var(--theme-page); color: var(--theme-text); }
header { border-color: var(--theme-border); }
header p, .hint, .user-card-metrics > span > span { color: var(--theme-muted); }
.panel, .user-settings-dialog, .class-performance, .performance-card, .performance-profile,
.user-statistics, .daily-record-group, .dated-record-group, .users-metric-filter,
.batch-row-navigation, .row-review #ocr-results td {
  color: var(--theme-text);
  background-color: var(--theme-panel);
  border-color: var(--theme-border);
}
.user-card, .metric-item, .daily-record-group, .guild-info-section {
  color: var(--theme-text);
  background-color: var(--theme-surface);
  border-color: var(--theme-border);
}
button, select, input, .upload {
  color: var(--theme-text);
  background-color: var(--theme-control);
  border-color: var(--theme-border-strong);
}
button:hover, .upload:hover { background-color: var(--theme-surface-hover); }
.secondary { background-color: var(--theme-control); }
.badge, .users-metric-filter, fieldset { border-color: var(--theme-border-strong); }
.badge, label, .users-metric-filter > summary, .daily-statistics > summary { color: var(--theme-soft-text); }
.site-nav button[aria-current="page"],
.users-view-toggle button[aria-pressed="true"],
.class-filter-button[aria-pressed="true"] {
  color: var(--theme-text);
  background-color: var(--theme-accent-strong);
  border-color: var(--theme-accent-border);
}
button:focus-visible, input:focus-visible, select:focus-visible,
.ranking-hover:focus-visible { outline-color: var(--theme-accent); }
.user-link, .metric-ranking, .time-card .chart-ranks { color: var(--theme-accent); }
.user-card-details .user-primary-class {
  color: var(--theme-soft-text);
  background-color: var(--theme-surface-raised);
  border-color: var(--theme-border-strong);
}
.persona-badge { border-color: var(--theme-accent-border); color: var(--theme-accent); }
.radar-grid, .radar-axis { stroke: var(--theme-border-strong); }
.radar-area { fill: color-mix(in srgb, var(--theme-accent) 28%, transparent); stroke: var(--theme-accent); }
.radar-line { stroke: var(--theme-accent); }
.radar-point { fill: var(--theme-accent); }
.radar-label { fill: var(--theme-soft-text); }
.distribution-marker { background: var(--theme-accent); }
.distribution-bin.current-bin, .distribution-axis span:nth-child(2) { color: var(--theme-accent); }
.distribution-bin.current-bin .distribution-bar { background: var(--theme-accent); }
.page-tabs button[aria-selected="true"] { background: var(--theme-accent-strong); border-color: var(--theme-accent-border); }
.site-nav { background: var(--theme-page); }
th { color: var(--theme-soft-text); background: var(--theme-surface-raised); }
td, th { border-color: var(--theme-border); }
tr.selected, #records-table tbody tr:nth-child(even),
.users-view #users-table tbody tr:nth-child(even),
.users-view #users-table tbody tr:nth-child(even) th,
.users-view #users-table tbody th,
.users-view #users-table thead th:first-child,
.dated-table-scroll tbody td:first-child { background: var(--theme-surface); }
#records-table td.editable-finalized-record:hover { outline-color: var(--theme-accent); }
.users-view #users-table tbody tr:hover,
.users-view #users-table tbody tr:hover th { background: var(--theme-surface-hover); }
.records-table-scroll, .table-scroll { border-color: var(--theme-border); }
.records-filters, .records-date-editor {
  color: var(--theme-text);
  background-color: var(--theme-surface);
  border-color: var(--theme-border);
}
.records-filters label, .records-date-editor label { color: var(--theme-soft-text); }
.records-view #records-table { color: var(--theme-text); }
#records-table .records-empty, .records-empty { color: var(--theme-muted); }
.outside-records-view #outside-records-table .user-link { color: var(--theme-accent); }
.users-view .user-link:disabled { color: var(--theme-muted); }
.record-image-dialog, .rename-family-dialog, .guild-settings-dialog,
.user-settings-dialog {
  color: var(--theme-text);
  background-color: var(--theme-panel);
  border-color: var(--theme-border-strong);
}
.record-image-dialog::backdrop, .rename-family-dialog::backdrop,
.guild-settings-dialog::backdrop, .user-settings-dialog::backdrop {
  background: rgb(0 0 0 / 68%);
}
.ranking-tooltip {
  color: var(--theme-text);
  background: var(--theme-tooltip);
  border-color: var(--theme-border-strong);
}
.distribution-chart { background: var(--theme-surface); border-color: var(--theme-border-strong); }
.distribution-bin, .distribution-axis { color: var(--theme-muted); }
.distribution-bar { background: var(--theme-border-strong); }
.distribution-bin.current-bin { color: var(--theme-accent); }
.distribution-bin.current-bin .distribution-bar { background: var(--theme-accent); }
.distribution-marker-track { border-color: var(--theme-border-strong); }
.time-split { background: var(--theme-border-strong); }
.time-split-survival { background: var(--theme-time-survival); }
.time-split-absence { background: var(--theme-time-absence); }
.upload, .button-link { color: var(--theme-text); background: var(--theme-accent-strong); border-color: var(--theme-accent-border); }
.upload:hover, .button-link:hover { background: var(--theme-surface-hover); }
.danger { color: var(--theme-danger-text); background: var(--theme-danger); border-color: var(--theme-danger-border); }
.danger:hover { background: var(--theme-danger); }
#ocr-results .converted-value { color: var(--theme-success-text); background: var(--theme-success-surface); }
#ocr-results .converted-value strong { color: var(--theme-text); }
#ocr-results .converted-value-warning { color: var(--theme-warning-text); background: var(--theme-warning-surface); }
#ocr-results .converted-value-warning strong { color: var(--theme-warning-text); }
#ocr-results td.review { background: var(--theme-warning-surface); }
#ocr-results td.pending { background: var(--theme-surface-hover); }
#ocr-results .ocr-cell-label { color: var(--theme-soft-text); }
#ocr-preview { background: var(--theme-page); }
#viewer { background: var(--theme-page); }
.batch-row-navigation { background: var(--theme-surface); }
.batch-row-navigation button:last-child { color: var(--theme-text); background: var(--theme-accent-strong); border-color: var(--theme-accent-border); }
.batch-row-navigation button:last-child:disabled { background: var(--theme-control); }
.batch-panel tr.active, .outside-record-row:hover { background: var(--theme-surface-hover); }
.guild-roster-list li { color: var(--theme-text); background: var(--theme-surface); border-color: var(--theme-border); }
input::placeholder { color: var(--theme-muted); opacity: .8; }
input[type="checkbox"], input[type="radio"], progress { accent-color: var(--theme-accent); }
.user-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.image-dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.image-dialog-heading h2 { overflow-wrap: anywhere; }
#record-image-stage { position: relative; width: fit-content; max-width: 100%; margin: 12px auto; }
#record-image-preview { display: block; max-width: 100%; max-height: 72vh; object-fit: contain; }
#record-image-row-highlight { position: absolute; border: 3px solid #ff3d4f; background: rgb(255 61 79 / 18%); box-shadow: 0 0 0 1px rgb(20 27 39 / 80%); pointer-events: none; }
#record-image-row-highlight[hidden] { display: none; }
.button-link { display: inline-block; padding: 8px 10px; border: 1px solid var(--theme-border-strong); border-radius: 6px; background: var(--theme-accent-strong); color: var(--theme-text); font-size: 13px; text-decoration: none; }
.button-link:hover { background: var(--theme-surface-hover); }
.ocr-scroll { overflow: auto; max-height: 550px; }
#ocr-results { width: max-content; min-width: 100%; }
#ocr-results td { min-width: 160px; vertical-align: top; }
#ocr-results input { width: 155px; }
#ocr-results .hint { max-width: 200px; margin: 5px 0; overflow-wrap: anywhere; }
#ocr-results .converted-value { display: flex; flex-direction: column; gap: 3px; max-width: 200px; margin: 8px 0 5px; padding: 7px 9px; border: 1px solid #4a9c88; border-radius: 6px; background: #17372f; color: #bfe9da; font-size: 12px; }
#ocr-results .converted-value strong { color: #ffffff; font-size: 16px; overflow-wrap: anywhere; }
#ocr-results .converted-value-warning { border-color: #c58d36; background: #49391f; color: #ffe1a3; }
#ocr-results .converted-value-warning strong { color: #fff2d2; }
#ocr-results td.review { background: #49332b; }
#ocr-results td.pending { background: #303e5a; }
#ocr-results button { padding: 3px 6px; min-height: 25px; margin: 4px 3px 0 0; }
#ocr-results .ocr-cell-label { display: block; color: #c6d5e8; font-size: 13px; margin-bottom: 8px; }
#ocr-preview { max-width: 100%; background: #0c1019; }
.preview-pair { display: flex; flex-wrap: wrap; gap: 24px; }
.preview-pair > div { min-width: 0; max-width: 100%; }
.preview-pair h3 { font-size: 13px; }
#ocr-processed-preview { max-width: 100%; background: white; image-rendering: pixelated; }
@media (max-width: 950px) {
  .workspace { grid-template-columns: 1fr; }
  header { gap: 12px; flex-wrap: wrap; }
  .header-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  main { padding: 12px; }
  #viewer { height: 430px; }
  .records-filters input, .records-filters select { min-width: 0; max-width: 100%; }
  .view-heading { align-items: flex-start; flex-wrap: wrap; }
  .users-filters input { min-width: 0; max-width: 100%; }
  .users-filters { align-items: stretch; }
  .users-filters label { flex: 1 1 100%; }
  .batch-progress { grid-template-columns: 1fr; gap: 5px; }
  .performance-core, .contribution-grid { grid-template-columns: 1fr; }
  .performance-overview { grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.4fr); }
  .performance-profile { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .persona-radar { width: min(100%, 320px); }
  .persona-role-card { padding-top: 0; }
  .persona-role-card .persona-badges { justify-content: flex-start; }
  .site-nav { position: sticky; top: 0; z-index: 5; padding: 8px 0; background: var(--theme-page); }
  .site-nav button { flex: 1; }
  .records-pagination { gap: 8px; }
  .records-pagination button { min-width: 75px; }
  .record-image-dialog { width: 96vw; padding: 10px; }
}
@media (max-width: 600px) {
  .performance-overview, .performance-profile { grid-template-columns: minmax(0, 1fr); }
  .persona-radar { width: min(100%, 340px); }
  .persona-role-card { padding-top: 0; }
  .contribution-grid > .performance-card .metric-grid { grid-template-columns: minmax(0, 1fr); }
}

/* A little depth uses the selected palette, while reading surfaces stay solid. */
body{background:radial-gradient(ellipse at 15% 0%,color-mix(in srgb,var(--theme-accent) 12%,transparent),transparent 55%),var(--theme-page);background-attachment:fixed;}
header.site-header{background:linear-gradient(110deg,color-mix(in srgb,var(--theme-accent) 10%,var(--theme-page)),var(--theme-page) 75%);}
.panel{box-shadow:0 10px 32px #00000018,inset 0 1px 0 color-mix(in srgb,var(--theme-accent) 15%,transparent);}
.brand-mark{background:linear-gradient(135deg,var(--theme-accent-strong),color-mix(in srgb,var(--theme-accent-strong) 65%,var(--theme-page)));box-shadow:0 3px 16px color-mix(in srgb,var(--theme-accent) 16%,transparent);}
