/* Readable market workspace. Shared components use the same type scale and spacing. */
:root{--bg:#10191c;--panel:#19262a;--panel-soft:#121f23;--line:#34494d;--text:#edf3ef;--muted:#a9bec0;--accent:#a5e7c3;--red:#f0a69f;--sidebar:256px}
body{font-size:15px;line-height:1.55}
button,input,select{min-height:44px;border-radius:9px;border-color:#465e62;padding:10px 14px}
button{transition:background .15s,border-color .15s,color .15s}
button:hover{background:#294136;border-color:#85b99d}
button:disabled{cursor:default;opacity:.5}
input::placeholder{color:#99b0b3}
input[type=checkbox]{min-height:auto;accent-color:var(--accent)}
h1{font-size:clamp(30px,2.7vw,38px);font-weight:800;letter-spacing:-1.3px;line-height:1.2;margin-top:10px}
h2{font-size:21px;line-height:1.4;letter-spacing:-.5px}
h3{font-size:17px}
.skip-link{position:fixed;top:-100px;left:20px;z-index:30;padding:12px 20px;background:var(--accent);color:#122a1d;border-radius:8px}
.skip-link:focus{top:16px}
.sidebar{padding:36px 18px 24px;background:#142024}
.brand{font-size:19px;gap:13px;margin:0 13px 46px}
.brand small{font-size:10px;letter-spacing:3.6px}
.brand-mark{width:42px;height:46px;font-size:26px;border-radius:12px 4px 12px 4px}
.sidebar nav{gap:9px}
.sidebar nav a{font-size:14px;gap:11px;min-height:50px;padding:13px 12px;border:1px solid transparent;border-radius:9px;color:#b9cacc}
.sidebar nav a[aria-current=page]{background:#2a493c;border-color:#496b56;color:#caf5d8}
.sidebar nav a[aria-current=page]::before{display:none}
.sidebar nav b{font-size:12px;min-width:24px;padding:3px 6px;color:#c7dbd0}
.sidebar nav svg{width:19px;height:19px}
.sidebar-bottom{padding:24px 12px 0}
.server-card{font-size:14px;gap:12px}.server-card small{font-size:12px}
.server-dot{width:8px;height:8px}
#connection{font-size:12px;margin:18px 0;color:#b2d0be}
.source-links{font-size:12px;flex-wrap:wrap;gap:8px 14px;padding-top:18px}.source-links a{color:var(--muted)}
main{padding:42px clamp(24px,3vw,52px) 64px;max-width:1900px}
.page-header{gap:24px;margin-bottom:28px}
.page-description{margin:12px 0 0;color:var(--muted);font-size:14px;max-width:620px;line-height:1.7}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:2px;color:#a7cdb8}
.header-actions,.quick-controls{gap:12px}
.quick-controls label{font-size:12px;gap:7px}.quick-controls select{max-width:190px;font-size:14px}
.button-secondary{font-size:13px;min-height:44px;height:auto;background:#203034;color:#d8e7e0;gap:9px}.button-secondary svg{width:17px;height:17px}
.notice{padding:13px 17px;font-size:13px;line-height:1.7;color:#e0cda9;border-color:#6d5d40;border-radius:9px;gap:12px;margin-bottom:26px}
.notice::before{height:20px;width:20px;font-size:12px}
.plan-overview{gap:18px;margin-bottom:30px}
.overview-card{padding:25px 26px;min-height:174px;border-radius:14px}
.overview-card>span{font-size:11px;letter-spacing:1.1px;font-weight:600;color:#b6c9c7}
.overview-card>strong{font-size:clamp(29px,2.7vw,40px);line-height:1.2;letter-spacing:-1.2px;font-weight:700;margin:17px 0 9px}
.overview-card>small{font-size:13px;color:var(--muted)}
.profit-card{background:linear-gradient(115deg,#284c3a,#1f382f 70%,#19262a);border-color:#567f62}.profit-card>strong{color:#c0f1d0}
.profit-card>svg{width:85px;bottom:22px;right:20px;opacity:.4}
.plan-rules span{font-size:11px;padding:4px 8px;color:#c7dfd0;border-color:#4f6b5b}
.results{border-radius:14px}
.section-heading{padding:25px 26px;gap:18px}
.section-meta{font-size:13px;line-height:1.7;margin-top:8px}
.section-tag{font-size:11px;padding:6px 10px;border-radius:6px;color:#badcc7;border-color:#4c7059}
.table-scroll{max-height:calc(100vh - 330px);scrollbar-color:#536d6b transparent}
th{font-size:11px;padding:15px 20px;letter-spacing:.6px;font-weight:600;color:#b4cacc;background:#213338;z-index:2}
td{font-size:14px;padding:22px 20px;line-height:1.55;border-bottom-color:#34494d99}
td:first-child{min-width:220px}td small{font-size:12px;color:var(--muted);margin-top:5px}td strong{font-size:15px;font-weight:700}
tbody tr:hover,tbody tr.selected{background:#284036}
tr:focus-visible{outline-offset:-3px}
.results tbody tr:hover td:first-child,.results tbody tr.selected td:first-child{background:#284036}
.recommendations td:last-child{font-size:18px;font-weight:600}
.listing-snapshot{display:block}.listing-snapshot small{white-space:normal;min-width:85px}
.positive{color:#b4eac4}
.item-identity{gap:13px}.item-name{font-size:14px;font-weight:600;line-height:1.5;color:var(--text)}
.item-icon{width:42px;height:42px;border-radius:9px}.game-icon{border-color:#597163}.game-icon>span{color:#b1cebc}
.table-button,.scan-item{font-size:12px;padding:8px 12px}
.watch-button{font-size:25px;min-width:44px;padding:3px 9px}
.badge{font-size:12px;padding:4px 8px;border-radius:6px}.badge.warn{color:#e8cfa2;border-color:#826d49}
.toolbar{padding:22px 24px;gap:16px}.search-wrap{max-width:480px;min-width:150px}.search-wrap svg{left:15px;width:18px;color:#a4bdbf}
.search-wrap input{padding-left:43px;font-size:14px;min-height:46px;background:#121f23}
#itemView .search-wrap input,#gatheringView .search-wrap input{padding-left:15px}
.filters{gap:10px;align-items:center}.filters select{font-size:13px;min-width:130px}
.browser-caption{font-size:12px;padding:0 24px 18px;gap:14px;color:var(--muted)}
.empty-state{padding:60px 24px}.empty-state h3{font-size:18px;color:#d6e6dc}
#recommendEmptyReason{font-size:14px;max-width:600px;margin-top:16px}
#recipeDialog,#historyDialog,#readerDialog{border-radius:18px;border-color:#5d806c;box-shadow:0 32px 120px #000b;max-height:92dvh}
#recipeDialog,#historyDialog{width:min(1120px,94vw)}
#recipeDialog::backdrop,#historyDialog::backdrop,#readerDialog::backdrop{background:#050d10d9;backdrop-filter:blur(7px)}
.modal-scroll{max-height:91dvh;padding:36px}
.modal-close{right:16px;top:16px;width:44px;height:44px;min-height:44px;line-height:1;padding:4px;border:1px solid #4a655b;border-radius:10px;background:#1d3031;color:#ccdfd2;z-index:4}
#recipeTitle{font-size:28px;line-height:1.3;max-width:calc(100% - 54px);margin-bottom:28px;letter-spacing:-.8px}
#recipeTitle .item-name{font:inherit}#recipeTitle .game-icon{width:50px;height:50px}#recipeTitle .item-identity{gap:16px}
#detail h3{font-size:17px;margin:30px 0 16px;color:#e0eee6}
.recipe-controls{padding:20px;gap:16px;background:#142328;border:1px solid var(--line);border-radius:12px;margin-bottom:26px}
.recipe-controls label,.recipe-controls>div>label{font-size:13px;color:#c2d8d3}
.recipe-controls small{font-size:13px}.quantity-stepper{gap:7px;margin-top:9px}.quantity-stepper button{width:46px;font-size:21px}
.quantity-stepper input{width:105px;font-size:17px;font-weight:600}
#recipeQuantityHelp{flex:1;width:auto;min-width:180px;font-size:13px;line-height:1.7}
.breakdown{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:22px}
.breakdown>div{padding:20px 18px;border-radius:11px;border-color:#3a554b;background:#122226}
.breakdown small{font-size:12px;margin-bottom:12px;color:#b0c9bd}
.breakdown strong{font-size:25px;line-height:1.3;font-weight:700;letter-spacing:-.7px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.recipe-meta{font-size:13px;gap:12px 18px}
.recipe-table td{font-size:14px;padding:17px 14px}.recipe-table td:first-child{width:38%}.recipe-table .game-icon{width:36px;height:36px;border-radius:7px}
.source-tag{font-size:12px}.source-tag.npc{padding:4px 8px}.price-age{font-size:12px;margin-top:5px}
.item-history{min-height:44px;border-radius:5px}.item-history:hover{background:transparent}.item-history:hover .item-name{text-underline-offset:4px}
.history-cue{width:18px;height:18px;opacity:.85}#recipeTitle .history-cue{width:23px;height:23px}
#itemView .section-meta{max-width:750px}
.history-content{padding:34px}.history-content h2{font-size:28px;margin:10px 45px 24px 0}
.history-title{display:flex;align-items:center;gap:15px}.history-title .game-icon{width:50px;height:50px}.history-title>span:last-child{min-width:0;overflow-wrap:anywhere}
.history-toolbar{gap:10px;margin-bottom:22px}
.history-ranges{padding:4px;border:1px solid var(--line);border-radius:11px;background:#111e22}
.history-ranges button{min-height:40px;font-size:13px;border-color:transparent}.history-ranges button[aria-pressed=true]{background:#345640;color:#cef6db;border-color:#638970}
.history-toolbar select{font-size:13px}.history-chart{border-radius:12px;padding:10px 0}.history-chart text{font-size:12px;fill:#bdd1d1}.history-grid{stroke:#344d52}
.history-empty{font-size:14px}#historyMessage{font-size:13px;margin:16px 0}.history-legend{font-size:13px;gap:20px}
.history-note{font-size:13px;line-height:1.8;margin-top:20px;max-width:90ch}
.activity-explanation{margin-top:18px;padding:12px 15px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:13px;line-height:1.8}.activity-explanation summary{cursor:pointer;color:#c5dccf}.activity-explanation p{margin:10px 0 0}
.gather-intro{padding:28px 30px;margin-bottom:26px;border-radius:14px;border-color:#577d60;background:linear-gradient(120deg,#294b38,#19262a 85%)}
.gather-intro h2{font-size:28px;margin:13px 0 10px}.gather-intro strong{font-size:24px;color:#bfefce}.gather-intro p{font-size:14px;max-width:820px;color:#b9cfc3}
.gather-explanation{font-size:13px;padding:22px 26px}.gather-explanation summary{cursor:pointer;color:#c9dfd0}.gather-explanation summary:hover{color:var(--accent)}
.gather-source{font-size:13px}.gather-tiers>div{gap:24px;margin-bottom:15px}.gather-tiers .item-icon{width:32px;height:32px;flex-basis:32px}
.gather-fee{font-size:13px}.gather-fee input{width:75px}.gather-fields{grid-template-columns:repeat(3,minmax(0,1fr));margin:22px 0}.gather-fields label{font-size:13px}
#readerDialog{width:min(560px,94vw)}.reader-content{padding:34px}.reader-content h2{font-size:26px;margin:12px 36px 26px 0}
.reader-field,.reader-field select,.reader-content p{font-size:14px}.reader-content p{line-height:1.8;margin:22px 0}.reader-confirm{font-size:13px}
.reader-actions{gap:12px;margin:24px 0 20px}.reader-status{padding:15px;font-size:14px;border-radius:9px}.reader-footnote{font-size:12px;margin-top:20px}
.reader-result{padding:20px}.reader-result>span,.reader-result small{font-size:13px}.scan-status{font-size:12px;max-width:220px}
@media(min-width:851px) and (max-width:1280px){
 :root{--sidebar:224px}.sidebar{padding-left:12px;padding-right:12px}.sidebar nav a{font-size:13px;gap:8px;padding:12px 9px}.brand{font-size:17px;gap:10px;margin-left:10px}
 main{padding:32px 26px 50px}.page-header{align-items:flex-start}.header-actions{flex-wrap:wrap;justify-content:flex-end}.overview-card{padding:22px 20px}.profit-card>svg{width:60px;opacity:.25}th,td{padding-left:16px;padding-right:16px}
}
@media(max-width:850px){
 :root{--sidebar:0px}.sidebar{padding:16px 20px 0;background:#142024f5}.brand{font-size:16px;margin:0 0 16px;gap:10px}.brand-mark{width:31px;height:31px;font-size:20px}
 .brand small{font-size:10px;letter-spacing:2px}.sidebar nav{gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:10px}.sidebar nav a{flex:1 0 auto;font-size:13px;padding:10px 12px;min-height:44px;white-space:nowrap}
 .sidebar nav b{min-width:0;background:transparent;padding:0}.sidebar nav svg{width:17px;height:17px}.sidebar-bottom{right:22px;top:20px;padding:0}#connection{font-size:12px;margin:0}
 main{padding:30px 22px 48px}.page-header{align-items:flex-start}.page-header h1{font-size:32px}.header-actions{flex-wrap:wrap;justify-content:flex-end}
 .plan-overview{gap:12px}.overview-card{min-height:162px;padding:22px 18px}.overview-card>span{font-size:11px}.overview-card>strong{font-size:30px}.profit-card>svg{display:none}
 .table-scroll{max-height:65vh}.section-heading{padding:24px}.breakdown{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 .sidebar{padding:14px 16px 0}.brand{margin-bottom:13px}.sidebar-bottom{right:16px;top:20px}#connection{font-size:11px}
 .sidebar nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding-bottom:12px;overflow:visible}.sidebar nav a{justify-content:flex-start;font-size:12px;gap:7px;padding:9px 8px;white-space:nowrap;min-width:0}
 .sidebar nav a:first-child{grid-column:span 2}.sidebar nav b{display:none}.sidebar nav svg{width:17px}
 main{padding:26px 16px 44px}.page-header{gap:18px;flex-direction:column;margin-bottom:24px}.page-header h1{font-size:30px}.page-description{font-size:14px;margin-top:10px}
 .header-actions{width:100%;flex:auto;justify-content:space-between;align-items:end}.header-actions #export{margin-left:auto}.header-actions .button-secondary{font-size:13px;padding:10px 14px;min-height:44px;height:auto}
 .eyebrow{font-size:10px}.quick-controls label{font-size:12px}.quick-controls select{max-width:190px;font-size:14px}
 .notice{font-size:13px;align-items:start;padding:13px;line-height:1.6}.notice::before{margin-top:2px}
 .plan-overview{grid-template-columns:1fr 1fr;gap:12px;margin-bottom:24px}.overview-card{padding:20px 16px;min-height:146px;border-radius:12px}
 .profit-card{grid-column:1/-1;min-height:160px}.profit-card>svg{display:block;width:90px}.overview-card>span{font-size:10px;letter-spacing:.7px}.overview-card>strong{font-size:27px}.profit-card>strong{font-size:42px}
 .overview-card>small{font-size:12px}.plan-card{grid-column:auto;flex-direction:column;align-items:start;gap:0}.plan-card>strong{margin:17px 0 9px}.plan-rules{margin-top:auto;margin-left:0;gap:5px}.plan-rules span{font-size:10px;padding:3px 6px}
 .section-heading{padding:22px 18px;align-items:start}.section-heading h2{font-size:20px}.section-tag{display:none}.section-meta{font-size:13px}
 .toolbar{padding:18px;gap:12px;flex-wrap:wrap}.search-wrap{max-width:none;flex-basis:100%}.filters{width:100%;gap:8px;flex-wrap:wrap}.filters select{flex:1;min-width:0;max-width:100%;font-size:13px}.search-wrap input{font-size:16px}
 .browser-caption{padding:0 18px 18px;font-size:12px}.results{border-radius:12px}
 /* Labelled cards avoid horizontal scrolling and keep every metric readable. */
 main .table-scroll{max-height:none;overflow:visible}main table,main tbody{display:block;width:100%;min-width:0;white-space:normal}main thead{display:none}
 main tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 12px 12px;padding:18px;border:1px solid #415d53;border-radius:11px;background:#14262a;position:relative}
 main td,main td.numeric{display:block;padding:0;border:0;text-align:left;min-width:0;font-size:15px}
 main .results td:first-child,main .results tbody tr:hover td:first-child{position:static;background:transparent;min-width:0;grid-column:1/-1;padding-bottom:14px;border-bottom:1px solid #3c554c}
 main td[data-label]:not(:first-child)::before{content:attr(data-label);display:block;font-size:11px;line-height:1.5;color:#b4cdc1;margin-bottom:7px}main td[data-label=""]::before{display:none}
 main td small{font-size:12px}main .item-name{font-size:15px}
 #recipeView td:nth-child(4),.recommendations td:last-child{font-size:21px}
 #recipeView td:nth-child(5){grid-column:1/-1}
 #recipeView td:last-child{position:absolute;top:16px;right:12px}#recipeView td:first-child{padding-right:34px}
 body.cloud-mode #itemView th:nth-child(2),body.cloud-mode #itemView td:nth-child(2),body.cloud-mode #itemView th:nth-child(5),body.cloud-mode #itemView td:nth-child(5),body.cloud-mode #itemView th:nth-child(6),body.cloud-mode #itemView td:nth-child(6){display:block}
 body.cloud-mode #itemView td,body.cloud-mode #itemView th{padding:0}body.cloud-mode #itemView td:first-child{min-width:0;padding-bottom:14px}body.cloud-mode #itemView td:nth-child(6),body.cloud-mode #itemView td:nth-child(7):empty{display:none}
 #itemView td:nth-child(7){grid-column:1/-1}.gather-table td:first-child,.gather-table td:nth-child(2),.gather-table td:last-child{grid-column:1/-1}
 .gather-table tr{padding:18px;gap:16px}.gather-table td{padding:0}.gather-table td:first-child::before{display:none}
 .gather-table td:last-child{border-top:1px solid #3c554c;padding-top:14px;font-size:24px;color:#bfefce}.gather-tiers>div{gap:14px}.gather-tiers .item-name{font-size:14px}.gather-tiers>div>span{font-size:14px}
 .gather-intro{padding:24px 20px}.gather-intro h2{font-size:25px}.gather-intro strong{font-size:22px}.gather-explanation{padding:20px;font-size:13px}.gather-fields{grid-template-columns:1fr}#gatherFamily{flex-basis:100%;width:100%}.gather-fee{margin-top:4px}
 #recipeDialog,#historyDialog{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:94dvh;border-radius:14px}.modal-scroll{max-height:93dvh;padding:26px 18px}.history-content{padding:26px 18px}
 .modal-close{right:10px;top:12px}#recipeTitle{font-size:23px;max-width:calc(100% - 40px);margin-bottom:22px}#recipeTitle .game-icon{width:40px;height:40px}#recipeTitle .item-identity{gap:10px}#recipeTitle .history-cue{width:18px}
 .recipe-controls{padding:16px;gap:14px}.recipe-controls .button-secondary{font-size:12px;padding:9px 10px}#recipeQuantityHelp{flex-basis:100%}
 .breakdown{gap:10px}.breakdown>div{padding:16px 13px}.breakdown strong,.history-content .breakdown strong{font-size:22px}.breakdown small{font-size:12px;margin-bottom:9px}.recipe-meta{gap:10px;font-size:12px}.history-note{font-size:13px}
 .recipe-table,.recipe-table tbody{display:block;width:100%;min-width:0}.recipe-table thead{display:none}.recipe-table tr{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 10px;padding:18px 0;border-bottom:1px solid var(--line)}
 .recipe-table td,.recipe-table td:first-child{display:block;width:auto;min-width:0;padding:0;border:0;font-size:14px}.recipe-table td:first-child{grid-column:1/-1}
 .recipe-table td:nth-child(2)::before{content:'Quantity'}.recipe-table td:nth-child(3)::before{content:'Unit price'}.recipe-table td:nth-child(4)::before{content:'Total'}.recipe-table td:nth-child(5)::before{content:'Current listings'}.recipe-table td:nth-child(5){grid-column:1/-1}
 .recipe-table td:not(:first-child)::before{display:block;color:var(--muted);font-size:11px;margin-bottom:6px}.recipe-table td:last-child{grid-column:1/-1}.recipe-table .item-name{font-size:14px}.price-age{white-space:normal;font-size:11px}
 .history-content h2{font-size:24px}.history-title{gap:11px}.history-title .game-icon{width:40px;height:40px}.history-ranges{width:100%;margin-right:0}.history-ranges button{flex:1;padding:8px}.history-toolbar{gap:9px}.history-toolbar select{flex:1 1 calc(50% - 5px);min-width:0;max-width:none;margin-right:0}.history-toolbar .button-secondary{flex:1 1 calc(50% - 5px)}
 .history-chart{min-height:170px}.history-chart svg{min-width:0}.history-chart text{font-size:16px}.history-legend{gap:10px 16px;font-size:12px}.reader-content{padding:28px 20px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;scroll-behavior:auto!important}}
@media(max-width:380px){.sidebar nav svg{display:none}.sidebar nav a{justify-content:center;padding-left:5px;padding-right:5px}.brand small{display:none}.brand{font-size:15px}}
