.tome-app{--tome-name-purple:#b87fe6;--tome-name-gold:#ffd36b;width:100%;max-width:1380px;padding:26px 30px 48px}
.tome-app [hidden],.tome-tooltip[hidden]{display:none!important}
.tome-heading{text-align:center;margin:0 0 20px}
.tome-heading h1{font-size:clamp(30px,3.3vw,44px);letter-spacing:-1.2px;line-height:1.2;margin:0 auto 12px;max-width:1150px}
.tome-heading h1 span{white-space:nowrap}
.tome-wizard{display:flex;align-items:center;max-width:980px;margin:0 auto 24px;gap:22px}
.tome-wizard button{display:flex;align-items:center;gap:13px;white-space:nowrap;border:0;background:none;padding:6px 0;font-weight:650;cursor:pointer}
.tome-wizard button:disabled{cursor:default;opacity:1;color:#858da5}
.tome-wizard .stage-marker{width:36px;height:36px;border:2px solid #4a5065;border-radius:50%;display:grid;place-items:center;color:#a4abc0;font-size:17px}
.tome-wizard .active .stage-marker,.tome-wizard .complete .stage-marker{border-color:#f2c75c;color:#ffda79;box-shadow:0 0 15px #ffc55025;background:#e8b93c0d}
.tome-wizard .active{color:#fff}.tome-wizard .stage-connector{flex:1;min-width:20px;height:2px;background:#3c4153}
.tome-wizard .stage-connector.complete{background:#edc361}
.tome-panel{background:rgba(22,24,35,.96);border:1px solid #303447;border-radius:16px;padding:28px}
.tome-panel h2{font-size:26px;letter-spacing:-.5px;line-height:1.25;text-align:left;margin:0 0 8px}
.tome-panel h3{font-size:19px;margin:0 0 14px}
.tome-help{color:#a7aec3;font-size:14px;line-height:1.6;margin:0}
.tome-catalog{margin-top:26px}
.tome-level{display:grid;grid-template-columns:100px 1fr;align-items:start;gap:18px;padding:18px 0;border-top:1px solid #303448}
.tome-level:first-child{border-top:0;padding-top:0}
.tome-level:last-child{padding-bottom:0}
.tome-level-label{font-size:15px;font-weight:650;white-space:nowrap;padding-top:13px}
.tome-icons{display:flex;gap:12px;flex-wrap:wrap;align-items:start}
.tome-icon{--quality:#a960d5;position:relative;display:inline-flex;justify-content:center;align-items:center;flex:none;vertical-align:middle;width:46px;height:46px;padding:5px;border:1px solid var(--quality);border-radius:6px;background:#0a0b12;box-shadow:inset 0 0 7px #b058d51a;cursor:help}
button.tome-icon{cursor:pointer}.tome-icon.gold{--quality:#d7ad50}
.tome-icon.material{--quality:#4c536b;width:36px;height:36px;padding:2px}
.tome-icon img{width:32px;height:32px;object-fit:contain;display:block}
.tome-icon:hover,.tome-icon:focus-visible{border-color:#ffdb79;box-shadow:0 0 12px #ffd56540;outline-offset:3px}
.tome-icon.selected{outline:2px solid #f3cd67;outline-offset:2px;box-shadow:0 0 15px #ffcc4c40}
.tome-badge{position:absolute;right:-9px;top:-9px;min-width:23px;height:23px;padding:0 5px;display:grid;place-items:center;background:#f0c35f;border:1px solid #ffde85;color:#1b1620;border-radius:12px;font-size:12px;font-weight:800}
.tome-owned-choice{width:46px;position:relative;margin-bottom:0}
.tome-owned-choice:has(.tome-quantity){margin-bottom:34px}
.tome-quantity{display:flex;position:absolute;left:50%;transform:translateX(-50%);margin-top:8px;align-items:center;background:#0f1120;border:1px solid #444b61;border-radius:7px;height:26px;font-size:12px}
.tome-quantity button{background:none;border:0;width:22px;height:24px;padding:0;cursor:pointer;color:#c3c9db}
.tome-quantity span{min-width:16px;text-align:center;font-weight:600}
.tome-inventory-layout{display:grid;grid-template-columns:minmax(0,1fr) 382px;gap:20px;align-items:start}
.tome-inventory-layout .tome-panel{padding:25px}
.tome-inventory-layout .tome-level{grid-template-columns:78px 1fr;gap:12px;padding:24px 0}
.tome-inventory-layout .tome-level:first-child{padding-top:8px}
.tome-inventory-layout .tome-icons{gap:12px}
.tome-inventory-layout .tome-level-label{font-size:14px}
.tome-stock-head{display:flex;justify-content:space-between;align-items:start;gap:14px;flex-wrap:wrap}
.tome-stock-head .tome-mode{margin:0;flex-wrap:nowrap}
.tome-mode{display:flex;gap:6px;margin:22px 0 10px;flex-wrap:wrap}
.tome-secondary,.tome-mode button,.tome-presets button{background:#1c2030;border:1px solid #3b4157;border-radius:10px;padding:10px 15px;cursor:pointer;font-size:14px;color:#cbd1e3}
.tome-secondary:hover,.tome-mode button:hover,.tome-presets button:hover{border-color:#dcaf52;color:#fff}
.tome-mode .selected,.tome-presets .selected{border-color:#efc45d;color:#ffdc86;background:#b58d2620;box-shadow:inset 0 0 0 1px #efc45d60}
.tome-mode button:disabled{cursor:default;opacity:.45}
.tome-recipe{margin-top:32px;text-align:center}
.tome-recipe-result{position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;padding-bottom:30px}
.tome-recipe-result::after{content:"";position:absolute;bottom:0;left:50%;height:22px;border-left:1px solid #d7ad50}
.tome-recipe-copy{min-width:0;line-height:1.4}
.tome-recipe-copy strong{display:block;font-size:16px;overflow-wrap:anywhere}
.tome-recipe-result strong{font-size:22px}
.tome-recipe-copy>span{display:block;color:#aab2c7;font-size:13px;margin-top:5px}
.tome-recipe-components{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));list-style:none;margin:0;padding:0}
.tome-recipe-components li{position:relative;display:flex;flex-direction:column;align-items:center;gap:12px;min-width:0;padding:24px 10px 0}
.tome-recipe-components li::before{content:"";position:absolute;top:0;left:0;right:0;border-top:1px solid #d7ad50}
.tome-recipe-components li:first-child::before{left:50%}
.tome-recipe-components li:last-child::before{right:50%}
.tome-recipe-components li::after{content:"";position:absolute;top:0;left:50%;height:16px;border-left:1px solid #d7ad50}
.tome-recipe-note{margin-top:28px;padding-top:18px;border-top:1px solid #303448}
@media(min-width:801px) and (max-width:1100px),(max-width:540px){
  .tome-recipe-result{padding-bottom:24px}
  .tome-recipe-result::after{display:none}
  .tome-recipe-components{grid-template-columns:minmax(0,1fr);gap:18px;text-align:left}
  .tome-recipe-components li{flex-direction:row;padding:0;gap:12px}
  .tome-recipe-components li::before,.tome-recipe-components li::after{display:none}
}
.tome-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.tome-summary-head h2{font-size:23px;margin:0}
.tome-reset{padding:8px 11px;font-size:12px;white-space:nowrap}
.tome-reset:focus-visible{outline:2px solid #efc45d;outline-offset:4px}
.tome-reset-dialog{width:min(420px,calc(100% - 40px));padding:26px;border:1px solid #64708c;border-radius:14px;background:#171b29;color:#eef0f8;box-shadow:0 24px 80px #0009}
.tome-reset-dialog::backdrop{background:#050812b8}
.tome-reset-dialog h2{margin:0 0 12px;font-size:24px;text-align:left}
.tome-reset-dialog p{margin:0;color:#b7c0d6;font-size:14px;line-height:1.6}
.tome-dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
.tome-dialog-actions .btn{min-width:88px}
.tome-dialog-actions .tome-reset-confirm{flex:0 1 150px;min-width:110px;height:42px}
.tome-reset-confirm strong{font-size:13px}
.tome-target{display:flex;align-items:center;gap:12px;padding:18px 0 20px;border-bottom:1px solid #303448;margin-bottom:20px}
.tome-target .tome-secondary{margin-left:auto;padding:8px 10px;font-size:12px}
.tome-target-copy{min-width:0;flex:1;line-height:1.4}
.tome-target strong{display:block;font-size:15px;overflow-wrap:anywhere}
.tome-target-copy>span{display:block;font-size:12px;color:#aab2c7;margin-top:3px}
.tome-slots-title{display:block;font-size:23px;font-weight:750;letter-spacing:-.4px;margin-bottom:16px}
.tome-slot-control{display:flex;justify-content:center;gap:0;max-width:240px;margin:0 auto 8px;background:#10121e;border:1px solid #353d54;border-radius:11px}
.tome-slot-control button{width:48px;flex:none;border:0;border-radius:9px;background:#202436;font-size:24px;cursor:pointer}
.tome-slot-control input{width:100%;min-width:0;background:none;border:0;text-align:center;font-size:30px;font-weight:750;padding:9px 0;appearance:textfield;-moz-appearance:textfield}
.tome-slot-control input::-webkit-inner-spin-button{appearance:none}
.tome-slot-rows{text-align:center;color:#aab2c7;font-size:13px;min-height:22px}
.tome-presets{display:flex;gap:8px;margin:16px 0 8px;justify-content:center}
.tome-presets button{padding:8px 16px;min-width:52px}
.tome-range{text-align:center;font-size:12px;color:#aab2c7;margin:0 0 19px}
.tome-grid-label{color:#b0b7cc;font-size:12px;margin:16px 0 9px}
.tome-bag{display:grid;grid-template-columns:repeat(8,32px);grid-auto-rows:32px;justify-content:center;gap:5px;max-height:210px;overflow:auto;padding:3px 2px}
.tome-bag .tome-icon,.tome-bag .empty-slot{width:100%;height:auto;aspect-ratio:1;border-radius:5px;padding:1px;min-width:0}
.tome-bag .tome-icon img{width:100%;height:100%;max-width:32px;max-height:32px}
.tome-bag .empty-slot{border:1px solid #3a4356;background:#11141d}
.tome-resource-help{font-size:12px;line-height:1.55;color:#aab2c7;margin:16px 0}
.tome-stock-materials{min-width:0;margin:0 0 20px;padding:0 0 20px;border:0;border-bottom:1px solid #303448}
.tome-stock-materials legend{padding:0;margin-bottom:14px;font-size:19px;font-weight:700}
.tome-stock-material{display:grid;grid-template-columns:36px minmax(0,1fr) 94px;align-items:center;gap:8px;margin-top:10px;font-size:13px;color:#cbd1e3}
.tome-stock-material input{width:100%;min-width:0;box-sizing:border-box;padding:9px 8px;border:1px solid #46516c;border-radius:8px;background:#191e2e;color:#f2f4fb;font-size:16px;text-align:right}
.tome-stock-material input:focus{outline:2px solid #edc363;outline-offset:2px}
.tome-stock-material input[aria-invalid="true"]{border-color:#df986c}
.tome-stock-error{grid-column:1/-1;font-size:12px;color:#f0b58e;line-height:1.4}
.tome-stock-error:empty{display:none}
.tome-material-balance{font-size:13px;line-height:1.6;color:#aab6ce;margin:12px 0;overflow-wrap:anywhere}
.tome-material-balance strong{color:#d1d9ed;font-weight:600}
@media(max-width:360px){.tome-stock-material{grid-template-columns:36px minmax(0,1fr)}.tome-stock-material input{grid-column:1/-1;text-align:left}}
.tome-recommendation{border-top:1px solid #303448;padding-top:15px;display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#bec5d8;margin-bottom:18px}
.tome-recommendation strong{font-weight:600;color:#f4d581}
.tome-app .open-btn{width:100%;max-width:none;min-height:48px;cursor:pointer}
.tome-app .open-btn strong{font-size:13px}
.tome-notice{padding:12px 16px;border:1px solid #b77948;border-radius:10px;color:#ffdcb1;background:#312319;margin:0 0 22px;line-height:1.5}
.tome-loading{text-align:center;color:#acb4cc;padding:60px 20px}
.tome-tooltip{position:fixed;z-index:1000;pointer-events:none;width:max-content;max-width:min(320px,calc(100vw - 24px));padding:14px 16px;border:1px solid #767e96;border-radius:9px;background:#0b0e18;box-shadow:0 12px 36px #0008;color:#cbd2e6;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.tome-tooltip strong{display:block;font-size:16px;color:#aa32ff;margin-bottom:6px}
.tome-tooltip.gold strong{color:#ffdc50}.tome-tooltip .tooltip-level{font-size:12px;color:#cbd2e6;margin-bottom:12px}
.tome-tooltip .tooltip-stats{white-space:pre-line;color:#ffcb4a}
.tome-tooltip .tooltip-description{white-space:pre-line;color:#00ffff;margin-top:6px}
.tome-tooltip .tooltip-text{white-space:pre-line;border-top:1px solid #303448;padding-top:9px}
.tome-plan-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}
.tome-plan-head .tome-icon{width:40px;height:40px}
.tome-plan-title{display:flex;align-items:center;gap:15px}
.tome-plan-title h2{margin:0 0 4px}
.tome-plan-count{font-size:12px;color:#a7aec3;margin:6px 0 0}
.tome-plan{overflow-anchor:none}
.tome-plan-head .tome-secondary{white-space:nowrap}
.tome-progress{height:4px;border-radius:3px;background:#343a4d;overflow:hidden;margin:0 0 26px}
.tome-progress div{height:100%;background:#edc363;transition:width .18s}
.tome-shopping{padding:0 0 24px;border-bottom:1px solid #34394c}
.tome-shopping h3{font-size:16px;margin:0 0 16px;font-weight:650}
.tome-shopping-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.tome-material-card{padding:16px 18px;background:#10131e;border:1px solid #30384d;border-radius:10px;min-width:0}
.tome-material-total{display:flex;align-items:center;gap:10px;font-size:14px;color:#bfc7dd}
.tome-material-total b{font-size:20px;color:#f4f5fa;margin-right:4px}
.tome-price-label{display:block;font-size:12px;color:#acb6cf;margin:14px 0 7px}
.tome-price-field{display:flex;align-items:center;gap:12px;border:1px solid #46516c;border-radius:8px;background:#191e2e;padding:0 12px}
.tome-price-field:focus-within{border-color:#edc363;box-shadow:0 0 0 2px #edc36320}
.tome-price-field input{width:100%;min-width:0;padding:10px 0;background:none;border:0;outline:none;color:#f2f4fb;font-size:17px;font-variant-numeric:tabular-nums}
.tome-price-field input::placeholder{font-size:14px;color:#8491ad}
.tome-price-field:has([aria-invalid="true"]){border-color:#df986c}
.tome-price-field>span{flex:none;font-size:12px;color:#aab6ce}
.tome-price-line{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;min-height:20px}
.tome-price-help{font-size:12px;color:#f0b58e}
.tome-subtotal{margin-left:auto;font-size:14px;color:#d1d9ed;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.tome-cost-total{display:flex;justify-content:flex-end;align-items:baseline;gap:18px;flex-wrap:wrap;margin-top:18px;font-size:13px;color:#aab6ce}
.tome-cost-total output{font-size:22px;font-weight:700;color:#f2d07b;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;max-width:100%}
.tome-step{display:grid;grid-template-columns:26px 90px minmax(0,1fr) auto;align-items:center;gap:20px;border-bottom:1px solid #303448;padding:23px 12px;scroll-margin-top:110px}
.tome-step.current{border:1px solid #e6be5f;border-radius:11px;box-shadow:0 0 18px #e6be5f0d;background:#d4ac3108;margin:12px -12px;padding:23px}
.tome-step.done{opacity:.6}.tome-step.done:hover{opacity:.85}
.tome-step-checkbox{width:22px;height:22px;margin:0;accent-color:#c7a74f;cursor:pointer;color-scheme:dark}
.tome-step-checkbox:disabled{cursor:default;opacity:.4}
.tome-step-number{display:grid;place-items:center;flex:none;width:42px;height:42px;border:2px solid #4a5065;border-radius:50%;font-size:15px;font-weight:650;font-variant-numeric:tabular-nums;color:#9ea9c1}
.tome-step.current .tome-step-number{border-color:#f2c75c;color:#ffda79;box-shadow:0 0 15px #ffc55025;background:#e8b93c0d}
.tome-step-result{display:flex;align-items:center;gap:12px;font-size:21px;font-weight:750}
.tome-step-copy h3{font-size:18px;font-weight:650;margin:0 0 4px;letter-spacing:-.2px;overflow-wrap:anywhere}
.tome-step-name{color:var(--tome-name-purple)}
.tome-step-name.gold{color:var(--tome-name-gold)}
.tome-step-level{font-size:13px;line-height:1.4;color:#b6c0d8;margin:0 0 10px}
.tome-ingredients{display:flex;flex-wrap:wrap;align-items:center;gap:9px;font-size:13px;color:#aab4ce}
.tome-ingredient{display:inline-flex;align-items:center;gap:6px}
.tome-ingredients .tome-icon{width:28px;height:28px;padding:1px;border-radius:4px}
.tome-ingredients .tome-icon img{width:24px;height:24px}
.tome-step-action{display:flex;flex-direction:column;align-items:flex-end;gap:10px;width:200px;min-width:0}
.tome-step-meta{display:flex;align-items:center;gap:10px;width:100%;text-align:left}
.tome-step-action .open-btn{flex:none;width:200px;min-height:42px;height:42px}
.tome-step-action .open-btn strong{font-size:11px;letter-spacing:2px}
.tome-step-status{font-size:12px;color:#9aabc0}.tome-step-status.complete{color:#76d4a0}
.tome-step-status.active{color:#eac563}
.tome-completion{text-align:center;padding:35px 0 10px;font-size:18px;color:#f0d591}
.tome-footer-note{font-size:12px;color:#98a4c0;margin:20px 0 0}
@media(max-width:1100px){.tome-app{padding:24px 18px 40px}.tome-inventory-layout{grid-template-columns:minmax(0,1fr) 340px}.tome-inventory-layout .tome-panel{padding:22px}.tome-level{grid-template-columns:80px 1fr}.tome-icons{gap:10px}.tome-step{gap:12px;grid-template-columns:24px 82px minmax(0,1fr) auto}.tome-step-action{width:165px}.tome-step-action .open-btn{width:165px}}
@media(max-width:800px){.tome-inventory-layout{grid-template-columns:minmax(0,1fr)}.tome-summary{order:-1}.tome-wizard{gap:8px}.tome-wizard button{font-size:11px;gap:7px;white-space:normal}.tome-wizard .stage-marker{flex:none;width:28px;height:28px}.tome-wizard .stage-connector{min-width:8px}.tome-heading h1{font-size:34px}.tome-panel{padding:20px}.tome-level{grid-template-columns:1fr;gap:12px}.tome-level-label{padding:0}.tome-bag{grid-template-columns:repeat(8,minmax(0,32px));max-width:360px;margin:auto;max-height:210px}.tome-step{grid-template-columns:24px 76px minmax(0,1fr);gap:10px}.tome-step-action{grid-column:2/-1;justify-self:end;width:100%;max-width:220px}.tome-step-action .open-btn{width:100%;max-width:220px}.tome-step-copy h3{font-size:15px}.tome-step-result{font-size:17px;gap:7px}.tome-plan-head{align-items:start}.tome-plan-head h2{font-size:23px}.tome-plan-title{gap:9px}.tome-plan-head .tome-secondary{font-size:12px;padding:8px}.tome-shopping{gap:14px}.tome-shopping h3{width:100%}.tome-step.current{margin:12px -8px;padding:18px 19px}}
@media(max-width:360px){
  .tome-wizard{display:grid;grid-template-columns:minmax(0,1fr) 8px minmax(0,1fr) 8px minmax(0,1fr);gap:4px;align-items:start}
  .tome-wizard button{min-width:0;flex-direction:column;gap:6px;text-align:center;line-height:1.4}
  .tome-wizard .stage-connector{margin-top:19px}
}
@media(prefers-reduced-motion:reduce){.tome-app *, .tome-app *::before,.tome-app *::after,.tome-reset-dialog *,.tome-reset-dialog *::before,.tome-reset-dialog *::after{animation:none!important;transition:none!important}}
@media(max-width:800px){.tome-shopping-grid{grid-template-columns:1fr}.tome-cost-total{justify-content:space-between}.tome-cost-total output{font-size:19px}}
