/* Loomian Care inspired: charcoal grid, graphite frames, neutral graphite trim and blue controls. */
@font-face {
  font-family: 'Russo One';
  src: url('assets/fonts/RussoOne-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* The display font has one real weight. Avoid synthetic bold and mixed unit fonts. */
*,*::before,*::after { font-family: var(--pc-title) !important; font-weight: 400 !important; font-synthesis: none; }
::placeholder,::file-selector-button { font-family: var(--pc-title) !important; font-weight: 400 !important; }
.rarity-tag,.low-pop-diamond { font-family: 'Segoe UI Emoji','Apple Color Emoji',sans-serif !important; }
hr { display: none; }
.pc-import-dialog { width: min(1000px,calc(100% - 28px)); max-width: 1000px; background: #202d3b; padding: 24px; }
.pc-import-page { padding-bottom: 25px; }.pc-import-page[hidden] { display: none; }
.pc-page-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 20px; }.pc-page-top > span { color: #8faabd; font-size: .75rem; }
.pc-capture-guide { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(240px,1fr); gap: 28px; align-items: center; margin-bottom: 25px; }
.pc-guide-image { position: relative; margin: 0; overflow: hidden; border-radius: 14px; background: #122334; isolation: isolate; }
.pc-guide-image > img { display: block; width: 100%; height: auto; }
.pc-guide-spotlight { position: absolute; left: 11.55%; top: 17.92%; width: 52.95%; height: 74.13%; border: 2px dashed #bde9ff; border-radius: 8px; box-shadow: 0 0 0 999px #071522b8; }
.pc-guide-spotlight > span { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; color: #effaff; background: #173e59; padding: 7px 10px; border-radius: 6px; font-size: clamp(.55rem,1vw,.8125rem); }
.pc-guide-image figcaption { position: absolute; left: 10px; bottom: 9px; color: #e3f3ff; font-size: .75rem; }
.pc-guide-steps h2 { margin: 0 0 22px; font-size: 1.25rem; color: #eaf6ff; }
.pc-guide-steps ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }.pc-guide-steps li { display: flex; gap: 13px; }.pc-guide-steps li > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 8px; background: #214d70; color: #dff3ff; font-size: .8125rem; }.pc-guide-steps strong { display: block; font-size: .9375rem; color: #e3f0fa; }.pc-guide-steps p { margin: 6px 0 0; color: #9fb9cf; font-size: .8125rem; line-height: 1.7; }
.pc-workspace { padding: 23px; border-radius: 14px; background: #202e3c; }.pc-grid-settings { display: flex; gap: 12px; }.pc-grid-settings[hidden],.pc-import-page [hidden] { display: none; }
.pc-grid-controls select { min-height: 36px; padding: 7px 30px 7px 10px; background-color: #142636; color: #e2f1fb; border-color: #405e76; }
@media(max-width:800px) { .pc-capture-guide { grid-template-columns: 1fr; gap: 20px; }.pc-guide-steps ol { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }.pc-guide-steps li { flex-direction: column; gap: 9px; }.pc-guide-steps li > span { flex-basis: auto; width: 30px; }.pc-guide-steps h2 { margin-bottom: 15px; }.pc-guide-spotlight > span { font-size: .75rem; } }
@media(max-width:500px) { .pc-guide-steps ol { grid-template-columns: 1fr; gap: 16px; }.pc-guide-steps li { flex-direction: row; }.pc-guide-steps li > span { flex: 0 0 30px; }.pc-workspace { padding: 16px; }.pc-page-top > span { font-size: .625rem; }.pc-guide-spotlight > span { font-size: .625rem; } }
.pc-upload-bar,.pc-grid-controls,.pc-review-toolbar,.pc-correction-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#pcImageName { color: #a7bed1; font-size: .75rem; overflow-wrap: anywhere; }
.pc-upload-hint { margin: 18px 0 8px; padding: 32px 18px; border-radius: 12px; background: #172737; color: #acc6db; text-align: center; font-size: .875rem; line-height: 1.8; }
.pc-import-status { color: #c4d9eb; margin: 14px 0; font-size: .8125rem; line-height: 1.6; min-height: 1.6em; }
.pc-crop-hint,.pc-review-hint { color: #9eb7cd; font-size: .75rem; line-height: 1.7; margin: 12px 0; }
.pc-canvas-wrap { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 760px; height: clamp(160px,34vh,344px); min-height: 160px; max-height: 344px; margin: 0 auto; padding: 12px; overflow: hidden; border-radius: 12px; background: #102131; }
#pcCropCanvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.pc-scan-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; max-width: 760px; margin: 15px auto 0; }.pc-scan-actions > span { color: #a7c2d6; font-size: .8125rem; }
@media(max-width:500px) { .pc-scan-actions > span { font-size: .6875rem; }.pc-scan-actions .button { white-space: nowrap; } }
.pc-grid-controls { margin-top: 14px; }.pc-grid-controls label,.pc-crop-fields label { display: grid; gap: 6px; color: #bcd2e3; font-size: .75rem; }.pc-grid-controls input,.pc-crop-fields input { width: 78px; min-height: 36px; border-radius: 7px; padding: 6px 9px; background: #142636; color: #eef7ff; border: 1px solid #405e76; }
#pcScan { margin-left: auto; }.pc-crop-fields { margin: 14px 0 22px; color: #98b6cc; font-size: .75rem; }.pc-crop-fields summary { cursor: pointer; }.pc-crop-fields > div { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.pc-review-toolbar { margin: 24px 0 8px; }.pc-review-toolbar h3,.pc-correction-heading h3 { color: #eaf5fd; font-size: 1rem; margin-right: auto; }.pc-review-toolbar label { display: flex; align-items: center; gap: 7px; color: #acc5d9; font-size: .6875rem; }
.pc-review-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; }
.pc-review-card { display: flex; flex-direction: column; gap: 8px; background: #172a3a; border-radius: 12px; padding: 12px; min-width: 0; }.pc-review-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .6875rem; color: #9ab5c9; }
.pc-confidence { color: #e6b76c; }.pc-confidence[data-level=High] { color: #67d79b; }.pc-confidence[data-level=Low] { color: #eda2ab; }
.pc-match-art { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; height: 88px; align-items: center; }.pc-match-art .portrait-sprites { display: flex; width: 100%; height: 80px; }.pc-match-art .sprite-portrait { width: 100%; height: 100%; }.pc-slot-crop { display: block; width: 100%; max-height: 88px; object-fit: contain; border-radius: 6px; image-rendering: pixelated; }
.pc-review-card > strong { font-size: .875rem; color: #e8f4fc; }.pc-match-variant { font-size: .6875rem; line-height: 1.5; color: #a5c0d5; white-space: pre-wrap; }.pc-ambiguity { font-size: .6875rem; line-height: 1.5; color: #e4bd79; }.pc-review-card > .text-button { padding: 3px 0; align-self: flex-start; color: #8cc5ee; font-size: .75rem; }
.pc-confirm { display: flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 6px; font-size: .6875rem; color: #c6dbeb; }.pc-confirm input { width: 16px; height: 16px; accent-color: #3f8bc2; }
.pc-correction { margin: 15px 0; padding: 18px; background: #102535; border-radius: 12px; }.pc-correction-heading { margin-bottom: 12px; }#pcCorrectionResults { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 8px; max-height: 300px; overflow-y: auto; margin-top: 12px; }
.pc-candidate { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; background: #1e3b50; border-radius: 8px; text-align: left; color: #d4e7f4; cursor: pointer; }.pc-candidate:hover { background: #305873; }.pc-candidate > .portrait-sprites { display: flex; width: 60px; height: 62px; flex: 0 0 60px; }.pc-candidate .sprite-portrait { width: 100%; height: 100%; }.pc-candidate > span:last-child { display: grid; gap: 4px; }.pc-candidate strong { font-size: .8125rem; }.pc-candidate span span { font-size: .625rem; line-height: 1.5; }
.pc-import-footer { display: flex; justify-content: flex-end; margin-top: 20px; }.pc-import-dialog [hidden] { display: none; }
@media(max-width:500px) { .pc-import-dialog { padding: 18px; }.pc-review-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.pc-review-card { padding: 9px; }.pc-review-top { font-size: .625rem; }.pc-match-art { height: 72px; }.pc-grid-controls { gap: 8px; }#pcScan { width: 100%; margin-left: 0; } }
.footer-credits { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.tabs button[aria-selected=true] { background: #285271; border-radius: 6px; }
:root {
  --bg: #191b1e;
  --panel: #2c2d31;
  --raised: #37383e;
  --border: #575757;
  --text: #f2f3f7;
  --muted: #b0b1c0;
  --accent: #9b9b9b;
  --pc-purple: #686868;
  --pc-blue: #4b77d8;
  --pc-title: 'Russo One', 'Arial Black', sans-serif;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
}
html { min-height: 100%; }
body { min-height: 100vh; isolation: isolate; background: #191b1e; }
body > header, body > main { position: relative; z-index: 1; }
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(#5b718b59 1px, transparent 1px), linear-gradient(90deg, #5b718b59 1px, transparent 1px);
  background-size: 36px 36px;
  animation: care-grid-drift 7s linear infinite;
  will-change: background-position;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #090a105c;
}
@keyframes care-grid-drift { from { background-position: 0 0, 0 0; } to { background-position: 36px 36px, 36px 36px; } }
.app-header {
  background: #25262bf5;
  
  box-shadow: 0 1px 0 #6a6c7b75;
}
.header-inner { max-width: 1240px; min-height: 84px; padding: 12px 32px; gap: 32px; }
.brand { font-family: var(--pc-title); font-weight: 400; letter-spacing: 0; font-size: 1.1rem; color: white; gap: 10px; }
.brand-label { font-weight: 400; color: #bababa; margin-left: -3px; }
.brand-disc { width: 34px; height: 34px; }
.header-inner nav { align-self: center; gap: 10px; }
.nav, .button, .toolbar-actions .text-button, .header-actions .text-button, #copyTrade {
  font-family: var(--pc-title);
  font-weight: 400;
  letter-spacing: .1px;
  background: #5487e9;
  color: #f9fbff;
  border: 2px solid #183677;
  border-radius: 8px;
  box-shadow: inset 0 2px 0 #9dbdff80, inset 2px 0 0 #7b9fe972, inset 0 -3px 0 #15376b80, 0 3px 0 #10131d;
  text-shadow: 0 2px 0 #142c675e;
  transition: background .15s, border-color .15s, transform .15s;
}
.nav { padding: 9px 16px; font-size: .95rem; min-height: 44px; color: #cbd4ef; background: #3c4b71; border-color: #1a233b; }
.nav.active { background: #707070; border-color: #868686; color: white; }
.nav.active::after { display: none; }
.nav-count { background: #17213970; color: #e0e5f3; font-family: 'Segoe UI', sans-serif; font-size: .75rem; border: 1px solid #ffffff20; }
.nav:hover:not(:disabled), .button:hover:not(:disabled), .toolbar-actions .text-button:hover, .header-actions .text-button:hover, #copyTrade:hover {
  background: #638ff0;
  border-color: #93b6ff;
  color: white;
}
.nav:active, .button:active:not(:disabled), .toolbar-actions .text-button:active, .header-actions .text-button:active, #copyTrade:active { transform: translateY(2px); }
.header-actions { gap: 9px; }
.header-actions .text-button { padding: 9px 13px; min-height: 42px; font-size: .875rem; }
main { max-width: 1190px; padding: 34px 32px 0; }
.page-heading { margin-bottom: 14px; gap: 18px; }
.page-heading h1 { font-family: var(--pc-title); font-size: clamp(1.45rem, 2.8vw, 2rem); font-weight: 400; letter-spacing: .15px; color: #fff; text-shadow: 0 3px 0 #0008; }
.demand-toggle { font-size: .875rem; color: #dedede; }
.toggle-track { background: #383942; border: 2px solid #747474; box-shadow: inset 0 2px 3px #0008; }
.toggle-track::after { left: 2px; top: 2px; background: #bbbbbb; }
.demand-toggle input:checked + .toggle-track { background: #4f4f4f; border-color: #a7a7a7; }
.demand-toggle input:checked + .toggle-track::after { background: #e4e4e4; }
.demand-toggle input:checked ~ .toggle-state { color: #bdbdbd; }
.toggle-state { font-size: .75rem; color: #b3b3b3; }
.section-toolbar { margin-bottom: 16px; }
.toolbar-actions { gap: 10px; margin-left: auto; }
.toolbar-actions .text-button { padding: 7px 13px; font-size: .8125rem; min-height: 38px; }
.trade-grid { gap: 24px; }
.trade-panel {
  border: 7px solid #464646;
  border-radius: 17px;
  background: #2b2c30;
  box-shadow: -2px -2px 0 #a7a7a7, 2px 3px 0 #151515, 0 7px 0 #10111670, inset 0 0 0 2px #676767;
  position: relative;
}
.panel-header, .receive .panel-header {
  margin: 3px 3px 0;
  padding: 15px 17px 14px;
  background: #434343;
  
  box-shadow: inset 0 1px 0 #b1b1b121;
  border-radius: 5px 5px 0 0;
}
.panel-header h2, .receive .panel-header h2 { font-family: var(--pc-title); font-weight: 400; font-size: 1.25rem; letter-spacing: .3px; color: #fff; text-shadow: 0 2px 0 #1b1b1b; }
.side-count { color: #d7d7d7; border: 1px solid #a3a3a34a; background: #19191975; border-radius: 5px; font-size: .8125rem; padding: 2px 7px; }
.slots { margin: 0 3px; padding: 15px 13px; gap: 10px; background: #2b2c30; }
.slots.is-empty { min-height: 216px; }
.slot-card {
  border: 2px solid #565656;
  background: #414141;
  border-radius: 8px;
  box-shadow: inset 0 1px 0 #dadada15, 0 2px 0 #171717;
  padding: 13px 11px;
}
.item-body h3 { font-family: var(--pc-title); font-weight: 400; font-size: .975rem; line-height: 1.5; color: #fff; gap: 6px 8px; }
.item-body > p { color: #c1c1c1; font-size: .8125rem; }
.item-value strong { font-family: var(--pc-title); font-weight: 400; font-size: .975rem; color: #f6f6f6; }
.item-value strong small { font-family: 'Segoe UI', sans-serif; color: #c4c4c4; font-size: .75rem; }
.remove-slot { color: #bababa; min-width: 23px; min-height: 26px; border-radius: 4px; }
.remove-slot:hover { color: #fff; background: #825555; }
.demand-chip { font-size: .875rem; }
.quantity { color: #dddddd; }
.quantity button { font-family: var(--pc-title); font-weight: 400; background: #587ac6; border: 1px solid #8eabe4; border-radius: 5px; box-shadow: inset 0 1px 0 #b6d0ff50, 0 2px 0 #1c253a; color: #fff; width: 26px; height: 26px; }
.quantity button:hover { background: #608ee4; }
.empty-slot { min-height: 50px; background: #222329; border: 2px dashed #6a6a6a; border-radius: 8px; box-shadow: none; color: #d9d9d9; font-size: .9375rem; }
.empty-slot:hover { background: #343434; border-color: #929292; color: #fff; }
.empty-slot strong, .is-empty .empty-slot strong { font-family: var(--pc-title); font-weight: 400; color: #dfdfdf; }
.is-empty .empty-slot span { width: 44px; height: 44px; background: #5587e7; border: 2px solid #80a6ee; border-radius: 8px; color: #fff; box-shadow: inset 0 2px 0 #b4d3ff40, 0 3px 0 #0e1e3f; }
.token-offer { margin: 0 3px;  background: #24252b; padding: 12px 17px; }
.token-label label { font-family: var(--pc-title); font-weight: 400; font-size: .875rem; }
.token-demand { font-family: 'Segoe UI', sans-serif; border-color: #758abe70; color: #aac6f3; font-size: .6875rem; }
.token-offer input { background: #171921; border: 2px solid #62677e; border-radius: 5px; color: white; font-size: .9375rem; }
.token-quote { color: #b5bdd2; font-size: .75rem; }
.panel-total { margin: 0 3px 3px;  background: #242424; padding: 13px 17px 16px; }
.panel-total > div:first-child > span { color: #b1b1b1; font-size: .8125rem; }
.panel-total strong { font-family: var(--pc-title); font-weight: 400; font-size: 1.8rem; color: #fff; letter-spacing: 0; text-shadow: 0 2px 0 #111111; }
.panel-total small { font-family: 'Segoe UI', sans-serif; color: #bcbcbc; }
.listed-subtotal { color: #b9b9b9!important; }
.comparison { border: 3px solid #636363; border-radius: 12px; background: #292929eF; box-shadow: inset 0 0 0 1px #a3a3a32b, 0 4px 0 #101010; padding: 20px 22px 0; }
.comparison h2 { font-family: var(--pc-title); font-weight: 400; font-size: 1.2rem; letter-spacing: .1px; color: #fff; }
.comparison-lead p { color: #bcbcbc; font-size: .8125rem; }
.difference > span { font-family: var(--pc-title); font-weight: 400; }
.meter-track { background: #3d3d3d; border: 3px solid #141414; border-radius: 6px; box-shadow: 0 1px 0 #94949440, inset 0 2px 3px #0006; }
.meter-axis { color: #b0b0b0; font-size: .75rem; }
.meter-axis span:nth-child(2) { color: #d4d4d4; }
.comparison-foot {  padding: 12px 0; align-items: center; }
.comparison-foot summary { color: #b9b9b9; font-size: .8125rem; }
.comparison-foot p { color: #c8c8c8; }
#copyTrade { font-size: .8125rem; padding: 8px 12px; }
.button { padding: 9px 15px; font-size: .875rem; }
.button.primary { background: #6c6c6c; color: white; border-color: #9b9b9b; box-shadow: inset 0 2px 0 #c2c2c250, inset 0 -3px 0 #26262680, 0 3px 0 #151515; }
.button.primary:hover:not(:disabled) { background: #818181; border-color: #b9b9b9; }
.text-button, .text-button.green { color: #c2c2c2; }
.text-button:hover, .text-button.green:hover { color: #fff; }
.search-field { background: #202127; border: 2px solid #646464; border-radius: 7px; box-shadow: inset 0 2px 3px #10101080; }
.search-field:focus-within { border-color: #9c9c9c; }
.search-field input { color: white; font-size: .9375rem; }
.search-field input::placeholder { color: #acacac; }
.search-field > span { color: #c2c2c2; }
.picker-dialog, .import-dialog, .guide-dialog, #multipliersDialog, dialog {
  background: #2c2c2c;
  border: 5px solid #636363;
  border-radius: 13px;
  box-shadow: inset 0 0 0 2px #696969, 0 25px 90px #000b;
  color: #ececec;
}
dialog::backdrop { background: #0b0c12c7; backdrop-filter: blur(2px); }
.modal-header h2 { font-family: var(--pc-title); font-weight: 400; font-size: 1.25rem; }
.modal-header .icon-button { font-family: var(--pc-title); background: #507de1; border: 2px solid #20417d; border-radius: 6px; color: white; box-shadow: inset 0 1px 0 #9cbbff70; }
.picker-row { border: 2px solid #545454; background: #373737; border-radius: 7px; box-shadow: inset 0 1px 0 #d0d0d019, 0 2px 0 #171717; margin-bottom: 9px; min-height: 87px; }
.picker-row:hover { background: #434343; border-color: #909090; }
.picker-info strong { font-family: var(--pc-title); font-weight: 400; font-size: .9375rem; }
.picker-info > span { color: #bdbdbd; font-size: .8125rem; }
.picker-price strong { font-family: var(--pc-title); font-weight: 400; font-size: .9375rem; }
.picker-price .demand-chip { font-size: .8125rem; }
select { background-color: #2e2e2e; color: #e7e7e7; border: 1px solid #6c6c6c; border-radius: 6px; font-size: .875rem; padding-right: 30px; }
.table-wrap { background: #292929; border: 3px solid #5b5b5b; border-radius: 9px; box-shadow: inset 0 0 0 1px #76767646; }
th { font-family: var(--pc-title); font-weight: 400; color: #eeeeee; background: #3b3b3b; }
td { border-color: #484848; }
.catalogue-loomian strong { font-family: var(--pc-title); font-weight: 400; font-size: .9375rem; }
td small { color: #b9b9b9; }
.rarity-tag { background: #41414159; border-color: #93939378; color: #d1d1d1; }
.data-settings, .data-settings .text-button, .helper, .muted, .review-toolbar, .data-banner { color: #b5b5b5; }
textarea, .full-input, .multiplier-row input { background: #212121; border-color: #646464; color: #ececec; }
.tabs { border-color: #545454; }
.tabs button { color: #bababa; }
.tabs button[aria-selected=true] { color: #e8e8e8; border-color: #9a9a9a; }
footer { border-color: #56565655; margin-top: 25px; }
footer a { color: #a7a7a7; text-decoration-color: #646464; }
@media (max-width: 900px) {
  .header-inner { gap: 18px; padding: 12px 24px; }
  .brand { font-size: .95rem; }
  .nav { padding: 8px 12px; }
  .header-actions .text-button { padding: 8px 10px; }
  main { padding: 28px 24px 0; }
  .trade-grid { gap: 18px; }
}
@media (max-width: 650px) {
  .header-inner { flex-wrap: wrap; gap: 12px; padding: 13px 18px; }
  .brand { flex: 1; }
  .brand-label { display: inline; }
  .header-inner nav { order: 3; width: 100%; gap: 9px; }
  .nav { justify-content: center; flex: 1; min-height: 40px; font-size: .875rem; }
  .header-actions { margin-left: 0; gap: 7px; }
  .header-actions .text-button { min-height: 36px; font-size: .75rem; padding: 6px 9px; }
  .brand-disc { width: 29px; height: 29px; }
  main { padding: 23px 16px 0; }
  .page-heading { gap: 10px; }
  .page-heading h1 { font-size: 1.4rem; }
  .demand-toggle { font-size: .8125rem; }
  .trade-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .panel-header { padding: 13px 13px; }
  .panel-header h2, .receive .panel-header h2 { font-size: 1.15rem; }
  .trade-panel { border-width: 6px; border-radius: 13px; }
  .slots { padding: 12px 10px; }
  .slots.is-empty { min-height: 150px; }
  .slot-card { padding: 11px 9px; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 7px; }
  .item-body h3 { font-size: .9rem; }
  .item-value strong { font-size: .875rem; }
  .item-body > p { font-size: .75rem; }
  .panel-total, .token-offer { padding-left: 14px; padding-right: 14px; }
  .token-label label { font-size: .8125rem; }
  .token-offer input { font-size: 1rem; }
  .comparison { padding: 17px 15px 0; }
  .comparison h2 { font-size: 1rem; }
  .picker-info strong, .picker-price strong { font-size: .875rem; }
  .picker-info > span { font-size: .75rem; }
  .picker-row { gap: 8px; padding: 10px 8px; }
  .picker-row .variant-badge { width: 22px; height: 22px; }
  .picker-price .demand-chip { font-size: .75rem; }
}
/* Interface animations stay on. */
.hover-disc { position: fixed; z-index: 10010; width: 30px; height: 30px; pointer-events: none; opacity: 0; transform: translateY(6px) scale(.7) rotate(-20deg); transition: opacity .16s, transform .24s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 3px 4px #0009); }
.hover-disc.is-visible { opacity: 1; transform: translateY(0) scale(1) rotate(12deg); }
.hover-disc img { display: block; image-rendering: pixelated; animation: care-disc-hover 1.6s ease-in-out infinite; }
@keyframes care-disc-hover { 0%,100% { transform: translateY(-2px) rotate(-7deg); } 50% { transform: translateY(3px) rotate(8deg); } }
@keyframes care-brand-bob { 0%,100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-3px) rotate(5deg); } }
@keyframes care-panel-enter { from { opacity: 0; transform: translateY(9px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes care-dialog-enter { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes care-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes care-picker-enter { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
html[data-motion=on] .brand-disc { animation: care-brand-bob 3.5s ease-in-out infinite; }
html[data-motion=on] .trade-panel { animation: care-panel-enter .4s ease-out both; }
html[data-motion=on] .trade-panel.receive { animation-delay: .07s; }
html[data-motion=on] dialog[open] { animation: care-dialog-enter .25s cubic-bezier(.2,.8,.2,1); }
html[data-motion=on] dialog[open]::backdrop { animation: care-backdrop-enter .2s ease-out; }
html[data-motion=on] .picker-row { animation: care-picker-enter .18s ease-out both; }
html[data-motion=on] #calculatorView:not([hidden]), html[data-motion=on] #catalogueView:not([hidden]) { animation: care-panel-enter .3s ease-out; }
html[data-motion=on] .button, html[data-motion=on] .nav, html[data-motion=on] .empty-slot, html[data-motion=on] .picker-row, html[data-motion=on] .text-button { transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .2s, border-color .18s, background .18s; }
html[data-motion=on] .is-disc-target { transform: translateY(-2px); }
html[data-motion=on] .is-disc-target:active { transform: translateY(1px) scale(.98); }
.is-disc-target { outline: 1px solid #a7a7a780; outline-offset: 2px; }
.meter-change, .meter-split { transition: none; }
@media (hover: none), (pointer: coarse) { .hover-disc { display: none; } }
@media (max-width: 650px) { .header-inner { column-gap: 8px; } .header-actions { gap: 5px; } .header-actions .text-button { padding: 6px 7px; font-size: .6875rem; } }
/* The guide slides off the right edge; its tab remains reachable. */
.guide-drawer { position: fixed; z-index: 40; right: 0; top: 94px; bottom: 18px; width: clamp(220px,calc((100vw - 1190px)/2 - 16px),300px); max-width: calc(100vw - 50px); transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.8,.2,1); color: #e5e5e5; }
.guide-drawer[data-open="true"] { transform: translateX(0); }
.guide-content { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 20px 14px; background: #313131; border: 3px solid #747474; border-right: 0; border-radius: 14px 0 0 14px; box-shadow: inset 0 0 0 2px #6767674a,-10px 5px 30px #0005; scrollbar-width: thin; scrollbar-color: #7a7a7a #262626; }
.guide-heading {  padding-bottom: 15px; margin-bottom: 21px; }
.guide-heading h2 { font: 1.2rem var(--pc-title); margin-top: 6px; color: #fff; }
.guide-heading .eyebrow { font-size: .75rem; color: #b5b5b5; }
.guide-content h3 { font: .95rem var(--pc-title); color: #e0e0e0; margin: 23px 0 10px; }
.guide-content p { font: .875rem/1.65 'Segoe UI',sans-serif; color: #c6c6c6; margin: 10px 0; }
.guide-toggle { position: absolute; left: -40px; top: 16px; width: 42px; height: 52px; display: grid; place-items: center; border: 2px solid #898989; border-right: 0; border-radius: 10px 0 0 10px; color: #e9e9e9; background: #595959; box-shadow: -3px 3px 6px #0004; }
.guide-toggle:hover { background: #646464; }
.guide-toggle svg { fill: none; stroke: currentColor; stroke-width: 2.5; transform: rotate(180deg); transition: transform .32s; }
.guide-drawer[data-open="true"] .guide-toggle svg { transform: rotate(0); }
.guide-toggle:focus-visible, .guide-details summary:focus-visible { outline: 3px solid #d1d1d1; outline-offset: 3px; }
.guide-rate { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0;  font-size: .875rem; }
.guide-rate strong { color: #ececec; font-variant-numeric: tabular-nums; }
.guide-rate .demand-chip { font-size: .875rem; }
.guide-details { margin-top: 16px;  padding-top: 13px; }
.guide-details summary { cursor: pointer; color: #c0c0c0; font-size: .875rem; line-height: 1.6; }
.shortcut-list { font-size: .875rem; line-height: 1.5; }
.shortcut-list dt { color: #e5e5e5; margin-top: 12px; font-weight: 700; }
.shortcut-list dd { color: #c6c6c6; margin: 3px 0 0; }
.comparison .difference { gap: 5px; min-width: 170px; }
.comparison .difference strong { font-size: 1.35rem; line-height: 1.5; display: block; }
.comparison .difference strong small { font-size: .8rem; }
.comparison .difference > span { font-size: 1rem; }
.raw-difference { display: block; font: .875rem/1.5 'Segoe UI',sans-serif; color: #c1c1c1; }
.result-basis { display: block; color: #b4b4b4; font: .8125rem/1.5 'Segoe UI',sans-serif; margin-bottom: 7px; }
.panel-total .listed-subtotal { font-size: .8125rem; }
@media (max-width: 650px) { .guide-drawer { top: 80px; bottom: 12px; } .guide-content { padding: 18px 17px; } .comparison { grid-template-columns: 1fr; } .comparison .difference { text-align: left; } }
/* Compact item tiles share one storage-style grid, including tokens and Add. */
.section-toolbar { flex-wrap: wrap; gap: 12px; }
.trade-workspace { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; }
.trade-workspace input { min-width: 120px; width: 180px; max-width: 100%; background: #22232a; border: 1px solid #696969; border-radius: 7px; padding: 9px 11px; color: #e9e9e9; font-size: .875rem; }
.trade-workspace .button,.trade-workspace .text-button { min-height: 40px; font-size: .8125rem; padding: 8px 11px; }
#savedTradeCount { display: inline-grid; place-items: center; background: #18191e80; border-radius: 4px; min-width: 20px; padding: 0 4px; margin-left: 4px; }
.trade-panel .slots { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,140px),1fr)); align-content: start; align-items: start; gap: 10px; padding: 14px 12px; min-height: 0; }
.trade-panel .slots.is-empty { min-height: 0; }
.slots .square-card { --card-demand: #898989; position: relative; display: block; width: 100%; aspect-ratio: 1; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 1px solid color-mix(in srgb,var(--card-demand) 65%,#737373); border-bottom: 3px solid var(--card-demand); border-radius: 10px; background: color-mix(in srgb,var(--card-demand) 48%,#080a07); box-shadow: inset 0 1px 0 #ffffff14,0 3px 0 #111219; cursor: grab; user-select: none; transition: border-color .16s,box-shadow .16s,transform .16s; }
.slots .square-card:hover { border-color: var(--card-demand); box-shadow: inset 0 1px 0 #ffffff25,0 3px 0 #111219,0 0 15px color-mix(in srgb,var(--card-demand) 24%,transparent); }
.slots .square-card:active { cursor: grabbing; }
.slots .square-card:focus-visible { outline: 3px solid #dcdcdc; outline-offset: 3px; }
.square-card .trade-portrait { position: absolute; inset: 7px 4px 41px; display: flex; align-items: center; justify-content: center; transform: translateY(14px); pointer-events: none; }
.square-card .trade-portrait > .loomian-sprites { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; width: 100%; height: 100%; max-width: none; margin: 0; gap: 3px; }
.square-card .sprite-portrait { display: block; flex: 1 1 0; width: 0; min-width: 0; height: 100%; overflow: hidden; filter: drop-shadow(0 2px 1px #0008); }
.sprite-portrait image { image-rendering: pixelated; }
.square-card .card-badges { position: absolute; z-index: 2; left: 6px; top: 6px; display: flex; align-items: center; gap: 3px; min-height: 0; max-width: calc(100% - 31px); }
.square-card .variant-badges { gap: 2px; flex-wrap: nowrap; }
.square-card .variant-badge { width: 19px; height: 19px; }
.square-card .rarity-tag { margin: 0; font-size: .6875rem; }
.slots .square-card .card-subtitle { position: absolute; z-index: 2; top: 29px; left: 6px; max-width: calc(100% - 12px); width: auto; margin: 0; padding: 1px 4px; border-radius: 3px; background: color-mix(in srgb,var(--card-demand) 28%,#080a07); color: #e8e8e8; font: .625rem/1.4 'Segoe UI',sans-serif; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.square-card .card-caption { position: absolute; z-index: 2; left: 0; bottom: 0; width: 100%; padding: 4px 7px 6px; background: none; text-shadow: 0 1px 2px #0008; }
.slots .square-card h3,.slots .square-card .card-name { display: block; width: 100%; margin: 0 0 3px; color: #f2f2f2; font: .75rem/1.35 var(--pc-title); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-stats { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.square-card .card-value { margin: 0; padding: 0; color: #fff; font: .8125rem/1.25 var(--pc-title); white-space: nowrap; }
.square-card .card-value small { font: .625rem/1.25 'Segoe UI',sans-serif; color: #bababa; }
.card-demand { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb,var(--card-demand) 55%,#fff); font: .625rem/1.3 'Segoe UI',sans-serif; white-space: nowrap; }
.square-card .remove-slot { position: absolute; z-index: 3; top: 3px; right: 3px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; color: #cacaca; background: #11121944; opacity: .7; font: 1.1rem/1 'Segoe UI',sans-serif; cursor: pointer; }
.square-card .remove-slot:hover { opacity: 1; color: #ffe5e9; background: #91455699; }
.card-warning { position: absolute; z-index: 3; right: 7px; top: 31px; color: #f4ce7e; font-size: .75rem; }
.slots .add-item-tile { width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; min-height: 0; padding: 10px; gap: 8px; margin: 0; border: 2px dashed #6a6a6a; border-radius: 10px; background: #23232388; color: #c4c4c4; box-shadow: none; }
.slots .add-item-tile > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #7a7a7a; border-radius: 50%; font: 1.6rem/1 'Segoe UI',sans-serif; background: #2b2b2b; }
.slots .add-item-tile > strong { font: .8125rem/1.4 var(--pc-title); }
.slots .add-item-tile:hover { background: #3a3a3a66; border-color: #a7a7a7; color: #fff; }
.trade-panel.is-drop-zone { outline: 3px solid #a9a9a9; outline-offset: 3px; }
.slots .square-card.is-swap-target { border-color: #f5cf7b; box-shadow: 0 0 0 2px #f5cf7b88; }
.slots .square-card.is-dragging { opacity: .4; transform: scale(.97); }
.trade-portrait .token-sprite .boost-token-icon { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.square-card .token-amount-button { position: absolute; z-index: 3; right: 6px; bottom: 45px; display: block; padding: 2px 5px; border: 1px solid #b5b5b577; border-radius: 5px; background: #1a1a1adc; color: #fff0f2; font: .8125rem/1.3 var(--pc-title); text-shadow: 0 1px 2px #000; cursor: pointer; }
.square-card .token-amount-button:hover { background: #784954; border-color: #e9bcc7; }
.slots .square-card .token-robux { top: 6px; }
.portrait-sprites { transform-origin: 50% 75%; }
.loomian-detail-dialog { width: min(760px,calc(100% - 28px)); --detail-demand: #7a7a7a; }
.detail-variant { margin-top: 7px; color: #bcbcbc; font: .875rem/1.5 'Segoe UI',sans-serif; }
.detail-layout { display: grid; grid-template-columns: minmax(180px,.85fr) minmax(0,1.15fr); gap: 24px; }
.detail-art-panel { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 15px; border: 1px solid color-mix(in srgb,var(--detail-demand) 65%,#4e4e4e); border-radius: 12px; background: color-mix(in srgb,var(--detail-demand) 30%,#12130f); }
.detail-badges { display: flex; align-items: center; gap: 7px; align-self: flex-start; min-height: 28px; }
.detail-badges .variant-badge { width: 30px; height: 30px; }
.loomian-detail-portrait { height: 200px; width: 100%; display: flex; align-items: center; justify-content: center; }
.loomian-detail-portrait .portrait-sprites { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 100%; }
.loomian-detail-portrait .sprite-portrait { display: block; width: 0; min-width: 0; height: 100%; flex: 1 1 0; overflow: hidden; filter: drop-shadow(0 4px 2px #0007); }
.loomian-detail-portrait .boost-token-icon { width: 85%; height: 85%; object-fit: contain; }
.detail-prices { display: grid; gap: 12px; }
.detail-prices > div { padding: 12px 14px; background: #16161666; border-radius: 8px; border: 1px solid #6a6a6a55; }
.detail-prices span { display: block; color: #b5b5b5; font-size: .8125rem; margin-bottom: 5px; }
.detail-prices strong { color: #ededed; font: 1.1rem/1.4 var(--pc-title); }
.detail-prices small { font: .8125rem/1.4 'Segoe UI',sans-serif; }
.detail-basis { line-height: 1.6; margin: 12px 0; }
.comparison .upgrade-note { color: #d8c092; font: .8125rem/1.5 'Segoe UI',sans-serif; margin-top: 7px; }
.detail-facts { display: grid; gap: 10px; margin: 15px 0; font-size: .875rem; }
.detail-facts > div { display: grid; grid-template-columns: 70px minmax(0,1fr); gap: 10px; }
.detail-facts dt { color: #adadad; }.detail-facts dd { margin: 0; color: #e8e8e8; overflow-wrap: anywhere; }
.loomian-abilities { margin: 18px 0 0; }.loomian-abilities[hidden],.holding-ability-field[hidden] { display: none; }
.loomian-abilities h3 { margin: 0 0 9px; color: #e5eef7; font: .875rem/1.4 var(--pc-title); }
#loomianAbilityOptions { display: grid; gap: 5px; }
.ability-option { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 7px; background: #192936; color: #d9e9f6; text-align: left; cursor: pointer; }
.ability-option strong { font: 600 .8125rem/1.4 'Segoe UI',sans-serif; }.ability-option > span { font-size: .75rem; }.ability-option .card-demand { margin: 0; }
.ability-option:hover { background: #29445a; }.ability-option.is-selected { border-color: #6296ba; background: #24445c; }
.ability-option:focus-visible { outline: 2px solid #9bd6ff; outline-offset: 2px; }
.holding-ability-field { margin-bottom: 12px; }.holding-ability-field select { width: 100%; max-width: 100%; }
.holding-ability-quote { color: #e5eef7; font: .9375rem/1.5 var(--pc-title); margin: 0 0 18px; }
/* Collection editor: a Loomian preview with compact, direct controls. */
dialog.holding-editor-dialog { width: min(520px,calc(100% - 28px)); max-width: 520px; padding: 24px; border-radius: 18px; background: #202d3b; }
.holding-editor-dialog .modal-header { margin-bottom: 20px; align-items: center; }
.holding-editor-dialog .modal-header h2 { margin: 0; font-size: 1.125rem; }
.collection-editor-preview { display: grid; grid-template-columns: 138px minmax(0,1fr); gap: 20px; align-items: center; margin-bottom: 24px; }
.collection-editor-art { position: relative; aspect-ratio: 1; border-radius: 12px; background: color-mix(in srgb,var(--card-demand) 24%,#152535); overflow: hidden; }
#holdingEditorBadges { position: absolute; top: 8px; left: 8px; z-index: 1; display: flex; align-items: center; gap: 3px; }
#holdingEditorBadges .variant-badge { width: 20px; height: 20px; }
#holdingEditorPortrait { width: 100%; height: 100%; padding: 25px 9px 7px; }
.holding-editor-dialog #holdingEditorName { color: #eff6fc; font-size: 1.125rem; line-height: 1.35; margin: 0 0 7px; overflow-wrap: anywhere; }
#holdingEditorVariant { color: #a8c0d4; font-size: .75rem; line-height: 1.65; margin: 0; white-space: pre-wrap; }
.collection-editor-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 13px; margin-top: 13px; }
.collection-editor-quote strong { color: #eef7ff; font-size: 1.05rem; }.collection-editor-quote small { font-size: .7rem; }.collection-editor-quote > span { font-size: .75rem; }
.holding-editor-dialog .holding-ability-field { margin-bottom: 24px; }
.holding-editor-dialog .field-label { color: #b5cbdd; font-size: .75rem; margin-bottom: 9px; }
.collection-ability-options { display: grid; gap: 7px; }.collection-ability-options[hidden],#holdingAbilitySelect[hidden] { display: none; }
.collection-ability-option { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; padding: 12px 14px; text-align: left; border: 1px solid transparent; border-radius: 9px; background: #182836; color: #d9eaf7; cursor: pointer; font-size: .8125rem; }
.collection-ability-option > span:first-child { grid-row: 1/3; align-self: center; }.collection-ability-option > span:nth-child(2),.editor-ability-demand { text-align: right; }.editor-ability-demand { font-size: .6875rem; }
.collection-ability-option:hover { background: #29455c; }.collection-ability-option.is-selected { background: #264c68; border-color: #6095ba; }
.collection-ability-option:focus-visible { outline: 2px solid #a1d8ff; outline-offset: 2px; }
.collection-quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }.collection-quantity-row > label { color: #c4d7e6; font-size: .875rem; }
.collection-quantity-control { display: flex; align-items: center; padding: 4px; gap: 2px; border-radius: 10px; background: #142636; }
.collection-quantity-control button { width: 36px; height: 36px; border: 0; border-radius: 7px; background: #2a4860; color: #e7f5ff; cursor: pointer; font-size: 1rem; }.collection-quantity-control button:hover { background: #386384; }.collection-quantity-control button:disabled { background: transparent; color: #506a7e; cursor: default; }
.collection-quantity-control #holdingQuantity { width: 66px; min-width: 0; height: 36px; padding: 4px; text-align: center; border: 0; background: transparent; box-shadow: none; color: #f2f7fb; font-size: 1rem; appearance: textfield; -moz-appearance: textfield; }
#holdingQuantity::-webkit-inner-spin-button,#holdingQuantity::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.collection-editor-actions { display: flex; align-items: center; gap: 14px; margin-top: 23px; }.collection-editor-actions .primary { margin-left: auto; min-height: 42px; padding: 10px 20px; border-radius: 9px; }
.collection-editor-actions .collection-remove { padding: 8px 0; color: #d498a2; font-size: .75rem; }.collection-editor-actions .collection-remove:hover { color: #ffc4cd; }
.holding-editor-dialog #holdingError:empty { display: none; }.holding-editor-dialog #holdingError { margin: 12px 0 0; }
@media(max-width:430px) { dialog.holding-editor-dialog { padding: 20px; }.collection-editor-preview { grid-template-columns: 112px minmax(0,1fr); gap: 14px; }.holding-editor-dialog #holdingEditorName { font-size: 1rem; }.collection-editor-actions .primary { padding: 10px 14px; font-size: .8125rem; } }
.unresolved-group-portrait { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #b4ccdf; font: 2.4rem/1 var(--pc-title); }
.detail-warning { padding: 10px; color: #f4d292; border: 1px solid #987d4f; border-radius: 6px; font-size: .875rem; line-height: 1.6; }
.detail-notes { margin-top: 16px; color: #c9c9c9; font-size: .875rem; line-height: 1.65; }
.detail-notes summary { cursor: pointer; }.detail-notes p { color: #bfbfbf; white-space: pre-line; margin-top: 10px; overflow-wrap: anywhere; }
.detail-related { margin-top: 22px;  padding-top: 18px; }
.detail-related h3 { font: .9375rem/1.5 var(--pc-title); color: #d7d7d7; margin-bottom: 12px; }
#loomianDetailRelated { display: flex; flex-flow: row nowrap; align-items: stretch; gap: 10px; overflow-x: auto; overflow-y: hidden; max-height: none; min-height: 0; padding: 5px 4px 13px; margin: 0; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #878787 #222222; }
.detail-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 20px; }
.loomian-name-button { color: inherit; font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: #9999994d; text-underline-offset: 3px; }
.loomian-name-button:hover { color: #fff; text-decoration-color: #c9c9c9; }
.picker-result { position: relative; display: flex; gap: 5px; align-items: stretch; margin-bottom: 8px; }
.picker-result .picker-row { flex: 1; min-width: 0; margin: 0; }
.picker-info-action { align-self: center; width: 30px; height: 34px; flex-shrink: 0; border: 1px solid #777777; border-radius: 6px; color: #cdcdcd; background: #292929; font: italic 1rem/1 Georgia,serif; cursor: pointer; }
.picker-info-action:hover { color: #fff; background: #484848; }
.loomian-name-button:focus-visible,.picker-info-action:focus-visible,.detail-variant-card:focus-visible { outline: 2px solid #d3d3d3; outline-offset: 3px; }
@media(max-width:550px) { .detail-layout { grid-template-columns: 1fr; gap: 18px; } .loomian-detail-portrait { height: 150px; } .detail-art-panel { gap: 6px; padding: 11px; } .detail-badges { position: absolute; align-self: flex-start; } .detail-prices { grid-template-columns: 1fr 1fr; gap: 8px; } .detail-prices strong { font-size: .9375rem; } .detail-actions .button { flex: 1; } }
.token-dialog { max-width: 420px; }
.token-editor-quote { margin: 15px 0 22px; color: #c4c4c4; font-size: .875rem; line-height: 1.6; }
.saved-trades-dialog { max-width: 620px; }
#savedTradeList { margin-top: 18px; }
.saved-trade-row { display: flex; align-items: center; gap: 8px; padding: 9px; margin-bottom: 9px; border: 1px solid #676767; border-radius: 8px; background: #272727; }
.saved-trade-open { flex: 1; min-width: 0; padding: 8px; text-align: left; color: #e6e6e6; cursor: pointer; }
.saved-trade-open strong { display: block; font: .9375rem/1.4 var(--pc-title); overflow-wrap: anywhere; }
.saved-trade-open span { display: block; font: .8125rem/1.5 'Segoe UI',sans-serif; color: #b6b6b6; margin-top: 6px; }
.saved-trade-open:hover strong { color: #fff; text-decoration: underline; }
.catalogue-toolbar { flex-wrap: wrap; gap: 10px; }
.catalogue-toolbar .search-field { flex: 1 1 260px; }
.catalogue-toolbar select { max-width: 100%; min-height: 42px; font-size: .875rem; }
.trade-workspace input:focus-visible,.token-amount-button:focus-visible { outline: 2px solid #c1c1c1; outline-offset: 2px; }
@media(max-width:650px) { .trade-workspace { flex-basis: 100%; } .trade-workspace input { flex: 1 1 100%; width: 100%; } .trade-panel .slots { grid-template-columns: repeat(auto-fill,minmax(min(100%,130px),1fr)); gap: 9px; padding: 12px 10px; } .slots .square-card { padding: 0; } .slots .add-item-tile { min-height: 0; } .toolbar-actions { margin-left: 0; } }

#loomianDetailRelated .detail-variant-card { flex: 0 0 150px; width: 150px; aspect-ratio: 1; scroll-snap-align: start; cursor: pointer; text-align: left; }
#loomianDetailRelated .detail-variant-card .trade-portrait { inset: 6px 5px 53px; transform: translateY(12px); }
.variant-card-label { display: block; color: #c8c8c8; font: .625rem/1.4 'Segoe UI',sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
#loomianDetailRelated .detail-variant-card.is-selected { outline: 2px solid #e3e3e3; outline-offset: 1px; }
#loomianDetailRelated .detail-variant-card:hover { transform: translateY(-2px); }
@media(max-width:550px) { #loomianDetailRelated .detail-variant-card { flex-basis: 140px; width: 140px; } }

/* Keep explanations available without filling the trade screen. */
.result-basis.sr-only { margin: 0; font-size: 1px; }
.comparison .upgrade-note { display: inline-block; margin-top: 7px; padding: 2px 7px; border: 1px solid #a4874c66; border-radius: 5px; font-size: .75rem; }
.comparison .upgrade-note[hidden] { display: none; }
.guide-heading { padding-bottom: 12px; margin-bottom: 13px; }
.guide-heading h2 { margin-top: 0; }
.guide-content h3 { margin-top: 17px; }
.demand-chip i,.card-demand i { display: none; }
/* Single quiet edges; demand and the verdict carry the meaningful color. */
body::before { background-image: linear-gradient(#ffffff0c 1px,transparent 1px),linear-gradient(90deg,#ffffff0c 1px,transparent 1px); }
.app-header { background: #1d252ef5;  box-shadow: none; }
.trade-panel { border: 1px solid #3c4958; border-radius: 12px; background: #222b35; box-shadow: none; }
.panel-header,.receive .panel-header { margin: 0; background: #293441;  border-radius: 11px 11px 0 0; box-shadow: none; }
.side-count { border: 0; background: #ffffff09; color: #bfc0c2; }
.slots { margin: 0; background: transparent; }
.panel-total { margin: 0; background: #202933;  border-radius: 0 0 11px 11px; }
.comparison { border: 1px solid #3c4958; background: #222b35; box-shadow: none; }
.comparison-foot {  }
.meter-track { border: 1px solid #151c24; background: #2d3947; box-shadow: none; }
.nav,.button,.toolbar-actions .text-button,.header-actions .text-button,#copyTrade { background: #2c3948; border: 1px solid #46566a; box-shadow: none; text-shadow: none; color: #eeeef0; }
.nav.active,.button.primary { background: #3a4c60; border-color: #637991; box-shadow: none; }
.nav:hover:not(:disabled),.button:hover:not(:disabled),.button.primary:hover:not(:disabled),.toolbar-actions .text-button:hover,.header-actions .text-button:hover,#copyTrade:hover { background: #35475a; border-color: #70859c; box-shadow: none; }
.modal-header .icon-button { background: #2c3948; border: 1px solid #46576a; box-shadow: none; }
.nav-count { background: #ffffff09; border: 0; color: #d2d3d5; }
.search-field,.trade-workspace input,textarea,.full-input,.multiplier-row input,select { border-width: 1px; border-color: #405165; box-shadow: none; }
.search-field:focus-within { border-color: #8ea7bf; }
.toggle-track { border-width: 1px; border-color: #51657b; box-shadow: none; }
.demand-toggle input:checked + .toggle-track { background: #4a637b; border-color: #8ca4ba; }
.toggle-track::after { top: 3px; left: 3px; }
.picker-dialog,.import-dialog,.guide-dialog,#multipliersDialog,dialog { border: 1px solid #46576a; box-shadow: 0 18px 60px #0009; }
.picker-row,.table-wrap { border-width: 1px; border-color: #3c4e61; box-shadow: none; }
.guide-content { border: 1px solid #405165; border-right: 0; background: #202a35; box-shadow: -8px 0 24px #0004; }
.guide-toggle { border-width: 1px; border-color: #51657b; background: #2c3948; box-shadow: none; }
.guide-toggle:hover { background: #35475a; }
.slots .square-card { border-bottom-width: 1px; box-shadow: none; }
.slots .square-card:hover { box-shadow: none; }
.slots .add-item-tile { border-width: 1px; border-color: #45586d; background: #ffffff03; }
.slots .add-item-tile > span { background: none; border: 0; box-shadow: none; }
.slots .add-item-tile:hover { background: #ffffff07; border-color: #7f99b3; }
.is-disc-target { outline: none; }
.detail-prices > div { border: 0; }.detail-art-panel { border-color: #ffffff22; }
.comparison .upgrade-note { border: 0; background: #ffffff06; }
.saved-trade-row { border-color: #3b4c5e; }

/* Solid slate-blue surfaces, with demand colors reserved for Loomians. */
:root { --bg: #171e26; --panel: #222b35; --raised: #2b3744; --border: #3c4a59; --accent: #a7bdd1; }
body { background: #171e26; }
body::after { background: none; }
.picker-dialog,.import-dialog,.guide-dialog,#multipliersDialog,dialog { background: #222c37; }
.search-field,.trade-workspace input,textarea,.full-input,.multiplier-row input,select { background-color: #1b2530; color: #e5ecf3; }
.picker-row,.saved-trade-row { background: #283442; }
.picker-row:hover,.saved-trade-row:hover { background: #304052; border-color: #677e97; }
.table-wrap { background: #222c37; } th { background: #2a3745; } td { border-color: #354453; }
.detail-prices > div,.nav-count,.side-count { background: #18232d80; }
.picker-info-action { background: #2b3948; border-color: #50657b; color: #d2dfeb; }
.picker-info-action:hover { background: #3b5066; }
.slots .add-item-tile { background: #1d283444; }
.slots .add-item-tile:hover { background: #31425666; }
.trade-meter:not(.pending) .meter-change { background: var(--edge-color); }
.square-card .token-amount-button { background: #19232de6; border-color: #7f92a577; }
.square-card .token-amount-button:hover { background: #35495d; border-color: #a2b6c9; }
.raw-source { background: #18232f; } .source-block { border-color: #405165; }
/* Collection-first dashboard. Solid surfaces and a single value trace. */
.dashboard-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dashboard-actions .text-button { color: #a8b7c8; font-size: .8125rem; }
.collection-overview { background: #202a35; border: 1px solid #374757; border-radius: 13px; padding: 26px 28px 14px; }
.collection-value-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.collection-label { display: block; color: #a8b6c6; font: .875rem/1.5 'Segoe UI',sans-serif; }
#collectionTotal { display: inline-block; color: #eef4fa; font: clamp(2.3rem,5vw,3.3rem)/1.4 var(--pc-title); font-variant-numeric: tabular-nums; letter-spacing: -.8px; }
#collectionTotal small { font: 700 1rem/1.5 'Segoe UI',sans-serif; color: #b5c8da; margin-left: 7px; letter-spacing: 0; }
.listed-reference { display: inline-block; margin-left: 14px; color: #95a8bb; font: .75rem/1.5 'Segoe UI',sans-serif; }
#collectionChange { margin-top: 3px; color: #9bafc3; font: 700 .875rem/1.5 'Segoe UI',sans-serif; min-height: 22px; }
#collectionChange[data-trend=up] { color: #22cf78; }#collectionChange[data-trend=down] { color: #efa1a5; }
.collection-counts { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; color: #b9c6d4; font-size: .8125rem; padding-top: 5px; }
#collectionUnpriced { color: #e4c18b; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 25px; }
.history-ranges { display: flex; gap: 5px; }
.history-ranges button { min-width: 39px; min-height: 32px; padding: 5px 9px; color: #9bb0c5; border: 1px solid transparent; border-radius: 6px; font: 700 .8125rem/1.4 'Segoe UI',sans-serif; cursor: pointer; }
.history-ranges button:hover { background: #2b3a4a; color: #e3edf7; }.history-ranges button.active { background: #314459; border-color: #58718c; color: #eef5fc; }
#historyPoint { color: #a3b4c7; font: 600 .75rem/1.5 'Segoe UI',sans-serif; min-height: 18px; }
.collection-chart-frame { display: grid; grid-template-columns: minmax(0,1fr) 75px; gap: 12px; margin-top: 18px; }
.chart-scale { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 0; color: #8c9fb3; font-size: .75rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.collection-chart { grid-column: 1; grid-row: 1; height: 240px; min-width: 0; --chart-color: #99bada; }
.collection-chart[data-trend=up] { --chart-color: #22cf78; }.collection-chart[data-trend=down] { --chart-color: #e6989f; }
.collection-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.collection-chart-path { stroke: var(--chart-color); stroke-width: 2.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart-grid-line { stroke: #45576955; stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-dot { fill: var(--chart-color); stroke: #202a35; stroke-width: 2; cursor: crosshair; opacity: .65; }
.history-dot:hover,.history-dot:focus-visible { opacity: 1; stroke: #e5f1fc; stroke-width: 3; outline: none; }
.chart-dates { display: flex; justify-content: space-between; padding-right: 87px; margin-top: 10px; color: #879cb1; font-size: .75rem; }
.chart-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;   color: #a6b6c6; font-size: .875rem; }
.chart-empty-line { display: none; }.chart-empty .button { font-size: .8125rem; }
.history-explainer { margin-top: 15px; color: #94a8bc; font: .75rem/1.6 'Segoe UI',sans-serif; }.history-explainer summary { cursor: pointer; }.history-explainer p { margin-top: 8px; max-width: 700px; }
.collection-holdings { margin-top: 28px; }.holdings-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }.holdings-heading h2 { color: #e6eef7; font: 1.15rem/1.5 var(--pc-title); }.holdings-heading > span { font-size: .75rem; color: #94a7bb; }
.holding-row { display: grid; grid-template-columns: 24px minmax(0,1fr) 45px minmax(100px,auto) 42px; gap: 14px; align-items: center; padding: 13px 16px; background: #202a35; border: 1px solid #354555; border-radius: 9px; margin-bottom: 9px; }
.holding-rank { color: #8ea4ba; font-size: .8125rem; font-variant-numeric: tabular-nums; }.holding-main { display: flex; align-items: center; gap: 15px; min-width: 0; text-align: left; cursor: pointer; color: #eaf1f8; }.holding-main > span:last-child { min-width: 0; }.holding-main strong { display: block; font: .9375rem/1.5 var(--pc-title); overflow-wrap: anywhere; }.holding-main:hover strong { color: #fff; text-decoration: underline; text-underline-offset: 3px; }.holding-variant { display: block; color: #a0b1c3; font-size: .75rem; line-height: 1.5; margin-top: 3px; }.holding-badges { display: block; margin-top: 4px; }.holding-badges .variant-badge { width: 21px; height: 21px; }
.holding-qty { color: #aabbd0; font-size: .875rem; text-align: right; }.holding-worth { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }.holding-worth strong { color: #e7f0f9; font: 1rem/1.5 var(--pc-title); }.holding-worth small { font: .75rem/1.4 'Segoe UI',sans-serif; color: #9eafc2; }.holding-worth .demand-chip { font-size: .75rem; }.holding-edit { color: #9db3c8; font-size: .75rem; padding: 8px 4px; cursor: pointer; }.holding-edit:hover { color: #e2effc; }
.collection-empty { padding: 28px 20px; background: #202a35; border: 1px dashed #465b70; border-radius: 9px; text-align: center; }.collection-empty h3 { font: 1rem/1.6 var(--pc-title); color: #e4edf7; }.collection-empty p { color: #9aafc3; margin: 6px 0 15px; font-size: .875rem; }
.collection-add-inline { display: inline-grid; place-items: center; height: 25px; width: 25px; border: 1px solid #526b84; border-radius: 5px; color: #d1e3f5; background: #293b4e; cursor: pointer; font: 1.1rem/1 'Segoe UI',sans-serif; }.collection-add-inline:hover { background: #3a536c; }
.holding-editor-dialog { max-width: 450px; }#holdingEditorName { font-size: .875rem; color: #b3c2d3; margin-bottom: 22px; line-height: 1.6; }#holdingError { color: #efaaaa; font-size: .8125rem; margin: 12px 0; }
.holding-main:focus-visible,.holding-edit:focus-visible,.collection-add-inline:focus-visible,.history-ranges button:focus-visible { outline: 2px solid #a8c5df; outline-offset: 3px; }
/* LoomianCare blue returns as an accent, using solid fills and light edges. */
:root { --accent: #8ccfee; --pc-blue: #286da4; }
.app-header { background: #1c2938f5;  }
.brand-label { color: #a6d7f1; }
.panel-header,.receive .panel-header { background: #214e70;  }
.nav,.button,.toolbar-actions .text-button,.header-actions .text-button,#copyTrade { background: #2b4862; border-color: #416681; color: #e7f4ff; }
.nav.active,.button.primary { background: #235f96; border-color: #4d87b3; }
.nav:hover:not(:disabled),.button:hover:not(:disabled),.button.primary:hover:not(:disabled),.toolbar-actions .text-button:hover,.header-actions .text-button:hover,#copyTrade:hover { background: #3075aa; border-color: #6da9d2; }
.modal-header .icon-button { background: #2b5273; border-color: #487da3; }
.demand-toggle input:checked + .toggle-track { background: #286a9b; border-color: #71aace; }
.demand-toggle input:checked ~ .toggle-state { color: #a4d9f4; }
.guide-toggle { background: #27577d; border-color: #4d7fa2; }.guide-toggle:hover { background: #3174a3; }
.guide-heading h2,.guide-content h3 { color: #c6e8fa; }
.history-ranges button.active,.collection-add-inline { background: #245780; border-color: #4f86af; }
th { background: #244b6b; }
.hover-disc { filter: drop-shadow(0 2px 2px #0006); }
.hover-disc img,.brand-disc { image-rendering: auto; }
@keyframes care-disc-hover { 0%,100% { transform: translateX(-2px) rotate(-4deg); } 50% { transform: translateX(1px) rotate(4deg); } }
/* The chart shows the value, its change, the trace and range controls. */
.page-heading { align-items: center; flex-wrap: wrap; }
.dashboard-actions { justify-content: flex-end; gap: 10px; margin: 0 0 0 auto; }
.dashboard-actions[hidden] { display: none; }
.collection-backup-actions { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 18px; }
.dashboard-actions > .button { flex: 0 0 auto; }







.collection-overview { position: relative; padding-top: 20px; }
#collectionTotal { font-size: clamp(2.1rem,4vw,3rem); line-height: 1.3; }
#collectionChange { margin-top: 5px; min-height: 0; }
.collection-value-header { align-items: center; margin-bottom: 26px; }
#collectionUnpriced { font-size: .75rem; }
.collection-chart-frame { margin-top: 0; grid-template-columns: 58px minmax(0,1fr); }
.chart-scale { grid-column: 1; text-align: right; font-size: .6875rem; color: #738da4; }
.collection-chart { grid-column: 2; height: 280px; }
.chart-grid-line { stroke: #46678333; }
.history-dot { opacity: 0; }
.history-dot.is-latest { opacity: 1; }
.history-dot:hover,.history-dot:focus-visible { opacity: 1; }
.chart-point-tooltip { position: absolute; z-index: 2; right: 28px; top: 25px; max-width: 48%; padding: 0; background: none; border: 0; box-shadow: none; color: #dcebf7; text-align: right; pointer-events: none; }
.chart-point-tooltip strong { display: block; font: 1.35rem/1.45 var(--pc-title); color: #e8f2fb; }
.chart-point-tooltip strong small { font: 700 .75rem/1.4 'Segoe UI',sans-serif; color: #a3b9cc; }
.chart-point-tooltip > span { display: block; margin-top: 2px; color: #92abc0; font: 650 .75rem/1.5 'Segoe UI',sans-serif; }
.chart-point-tooltip[hidden] { display: none; }
.chart-range-footer { display: flex; justify-content: center; margin-top: 20px; }
.chart-range-footer .history-ranges { display: flex; padding: 3px; gap: 4px; background: #1a2a39; border-radius: 10px; }
.history-ranges button { min-width: 54px; border: 0; }
.history-ranges button.active { background: #284a65; border: 0; }
.collection-chart { cursor: crosshair; }
.chart-cursor { pointer-events: none; }
.chart-cursor line { stroke: #a2b8cc80; stroke-width: 1; stroke-dasharray: 4 4; }
.chart-cursor circle { fill: var(--chart-color); stroke: #e5f3fc; stroke-width: 2; }
.loomian-detail-dialog .detail-prices { grid-template-columns: 1fr; }
.slots.collection-card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,148px),1fr)); gap: 12px; align-items: start; margin: 0; padding: 0; }
.slots.collection-preview { grid-template-columns: repeat(6,minmax(0,1fr)); }
.collection-tile { position: relative; min-width: 0; aspect-ratio: 1; }
.collection-tile .owned-card { width: 100%; height: 100%; aspect-ratio: 1; cursor: pointer; text-align: left; }
.collection-tile .trade-portrait { inset: 6px 5px 53px; transform: translateY(12px); }
.collection-tile .card-badges { max-width: calc(100% - 42px); }
.owned-quantity { position: absolute; z-index: 3; top: 7px; right: 7px; min-width: 28px; max-width: 80px; padding: 2px; border: 0; border-radius: 2px; background: transparent; color: #f4f0fa; font: 1.1rem/1.35 var(--pc-title); text-shadow: 0 1px 2px #0008; cursor: pointer; }
.owned-quantity:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }.owned-quantity:focus-visible { outline: 2px solid #d4e8f8; outline-offset: 2px; }
.catalogue-quick-add { position: absolute; z-index: 3; top: 5px; right: 5px; width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #edf5fc; font: 1.55rem/1 var(--pc-title); text-shadow: 0 1px 2px #0008; cursor: pointer; }
.catalogue-quick-add:hover { color: #fff; transform: scale(1.12); }.catalogue-quick-add:active { transform: scale(.93); }.catalogue-quick-add:focus-visible { outline: 2px solid #d4e8f8; outline-offset: 2px; }.catalogue-quick-add:disabled { opacity: .4; cursor: default; }
.catalogue-owned { position: absolute; z-index: 2; right: 7px; top: 39px; pointer-events: none; color: #edf5fc; font: .875rem/1.4 var(--pc-title); text-shadow: 0 1px 2px #000b; }
.catalogue-grid-item .card-badges { max-width: calc(100% - 40px); }
.gr-filter { max-width: 580px; margin: 18px 0 14px; padding: 12px 15px 8px; border: 1px solid #3a536a; border-radius: 9px; background: #1d2b38; }
.gr-filter-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #d4e4f2; font: 650 .8125rem/1.4 'Segoe UI',sans-serif; }
.gr-filter-numbers { display: flex; align-items: center; gap: 7px; }.gr-filter-numbers > span { color: #899fb4; font-weight: 500; }
.gr-filter-numbers input { width: 82px; min-width: 0; padding: 4px 5px; border: 1px solid #425e77; border-radius: 5px; background: #17232f; color: #e2effb; font: 650 .8125rem/1.4 'Segoe UI',sans-serif; }
.gr-filter-numbers .text-button { padding: 5px 0 5px 7px; color: #a7c5de; font-size: .75rem; }.gr-filter-numbers .text-button:disabled { opacity: .35; cursor: default; }
.gr-range-slider { position: relative; height: 31px; margin-top: 9px; --range-low: 0%; --range-high: 100%; }
.gr-range-track,.gr-range-selection { position: absolute; height: 5px; top: 13px; border-radius: 3px; pointer-events: none; }
.gr-range-track { left: 0; right: 0; background: #344a5e; }.gr-range-selection { left: var(--range-low); right: calc(100% - var(--range-high)); background: #59a4d2; }
.gr-range-slider input[type=range] { position: absolute; inset: 0; width: 100%; height: 31px; margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; appearance: none; -webkit-appearance: none; pointer-events: none; }
.gr-range-slider input[type=range]::-webkit-slider-runnable-track { height: 5px; background: transparent; }
.gr-range-slider input[type=range]::-webkit-slider-thumb { width: 17px; height: 17px; margin-top: -6px; border: 2px solid #b6def8; border-radius: 50%; background: #2873a8; appearance: none; -webkit-appearance: none; pointer-events: auto; cursor: ew-resize; }
.gr-range-slider input[type=range]::-moz-range-track { height: 5px; background: transparent; }.gr-range-slider input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border: 2px solid #b6def8; border-radius: 50%; background: #2873a8; pointer-events: auto; cursor: ew-resize; }
.gr-range-slider input[type=range]:focus-visible { outline: none; }.gr-range-slider input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #92cff355; }.gr-range-slider input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #92cff355; }
.rarity-tag,.square-card .rarity-tag,.picker-info .rarity-tag,.catalogue-loomian .rarity-tag { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 19px; height: 19px; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font: 19px/1 'Segoe UI Emoji','Apple Color Emoji',sans-serif; }
.picker-info .rarity-tag { width: 25px; height: 25px; font-size: 23px; }
/* Offset the emoji font's lower visual center to match the image badges. */
.square-card .card-badges > .rarity-tag { transform: translateY(-4px); }
.low-pop-detail { display: flex; align-items: center; gap: 10px; margin: 15px 0; padding: 0 2px; }.low-pop-detail[hidden] { display: none; }
.low-pop-diamond { display: block; font: 28px/1 'Segoe UI Emoji','Apple Color Emoji',sans-serif; }
.low-pop-detail strong { display: block; color: #d9edf9; font: .875rem/1.5 var(--pc-title); }.low-pop-detail div > span { display: block; margin-top: 2px; color: #a9bdcf; font: 600 .8125rem/1.5 'Segoe UI',sans-serif; }
.trait-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 16px; }
.trait-filter { min-height: 34px; padding: 6px 12px; border: 1px solid #3c5267; border-radius: 7px; background: #1b2b3a; color: #b9cbdc; font: 600 .8125rem/1.35 'Segoe UI',sans-serif; cursor: pointer; transition: background .14s ease, border-color .14s ease, color .14s ease; }
.trait-filter:hover { background: #273f54; border-color: #698cac; color: #fff; }
.trait-filter.is-active { background: #245b83; border-color: #69a7d2; color: #fff; }
.trait-filter:focus-visible { outline: 2px solid #b8e0ff; outline-offset: 3px; }
.loomian-value-section { margin-top: 24px; padding-top: 19px;  }
.loomian-value-section[hidden] { display: none; }
.loomian-value-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.loomian-value-heading h3 { margin: 0; color: #e5eef7; font: .9375rem/1.4 var(--pc-title); }
.modal-history-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.modal-history-metrics { display: inline-flex; padding: 3px; gap: 3px; border-radius: 8px; background: #192a38; }
.modal-history-metrics button { min-height: 30px; padding: 4px 10px; border: 0; border-radius: 5px; color: #9fb7cb; background: transparent; cursor: pointer; font: 700 .75rem/1.4 'Segoe UI',sans-serif; }
.modal-history-metrics button:hover { color: #fff; background: #2a4053; }.modal-history-metrics button.active { color: #eef7ff; background: #285271; }
.modal-history-metrics button:focus-visible { outline: 2px solid #91c8ed; outline-offset: 2px; }
.loomian-value-graph[data-metric=demand] { position: relative; padding-left: 65px; --chart-color: var(--demand-history-color,#7eb9e4); }
.demand-history-axis { position: absolute; left: 0; top: 3%; bottom: 3%; width: 60px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.demand-history-axis span { font: 700 .6875rem/1.4 'Segoe UI',sans-serif; }
#loomianValueReadout { color: #e5eef7; font: .9375rem/1.4 var(--pc-title); min-height: 1.4em; white-space: pre-wrap; }
.loomian-value-graph { height: 180px; min-width: 0; cursor: crosshair; --chart-color: #7eb9e4; }
.loomian-value-graph[data-trend=up] { --chart-color: #22cf78; }.loomian-value-graph[data-trend=down] { --chart-color: #ef7886; }
.loomian-value-graph svg { display: block; width: 100%; height: 100%; overflow: visible; }
.loomian-value-graph[data-metric=value] { position: relative; padding-left: 80px; }
.value-history-axis { position: absolute; inset: 0 auto 0 0; width: 70px; pointer-events: none; color: #b2c6d8; font-size: .6875rem; text-align: center; }
.value-axis-unit { position: absolute; top: -12px; left: 0; right: 0; color: #dceaf5; font-size: .625rem; }
.value-axis-tick { position: absolute; left: 0; right: 0; transform: translateY(-50%); white-space: nowrap; }
@media(max-width:480px) { .loomian-value-graph[data-metric=value] { padding-left: 68px; }.value-history-axis { width: 60px; font-size: .625rem; } }
.loomian-value-dot { fill: var(--chart-color); }
.loomian-value-empty { margin: 0; height: 100%; display: grid; place-items: center; color: #9bb1c6; font: 600 .875rem/1.5 'Segoe UI',sans-serif; }
.loomian-value-dates { display: flex; justify-content: space-between; margin: 7px 8px 0; color: #92a9be; font: 600 .6875rem/1.4 'Segoe UI',sans-serif; }
.loomian-value-ranges { justify-content: center; margin-top: 13px; }
.loomian-value-graph:focus-visible { outline: 2px solid #91c8ed; outline-offset: 3px; border-radius: 5px; }
@media(max-width:480px) { .loomian-value-graph { height: 155px; }.loomian-value-ranges button { min-width: 42px; } }
.picker-dialog .trait-filters { margin-top: 10px; }
@media(max-width:650px) { .trait-filters { gap: 5px; }.trait-filter { padding: 7px 10px; min-height: 36px; } }
@media(max-width:500px) { .gr-filter { padding: 10px; }.gr-filter-header { align-items: flex-start; flex-direction: column; gap: 9px; }.gr-filter-numbers { width: 100%; }.gr-filter-numbers input { flex: 1; }.gr-filter-numbers .text-button { margin-left: auto; } }
.view-collection-button { display: block; margin: 18px auto 0; }.view-collection-button[hidden] { display: none; }
.inventory-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.inventory-toolbar .search-field { flex: 1 1 260px; }.inventory-toolbar select { min-height: 42px; max-width: 100%; }
.inventory-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; color: #a4b8ca; font-size: .8125rem; }
.inventory-status label { display: flex; align-items: center; gap: 7px; }.inventory-empty { grid-column: 1/-1; padding: 30px 15px; text-align: center; color: #b3c5d6; font-size: .875rem; }
.collection-card-grid > .collection-empty { grid-column: 1/-1; }
@media(max-width:1050px) { .slots.collection-preview { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media(max-width:650px) { .slots.collection-preview { grid-template-columns: repeat(2,minmax(0,1fr)); }.inventory-toolbar .search-field { flex-basis: 100%; }.inventory-toolbar select { flex: 1; min-width: 130px; }.header-inner nav { overflow-x: auto; flex-wrap: nowrap; }.header-inner nav .nav { flex: 1 0 auto; }.slots.collection-card-grid { gap: 10px; } }
.chart-dates.sr-only { margin: 0; padding: 0; }
/* Quiet modal controls and slim scroll tracks, including the variant rail. */
.modal-header .icon-button[data-close] { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: #a7bed0; font-size: 0; cursor: pointer; transition: color .15s ease, background .15s ease; }
.modal-header .icon-button[data-close]::before,.modal-header .icon-button[data-close]::after { content: ''; position: absolute; width: 17px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.modal-header .icon-button[data-close]::after { transform: rotate(-45deg); }
.modal-header .icon-button[data-close]:hover { background: #30475a; color: #f2f8ff; }
.modal-header .icon-button[data-close]:active { background: #3b5670; }
.modal-header .icon-button[data-close]:focus-visible { outline: 2px solid #8bc6ee; outline-offset: 2px; }
dialog { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; color-scheme: dark; }
dialog,dialog *,#loomianDetailRelated,.guide-content { scrollbar-width: thin; scrollbar-color: #48667e transparent; }
@supports selector(::-webkit-scrollbar) {
 dialog,dialog *,#loomianDetailRelated,.guide-content { scrollbar-width: auto; scrollbar-color: auto; }
 dialog::-webkit-scrollbar,dialog *::-webkit-scrollbar,.guide-content::-webkit-scrollbar { width: 6px; height: 6px; }
 dialog::-webkit-scrollbar-track,dialog *::-webkit-scrollbar-track,.guide-content::-webkit-scrollbar-track { background: transparent; margin: 9px 0; }
 dialog::-webkit-scrollbar-thumb,dialog *::-webkit-scrollbar-thumb,.guide-content::-webkit-scrollbar-thumb { background: #48667e; border-radius: 20px; }
 dialog::-webkit-scrollbar-thumb:hover,dialog *::-webkit-scrollbar-thumb:hover,.guide-content::-webkit-scrollbar-thumb:hover { background: #729bb9; }
 dialog::-webkit-scrollbar-button,dialog *::-webkit-scrollbar-button,.guide-content::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
 dialog::-webkit-scrollbar-corner,dialog *::-webkit-scrollbar-corner,.guide-content::-webkit-scrollbar-corner { background: transparent; }
}
@media(max-width:650px) { .collection-value-header { margin-bottom: 22px; }.collection-chart-frame { grid-template-columns: 38px minmax(0,1fr); gap: 6px; }.chart-scale { font-size: .625rem; }.collection-chart { height: 230px; }.chart-point-tooltip { top: 22px; right: 15px; max-width: 45%; }.history-ranges button { min-width: 46px; } }
@media(max-width:650px) { .collection-overview { padding: 20px 15px 13px; }.collection-value-header { gap: 10px; }.listed-reference { display: block; margin: 0; }.collection-chart-frame { grid-template-columns: minmax(0,1fr) 54px; gap: 7px; }.chart-dates { padding-right: 61px; }.collection-chart { height: 210px; }.collection-counts { font-size: .75rem; }.holding-row { grid-template-columns: 16px minmax(0,1fr) auto; gap: 8px; padding: 10px; }.holding-main { gap: 8px; }.holding-main strong { font-size: .8125rem; }.holding-main .loomian-sprites { width: 54px; min-width: 54px; }.holding-qty { grid-column: 1; grid-row: 2; font-size: .75rem; }.holding-worth { grid-column: 3; grid-row: 1; }.holding-worth strong { font-size: .875rem; }.holding-edit { grid-column: 3; grid-row: 2; }.holdings-heading { align-items: flex-start; }.holdings-heading h2 { font-size: 1rem; } }

.pc-background-help { margin: 16px 0; color: #b6ccdc; font-size: .8125rem; }
.pc-background-help summary { cursor: pointer; width: fit-content; color: #d5e8f5; }
.pc-background-help p { max-width: 560px; margin: 12px 0; line-height: 1.6; }
.pc-background-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.pc-background-actions span { font-size: .75rem; overflow-wrap: anywhere; }
