*{box-sizing:border-box}body{margin:0;background:#152943;color:#fff7df;font:600 16px "Yuanti TC","PingFang TC","Microsoft JhengHei",sans-serif}button,input{font:inherit}button{cursor:pointer;min-height:44px;border-radius:10px;padding:7px 14px;border:1px solid #82b9e8;font-weight:800;transition:filter .15s,transform .15s}button:hover{filter:brightness(1.13)}button:active{transform:translateY(1px)}:focus-visible{outline:3px solid #fff;outline-offset:3px}.shell{max-width:1120px;margin:auto;min-height:100dvh;background:#754e43;box-shadow:0 0 60px #07152480}.top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 20px;background:linear-gradient(#366a9b,#20456e);border-bottom:2px solid #80bee5}.brand{font-size:25px;color:#fff0ac;font-weight:900;text-shadow:0 2px #513418}.top nav,.stats{display:flex;gap:8px;flex-wrap:wrap}.top nav button{min-height:36px;padding:4px 10px}.stats{background:#193f60;padding:8px 20px;justify-content:space-between}.stats span,.est{border-radius:18px;background:#102d4ecc;padding:7px 14px;color:#fff1a6}.blue{color:white;background:linear-gradient(#599bd0,#285b96);box-shadow:inset 0 1px #a4dbff,0 2px 3px #181e3660}.gold,.buy{color:#683811;background:linear-gradient(#fff39e,#ffc556 64%,#ffdc79);border-color:#ffdf82;box-shadow:inset 0 0 0 2px #fff1af70,0 3px 4px #3920147f}.gold{border-radius:22px;padding-inline:24px}.harbor,.welcome{background:#379ace url(/harbor.webp) center center/cover no-repeat;position:relative}.harbor{min-height:310px;padding:22px 20px 54px}.bulletin{max-width:490px;background:#123854e8;border:1px solid #8ddbf0;border-radius:12px;padding:12px 16px;box-shadow:inset 0 0 0 3px #8cd6f32c}.bulletin h2{color:#ffbc79;margin:0 0 6px}.bulletin p{font-size:14px;margin:4px 0 10px;line-height:1.45}.bulletin button{min-height:38px}.est{position:absolute;bottom:9px;right:20px}.deck{padding:10px 20px 22px;background:repeating-linear-gradient(91deg,#ffffff00 0 13px,#fff4d306 14px 16px),linear-gradient(105deg,#8e5f4e,#69453d 60%,#815a4c);border-top:5px ridge #ad806b}.sectionbar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0 10px;color:#fff0d7}.sectionbar h2{margin:0;font-size:21px}.rack,.warehouse{background:#493138;border:5px ridge #a4745f;border-radius:12px;box-shadow:inset 0 3px 12px #261623;padding:12px}.rack{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.commodity{min-width:0;text-align:center;color:#824613;background:linear-gradient(#ffed86 0 34px,#fff4cf 34px,#fff9e9);border:2px solid #f5d072;border-radius:12px;padding:6px;box-shadow:0 4px 5px #291822}.commodity h3{margin:1px 0 6px;font-size:20px}.art{position:relative;background:radial-gradient(ellipse at 50% 27%,#ffe5a1,#e9a049);border:2px solid #f3cc73;border-radius:10px;margin:0 auto;width:min(100%,96px);aspect-ratio:1;display:grid;place-items:center}.item-icon{display:inline-grid;place-items:center;width:72px;height:72px}.item-icon svg{width:100%;height:100%;filter:drop-shadow(0 3px 1px #6c37183e)}.change{position:absolute;top:0;right:-5px;color:white;background:#716045;border-radius:6px;padding:1px 5px;font-size:12px;font-weight:900}.up{background:#24863f}.down{background:#bd3344}.price{display:block;font-size:22px;margin:3px 0}.price small{font-size:12px}.buy{width:100%;min-height:39px}.warehouse{min-height:77px}.empty{text-align:center;color:#efd0af}.holding,.log{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px;border-bottom:1px solid #ffffff30}.holding .item-icon{width:42px;height:42px}.holding div{flex:1}.holding small,.log small{display:block;color:#c3ddf1}.actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:15px}.welcome{text-align:center;min-height:590px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:30px;background-image:linear-gradient(#12395f26,#12395fc0),url(/harbor.webp);text-shadow:0 2px 5px #203154}.welcome h1{font-size:clamp(42px,8vw,82px);color:#ffe79c;margin:0;line-height:1.15}.welcome p{margin:14px 0 23px}.welcome .kicker{padding:5px 14px;border:1px solid #b0d8fc;border-radius:5px;background:#215280}.welcome button{text-shadow:none}dialog{width:min(590px,calc(100% - 22px));max-height:90dvh;padding:0;background:#173957;color:white;border:2px solid #93c5ec;border-radius:16px;box-shadow:0 14px 50px #041b38cf}dialog::backdrop{background:#05172aab}dialog header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(#376f9f,#245683);padding:8px 16px;z-index:2}dialog h2{margin:0;font-size:22px}#panel-body{padding:16px;line-height:1.55}.mode-list{display:grid;gap:10px}.newsentry{padding:14px;background:#225272;border-radius:10px;margin-bottom:12px}.newsentry h3,.goods-tag{color:#ffe39a}.newsentry h3{margin:3px 0}.update{padding:8px 12px;background:#163851;border-radius:8px}.order{text-align:center}.step{display:flex;justify-content:center;align-items:center;gap:6px}.step input{max-width:80px;min-height:44px;text-align:center;border-radius:8px;border:0}.order strong{display:block;font-size:24px;color:#ffdf83;margin:10px}.log strong{color:#ffe59a}#toast:not(:empty){position:fixed;bottom:15px;left:50%;transform:translateX(-50%);z-index:4;background:#132e4a;color:#fff1b9;padding:9px 16px;border-radius:20px;white-space:nowrap}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
@media(max-width:600px){.top{padding:7px;gap:4px}.brand{font-size:18px}.top nav{gap:4px}.top nav button{padding-inline:6px;font-size:12px}.stats{padding:6px;gap:4px;font-size:13px}.stats span{padding:6px 8px}.harbor{padding:12px 9px 45px;min-height:240px;background-position:64% center}.bulletin{width:min(410px,80%);background:#143b56dc;padding:9px 10px}.bulletin p{font-size:13px}.bulletin h2{font-size:18px}.deck{padding:8px}.rack{display:flex;overflow-x:auto;scroll-snap-type:x proximity;padding:8px;gap:8px}.commodity{flex:0 0 103px;scroll-snap-align:start}.commodity h3{font-size:18px}.sectionbar h2{font-size:17px}.sectionbar small{font-size:10px}.warehouse{padding:5px}.welcome{min-height:74dvh}.est{font-size:13px}}
.item-name{color:inherit;background:none;border:0;padding:0 3px;min-height:25px;font-size:inherit}.item-name:hover{text-decoration:underline}.chart{display:block;width:100%;background:#112f4d;border:1px solid #7da9ca;border-radius:10px;margin-bottom:12px}.chart+details{padding:4px}
.edition+.edition{border-top:1px solid #b1d8f377;margin-top:10px;padding-top:10px}.edition h2{color:#ffbd78;font-size:18px}.edition:nth-of-type(2) h2{color:#a8ecff}.headline strong{color:#ffe18c;display:block;font-size:17px;margin:4px 0}.headline p{color:#f3f9ff;font-weight:500;line-height:1.55}.edition p{margin-top:3px}.newsentry .edition{margin-top:8px}#rank-name{width:100%;padding:10px;border:1px solid #88c1ee;border-radius:8px;background:#fff8dc;color:#38241c}

/* Keep news and trading labels readable at both screen sizes. */
body{font-size:18px}
.brand{font-size:28px}
.bulletin p{font-size:16px}
.edition h2{font-size:21px}
.headline strong{font-size:20px}
.change{font-size:14px}
.price{font-size:25px}
.price small{font-size:14px}
.commodity h3{font-size:23px}
.sectionbar h2{font-size:24px}
.sectionbar small{font-size:15px}
dialog h2{font-size:25px}
@media(max-width:600px){
 .brand{font-size:21px}
 .top nav button{font-size:14px}
 .stats,.est{font-size:15px}
 .bulletin p{font-size:16px}
 .bulletin h2,.edition h2{font-size:21px}
 .commodity h3{font-size:21px}
 .sectionbar h2{font-size:20px}
 .sectionbar small{font-size:12px;text-align:right}
 .commodity{flex-basis:113px}
 .sectionbar h2{flex-shrink:0}
}
.market-context{display:block;color:#794612;font-size:13px;font-weight:800;line-height:1.4;margin:-3px 0 5px}

/* Responsive trading layout: retain large type and full monetary amounts. */
html{-webkit-text-size-adjust:100%;scroll-padding-bottom:100px}
.shell{width:100%;min-width:0}
.top{flex-wrap:wrap}.top .brand{white-space:nowrap}
.top nav button,.buy,.item-name{min-height:44px}
.stats span{max-width:100%;overflow-wrap:anywhere}
.rack{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.commodity{display:flex;flex-direction:column;align-items:stretch}
.commodity .art{flex-shrink:0}.commodity .buy{margin-top:auto}
.price{overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.holding>div,.log>*{min-width:0;overflow-wrap:anywhere}
.holding .item-icon,.holding>button{flex-shrink:0}
.sectionbar{flex-wrap:wrap}.sectionbar>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.welcome>*{max-width:100%}.result h1{font-size:clamp(32px,6vw,68px);overflow-wrap:anywhere}
dialog{overscroll-behavior:contain;max-height:calc(100dvh - 24px);max-width:calc(100% - 16px)}
dialog header{gap:12px}dialog h2{min-width:0;overflow-wrap:anywhere}dialog header button{flex-shrink:0;min-width:44px}
#panel-body{overflow-wrap:anywhere}#panel-body>button{margin:4px}
.step{flex-wrap:wrap}.step input{min-width:0;font-size:18px}.step button{min-width:44px}
.log{flex-wrap:wrap}.log>strong,.log>span:last-child{text-align:right;margin-left:auto}
.order strong{overflow-wrap:anywhere}
#toast:not(:empty){white-space:normal;max-width:calc(100vw - 24px);width:max-content;text-align:center;bottom:calc(84px + env(safe-area-inset-bottom))}
@media(min-width:601px) and (max-width:900px){
 .rack{grid-template-columns:repeat(3,minmax(0,1fr))}
 .bulletin{max-width:560px}
}
@media(max-width:900px){
 .deck>.actions{position:sticky;bottom:0;z-index:3;display:grid;grid-template-columns:1fr 1.4fr;gap:10px;margin:14px -8px -8px;padding:10px 8px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(#624037f5,#493138);border-top:1px solid #bf9070;box-shadow:0 -4px 14px #2d1e3440}
 .deck>.actions button{padding:10px 8px;min-height:48px}
}
@media(max-width:600px){
 .top{padding:8px 10px}.top nav{margin-left:auto}
 .top nav button{font-size:14px;padding:6px 8px}
 .bulletin{width:100%;max-width:none;padding:12px;background:#143b56ed}
 .harbor{padding:60px 10px 50px;background-position:65% top}
 .headline p{line-height:1.7}.headline+.headline{margin-top:14px}
 .rack{display:flex;gap:10px;scroll-padding-inline:10px;overscroll-behavior-x:contain;scrollbar-color:#d5ad7d #493138;padding:10px}
 .commodity{flex:0 0 clamp(148px,40vw,180px)}
 .commodity .art{width:100px}.price{font-size:24px}
 .sectionbar{align-items:center}.sectionbar>small{max-width:60%}
 .holding{gap:8px;padding:10px 4px}.holding small{font-size:14px;line-height:1.5}
 .holding>button{padding:8px 12px}
 .welcome{padding:24px 16px}.welcome .actions{width:100%}.welcome .actions>button{flex:1 1 140px}
 dialog header{padding:10px 12px}dialog h2{font-size:22px}#panel-body{padding:14px}
 .log>span:last-child{flex-basis:100%}
 .est{right:10px;left:10px;width:fit-content;max-width:calc(100% - 20px);margin-left:auto;overflow-wrap:anywhere}
}
@media(max-width:359px){
 .top .brand{font-size:20px}.top nav{gap:3px}.top nav button{padding-inline:5px}
 .stats{font-size:14px}.stats span{padding-inline:6px}
 .sectionbar>small{max-width:100%;text-align:left}
 .deck>.actions{font-size:16px}
}
@media(prefers-reduced-motion:reduce){button{transition:none}button:active{transform:none}}
