[hidden] { display: none !important; }
.page-tabs { display: flex; align-self: end; gap: 5px; }
button.section-tab { cursor: pointer; font-family: var(--display); }
.section-tab:not(.is-active) { background: linear-gradient(#62625f, #30302f); color: #dfdfda; text-shadow: 1px 2px #050505; box-shadow: inset 1px 2px #ffffff36; }
.section-tab:hover { filter: brightness(1.12); }
.section-tab:focus-visible, .web-grader button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.grader-panel { margin-top: 22px; min-height: 590px; border: 3px solid #0b0b0b; border-radius: 30px; background: #191919; box-shadow: inset 0 4px 10px #0009, 0 1px #7775; }
.grader-loading { padding: 36px; }
.web-grader { padding: 20px; font-family: var(--display); font-weight: 400; font-synthesis: none; font-size: 1rem; line-height: 1.5; }
.web-grader h2, .web-grader h3 { margin: 0; font: 1.3rem/1.35 var(--display); letter-spacing: .015em; }
.web-grader h2 { font-size: 1.6rem; }
.web-grader p { margin-top: 0; }
.web-grader button, .web-grader input, .web-grader select { font: inherit; }
.web-grader button, .web-grader .file-button { cursor: pointer; border: 2px solid #0a0a0a; border-radius: 9px; padding: 8px 13px; color: #f8f8f4; background: linear-gradient(#464645,#282828); box-shadow: inset 0 1px #ffffff29, 0 1px #7773; font-weight: 400; }
.web-grader button:hover, .web-grader .file-button:hover { border-color: #b56b34; color: #ffac6d; }
.web-grader button:disabled { opacity: .45; cursor: default; }
.web-grader button.primary { background: linear-gradient(#ff9445,#f46a15); color: #111; }
.web-grader input, .web-grader select { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid #a9aaa4; border-radius: 0; background: #101010; color: #f7f7f2; }
.web-grader input:focus, .web-grader select:focus { outline: 2px solid #d77b35; outline-offset: 1px; }
.web-grader input[type="checkbox"] { width: auto; accent-color: var(--orange); }
.web-grader label { color: #d3d2cc; }
.web-grader .muted { color: #aaa9a3; }
.web-grader .positive { color: #eab844; }
.web-grader .negative { color: #83837e; }
.web-grader .decision-lock { color: #80dec2; }
.web-grader .decision-discard { color: #ff6875; }
.web-grader .decision-review { color: #bcc4ce; }
.web-grader .grade-f, .web-grader .grade-d { color: #ff6875; }
.web-grader .grade-c, .web-grader .grade-b { color: #efce59; }
.web-grader .grade-a, .web-grader .grade-s { color: #80dec2; }
.web-grader .grade-z { animation: web-rainbow 2s linear infinite; }
@keyframes web-rainbow { 0%,100% {color:#ff6a75} 17% {color:#ffb452} 33% {color:#efdf65} 50% {color:#72df9c} 67% {color:#76cfff} 83% {color:#d294ff} }
.web-layout { display: grid; grid-template-columns: minmax(400px, 1fr) minmax(0, 1.7fr); gap: 26px; align-items: start; }
.disc-editor { padding: 22px 13px; border: 0; border-radius: 18px; background: radial-gradient(ellipse at 65% 28%, #ffffff09, transparent 70%), var(--dots) 0 0 / 5px 5px, #292929; min-width: 0; font-size: 1.125rem; }
.capture-tools, .web-toolbar, .detail-heading, .dialog-actions, .build-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.capture-tools { margin: 0 0 20px; gap: 9px; }
.capture-tools button:not(.info) { font-size: 1.2rem; }
.file-button { display: inline-block; }
.disc-history { height: 107px; overflow: auto; border: 1px solid #ccc; border-radius: 10px; background: #111; margin-bottom: 14px; }
.disc-history button { display: block; width: 100%; border: 0; border-radius: 0; text-align: left; padding: 3px 8px; box-shadow: none; background: transparent; font-size: .9375rem; }
.disc-history button[aria-current="true"] { background: #704124; color: white; }
.disc-history .muted { display: block; padding: 9px; font-size: .875rem; }
.disc-card { display: grid; justify-items: center; padding: 12px 0 18px; }
.disc-art { width: 154px; height: 154px; position: relative; }
.disc-art .disc-picture { width: 100%; height: 100%; object-fit: contain; }
.disc-art .slot-badge, .disc-art .rank-badge { position: absolute; width: 42px; height: 42px; object-fit: contain; bottom: -7px; }
.disc-art .slot-badge { left: -5px; }.disc-art .rank-badge { right: -5px; }
.disc-card strong { font: 1.3rem var(--display); margin-top: 12px; text-align: center; }
.disc-card .disc-name { text-align: center; font-weight: 650; margin-top: 4px; }
.disc-card .disc-empty { min-height: 36px; display: grid; place-items: center; color: #aeb7bf; text-align: center; }
.edit-disc-action { display: flex; justify-content: center; margin: 0 0 43px; }
.web-grader .edit-disc-button { padding: 8px 13px; font-size: 1.125rem; }
.disc-identity { display: grid; gap: 8px; padding-bottom: 14px; }
.disc-identity label { display: grid; grid-template-columns: 50px 1fr; align-items: center; gap: 6px; }
.slot-level { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.slot-level label { grid-template-columns: auto 1fr; }
.stat-fields { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(75px,.47fr); gap: 2px 7px; align-items: center; }
.stat-fields label { font-size: 1.125rem; font-weight: 400; color: #f3f3f1; white-space: nowrap; }
.stat-fields select { min-height: 39px; padding: 5px 6px; }
.main-display { text-align: center; color: #aeb7bf; }
.disc-editor .hint { margin: 15px 0 0; color: #aeb7bf; font-size: 1.0625rem; line-height: 1.5; }
.scan-message { min-height: 54px; margin: 0 0 13px; color: #aeb7bf; font-size: 1.125rem; line-height: 1.5; }
.scan-message.error, .error-text { color: #ff7c87; }
.web-toolbar { display: grid; grid-template-columns: minmax(0,1fr); margin: 12px 0; gap: 12px; }
.agent-filter-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.grading-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }
.threshold-controls { display: flex; align-items: end; gap: 20px; }
.web-toolbar label { display: grid; gap: 4px; font-size: .875rem; }
.web-toolbar .search-field { flex: 1 1 190px; }
.threshold-field { width: max-content; }
.threshold-field > span { white-space: nowrap; }
.web-toolbar .threshold-field input { width: 76px; height: 34px; padding: 4px 7px; }
.web-toolbar .changed { color: #eab844; }
.web-toolbar .action-field { display: inline-flex; align-items: center; gap: 3px; padding-bottom: 1px; white-space: nowrap; }
.estimate-option { display: flex; align-items: center; gap: 7px; margin-top: 13px; font-size: .9375rem; }
.web-summary { min-height: 75px; }
.web-summary h2 { margin-bottom: 5px; }
.web-summary p { color: #cbc9c1; font-size: .9375rem; margin: 0; }
.agent-results { max-height: 670px; overflow-y: auto; padding: 12px 5px 12px 0; }
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(108px,1fr)); gap: 22px 9px; }
.web-grader .agent-card { padding: 0 2px; border: 0; box-shadow: none; background: transparent; min-width: 0; }
.agent-portrait { width: min(100%,140px); aspect-ratio: 1; margin: auto; position: relative; }
.agent-portrait > img.portrait { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.agent-portrait .decision-badge { position: absolute; width: 34%; height: 34%; right: -3%; bottom: -3%; object-fit: contain; }
.agent-portrait .favorite-badge { position: absolute; width: 30%; height: 30%; right: -2%; top: -4%; object-fit: contain; }
.agent-portrait .portrait-grade { position: absolute; left: 0; bottom: -5px; display: grid; font: 1.1rem/1.1 var(--display); text-shadow: 1px 1px #000,-1px -1px #000; }
.portrait-grade small { font: .75rem/1.2 var(--display); }
.agent-card .agent-name { display: block; margin-top: 13px; color: #fff; font: 1rem/1.3 var(--display); overflow-wrap: anywhere; }
.web-empty { padding: 45px 15px; text-align: center; color: #aaa; }
.web-grader .info { display: inline-grid; place-items: center; vertical-align: middle; border: 0; border-radius: 50%; padding: 0; width: 20px; height: 20px; flex-shrink: 0; background: #bcbdb9; color: #111; font: 14px/1 var(--display); box-shadow: none; margin-left: 5px; cursor: help; }
.help-bubble { position: fixed; z-index: 1001; padding: 13px 16px; max-width: min(580px,calc(100vw - 24px)); border: 1px solid #080808; border-radius: 0; color: #f7f7f0; background: #383837; box-shadow: 0 5px 20px #0008; font: 1rem/1.5 var(--display); white-space: pre-line; pointer-events: none; }
.web-modal { width: min(860px,calc(100vw - 32px)); max-height: calc(100svh - 40px); padding: 0; border: 3px solid #101010; border-radius: 21px; color: #eee; background: #242424; box-shadow: inset 0 1px #ffffff33,0 15px 55px #000a; }
.web-modal::backdrop { background: #000b; }
.web-modal-content { padding: 23px; }
.web-modal h2 { margin-bottom: 6px; }
.picker-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 13px 0; }
.picker-tools input { flex: 1 1 180px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(105px,1fr)); gap: 12px; max-height: 50svh; overflow: auto; padding: 7px; }
.web-grader .picker-card { padding: 9px; min-width: 0; border: 2px solid #454540; background: #1b1b1b; }
.picker-card[aria-pressed="true"] { border-color: #e2b145; box-shadow: 0 0 0 1px #e2b145; }
.picker-picture { position: relative; aspect-ratio: 1; }
.picker-picture img:first-child { width: 100%; height: 100%; object-fit: contain; }
.picker-picture.agent img:first-child { border-radius: 50%; }
.picker-picture .rank-badge { position: absolute; width: 30%; height: 30%; right: 0; top: 0; object-fit: contain; }
.picker-card span { display: block; color: #f5f5f0; font-size: .875rem; line-height: 1.3; padding-top: 5px; overflow-wrap: anywhere; }
.dialog-actions { justify-content: end; margin-top: 16px; }
.dialog-actions .selection-count { margin-right: auto; color: #bcbcb3; }
.detail-heading { margin-bottom: 18px; }
.detail-heading .detail-agent { width: 54px; height: 54px; border-radius: 50%; }
.comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 25px; margin: 18px 0; }
.comparison-block { min-width: 0; }
.comparison-block h3 { margin-bottom: 15px; }
.comparison-line { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 10px; margin-bottom: 15px; }
.comparison-line dt { font-weight: 650; color: #eee; }
.comparison-line dd { margin: 0; overflow-wrap: anywhere; }
.detail-metrics { margin: 25px 0 0; }
.detail-metrics .comparison-line { grid-template-columns: 90px minmax(0,1fr); }
.detail-metrics dd { font-weight: 650; }
.metric-letter { margin-right: 6px; }
.detail-note { color: #b7b7b0; font-size: .875rem; }
.build-list { display: grid; gap: 12px; margin-top: 20px; }
.build-list-item { padding: 15px; display: flex; align-items: center; gap: 15px; border-radius: 13px; background: #292929; border: 1px solid #444; }
.build-list-item img { width: 60px; height: 60px; border-radius: 50%; }
.build-list-item .build-description { flex: 1; min-width: 0; }
.build-list-item strong, .build-list-item small { display: block; }
.build-heading { justify-content: space-between; margin-bottom: 20px; }
.build-identity { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.build-identity label { display: grid; gap: 5px; }
.build-sets { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.set-preview { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.set-preview img { width: 40px; height: 40px; object-fit: contain; }
.build-slots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.build-slot { min-width: 0; padding: 15px; border: 2px solid #111; border-radius: 15px; background: #303030; }
.build-slot h3 { margin-bottom: 10px; }
.build-slot .build-main { display: grid; gap: 6px; margin-bottom: 11px; }
.build-stat-row { display: grid; grid-template-columns: minmax(0,1fr) 70px; gap: 7px; margin-bottom: 7px; }
.weight-presets { margin: 0; }
.build-error { color: #ff7b84; margin: 0 0 12px; min-height: 24px; }
.backup-tools { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.web-grader details { margin-top: 13px; color: #c2c2b9; font-size: .875rem; }
.web-grader .editor-options { margin-top: 24px; }
.editor-options .storage-note { margin: 15px 0 0; }
.web-grader pre { white-space: pre-wrap; max-height: 180px; overflow: auto; }
.web-grader :is(.disc-history,.agent-results,.picker-grid) { scrollbar-width: thin; scrollbar-color: #979793 transparent; }
.web-grader ::-webkit-scrollbar { width: 8px; }
.web-grader ::-webkit-scrollbar-track { background: transparent; }
.web-grader ::-webkit-scrollbar-thumb { background: #979793; border-radius: 10px; }
.on-grader .shell { max-width: 1550px; padding-left: 128px; padding-right: 23px; }
@media (max-width: 1150px) {
  .on-grader .shell { padding-left: 22px; }
  .on-grader .side-rail { display: none; }
  .web-layout { gap: 15px; grid-template-columns: minmax(320px,1fr) minmax(0,1.2fr); }
  .web-grader { padding: 15px; }
  .comparison-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .page-tabs { gap: 3px; }
  .page-tabs .section-tab { font-size: .875rem; padding: 10px 9px 9px; }
  header { padding: 0; }
  header .brand { font-size: .875rem; max-width: 110px; }
  .on-grader .shell { padding: 22px 14px 20px; }
  .grader-panel { margin-top: 16px; border-radius: 23px; }
  .web-grader { padding: 12px; }
  .web-layout, .build-slots, .build-identity { grid-template-columns: 1fr; }
  .disc-editor { padding: 20px 12px; }
  .agent-results { max-height: none; }
  .agent-grid { grid-template-columns: repeat(auto-fill,minmax(95px,1fr)); }
  .web-toolbar { gap: 8px; }
  .web-modal-content { padding: 16px; }
  .picker-grid { grid-template-columns: repeat(auto-fill,minmax(90px,1fr)); gap: 8px; }
  .build-list-item { flex-wrap: wrap; }
  .detail-metrics .comparison-line { grid-template-columns: 80px minmax(0,1fr); }
}
@media (max-width: 480px) {
  .stat-fields { grid-template-columns: minmax(0,1fr) 80px; gap: 3px 7px; }
  .stat-fields label { grid-column: 1 / -1; margin-top: 7px; font-size: 1rem; }
  .capture-tools button:not(.info) { font-size: 1rem; }
  .disc-editor { font-size: 1rem; }
  .scan-message { font-size: 1rem; }
}
@media (prefers-reduced-motion:reduce) { .web-grader .grade-z { animation: none; color: #80dcff; } }
