.page-intro h1{max-width:1020px;font-size:clamp(25px,3vw,36px);line-height:1.3}.account-menu{position:relative;margin-left:auto}.account-menu summary{list-style:none;cursor:pointer}.account-menu summary::-webkit-details-marker{display:none}.account-popover{position:absolute;right:0;top:calc(100% + 12px);width:min(325px,calc(100vw - 30px));padding:20px;border:1px solid #665b43;border-radius:7px;background:#142127;box-shadow:0 20px 55px #000a;z-index:20}.account-popover .button{margin-top:18px;width:100%}.account-popover select{width:100%}.account-popover small{display:block;line-height:1.6;margin-top:8px}.result-actions{flex-wrap:wrap;justify-content:flex-end}.results-heading>div:first-child{min-width:0}.results-heading h2{overflow-wrap:anywhere}.results-view-toggle{display:flex;gap:3px;border:1px solid #445157;padding:3px;border-radius:5px;flex-shrink:0}.results-view-toggle button{border:0;border-radius:3px;padding:7px 12px;background:transparent;color:#9db2bb;font:inherit;cursor:pointer}.results-view-toggle button[aria-pressed=true]{color:#ead5a0;background:#69533066}
.history-entry{display:flex;gap:8px;margin-bottom:12px;align-items:center}.history-entry .history-card{margin:0;flex:1;min-width:0}.history-entry .history-card>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.history-delete{flex-shrink:0;color:#d5aaa1}.history-entry .history-card strong{font-size:17px}

/* Slot headings anchor the doll; source colors stay independent of rank. */
.paper-doll { padding: 8px 0 20px; }
.doll-legend { display:flex; gap:18px; flex-wrap:wrap; color:#bac9ce; font-size:12px; margin-bottom:24px; line-height:1.7; }
.doll-legend > span { display:flex; align-items:center; gap:7px; }
.doll-legend i { width:8px; height:8px; border-radius:50%; }
.legend-pink { background:#e8a6ed; }
.legend-blue { background:#83c6ff; }
.legend-check { color:#93d6a6; }
.doll-legend small { flex-basis:100%; color:#9db2ba; font-size:12px; }
.doll-stage { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:32px; row-gap:18px; align-items:start; }
.doll-left, .doll-right { display:contents; }
.doll-left .doll-slot { grid-column:1; }
.doll-right .doll-slot { grid-column:2; }
.doll-slot { display:grid; grid-template-columns:54px minmax(0,1fr); gap:14px; align-items:start; min-width:0; padding:0 0 18px; border-bottom:1px solid #344449; text-align:left; }
.doll-slot-label { grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:10px; min-height:44px; width:100%; padding:7px 10px; border:1px solid #344449; border-radius:5px; background:#17252c66; color:#ecf0ef; font-size:17px; font-weight:600; text-align:left; cursor:pointer; }
.doll-slot-action { color:#9eb2bc; font-size:11px; font-weight:400; white-space:nowrap; }
.doll-slot-action > span { display:inline-block; margin-left:5px; font-size:15px; }
.doll-slot-label:hover, .doll-slot-label[aria-expanded=true] { background:#22343e; border-color:#83c6ff; }
.doll-slot-label:hover .doll-slot-action, .doll-slot-label[aria-expanded=true] .doll-slot-action { color:#b7ddff; }
.doll-equipment { width:54px; }
.doll-icon { width:54px; height:54px; border:1px solid #ba83c4; border-radius:5px; background:#101b22; position:relative; }
.doll-icon .item-link { display:block; width:100%; height:100%; }
.doll-icon-art { display:grid; place-items:center; width:100%; height:100%; position:relative; overflow:hidden; border-radius:4px; color:#71878e; }
.doll-icon-art > svg { width:30px; height:30px; }
.doll-icon-art > img { position:absolute; width:100%; height:100%; object-fit:cover; inset:0; }
.doll-check { position:absolute; inset:0; display:grid; place-items:center; font-size:36px; font-weight:700; color:#8df0ab; background:#293234; }
.doll-info { min-width:0; overflow-wrap:anywhere; }
.raid-option { --loot-color:#e8a6ed; }
.mplus-option { --loot-color:#83c6ff; }
.doll-option-heading { display:flex; align-items:baseline; gap:8px; }
.doll-option-heading > .doll-source { flex-shrink:0; }
.doll-source { display:inline-block; color:var(--loot-color); background:color-mix(in srgb,var(--loot-color) 10%,transparent); border:1px solid color-mix(in srgb,var(--loot-color) 30%,transparent); border-radius:3px; padding:2px 6px; font-size:11px; font-weight:600; line-height:1.4; }
.doll-option strong { display:block; font-size:15px; line-height:1.5; font-weight:600; color:var(--loot-color); }
.doll-item-line { min-width:0; line-height:1.6; }
.doll-item-line strong { display:inline; }
.doll-option .item-link:hover, .slot-upgrades .item-link:hover { color:var(--loot-color); text-decoration:underline; }
.doll-option-meta { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-top:6px; }
.doll-gain { color:#93d6a6; }
.doll-gain-value { font-size:28px; line-height:1.15; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; letter-spacing:-.5px; }
.doll-gain-unit { font-size:12px; }
.doll-percent { color:#a2beb0; font-size:12px; white-space:nowrap; }
.doll-location { color:#a7bac2; font-size:12px; line-height:1.6; }
.alternative-option { margin-top:14px; padding-top:12px; border-top:1px solid #2d3d43; }
.alternative-option .doll-gain-value { font-size:24px; font-weight:500; }
.doll-provisional { display:block; color:#b6b7a4; font-size:11px; margin-top:12px; line-height:1.6; }
.doll-option .conversion-note { display:block; font-size:11px; margin-top:4px; }
.doll-option .conversion-note .item-link { color:var(--loot-color); }
.checked-slot .doll-icon { border-color:#56615d; }
.doll-settled { display:block; color:#a8cbb2; font-size:14px; font-weight:500; line-height:1.6; }
.doll-settled-note { display:block; color:#a4bab2; font-size:12px; line-height:1.6; margin-top:4px; }
.doll-unknown { color:#a5b7bf; font-size:13px; line-height:1.7; }
.unknown-slot .doll-icon { border-color:#45545b; }
.doll-weapons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:32px; padding-top:22px; margin-top:22px; border-top:1px solid #344449; }
.doll-weapons .doll-slot { grid-row:1!important; }
.paper-slot-details { margin-top:28px; border:1px solid #546573; background:#14212bcc; padding:20px; border-radius:6px; scroll-margin-top:20px; }
.slot-details-heading { display:flex; justify-content:space-between; align-items:start; gap:15px; }
.slot-details-heading h3 { font:600 22px/1.4 "Segoe UI",Arial,sans-serif; color:#ecf0ef; }
.slot-details-heading p, .paper-slot-details > p { font-size:12px; color:#adbec5; line-height:1.7; margin-top:8px; }
.slot-upgrades { width:100%; border-collapse:collapse; font-size:13px; margin-top:18px; table-layout:fixed; }
.slot-upgrades caption { text-align:left; color:#d9e3e7; font-weight:600; font-size:13px; padding:0 0 12px; }
.slot-upgrades th { font-size:11px; font-weight:500; text-align:left; color:#a4b8c1; padding:10px 8px; border-bottom:1px solid #546573; }
.slot-upgrades td { padding:14px 8px; vertical-align:top; border-bottom:1px solid #344449; color:#b7c8cf; line-height:1.6; overflow-wrap:anywhere; }
.slot-upgrades th:first-child { width:48px; }
.slot-upgrades th:nth-child(2) { width:42%; }
.slot-upgrades th:nth-child(4) { width:60px; }
.slot-upgrades th:last-child { width:118px; text-align:right; }
.slot-upgrades td strong { display:block; color:var(--loot-color); font-size:14px; font-weight:500; }
.slot-upgrades td small { display:block; color:#a5b8bf; font-size:11px; line-height:1.6; margin-top:4px; }
.slot-upgrades .doll-source { margin-bottom:5px; }
.slot-upgrades .conversion-note a { color:var(--loot-color); }
.slot-upgrades .upgrade-rank { color:#c5d8e2; font-variant-numeric:tabular-nums; }
.slot-upgrades .upgrade-gain { text-align:right; font-variant-numeric:tabular-nums; }
.slot-upgrades .upgrade-gain strong { color:#93d6a6; white-space:nowrap; }
.slot-upgrades .upgrade-gain strong small { display:inline; }
.doll-slot-label:focus-visible, .results-view-toggle button:focus-visible { outline:2px solid #83c6ff; outline-offset:4px; }
.paper-slot-details:focus { outline:2px solid #83c6ff; outline-offset:3px; }
@media(max-width:850px) {
  .doll-stage, .doll-weapons { column-gap:20px; }
  .doll-slot { grid-template-columns:44px minmax(0,1fr); gap:10px; }
  .doll-equipment, .doll-icon { width:44px; }
  .doll-icon { height:44px; }
  .doll-slot-label { font-size:16px; }
  .doll-slot-action { font-size:10px; }
  .doll-option strong { font-size:14px; }
  .doll-gain-value { font-size:26px; }
  .results-heading h2 { font-size:23px; }
}
@media(max-width:640px) {
  .doll-stage, .doll-weapons { grid-template-columns:minmax(0,1fr); gap:18px; }
  .doll-stage .doll-slot, .doll-weapons .doll-slot { grid-column:1; grid-row:auto!important; }
  .doll-slot-label { font-size:17px; }
  .doll-slot-action { font-size:11px; }
  .doll-option strong { font-size:15px; }
  .doll-legend { gap:12px; }
  .paper-slot-details { padding:14px 10px; }
  .slot-details-heading h3 { font-size:20px; }
  .slot-upgrades { font-size:12px; }
  .slot-upgrades th, .slot-upgrades td { padding:10px 5px; }
  .slot-upgrades th:first-child { width:34px; }
  .slot-upgrades th:nth-child(2) { width:auto; }
  .slot-upgrades th:last-child { width:88px; }
  .slot-upgrades th:nth-child(3), .slot-upgrades th:nth-child(4) { display:none; }
  .slot-upgrades td:nth-child(3) { display:block; border:0; padding-top:0; font-size:11px; }
  .slot-upgrades td:nth-child(4) { display:block; border:0; padding-top:0; font-size:11px; }
  .slot-upgrades td:nth-child(4)::before { content:"ilvl "; }
  .slot-upgrades td:nth-child(2) { display:block; border:0; padding-bottom:4px; }
  .slot-upgrades td strong { font-size:13px; }
  .slot-upgrades tr { border-bottom:1px solid #344449; }
  .slot-upgrades td:nth-child(3):empty { display:none; }
}
@media(max-width:560px) {
  .account-menu { position:absolute; right:15px; top:24px; }
  .site-header { position:relative; }
  .brand { padding-right:140px; }
  .results-toolbar { flex-wrap:wrap; }
  .history-entry { gap:4px; }
  .history-delete { font-size:10px; padding:9px 7px; }
  .history-entry .history-card strong { font-size:14px; }
  .history-entry .history-card { padding:12px 8px; }
  .page-intro h1 { font-size:25px; }
}
