.workspace, .glass-dialog { font-family: "Segoe UI", system-ui, sans-serif; color: #e8e8e8; color-scheme: dark; }
.workspace { width: min(100%, 1450px); margin: 0 auto; padding: 24px 32px 30px; }
.destination { overflow-y: auto; scrollbar-color: #a9b5cb #263149; }
.workspace-header { display: flex; align-items: center; gap: 24px; margin-bottom: 23px; min-height: 65px; }
.workspace-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: #f2f5ff; text-shadow: 0 2px 5px #061127; }
.workspace-brand img { width: 158px; height: auto; }
.workspace-brand > span { font: 700 22px Georgia, serif; border-left: 1px solid #c5d5ec70; padding-left: 17px; }
.workspace-brand small { display: block; margin-top: 5px; font: 12px "Segoe UI", sans-serif; letter-spacing: .5px; color: #d1dded; }
.workspace .back-button { position: static; font: 600 13px "Segoe UI", sans-serif; background: #dae4f123; border-color: #e4efff70; border-radius: 8px; }
.workspace-columns { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.build-column { min-width: 0; }
.glass { background: linear-gradient(135deg, rgb(38 38 40 / 94%), rgb(30 30 33 / 91%)); border: 1px solid #ffffff23; border-radius: 10px; box-shadow: inset 0 1px 0 #ffffff08, 0 12px 38px #06102a2e; backdrop-filter: blur(19px) saturate(.85); -webkit-backdrop-filter: blur(19px) saturate(.85); }
.eyebrow { display: block; margin: 0; font: 650 10px "Segoe UI", sans-serif; letter-spacing: 1.7px; color: #a7a7b0; }
.unit-selector { display: flex; align-items: center; gap: 18px; width: 100%; padding: 17px 20px; margin-bottom: 18px; color: inherit; text-align: left; cursor: pointer; font-family: inherit; }
.unit-selector:hover { border-color: #ffffff55; background-color: #ffffff08; }
.art-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, #45454b, #37373d); border: 2px solid #68686f; border-radius: 8px; box-shadow: inset 0 1px 2px #fff2; }
.art-placeholder.has-art { position: relative; overflow: hidden; }
.unit-portrait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.has-art .selection-check { position: relative; z-index: 1; filter: drop-shadow(0 1px 3px #000); }
.selector-art { flex: 0 0 62px; height: 62px; }
.selected-unit-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.selected-unit-copy strong { font-size: 18px; font-weight: 650; line-height: 1.3; }
.selected-unit-copy > span:last-child { font-size: 12px; color: #a6a6af; }
.change-unit { margin-left: auto; flex-shrink: 0; color: #b8b8c0; font-size: 12px; font-weight: 600; }
.change-unit > span { font-size: 19px; margin-left: 10px; }
.build-panel { padding: 25px 27px 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; }
.panel-heading h2 { margin: 5px 0 0; font-size: 24px; letter-spacing: -.65px; font-weight: 650; }
.text-button { border: 0; background: none; padding: 7px 0 7px 10px; font: 600 12px "Segoe UI", sans-serif; color: #aeafb8; cursor: pointer; }
.text-button:hover { color: #f1f1f4; text-decoration: underline; }
.choice-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; }
.choice-tile { display: flex; flex-direction: column; align-items: center; border: 0; padding: 0; background: none; cursor: pointer; min-width: 0; font-family: inherit; color: inherit; }
.choice-tile .art-placeholder { width: min(100%, 98px); aspect-ratio: 1; transition: border-color 150ms, background-color 150ms; }
.choice-tile:hover .art-placeholder { border-color: #9999a0; background-color: #ffffff08; }
.choice-tile.is-selected .art-placeholder { border-color: #56a68d; background-color: #acd8ca1a; }
.selection-check { width: 34px; height: 34px; stroke: #32b47b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; opacity: 0; }
.choice-tile.just-picked .selection-check { animation: check-feedback 900ms ease both; }
@keyframes check-feedback { 0% { opacity: 0; transform: scale(.7); } 20%, 65% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.choice-label { margin-top: 11px; font-size: 12px; font-weight: 650; text-align: center; }
.choice-value { margin-top: 4px; color: #a7a7b0; font-size: 11px; line-height: 1.25; min-height: 14px; text-align: center; }
.choice-tile:disabled { opacity: .48; cursor: not-allowed; }
.choice-tile:focus-visible { outline: 2px solid #32899b; outline-offset: 5px; border-radius: 6px; }
.build-message { margin: 18px 0 0; font-size: 12px; line-height: 1.55; color: #dec389; }
.build-message:empty { display: none; }
.form-section { border-top: 1px solid #ffffff12; padding-top: 20px; margin-top: 25px; }
.section-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.section-caption h3 { margin: 0; font-size: 13px; font-weight: 650; }
.section-caption > span { font-size: 10px; color: #9999a3; }
.field-grid { display: grid; gap: 15px; }
.two-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.three-fields { grid-template-columns: repeat(3,minmax(0,1fr)); }
.unit-party-controls { display: grid; grid-template-columns: 82px minmax(0,1fr); align-items: start; gap: 20px; }
.unit-level-tile .art-placeholder { width: 58px; }
.unit-level-tile .choice-label { font-size: 10px; margin-top: 8px; }
.unit-level-tile .choice-value { font-size: 10px; }
.unit-party-controls > .field-grid { padding-top: 4px; }
.level-note { margin: 13px 0 0; color: #b9ae8c; font-size: 10px; line-height: 1.6; }
.level-note:empty { display: none; }
.field-grid label, .catalog-controls > label { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 11px; color: #b2b2bb; }
.number-field { display: flex; align-items: center; border: 1px solid #ffffff20; background: #17171985; border-radius: 6px; min-height: 39px; overflow: hidden; }
.number-field input { border: 0; background: none; outline: none; padding: 10px 11px; width: 100%; min-width: 0; color: #e2e2e7; font: 600 13px "Segoe UI",sans-serif; font-variant-numeric: tabular-nums; }
.number-field > span { font-size: 11px; padding-right: 12px; flex-shrink: 0; color: #95959f; }
.number-field:focus-within { border-color: #438b9c; box-shadow: 0 0 0 2px #438b9c22; }
.number-field:has(input:disabled) { opacity: .52; }
.number-field input:invalid { color: #ff8996; }
.field-grid select, .catalog-controls select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #ffffff20; border-radius: 6px; color: #e2e2e7; background: #303034; font: 600 12px "Segoe UI", sans-serif; color-scheme: dark; }
.workspace-footnote { margin: 14px 2px 0; color: #d5deeb; font-size: 10px; text-shadow: 0 1px 3px #05112a; }
.overview { padding: 17px 16px 15px; min-width: 0; }
.overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.live-indicator { display: flex; align-items: center; gap: 5px; font-size: 10px; color: #a7a7b0; }
.live-indicator::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #95a3b5; }
.live-indicator.is-live::before { background: #38a782; }
.overview-art { width: 80px; height: 80px; margin: 0 auto 10px; }
.overview h2 { margin: 0 0 6px; text-align: center; font-size: 19px; font-weight: 650; letter-spacing: -.4px; line-height: 1.35; }
.unit-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 6px; }
.overview-scope { color: #a4a4af; text-align: center; font-size: 10px; margin: 0 0 15px; }
.crit-summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0 0; font-size: 10px; color: #a4a4af; }
.crit-summary strong { margin-left: 5px; color: #d5d5df; font-weight: 600; }
.unit-tag { font-size: 9px; letter-spacing: .5px; padding: 4px 7px; border: 1px solid #ffffff20; border-radius: 4px; color: #b2b2bd; background: #ffffff05; }
.stats-header, .stat-row { display: grid; grid-template-columns: 33px 1fr 1fr 1fr; gap: 8px; align-items: center; text-align: right; }
.stats-header { margin-bottom: 10px; font-size: 8px; letter-spacing: 1px; color: #95959f; }
.stat-row { min-height: 37px; border-bottom: 1px solid #ffffff10; font-size: 12px; font-variant-numeric: tabular-nums; }
.stat-row > :first-child { text-align: left; font-size: 10px; }
.stat-row > span { color: #acacb6; }
.stat-row > strong:last-child { font-weight: 700; }
.damage-text { color: #fa8793; }
.spa-text { color: #7bceee; }
.range-text { color: #ecd16a; }
.tip { position: relative; border: 0; background: none; padding: 6px 0; cursor: help; font: inherit; font-weight: 600; text-align: right; }
.tip::after { content: attr(data-tip); display: none; position: absolute; z-index: 20; right: 0; bottom: calc(100% + 6px); width: max-content; max-width: 245px; padding: 11px 13px; border: 1px solid #d5e8ff6b; border-radius: 7px; color: #e6edf8; background: #252527fa; box-shadow: 0 7px 22px #06112640; font: 12px/1.65 "Segoe UI",sans-serif; text-align: left; font-variant-numeric: tabular-nums; white-space: pre-line; pointer-events: none; }
.tip:hover::after, .tip:focus-visible::after { display: block; }
.tip:focus-visible { outline: 1px solid #438b9c; outline-offset: 2px; }
.damage-results { padding: 9px 0 9px; }
.result-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 27px; font-size: 12px; color: #b6b6c0; }
.result-line > button { color: #e3e3e8; }
.total-result { padding: 11px 0 10px; border-top: 1px solid #ffffff17; border-bottom: 1px solid #ffffff17; }
.total-result > div { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 650; }
.info-tip { color: #71829a; border: 1px solid #9eacbe; width: 15px; height: 15px; border-radius: 50%; padding: 0; text-align: center; font-size: 10px; }
.total-result > strong { display: block; margin-top: 5px; font-size: 34px; line-height: 1.2; letter-spacing: -1.6px; font-weight: 650; color: #f0f0f3; }
.total-result > p { margin: 7px 0 0; font-size: 10px; line-height: 1.6; color: #aaaab5; }
.coverage-note { margin: 15px 0 0; font-size: 10px; line-height: 1.7; color: #9c9ca8; }
.math-details { margin-top: 15px; font-size: 10px; color: #aaaab5; }
.math-details summary { cursor: pointer; }
.math-details ol { padding-left: 17px; line-height: 1.7; }
.math-details li { margin-top: 6px; }
.wiki-link { display: inline-block; color: #aebbc8; margin-top: 15px; font-size: 10px; text-decoration: none; }
.wiki-link:hover { text-decoration: underline; }
.glass-dialog { border: 1px solid #ffffff29; border-radius: 11px; background: linear-gradient(145deg,#29292bf5,#222225f5); box-shadow: inset 0 1px 0 #ffffff08, 0 24px 100px #02082070; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); padding: 25px 27px 18px; overflow: visible; max-height: 88svh; }
.glass-dialog::backdrop { background: #00000026; }
.unit-dialog { width: min(1120px,94vw); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dialog-heading h2 { margin: 5px 0 0; font-size: 26px; font-weight: 650; letter-spacing: -.65px; }
.close-dialog { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #ffffff24; background: #fff2; border-radius: 6px; font: 25px/1 "Segoe UI",sans-serif; color: #c3c3cd; cursor: pointer; }
.close-dialog:hover { background: #ffffff0c; }
.catalog-controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: end; }
.filter-menu { position: relative; }
.filter-menu > summary { min-height: 39px; border: 1px solid #ffffff20; border-radius: 6px; background: #303034; padding: 9px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; font-weight: 600; list-style: none; }
.filter-menu > summary::-webkit-details-marker { display: none; }
.filter-menu > summary > span:last-child { margin-left: auto; }
.filter-count { color: #77c6a7; font-size: 10px; }
.filter-popover { position: absolute; z-index: 5; top: calc(100% + 8px); left: 0; width: 320px; max-width: 80vw; padding: 17px; border: 1px solid #ffffff29; border-radius: 8px; background: #2c2c30fa; box-shadow: 0 12px 35px #081b3c33; }
.filter-heading { display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.filter-popover fieldset { border: 0; padding: 0; margin: 15px 0 0; }
.filter-popover legend { color: #a4a4af; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.filter-popover fieldset > div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-popover label { display: flex; gap: 7px; align-items: center; font-size: 11px; }
.filter-popover input { accent-color: #3b9a7d; margin: 0; }
.unit-search { display: flex; align-items: center; gap: 10px; margin-top: 18px; border: 1px solid #ffffff20; border-radius: 6px; background: #1b1b1e80; padding: 0 12px; }
.unit-search svg { width: 17px; height: 17px; stroke: #73839a; stroke-width: 1.6; fill: none; }
.unit-search input { flex: 1; width: 100%; border: 0; background: none; outline: none; padding: 11px 0; color: #e6e6ec; font: 12px "Segoe UI",sans-serif; }
.unit-search:focus-within { border-color: #438b9c; }
.catalog-meta { display: flex; justify-content: space-between; gap: 10px; margin: 15px 0 12px; font-size: 10px; color: #a1a1ad; }
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(140px,1fr)); gap: 12px; max-height: calc(88svh - 290px); min-height: 150px; overflow-y: auto; padding: 2px 4px 3px 2px; scrollbar-color: #a7b5c9 transparent; }
.unit-card { position: relative; display: flex; flex-direction: column; padding: 9px; border: 1px solid #ffffff1a; border-radius: 8px; background: #ffffff04; color: #e5e5eb; font-family: inherit; text-align: left; cursor: pointer; }
.unit-card:hover { border-color: #ffffff55; background: #ffffff0c; }
.unit-card.is-current { border-color: #58a18b; box-shadow: 0 0 0 1px #58a18b; }
.unit-card .art-placeholder { width: 100%; aspect-ratio: 1; border-width: 1px; border-radius: 6px; margin-bottom: 10px; }
.unit-card strong { font-size: 11px; line-height: 1.45; font-weight: 600; min-height: 32px; }
.unit-card small { color: #aaaab5; font-size: 9px; margin-top: 6px; }
.unit-card .card-dps { color: #c4c4ce; font-size: 10px; font-weight: 600; margin-top: 8px; }
.catalog-note { margin: 14px 0 0; font-size: 10px; line-height: 1.5; color: #9e9eaa; }
.empty-catalog { grid-column: 1 / -1; text-align: center; font-size: 13px; padding: 40px 10px; color: #acacb7; }
.choice-dialog { width: min(440px,92vw); }
.choice-dialog .dialog-heading h2 { font-size: 22px; }
.choice-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; max-height: 55svh; overflow-y: auto; }
.choice-option { display: flex; align-items: center; gap: 10px; padding: 10px; min-height: 62px; text-align: left; border: 1px solid #ffffff1a; border-radius: 7px; background: #ffffff04; color: #e5e5eb; font: 600 12px "Segoe UI",sans-serif; cursor: pointer; }
.choice-option .art-placeholder { width: 35px; height: 35px; border-width: 1px; border-radius: 5px; flex-shrink: 0; }
.choice-option small { display: block; margin-top: 4px; font-size: 9px; font-weight: 400; color: #a0a0ad; }
.choice-option:hover { background: #ffffff0c; border-color: #ffffff55; }
.choice-option[aria-pressed="true"] { border-color: #4f9d83; }
.choice-note { font-size: 10px; line-height: 1.6; color: #a3a3af; margin-bottom: 0; }
.anchored-menu { position: fixed; inset: auto; margin: 0; padding: 20px; overflow: visible; }
.anchored-menu[open] { display: flex; flex-direction: column; }
.anchored-menu::before { content: ""; position: absolute; top: -6px; left: calc(var(--anchor-x) - 6px); width: 11px; height: 11px; background: #29292b; border-top: 1px solid #ffffff29; border-left: 1px solid #ffffff29; transform: rotate(45deg); }
.anchored-menu.opens-above::before { top: auto; bottom: -6px; transform: rotate(225deg); background: #222225; }
.anchored-menu .dialog-heading { flex-shrink: 0; margin-bottom: 18px; }
.anchored-menu .catalog-controls, .anchored-menu .unit-search, .anchored-menu .catalog-meta, .anchored-menu .catalog-note, .anchored-menu .choice-note { flex-shrink: 0; }
.anchored-menu .unit-grid, .anchored-menu .choice-options { flex: 1; min-height: 0; max-height: none; overflow-y: auto; }
.anchored-menu .catalog-meta { margin: 12px 0; }
.anchored-menu .choice-options { max-height: 360px; }
.choice-tile[aria-expanded="true"] .art-placeholder, .unit-selector[aria-expanded="true"] .selector-art { border-color: #b6bdc9; box-shadow: 0 0 0 3px #b6bdc917; }
@media (max-width:760px) { .choice-grid { grid-template-columns: repeat(3,minmax(0,1fr)); row-gap: 20px; } .choice-tile .art-placeholder { width: 78px; } .anchored-menu { padding: 16px; } .anchored-menu .dialog-heading { margin-bottom: 14px; } }
@media (min-width:1550px) { .workspace { padding-top: 35px; } .workspace-header { margin-bottom: 32px; } .build-panel { padding: 30px 34px 25px; } .choice-tile .art-placeholder { width: 108px; } .form-section { margin-top: 30px; } }
@media (max-width:1050px) { .workspace { padding: 20px; } .workspace-columns { grid-template-columns: minmax(0,1fr) 310px; gap: 15px; } .build-panel { padding: 23px 20px; } .choice-grid { gap: 10px; } .choice-label { font-size: 10px; } .choice-value { font-size: 10px; } .change-unit { font-size: 0; } .change-unit > span { font-size: 22px; } .section-caption > span { display: none; } }
@media (max-width:760px) { .workspace { padding: 15px 14px 25px; } .workspace-header { gap: 10px; margin-bottom: 16px; } .workspace-brand { gap: 5px; } .workspace-brand img { width: 112px; } .workspace-brand > span { font-size: 17px; padding-left: 10px; } .workspace-brand small { font-size: 9px; } .workspace .back-button { padding: 7px 9px; font-size: 11px; } .workspace .back-button svg { width: 15px; } .workspace-columns { grid-template-columns: 1fr; } .unit-selector { padding: 14px; gap: 12px; } .selected-unit-copy strong { font-size: 16px; } .selector-art { height: 52px; flex-basis: 52px; } .build-panel { padding: 22px 17px; } .choice-grid { gap: 9px; } .choice-tile .art-placeholder { border-radius: 6px; } .choice-label { font-size: 9px; min-height: 23px; display: grid; place-items: center; margin-top: 8px; } .choice-value { font-size: 9px; } .panel-heading { margin-bottom: 23px; } .panel-heading h2 { font-size: 23px; } .three-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } .overview { padding: 23px; } .overview-art { width: 120px; height: 120px; } .stat-row { min-height: 43px; font-size: 14px; } .stat-row > :first-child { font-size: 11px; } .overview h2 { font-size: 21px; } .glass-dialog { padding: 20px 16px 16px; } .catalog-controls { gap: 8px; } .catalog-controls select { font-size: 10px; padding: 7px 5px; } .filter-menu > summary { font-size: 11px; padding: 8px; } .filter-popover { left: -90px; width: 290px; } .catalog-meta { font-size: 9px; } .unit-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; max-height: calc(88svh - 295px); } .dialog-heading h2 { font-size: 24px; } }
@media (prefers-reduced-motion:reduce) { .choice-tile .art-placeholder { transition:none; } .choice-tile.just-picked .selection-check { animation:none; opacity:1; } }

.art-placeholder.trait-art { background: #29292e; box-shadow: inset 0 1px 0 #ffffff05; border-color: #55555d; }
.trait-art .unit-portrait { padding: 0; }
.art-placeholder.trait-front { border-color: transparent; background: transparent; box-shadow: none; }
.choice-tile.is-selected .trait-art { background: #29292e; }
.choice-option .trait-art { width: 40px; height: 40px; }
.art-placeholder.relic-art { background: #29292e; border-color: #55555d; box-shadow: inset 0 1px 0 #ffffff05; }
.choice-option .relic-art { width: 40px; height: 40px; }
.field-grid label > small { display: block; color: #a7a7b0; margin-top: 6px; font-size: 10px; line-height: 1.4; }
.field-grid label[hidden] { display: none; }
#relic-roll { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #ffffff20; border-radius: 6px; background: #242427; color: #ddd; font: inherit; }
.relic-note, #relic-effects { color: #aaaab4; font-size: 11px; line-height: 1.65; margin: 12px 0 0; }
.relic-note:empty { display: none; }
#relic-details { margin-top: 10px; font-size: 11px; color: #bcbcc5; }
#relic-details summary { cursor: pointer; width: fit-content; }
.art-placeholder.relic-front { border-color: transparent; background: transparent; box-shadow: none; }
.relic-art:not(.relic-front) .unit-portrait { filter: drop-shadow(0 0 .6px #ffffff70); }


.number-field { background: #1d1d21; border-color: #55545f; box-shadow: inset 0 1px 3px #0003; }
.number-field input { color: #f0edf5; font: 400 16px/1.2 "Lilita One", "Arial Rounded MT Bold", sans-serif; letter-spacing: .2px; text-shadow: 0 1px 1px #0006; }
.number-field > span { font: 400 14px "Lilita One", sans-serif; color: #b1aaba; }
.number-field:focus-within { border-color: #aba0c5; box-shadow: 0 0 0 2px #b09ad51c, inset 0 1px 3px #0003; }
.field-grid select, #relic-roll, .unit-search input { font: 400 14px/1.3 "Lilita One", "Arial Rounded MT Bold", sans-serif; letter-spacing: .15px; }
.unit-search input::placeholder { color: #99939f; }
.relic-tooltip { position: fixed; inset: auto; margin: 0; width: min(300px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow-y: auto; box-sizing: border-box; padding: 16px 18px; border: 1px solid #77717e; border-radius: 8px; background: #202024fa; color: #e9e6ee; box-shadow: 0 10px 32px #0007; pointer-events: none; text-align: left; font: 400 13px/1.5 "Lilita One", "Arial Rounded MT Bold", sans-serif; }
.relic-tooltip-title { display: block; font: inherit; font-size: 17px; color: #f5f1f8; padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid #ffffff16; }
.relic-effect { margin-top: 4px; text-shadow: 0 1px 1px #0005; }
.relic-effect-heading { color: #b1acbd; font: 650 10px/1.5 "Segoe UI",sans-serif; letter-spacing: .5px; margin-top: 13px; margin-bottom: 5px; }
.relic-effect-magic, .relic-effect-aqua { color: #57d7ff; }
.relic-effect-physical { color: #ff848c; }
.relic-effect-power, .relic-effect-air { color: #91ecac; }
.relic-effect-effect, .relic-effect-light { color: #ffda69; }
.relic-effect-fire { color: #ffaa5d; }
.relic-effect-rose { color: #ffa5de; }
.relic-effect-storm { color: #a6d4ff; }
.relic-effect-dark { color: #c9a2f4; }
.relic-tooltip-note { font: 11px/1.55 "Segoe UI",sans-serif; color: #aaa6b4; border-top: 1px solid #ffffff16; margin: 12px 0 0; padding-top: 10px; }


.stats-header, .stat-row { grid-template-columns: 26px 59px 26px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap: 5px; }
.stat-row { min-height: 44px; }
.stat-roll { min-height: 27px; border-radius: 5px; }
.stat-roll input { padding: 6px 0 6px 5px; font-size: 12px; appearance: textfield; -moz-appearance: textfield; }
.stat-roll input::-webkit-inner-spin-button, .stat-roll input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stat-roll > span { padding-right: 4px; font-size: 10px; }
.stat-grade { display: block; width: 26px; height: 18px; object-fit: contain; }
.unit-party-controls .three-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.relic-effect:not(.relic-effect-heading):not(.relic-effect-neutral) { background: linear-gradient(180deg,var(--effect-top) 10%,var(--effect-bottom) 90%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 1px 0 #0006); }
.relic-effect-magic, .relic-effect-aqua { --effect-top:#b5f7ff; --effect-bottom:#00aaff; }
.relic-effect-physical { --effect-top:#ffd1cc; --effect-bottom:#ff405d; }
.relic-effect-power, .relic-effect-air { --effect-top:#d2ffdf; --effect-bottom:#39df86; }
.relic-effect-effect, .relic-effect-light { --effect-top:#fff8b9; --effect-bottom:#ffbc00; }
.relic-effect-fire { --effect-top:#ffdb87; --effect-bottom:#ff6c17; }
.relic-effect-rose { --effect-top:#ffd7f6; --effect-bottom:#ff69c9; }
.relic-effect-storm { --effect-top:#f0fcff; --effect-bottom:#65aeff; }
.relic-effect-dark { --effect-top:#dec4ff; --effect-bottom:#9661d2; }
.resistance-details { margin-top: 12px; border-top: 1px solid #ffffff12; padding-top: 12px; color: #a7a2b2; font-size: 11px; }
.resistance-details summary { cursor: pointer; width: fit-content; }
.resistance-toggle { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.resistance-toggle input { accent-color: #9c83bf; }

.bleed-support-tile { position: relative; cursor: pointer; }
.bleed-support-tile:has(:disabled) { opacity: .48; }
.bleed-support-tile:has(:disabled), .bleed-support-tile > :disabled { cursor: not-allowed; }
.bleed-support-tile > input,
.bleed-support-tile > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.bleed-support-tile:focus-within .art-placeholder { outline: 2px solid #a9baff; outline-offset: 2px; }
.bleed-support-tile .unit-portrait { object-fit: cover; }
.enemy-amp-control { margin-top: 12px; max-width: 310px; }
.stats-header, .stat-row { grid-template-columns: 26px 64px 32px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); }
.stat-grade { width: 32px; height: 20px; }
.spa-roll-control { position: relative; display: block; min-width: 0; }
.spa-roll-prefix { position: absolute; right: calc(100% + 2px); top: 50%; transform: translateY(-50%); color: #7bceee; font: 400 12px "Lilita One",sans-serif; }
.spa-roll-control .stat-roll { width: 100%; min-width: 0; }


.build-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 94px), 1fr));
  gap: 10px;
  align-items: start;
  padding: 2px 2px 4px;
}
.build-group { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-width: 0; }
.build-group .choice-tile { width: 100%; }
.build-group .art-placeholder { width: min(100%,82px); }
.build-group .choice-label { font-size: 10px; margin-top: 8px; }
.build-group .choice-value { font-size: 10px; }
.build-panel [hidden] { display: none !important; }
.add-trait, .remove-trait { border: 0; background: none; padding: 3px; color: #b4adbf; font: 10px "Segoe UI",sans-serif; cursor: pointer; text-align: center; }
.add-trait:hover, .remove-trait:hover { color: #eee8f8; }
#second-trait-wrap .remove-trait { display: block; margin: 6px auto 0; }
.build-symbol { width: 58%; height: 58%; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.build-group .number-field input { padding: 7px 4px; font-size: 12px; }
.build-group .number-field { min-height: 29px; }
.build-group .number-field > span { padding-right: 4px; font-size: 10px; }
.build-group input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.build-group input::-webkit-inner-spin-button, .build-group input::-webkit-outer-spin-button { -webkit-appearance: none; }
.compact-relic-stat { display: grid; grid-template-columns: minmax(0,46px) minmax(0,1fr); gap: 4px; align-items: center; color: #bcb5c6; font-size: 9px; line-height: 1.3; }
.compact-relic-stat > small { grid-column: 1/-1; color: #918b9c; font-size: 8px; }
.relic-inline-controls { display: flex; flex-direction: column; gap: 10px; }
.relic-inline-controls #relic-roll { padding: 6px 3px; font-size: 10px; margin-top: 4px; }
.inline-caption { font-size: 9px; color: #aaa3b6; }
.party-entry { display: grid; gap: 6px; font-size: 10px; color: #bcb5c6; text-align: center; }
.party-entry small { font-size: 8px; color: #8e879b; line-height: 1.4; }
#unit-limit-broken.is-selected ~ .party-entry small { display: none; }
.curse-group { display: grid; gap: 8px; }
.build-group .curse-group #curse-choice { width: calc(100% - 8px); margin-inline-start: 8px; }
.build-group .level-note { font-size: 8px; line-height: 1.5; margin: 0; }
.curse-row { display: grid; grid-template-columns: 22px minmax(0,1fr) 18px; align-items: center; gap: 3px; margin-bottom: 9px; font-size: 8px; }
.curse-row .number-field input { padding: 6px 1px 6px 3px; font-size: 10px; }
.curse-row .number-field > span { font-size: 8px; padding-right: 1px; }
.curse-switch { padding: 0; width: 17px; height: 24px; border: 1px solid #696272; border-radius: 5px; background: #38353e; cursor: pointer; display: grid; place-items: center; }
.curse-switch span { width: 7px; height: 7px; border-radius: 50%; background: #8b8494; }
.curse-switch[data-state="on"] { border-color: #54b99a; background: #24443a; }
.curse-switch[data-state="on"] span { background: #6fe0b7; box-shadow: 0 0 5px #64dfae38; }
.curse-switch[data-state="off"] { border-color: #c26d7c; background: #482e37; }
.curse-switch[data-state="off"] span { background: #ee8c9e; }
.build-footer { margin-top: 14px; border-top: 1px solid #ffffff12; padding-top: 4px; }
.support-note { font-size: 11px; color: #bdb0d1; line-height: 1.6; margin: 16px 0 0; }
@media (max-width:1100px) and (min-width:761px) { .build-grid { gap: 7px; } .build-panel { padding-left: 16px; padding-right: 16px; } .workspace-columns { grid-template-columns: minmax(0,1fr) 320px; gap: 12px; } }
.build-group .art-placeholder:has(.build-symbol) { position: relative; }
.build-group .build-symbol { position: absolute; inset: 20%; width: 60%; height: 60%; }
.curse-switch { height: 14px; border-radius: 7px; }
.curse-switch span { width: 6px; height: 6px; transition: transform 120ms; }
.curse-switch[data-state="on"] span { transform: translateX(3px); }
.curse-switch[data-state="off"] span { transform: translateX(-3px); }


.trait-art.trait-muted .unit-portrait { filter: grayscale(1); opacity: .68; }
#second-trait-wrap, #third-trait-wrap { margin-top: 0; }
.curse-row { grid-template-columns: 26px 42px 18px; gap: 3px; font-size: 11px; font-weight: 650; }
.curse-row .number-field input { padding: 6px 2px 6px 3px; font-size: 12px; }
.curse-row .number-field > span { font-size: 9px; padding-right: 2px; }
.curse-spa-field { position: relative; overflow: visible; }
.curse-spa-sign { position: absolute; right: calc(100% + 1px); top: 50%; transform: translateY(-50%); padding: 0 !important; color: #7bceee !important; font-size: 11px !important; }
.compact-relic-stat { font-size: 10px; }


.workspace-nav { display:flex; gap:5px; padding:4px; border:1px solid #ffffff24; border-radius:7px; background:#141426c9; }
.workspace-nav a { padding:10px 13px; color:#bbb6ce; text-decoration:none; white-space:nowrap; font:15px 'Lilita One',sans-serif; border-radius:4px; }
.workspace-nav a:hover { background:#ffffff0b; color:#fff; }
.workspace-nav a.is-active { background:#29345a; color:#f2f1fb; box-shadow:inset 0 -2px #adbfff; }
.workspace-nav a:focus-visible { outline:2px solid #a9baff; outline-offset:2px; }
@media(max-width:900px) { .workspace-header { flex-wrap:wrap; gap:14px; } .workspace-brand { flex:1; } .workspace-nav { order:3; width:100%; justify-content:center; } .workspace-nav a { flex:1; text-align:center; } }
@media(max-width:500px) { .workspace-brand img { width:110px; } .workspace-brand > span { font-size:20px; padding-left:12px; } .workspace-nav a { font-size:14px; padding:9px 8px; } }
