:root{--shell-bg:#101112;--shell-surface:#1a1c1e;--shell-raised:#252b2c;--shell-line:#303537;--shell-text:#efefed;--shell-muted:#929792;--shell-accent:#b3ed43;color-scheme:dark}
:root[data-shell-theme=light]{--shell-bg:#f3f4f0;--shell-surface:#fff;--shell-raised:#f4f6f0;--shell-line:#dfe3da;--shell-text:#242821;--shell-muted:#70766c;color-scheme:light}
html[data-shell-theme] body{background:var(--shell-bg)!important;color:var(--shell-text)!important;font-family:system-ui,'Microsoft YaHei',sans-serif}
html[data-shell-theme] :is(button,input,select){font-family:inherit}
html[data-shell-theme] :is(button,a,input,select,summary):focus-visible{outline:2px solid var(--shell-accent)!important;outline-offset:3px}
html[data-shell-theme] button:disabled{cursor:not-allowed;opacity:.5}
/* Legacy play controls and visible modal layer. */
html[data-shell-theme][data-pixel-skin] body dialog[open]{display:block!important;background:var(--shell-surface)!important;background-image:none!important;color:var(--shell-text)!important;border:1px solid var(--shell-line)!important;border-image:none!important;border-radius:16px!important;padding:24px!important;box-shadow:0 24px 100px #0008!important;max-width:min(800px,92vw)!important;max-height:85dvh!important;overflow:auto!important}
html[data-shell-theme][data-pixel-skin] body dialog::backdrop{background:#000a!important}
html[data-shell-theme][data-pixel-skin][data-pixel-skin][data-pixel-skin] body button:is(.selected,[aria-selected=true],[aria-pressed=true]){background:var(--shell-accent)!important;color:#172008!important;border-color:var(--shell-accent)!important}
html[data-shell-theme][data-pixel-skin] body dialog :is(h2,h3,p,label,small,summary){color:var(--shell-text)!important}
/* Market sits below the main station navigation. */
html[data-shell-theme] body.cryptocanvas{--bg:var(--shell-bg);--surface:var(--shell-surface);--line:var(--shell-line);--text:var(--shell-text);--muted:var(--shell-muted);--accent:var(--shell-accent);padding:0;overflow:hidden}
html[data-shell-theme] .cryptocanvas .app-shell{display:flex!important;flex-direction:column!important;height:100dvh;min-height:0;background:var(--shell-bg)!important;border-radius:0;padding:0}
html[data-shell-theme] .cryptocanvas .nav-rail{padding:0 0 12px!important;background:transparent!important;border:0!important;gap:0!important;flex:none}
html[data-shell-theme] .cryptocanvas .nav-rail .logo-mark{display:none}
html[data-shell-theme] .cryptocanvas .nav-rail nav{display:flex!important;gap:7px;overflow-x:auto}
html[data-shell-theme] .cryptocanvas .nav-rail nav a{white-space:nowrap;padding:9px 13px!important;border:1px solid var(--shell-line);background:var(--shell-raised);color:var(--shell-text);border-radius:9px}
html[data-shell-theme] .cryptocanvas .nav-rail nav a[aria-current]{color:var(--shell-accent);border-color:var(--shell-accent);background:var(--shell-surface)!important}
html[data-shell-theme] .cryptocanvas .app-body{min-height:0;flex:1;overflow:hidden}
html[data-shell-theme] .cryptocanvas .app-top{min-height:0!important;padding:0 2px 10px!important;border:0!important;flex:none}
html[data-shell-theme] .cryptocanvas .app-top>div:first-child{display:none}
html[data-shell-theme] .cryptocanvas .board{padding:0!important;min-height:0;overflow:auto;align-items:start}
html[data-shell-theme] .cryptocanvas .board :is(.wallet,.chart-card,.positions-card,.event-card,.trade-card,.stock-section,.replay-panel,#order-history),html[data-shell-theme] .cryptocanvas .collection-board{background:var(--shell-surface)!important;border:1px solid var(--shell-line)!important;color:var(--shell-text)!important}
html[data-shell-theme] .cryptocanvas :is(button,input,select,.trade-stock,.stock-group,.trade-quote-panel,.trade-direction){background:var(--shell-raised)!important;color:var(--shell-text)!important;border-color:var(--shell-line)!important}
html[data-shell-theme] .cryptocanvas button:is([aria-pressed=true],[type=submit]){background:var(--shell-accent)!important;color:#172008!important}
html[data-shell-theme] .cryptocanvas .chart-frame{background:var(--shell-bg)!important}
html[data-shell-theme] .cryptocanvas .collection-board{overflow:auto}
/* Gallery chrome follows the station; original card artwork remains untouched. */
html[data-shell-theme] .album{display:flex;flex-direction:column;margin:0;padding:0;gap:12px;max-width:none;height:100dvh;min-height:0}
html[data-shell-theme] .album>aside{padding:0;flex:none}
html[data-shell-theme] .album .brand{display:none}
html[data-shell-theme] #categories{display:flex;gap:8px;overflow-x:auto}
html[data-shell-theme] #categories button{background:var(--shell-raised);color:var(--shell-text);box-shadow:none;border:1px solid var(--shell-line);border-radius:9px;padding:10px 14px;flex:none;font-size:12px}
html[data-shell-theme] #categories button[aria-pressed=true]{border-color:var(--shell-accent);color:var(--shell-accent);background:var(--shell-surface)}
html[data-shell-theme] #categories .category-icon{font-size:18px}
html[data-shell-theme] .album>main{background:var(--shell-surface);border:1px solid var(--shell-line);border-radius:14px;box-shadow:none;padding:16px 20px;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
html[data-shell-theme] .album header{flex:none;padding-bottom:10px}
html[data-shell-theme] .album h1{font-size:20px}
html[data-shell-theme] .album .eyebrow{color:var(--shell-accent)}
html[data-shell-theme] .album .teams{flex:none;padding:10px 0;max-height:86px;overflow:auto}
html[data-shell-theme] .album .teams button{background:var(--shell-raised);color:var(--shell-text);border-color:var(--shell-line)}
html[data-shell-theme] .album .teams button[aria-pressed=true]{background:var(--shell-accent);border-color:var(--shell-accent);color:#172008}
html[data-shell-theme] .album :is(#summary,.caption small,.rarity-guide){color:var(--shell-muted)}
html[data-shell-theme] .album .rarity-guide{padding-bottom:10px;flex:none}
html[data-shell-theme] .album #cards{flex:1;min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:start;overflow:hidden}
html[data-shell-theme] .album .entry{display:flex;flex-direction:column;align-items:center;height:100%;min-height:0}
html[data-shell-theme] .album .entry>.card{flex:none;max-height:calc(100dvh - 250px);width:auto;max-width:100%;height:calc(100dvh - 250px);aspect-ratio:.716}
html[data-shell-theme] .album .caption{width:100%;flex:none;margin-top:10px}
html[data-shell-theme] .card-pages{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:12px;flex:none}
html[data-shell-theme] .card-pages button{background:var(--shell-raised);color:var(--shell-text);border:1px solid var(--shell-line);border-radius:8px;padding:8px 14px}
html[data-shell-theme] .card-pages span{font-size:12px;color:var(--shell-muted)}
@media(max-width:850px){html[data-shell-theme] .album #cards{grid-template-columns:repeat(2,minmax(0,1fr))}html[data-shell-theme] .cryptocanvas .board{grid-template-columns:1fr}}

html[data-shell-theme] .cryptocanvas .board{overflow:hidden!important;align-items:stretch!important;flex:1;height:0}
html[data-shell-theme] .cryptocanvas :is(.primary,.trade-column){min-height:0;overflow:auto;padding-right:3px}
html[data-shell-theme] .cryptocanvas .chart-card{flex:none}
html[data-shell-theme] .cryptocanvas .chart-frame{height:clamp(180px,32vh,320px)!important}
html[data-shell-theme] .cryptocanvas .chart-frame canvas{height:100%!important;max-height:100%}
html[data-shell-theme] .album .brand{display:none!important}
html[data-shell-theme] .album #cards{grid-template-rows:minmax(0,1fr)}
html[data-shell-theme] .album .entry{display:grid;grid-template-rows:minmax(0,1fr) 36px;justify-items:center;gap:6px}
html[data-shell-theme] .album .entry>.card{height:100%;width:auto;max-height:100%;max-width:100%;min-height:0;align-self:start}
html[data-shell-theme] .album .caption{height:36px;margin:0;align-self:center}
html[data-shell-theme] .cryptocanvas .board{overflow:hidden;grid-template-rows:minmax(0,1fr)}
html[data-shell-theme] .cryptocanvas :is(.primary,.trade-column){height:100%;min-height:0;overflow:auto;padding-right:4px}
html[data-shell-theme] .cryptocanvas .chart-frame{height:clamp(170px,34vh,300px);min-height:0}
html[data-shell-theme] .cryptocanvas .chart-frame canvas{height:100%!important;max-height:100%!important}

/* Market navigation and trading workspace. */
html[data-shell-theme] .cryptocanvas .nav-rail nav a{border-radius:0!important}
html[data-shell-theme] .cryptocanvas:is([data-page=overview],[data-page=trade]) .primary{
  display:grid;grid-template-columns:minmax(0,2fr) minmax(270px,1fr);
  grid-auto-rows:min-content;align-content:start;align-items:start;gap:12px
}
html[data-shell-theme] .cryptocanvas .primary>.account-row{grid-column:1/-1}
html[data-shell-theme] .cryptocanvas .primary>.chart-card{grid-column:1;min-width:0}
html[data-shell-theme] .cryptocanvas .primary>#trade-panel{grid-column:2;min-width:0}
html[data-shell-theme] .cryptocanvas .chart-frame{height:clamp(170px,27vh,260px)!important}
@media(max-width:1100px){
  html[data-shell-theme] .cryptocanvas .board{grid-template-columns:minmax(0,1fr) minmax(220px,25%)}
  html[data-shell-theme] .cryptocanvas:is([data-page=overview],[data-page=trade]) .primary{grid-template-columns:minmax(0,1fr) 270px}
}
@media(max-width:850px){
  html[data-shell-theme] .cryptocanvas .board{grid-template-columns:1fr}
  html[data-shell-theme] .cryptocanvas .trade-column{height:auto}
}
@media(max-width:620px){
  html[data-shell-theme] .cryptocanvas:is([data-page=overview],[data-page=trade]) .primary{grid-template-columns:1fr}
  html[data-shell-theme] .cryptocanvas .primary>#trade-panel{grid-column:1}
}

html[data-shell-theme] .cryptocanvas .nav-rail nav{border-radius:0!important}
html[data-shell-theme] .cryptocanvas .nav-rail{border-radius:0!important}

html[data-shell-theme] .cryptocanvas .app-shell{max-width:none!important;width:100%!important;margin:0!important}
html[data-shell-theme] .cryptocanvas .market-heading{display:grid;grid-template-columns:minmax(270px,1fr) minmax(0,3fr);gap:24px;align-items:center;padding-bottom:16px;flex:none}
html[data-shell-theme] .cryptocanvas .market-intro h1{margin:6px 0;font-size:25px}
html[data-shell-theme] .cryptocanvas .market-intro>small{color:var(--shell-accent);font-size:10px;letter-spacing:2px}
html[data-shell-theme] .cryptocanvas .market-intro p{font-size:12px;color:var(--shell-muted);margin:5px 0 10px}
html[data-shell-theme] .cryptocanvas .market-heading .account-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
html[data-shell-theme] .cryptocanvas .market-heading .wallet{position:relative;background:var(--shell-surface);border:1px solid var(--shell-line);padding:14px 12px 12px 54px;border-radius:10px;min-width:0}
html[data-shell-theme] .cryptocanvas .market-heading .wallet strong{display:block;color:var(--shell-accent);font-size:clamp(20px,2vw,32px)}
html[data-shell-theme] .cryptocanvas .market-heading .wallet small,html[data-shell-theme] .cryptocanvas .market-heading .wallet p{font-size:11px;color:var(--shell-muted)}
@media(max-width:850px){html[data-shell-theme] .cryptocanvas .market-heading{grid-template-columns:1fr;gap:12px}}

/* Fill the station's available width and height. */
html[data-shell-theme] .cryptocanvas .board{width:100%!important;max-width:none!important;margin:0!important}
@media(min-width:851px){
  html[data-shell-theme] .cryptocanvas:is([data-page=overview],[data-page=trade]) .board{grid-template-columns:minmax(0,2fr) minmax(300px,1fr)}
  html[data-shell-theme] .cryptocanvas:is([data-page=overview],[data-page=trade]) .primary{
    grid-template-columns:minmax(0,3fr) minmax(270px,1fr);grid-template-rows:minmax(0,1fr);align-content:stretch;align-items:stretch
  }
  html[data-shell-theme] .cryptocanvas .primary>.chart-card{height:100%;display:flex;flex-direction:column;overflow:hidden}
  html[data-shell-theme] .cryptocanvas .primary>.chart-card .chart-frame{height:auto!important;flex:1;min-height:220px}
  html[data-shell-theme] .cryptocanvas .chart-card>details{flex:none}
  html[data-shell-theme] .cryptocanvas .chart-card .tape-scroll{max-height:160px}
  html[data-shell-theme] .cryptocanvas .primary>#trade-panel{height:100%;overflow:auto}
  html[data-shell-theme] .cryptocanvas[data-page=overview] .trade-column{display:grid;grid-template-rows:minmax(250px,.44fr) minmax(0,.56fr);gap:12px;overflow:hidden}
  html[data-shell-theme] .cryptocanvas[data-page=overview] .trade-column>section{height:100%;min-height:0;overflow:auto}
  html[data-shell-theme] .cryptocanvas[data-page=overview] #stock-cards{display:grid;height:calc(100% - 35px);grid-template-rows:repeat(6,minmax(32px,1fr))}
}
@media(min-width:851px){
  html[data-shell-theme] .cryptocanvas[data-page=overview] .trade-column{grid-template-rows:calc((100% - 12px)*.44) calc((100% - 12px)*.56)}
  html[data-shell-theme] .cryptocanvas[data-page=overview] #stock-cards{height:calc(100% - 44px);grid-template-rows:repeat(6,minmax(0,1fr))}
  html[data-shell-theme] .cryptocanvas[data-page=overview] #stock-cards .stock-tile{min-height:0;padding:3px}
}
/* Restore only the aquarium interior; keep the surrounding workspace restrained. */
html[data-shell-theme] #petAquarium .tank-scene{background:#075a76 url('/assets/catshop/aquarium.webp') center bottom/cover no-repeat!important}
html[data-shell-theme] #petAquarium .tank-scene[data-collected-tank]:not([data-collected-tank='']){background-image:var(--collected-tank)!important}
html[data-shell-theme] #petAquarium .fish-wardrobe summary{background:var(--shell-raised)!important;border:1px solid var(--shell-line)!important;color:var(--shell-text)!important;border-radius:8px!important}
html[data-shell-theme] #petAquarium .fish-wardrobe .pet-select{background:var(--shell-surface)!important;color:var(--shell-text)!important;border:1px solid var(--shell-line)!important;box-shadow:0 12px 30px #0006!important;border-radius:10px!important}
html[data-shell-theme] #petAquarium .fish-wardrobe :is(select,option){background:var(--shell-raised)!important;color:var(--shell-text)!important;border-color:var(--shell-line)!important}
/* Equal coin/dice columns, without hiding either game. */
html[data-shell-theme] #panel-games>.desk-subtabs{display:none!important}
html[data-shell-theme] #panel-games .gamecards{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;align-items:stretch!important}
html[data-shell-theme] #panel-games .game{display:flex!important;flex-direction:column!important;gap:8px!important;padding:15px!important;min-width:0!important;overflow:hidden}
html[data-shell-theme] #panel-games .game>*{margin:0!important;min-width:0}
html[data-shell-theme] #panel-games .game .gamevisual{height:clamp(75px,16vh,145px)!important;min-height:0!important;flex:none!important;width:100%;display:grid!important;place-items:center}
html[data-shell-theme] #panel-games .game .throw-stage{width:100%!important;height:100%!important;min-height:0!important;gap:5px!important}
html[data-shell-theme] #panel-games .game h3{font-size:16px!important;line-height:1.4}.game p{line-height:1.5}
html[data-shell-theme] #panel-games .game :is(p,label){font-size:11px!important}
html[data-shell-theme] #panel-games .game .result{margin-top:auto!important;padding:8px!important;min-height:34px}
html[data-shell-theme] #panel-games .game .tabs{display:flex!important;gap:5px!important;border:0!important;background:transparent!important;padding:0!important}
html[data-shell-theme] #panel-games .game .tabs button{flex:1;white-space:nowrap;padding:6px!important}
/* Replace inherited cream/plum skins throughout controls, rewards and settings. */
html[data-shell-theme][data-pixel-skin][data-pixel-skin][data-pixel-skin] body :is(.pet-select,.scene-wardrobe-item,.gacha-batch-item,.prize-presentation,.batch-heading,.gacha-batch-result,.gacha-reward,.inventory-row,.collection-benefits,.collection-result,.fish-food-shop,.fish-care,.reminder-config-card,.reminder-options,.dialog-tabs,.title-frame,.skin-choice,.skin-preview){background-color:var(--shell-surface)!important;color:var(--shell-text)!important;border-color:var(--shell-line)!important;box-shadow:none!important;border-image:none!important}
html[data-shell-theme][data-pixel-skin][data-pixel-skin][data-pixel-skin] body :is(.gacha-batch-item,.scene-wardrobe-item,.skin-choice){border:1px solid var(--shell-line)!important;border-radius:10px!important;padding:12px!important}
html[data-shell-theme][data-pixel-skin][data-pixel-skin][data-pixel-skin] body :is(.gacha-batch-item,.scene-wardrobe-item,.prize-presentation,.inventory-row,.fish-care,.skin-choice) :is(h3,h4,b,small,p,label){color:var(--shell-text)!important}
html[data-shell-theme][data-pixel-skin][data-pixel-skin][data-pixel-skin] body :is(.gacha-batch-item.rare,.prize-presentation.rare){border-color:#9e8ddc!important}
html[data-shell-theme][data-pixel-skin][data-pixel-skin][data-pixel-skin] body :is(.gacha-batch-item.legendary,.prize-presentation.legendary){border-color:#c6ae61!important}
html[data-shell-theme] #gachaBatchResult{padding:16px!important}html[data-shell-theme] #gachaBatchResult .gacha-batch-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:10px!important}
html[data-shell-theme] #remindersDialog .dialog-tabs{display:none!important}
@media(max-width:600px){html[data-shell-theme] #panel-games .gamecards{grid-template-columns:1fr!important}html[data-shell-theme] #gachaBatchResult .gacha-batch-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-height:720px){html[data-shell-theme] #panel-games .game .gamevisual{height:75px!important}html[data-shell-theme] #panel-games .game .gamevisual canvas{max-height:65px!important;width:auto!important}html[data-shell-theme] #panel-games .game{gap:5px!important;padding:10px!important}}

html[data-shell-theme] #panel-gacha:has(#gachaBatchResult:not([data-desk-page-hidden])) .gacha-batch-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}html[data-shell-theme] #gachaBatchResult .gacha-batch-item{min-height:125px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}html[data-shell-theme] #gachaBatchResult .gacha-batch-item>div{min-height:48px;display:grid;place-items:center}html[data-shell-theme] #gachaBatchResult .gacha-batch-item small{font-size:11px!important}

/* Collection surfaces and title previews follow the station palette. */
html[data-shell-theme] #collectionInventory .inventory-card{background:var(--shell-surface)!important;background-image:none!important;color:var(--shell-text)!important;border:1px solid var(--shell-line)!important;box-shadow:none!important;border-image:none!important}
html[data-shell-theme] #collectionInventory .inventory-art{background:var(--shell-raised)!important;background-image:none!important;border:1px solid var(--shell-line)!important;box-shadow:none!important}
html[data-shell-theme] #collectionInventory .inventory-copy :is(h4,p){color:var(--shell-text)!important}
html[data-shell-theme] #collectionInventory .inventory-copy small{color:var(--shell-muted)!important}
html[data-shell-theme] #panel-gacha .title-frame{background:var(--shell-raised)!important;background-image:none!important;color:var(--shell-text)!important;border:1px solid var(--shell-line)!important;box-shadow:none!important;text-shadow:none!important}
html[data-shell-theme] #collectionBenefits>div>span{display:inline-block;background:var(--shell-raised)!important;color:var(--shell-text)!important;border:1px solid var(--shell-line)!important;padding:7px 10px;border-radius:8px}
html[data-shell-theme] #collectionBenefits :is(b,small){color:var(--shell-text)!important}
html[data-shell-theme] #panel-gacha .collection-heading-mini{color:var(--shell-text)!important}
html[data-shell-theme] #panel-gacha .gacha-return{order:99;display:flex;justify-content:center;padding:18px 0 8px;margin:0}
html[data-shell-theme] #panel-gacha .gacha-return .gacha-back-button{background:var(--shell-accent)!important;color:#172008!important;border:1px solid var(--shell-accent)!important;min-width:220px;padding:12px 24px!important;font-size:14px!important;font-weight:600}
html[data-shell-theme] #panel-gacha #gachaMachine{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important}
html[data-shell-theme] #panel-gacha #gachaMachine::before,html[data-shell-theme] #panel-gacha #gachaMachine::after{display:none!important}
html[data-shell-theme] #panel-gacha #gachaMachine canvas{background:transparent!important;border:0!important;box-shadow:none!important}

html[data-shell-theme] #gachaBatchResult .gacha-batch-item{animation:none!important;opacity:1!important;transform:none!important}
