/* Coast expedition kit: squared charts, brass rules, ocean ink and sailcloth. */
:root{--bg:#dceff4;--panel:#f7f1dd;--panel2:#d2e8ec;--line:#699bab;--text:#173e52;--muted:#406778;--green:#126c86;--teal:#126c86;--orange:#916015}
body{background:#dceff4;color:#173e52}
*,*:before,*:after{border-radius:0!important}
:is(.realm-panel,.modal,.account-card,.study-shell,.hud-panel){border:1px solid #548798!important;border-top:4px solid #d6a953!important;background:#ecf5f5!important;color:#173e52!important;box-shadow:5px 5px 0 #234f6338!important}
:is(.realm-panel-header,.modal-header,.training-overlay .topbar,.account-brand){background:#c6e3ec!important;color:#173e52!important;border-bottom:1px solid #699bab!important}
:is(.realm-panel,.modal,.account-card,.study-shell) :is(h1,h2,h3,h4,strong,.muted,.fine-print,.eyebrow,.step-label,.footer-note,.keyboard-help){color:#173e52}
:is(.realm-panel,.modal,.study-shell,.account-card) p{color:#355a69}
.study-shell{--text:#173e52;--muted:#426a7c;--green:#08667f;--line:#699bab}
.study-shell :is(.panel.statement,.inline-why,.hint-box){background:#fff5d9!important;color:#173e52!important;border-color:#bba772!important;box-shadow:3px 3px 0 #c9c09b!important}
.study-shell :is(.editor,.step-section,.summary-card,.design-debrief){background:#d7edf3!important;color:#173e52!important;border-color:#699bab!important;box-shadow:none!important}
.study-shell :is(.code-option,.why-option,.design-flow li,.reward-stat,.design-followup){background:#f7fbf9!important;color:#173e52!important;border-color:#82a9b6!important;box-shadow:0 3px #9bbcc4!important}
.study-shell :is(.code-option.correct,.why-option.correct){background:#c0e7d8!important}.study-shell .code-option.wrong{background:#f8d7c5!important}
.study-shell :is(.code-line,.editor-bar,.code-placeholder,.statement .description,.inline-why h4){color:#173e52!important}.study-shell .editor-bar{background:#bedce8!important}
.btn,.icon-btn,.world-tool,.dock-item,.back-world,.character-action{border:1px solid #568798!important;border-bottom:3px solid #346278!important;background:#e8f2f1!important;color:#163f55!important;box-shadow:none!important}
.btn.primary,.dock-item.active{background:#137d9a!important;color:#fff9e5!important;border-color:#0b526d!important}
.btn.secondary{background:#f8e4b6!important;color:#513f26!important;border-color:#c59d59!important}
.btn:disabled{opacity:.5}.training-heading h2,.training-overline{color:#173e52!important}
.realm-dock{background:#e5f0e9f2!important;border-top:3px solid #d1a65b!important;gap:3px!important}.dock-item{min-width:0!important;flex:1}.dock-item small{font-size:10px}
.realm-top,.realm-location,.realm-controls{color:#153f54!important}.realm-brand,.resource-token{background:#eaf5f3e8!important;color:#153f54!important}.realm-welcome{color:#fff7db;text-shadow:0 2px #24506d}
.loot-tile,.combat-stats>span,.activity-pair>div,.online-player,.match-row,.compare-stats>div,.duel-message,.treasure-meter,.premium-offer{background:#d5e9ee!important;color:#173e52!important;border:1px solid #73a0af!important;box-shadow:none!important}
.loot-tile{border-top:4px solid var(--gear)!important}.loot-tile.wearing{outline:2px solid #147a93;outline-offset:-3px}
.combat-stats :is(b,small),.loot-tile strong,.loot-heading strong,.duel-message :is(strong,p){color:#173e52!important}
.loot-tile small{color:#375c6d}.treasure-meter small,.duel-kind,.duel-round{color:#375c6d}.loot-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.outfit-stage{position:relative;height:340px;background:linear-gradient(#9fd7ec,#edf6eb 70%,#ead7a6);border:1px solid #6c9dad;margin-bottom:18px}
.outfit-stage .drawer-gear-preview{height:100%!important;min-height:0!important;background:transparent!important}
.outfit-slot{position:absolute;width:78px;min-height:86px;padding:5px;background:#fff4d9e8;color:#173e52;border:1px solid #779ba6;border-top:3px solid #c5a45b;display:grid;justify-items:center;cursor:pointer}
.outfit-slot .gear-sprite{width:44px;height:44px}.outfit-slot small{font-size:10px}.outfit-slot span{font-size:11px}.slot-head{left:8px;top:8px}.slot-weapon{left:8px;bottom:12px}.slot-armor{right:8px;top:8px}.slot-shield{right:8px;bottom:12px}
.reward-coffer{display:grid;place-items:center;margin:20px auto;width:110px;height:90px;border:5px double #88642d;background:#eed292;color:#765325;font-size:58px;box-shadow:8px 8px #12648222}
.chest-odds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}.chest-odds>div{display:grid;gap:4px;padding:10px;background:#fff5d9;border-left:3px solid #d1a65b}.chest-odds small{font-size:10px;color:#426778}.reward-station h3{font-size:28px;margin:10px 0}
.account-card{background:#edf6f5!important}.account-card :is(input,button){border-radius:0!important}.account-subtitle,.account-guest-note{color:#426778!important}
@media(max-width:480px){.realm-dock{padding:4px!important;gap:2px!important}.dock-item{padding:6px 2px!important}.dock-item small{font-size:9px}.outfit-stage{height:310px}.outfit-slot{width:68px}.realm-panel-header{padding:14px}.study-shell .statement h1{font-size:27px}}
@media(prefers-reduced-motion:reduce){.reward-coffer{animation:none}}
/* Beat older component-specific radius rules, including phone navigation. */
body :is(#app,#modal-root,#account-root) *,body :is(#app,#modal-root,#account-root) *:before,body :is(#app,#modal-root,#account-root) *:after{border-radius:0!important}
body .realm-dock{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;flex-wrap:nowrap!important;width:100%;max-width:700px}
body .realm-dock .dock-item{width:auto!important;min-width:0!important;margin:0!important}
body .realm-brand span,body .realm-panel-header span,body .text-button,body .realm-panel a.text-button{color:#24556b!important}
body .account-boot p,body .account-card :is(h1,h2,p,small){color:#24556b!important}
body .realm-panel-header{background-image:linear-gradient(135deg,#d5a559 8px,transparent 8px)!important}
body .realm-panel-header .drawer-emblem{background:#e9d6a5;color:#23576c}
.account-card :is(.account-signup,.account-guest,.account-local-note),.account-card button:not(.btn){color:#24556b}
.study-shell .study-top .meta,.study-shell .editor-bar span,.study-shell .option-key{color:#244f63!important}
.account-card [data-account="guest"]{background:#d5e9ee!important;color:#173e52!important;border:1px solid #568798!important}
.account-card [role="status"]{background:#d5e9ee!important;color:#173e52!important}
@media(max-width:480px){body .realm-dock .dock-item small{font-size:8px}body .realm-dock .dock-item>span{padding:0!important}.realm-panel{bottom:82px!important}}

/* One surface family throughout the app; color and spacing define each group. */
:root{--coast-surface:#edf5f5;--coast-inset:#deedf0;--coast-ink:#1d4355;--coast-secondary:#3d6273;--coast-rule:#c4dadd}
body :is(.realm-panel,.modal,.account-card,.study-shell,.hud-panel){background:var(--coast-surface)!important;border:1px solid var(--coast-surface)!important;box-shadow:0 5px 20px #183e5017!important}
body :is(.realm-panel-header,.modal-header,.training-overlay .topbar,.account-brand){background:var(--coast-surface)!important;border-color:var(--coast-surface)!important;background-image:none!important}
body .realm-panel-header .drawer-emblem{background:var(--coast-inset);color:var(--coast-ink)}
body :is(.quest-choice,.quest-milestones,.notice,.design-locked,.realm-panel .panel,.realm-panel .bot-card,.realm-panel .item-card,.realm-panel .reward-stat,.plan-comparison>div,.cosmetic-card,.ad-offer,.premium-quest-link,.shop-release-banner,.sprint-options button,.profile-gear,.design-context,.lobby-connection){background:var(--coast-inset)!important;border:1px solid var(--coast-inset)!important;color:var(--coast-ink)!important;box-shadow:none!important}
body :is(.quest-choice,.quest-milestones,.notice,.design-locked,.plan-comparison,.cosmetic-card,.ad-offer,.premium-quest-link,.sprint-options,.profile-gear,.lobby-connection) :is(h3,h4,strong,b,p,small,span){color:var(--coast-ink)}
body :is(.quest-choice p,.milestone-row small,.design-filter,.design-format,.drawer-stats,.shop-disclosure,.shop-beta-note,.shop-section-heading span,.shop-benefits,.realm-brand small){color:var(--coast-secondary)!important}
body .milestone-row{border-color:var(--coast-rule)}
body :is(.quest-tracks button,.pill,.design-filter select,.archive-filter select){background:var(--coast-inset)!important;color:var(--coast-ink)!important;border:1px solid var(--coast-inset)!important}
body :is(.quest-tracks button[aria-pressed=true],.pill.active){background:#176f87!important;color:#fff!important;border-color:#176f87!important}
body .quest-choice .problem-icon{background:#c9e1e6!important;color:#22576d!important}
body .difficulty{background:#eaf3ee!important;color:#285d4e!important;border-color:transparent!important}
body .difficulty.medium{background:#f3e7cc!important;color:#6b501c!important}body .difficulty.hard{background:#f0dcda!important;color:#7a3a39!important}
body .quest-choice:hover{background:#cfe5eb!important;border-color:#cfe5eb!important;box-shadow:none!important}
body :is(.btn,.icon-btn,.world-tool,.dock-item,.back-world,.character-action){border-width:1px!important;border-color:transparent!important;box-shadow:none!important}
body .realm-dock{background:var(--coast-surface)!important;border:1px solid var(--coast-surface)!important;box-shadow:0 4px 16px #183e5017!important}
body :is(.loot-tile,.combat-stats>span,.activity-pair>div,.online-player,.match-row,.compare-stats>div,.duel-message,.treasure-meter,.premium-offer){background:var(--coast-inset)!important;border:1px solid var(--coast-inset)!important;box-shadow:none!important}
body .loot-tile{border-top-width:1px!important}
body .hud-panel .treasure-meter{background:transparent!important;border:0!important;padding:0;margin:0 0 20px}
body .treasure-meter .between{flex-wrap:wrap;gap:6px 12px}body .treasure-meter small{line-height:1.65}
body .treasure-meter progress{background:#c4dadd}body .treasure-meter progress::-webkit-progress-bar{background:#c4dadd}body .treasure-meter progress::-webkit-progress-value{background:#28859b}body .treasure-meter progress::-moz-progress-bar{background:#28859b}
body .progress{background:#c4dadd;border:0!important}body .progress>span{background:#28859b!important}
body .study-shell :is(.panel.statement,.inline-why,.hint-box){border-color:#fff5d9!important;box-shadow:none!important}
body .study-shell :is(.editor,.step-section,.summary-card,.design-debrief){border-color:#d7edf3!important}
body .study-shell :is(.code-option,.why-option,.design-flow li,.reward-stat,.design-followup){border-width:1px!important;border-color:#f7fbf9!important;box-shadow:none!important}
body .study-shell .editor-bar{background:#d7edf3!important;border-color:#d7edf3!important}
body .outfit-slot{border:1px solid #fff4d9!important}body .outfit-stage{border-color:transparent}
body .chest-odds>div{border:1px solid #fff5d9}
body .reward-coffer{border:1px solid #eed292;box-shadow:none}
/* Focus and equipped/selected indicators remain distinct for keyboard navigation. */
body :is(button,a,select,input):focus-visible{outline:3px solid #176f87!important;outline-offset:2px}
body :is(.library-scope button,.release-card,.archive-heading,.shop-tier,.shop-kicker b){background:var(--coast-inset)!important;color:var(--coast-ink)!important;border:1px solid var(--coast-inset)!important;box-shadow:none!important}
body .library-scope button[aria-pressed=true]{background:#176f87!important;color:#fff!important;border-color:#176f87!important}
body :is(.release-card small,.archive-intro small,.language-picker,.language-picker small,.shop-kicker,.premium-offer .shop-kicker,.shop-price,.shop-price small,.premium-offer ul,.premium-offer li){color:var(--coast-ink)!important}
body .language-picker select{background:var(--coast-inset)!important;color:var(--coast-ink)!important;border-color:var(--coast-inset)!important}
body .realm-panel .pills{background:transparent;border-color:transparent;padding:0;gap:5px}
body .realm-location{background:var(--coast-surface)!important;border-color:var(--coast-surface)!important;box-shadow:none!important}
body :is(.realm-location,.realm-player,.realm-mini) :is(small,strong,span){color:var(--coast-secondary)!important}
body .mini-controls button{background:var(--coast-inset);color:var(--coast-ink);border:0}
body .study-shell :is(.xp-breakdown,.design-followup,.design-flow li){background:var(--coast-inset)!important;color:var(--coast-ink)!important;border-color:var(--coast-inset)!important}

/* Floating navigation pebbles: the dock alone has soft edges. */
body #app .realm-dock{background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;padding:4px!important;gap:9px!important}
body #app .realm-dock .dock-item{height:64px;border:0!important;border-radius:20px!important;background:#edf5f5!important;box-shadow:0 4px 10px #183e5026!important;transition:transform .18s ease,background .18s ease,box-shadow .18s ease;transform:none}
body #app .realm-dock .dock-item.active{background:#176f87!important;color:#fff!important;animation:coast-dock-select .3s ease-out}
body #app .realm-dock .dock-item.active:after{display:none}
body #app .realm-dock .dock-item .icon{width:25px;height:25px}
body #app .realm-dock .dock-badge{border-radius:7px!important}
@media(hover:hover){body #app .realm-dock .dock-item:hover{transform:translateY(-5px);box-shadow:0 8px 15px #183e502b!important}}
body #app .realm-dock .dock-item:active{transform:translateY(2px) scale(.95);box-shadow:0 1px 3px #183e5026!important}
@keyframes coast-dock-select{0%{transform:scale(.92)}65%{transform:translateY(-3px) scale(1.04)}100%{transform:none}}
/* Let the logo and status symbols sit directly on the landscape. */
body #app :is(.realm-brand,.realm-resources .resource-token,.realm-resources .world-tool,.realm-world-tools .world-tool){background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}
body #app .realm-brand{filter:none;text-shadow:0 1px 2px #f3f8e8}
body #app .realm-brand img{width:50px;height:50px;box-shadow:none}
body #app .realm-resources .resource-token{padding:5px 6px;gap:5px;text-shadow:0 1px 2px #f3f8e8}
body #app .realm-resources .resource-token .icon{width:25px;height:25px}
body #app .realm-resources .player-profile{width:52px;height:52px;flex-basis:52px;padding:2px}
body #app .realm-resources .player-profile .avatar{width:46px;height:46px;background:none}
body #app .realm-world-tools .world-tool{width:44px;height:44px}
body #app .realm-world-tools .world-tool .icon{width:27px;height:27px;filter:drop-shadow(0 1px 1px #f3f8e8)}
@media(max-width:760px){body #app .realm-brand img{width:38px;height:38px}body #app .realm-resources{gap:3px}body #app .realm-resources .resource-token{padding:3px 2px;gap:3px}body #app .realm-resources .resource-token .icon{width:21px;height:21px}body #app .realm-resources .player-profile{width:46px;height:46px;flex-basis:46px}body #app .realm-resources .player-profile .avatar{width:40px;height:40px}body #app .realm-dock{gap:5px!important;padding:3px!important}body #app .realm-dock .dock-item{height:56px;border-radius:15px!important}body #app .realm-dock .dock-item .icon{width:23px;height:23px}}
@media(max-width:350px){body #app .realm-dock{gap:4px!important}body #app .realm-dock .dock-item{border-radius:12px!important}body #app .realm-brand>span{font-size:16px}body #app .realm-brand img{width:35px;height:35px}body #app .realm-resources .resource-token .icon{width:18px;height:18px}}
@media(prefers-reduced-motion:reduce){body #app .realm-dock .dock-item{animation:none!important;transition:none!important;transform:none!important}}

/* A little treasure ledger, with the adventurer seal at its curved end. */
body #app .realm-brand>span{font-size:34px;line-height:1.1;white-space:nowrap;letter-spacing:-.8px}
body #app .realm-resources{gap:12px;padding:6px 8px 6px 12px;background:linear-gradient(115deg,#fff0c6 0%,#e9f6ed 48%,#bce7f1 100%)!important;border:0!important;border-radius:12px 36px 36px 12px!important;box-shadow:0 3px 9px #1e526324!important;backdrop-filter:none;animation:treasure-arrive .4s ease-out}
body #app .resource-values{display:grid;gap:2px;min-width:102px}
body #app .realm-resources .resource-token{min-height:24px;padding:0;gap:6px;text-shadow:none;white-space:nowrap;color:#244d60!important}
body #app .realm-resources .resource-token b{font-size:16px;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:-.3px}
body #app .realm-resources .resource-token small{display:inline;font-size:10px;font-weight:800;color:#426475;line-height:1;margin-left:auto}
body #app .resource-symbol{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;border-radius:50%!important;background:#ffce57;color:#80500b;box-shadow:inset 0 -2px 0 #e4a826}
body #app .green .resource-symbol{background:#80d8ef;color:#135777;box-shadow:inset 0 -2px 0 #4bb8dc}
body #app .realm-resources .resource-symbol .icon{width:17px;height:17px}
body #app .realm-resources .player-profile{width:52px;height:52px;flex-basis:52px;padding:2px;transition:transform .18s ease}
body #app .realm-resources .player-profile:active{transform:scale(.92)}
body #app .realm-resources .player-profile .avatar{width:46px;height:46px}
body #app .resource-changed .resource-symbol{animation:treasure-pop .5s ease-out}
body #app .resource-changed b{animation:treasure-count .5s ease-out}
@keyframes treasure-arrive{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:none}}
@keyframes treasure-pop{0%,100%{transform:none}40%{transform:translateY(-3px) rotate(-12deg) scale(1.14)}70%{transform:rotate(7deg)}}
@keyframes treasure-count{0%,100%{transform:none}40%{transform:translateY(-2px);color:#087d9a}}
@media(max-width:760px){body #app .realm-brand>span{font-size:24px}body #app .realm-resources{gap:7px;padding:5px 6px 5px 8px}body #app .resource-values{min-width:88px;gap:2px}body #app .realm-resources .resource-token{min-height:21px;gap:5px}body #app .realm-resources .resource-token b{font-size:13px}body #app .realm-resources .resource-token small{font-size:9px}body #app .resource-symbol{width:21px;height:21px;flex-basis:21px}body #app .realm-resources .resource-symbol .icon{width:15px;height:15px}body #app .realm-resources .player-profile{width:44px;height:44px;flex-basis:44px}body #app .realm-resources .player-profile .avatar{width:40px;height:40px}}
@media(max-width:350px){body #app .realm-brand>span{font-size:21px}body #app .realm-resources{gap:5px;padding-left:6px}body #app .resource-values{min-width:78px}body #app .realm-resources .resource-token{gap:4px}body #app .realm-resources .resource-token b{font-size:12px}body #app .realm-resources .resource-token small{font-size:8px}body #app .realm-resources .player-profile{width:40px;height:44px;flex-basis:40px}body #app .realm-resources .player-profile .avatar{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){body #app .realm-resources,body #app .realm-resources *{animation:none!important;transition:none!important}}

/* Chest reward card, shared by the map, academy and Rewards. */
body #app .tidal-meter{display:grid;grid-template-columns:minmax(100px,140px) minmax(0,1fr);align-items:center;gap:8px 14px;padding:16px;background:#e4f1ef!important;border:0!important;position:relative}
body #app .tidal-art{display:block;min-width:0;line-height:0;color:inherit;touch-action:manipulation}
body #app .tidal-chest{display:block;width:100%;height:auto;overflow:visible}
body #app .tidal-copy{min-width:0}
body #app .tidal-kicker{display:block;font-size:9px;letter-spacing:1.7px;font-weight:900;color:#327d8e}
body #app .tidal-title{display:block;font:700 19px/1.15 'Baloo 2',Nunito,sans-serif;color:#214f62;margin:5px 0 9px}
body #app .tidal-count{display:flex;align-items:center;gap:7px;color:#1c546a;white-space:nowrap;font-variant-numeric:tabular-nums}
body #app .tidal-count>b{font:700 35px/1 'Baloo 2',Nunito,sans-serif;letter-spacing:-1px}
body #app .tidal-count>span{font-size:13px;font-weight:800;line-height:1.1}
body #app .tidal-count small{display:block;margin-top:3px;font-size:9px;line-height:1.2;font-weight:700;letter-spacing:.2px;color:#52727b}
body #app .tidal-remaining{font-size:11px;line-height:1.4;color:#496d78;margin:8px 0 10px}
body #app .tidal-ready{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:6px 8px;background:#f7df9d;color:#765313;font-size:11px;font-weight:900;line-height:1.35;text-decoration:none}
body #app a.tidal-ready{transition:background .15s ease,transform .15s ease}
body #app a.tidal-ready:active{transform:scale(.97)}
body #app .tidal-ready.is-empty{padding:0;background:none;color:#52727b;font-size:10px}
body #app .tidal-rules{grid-column:1/-1;border-top:1px solid #c8dddb;margin-top:5px;padding-top:9px;text-align:left;color:#476d78}
body #app .tidal-rules summary{cursor:pointer;font-size:11px;font-weight:800;min-height:28px;align-content:center;list-style-position:inside}
body #app .tidal-rules p{font-size:11px;line-height:1.6;margin:8px 0 0;color:#496d78}
body #app .tidal-rates{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:9px}
body #app .tidal-rates span{font-size:10px;text-align:center;background:#d3e9e7;padding:7px 2px;color:#3c6975}
body #app .tidal-rates b{display:block;font-size:14px;color:#176b81}
body #app .chest-lid{transform-box:fill-box;transform-origin:15% 90%}
body #app .chest-sparks{transform-box:fill-box;transform-origin:center}
@media(hover:hover) and (prefers-reduced-motion:no-preference){body #app a.tidal-art:hover .chest-lid{animation:chest-peek .65s ease-out}body #app a.tidal-art:hover .chest-sparks{animation:chest-shimmer .65s ease-out}body #app a.tidal-ready:hover{background:#f9d47c;transform:translateY(-2px)}}
body #app a.tidal-art:focus-visible .chest-lid{animation:chest-peek .65s ease-out}
@keyframes chest-peek{0%,100%{transform:none}40%{transform:translateY(-4px) rotate(-4deg)}70%{transform:translateY(-2px) rotate(-2deg)}}
@keyframes chest-shimmer{0%,100%{opacity:1;transform:none}45%{opacity:.55;transform:scale(1.08)}}
body #app .realm-quest .tidal-meter{grid-template-columns:1fr;gap:0;padding:0!important;background:none!important;margin-bottom:12px}
body #app .realm-quest .tidal-art{width:176px;max-width:100%;margin:-10px auto -4px}
body #app .realm-quest .tidal-copy{text-align:center}
body #app .realm-quest .tidal-title{font-size:19px;margin-bottom:6px}
body #app .realm-quest .tidal-count{justify-content:center}
body #app .realm-quest .tidal-remaining{margin:5px 0 9px}
body #app .realm-quest .tidal-rules{margin-top:13px}
body #app .reward-station .tidal-meter{grid-template-columns:1fr;text-align:center;gap:0;background:linear-gradient(160deg,#eef7ef,#deeff1)!important}
body #app .reward-station .tidal-art{width:180px;max-width:100%;margin:-5px auto 3px}
body #app .reward-station :is(.tidal-title,.tidal-kicker){display:none}
body #app .reward-station .tidal-intro{font-size:13px;line-height:1.5;margin:8px 0 12px}
body #app .reward-station .tidal-count{justify-content:center}
body #app .reward-station .tidal-rules{margin-top:15px}
@media(max-width:380px){body #app .tidal-meter{grid-template-columns:94px minmax(0,1fr);gap:8px;padding:12px}body #app .tidal-title{font-size:17px}body #app .tidal-count>b{font-size:30px}body #app .tidal-count>span{font-size:12px}body #app .tidal-ready{font-size:10px;padding:5px}body #app .tidal-kicker{font-size:8px;letter-spacing:1.1px}}
@media(max-width:760px){body #app .reward-station .tidal-art{width:154px}}
@media(min-width:761px) and (max-height:780px){body #app .realm-quest .tidal-art{width:128px}body #app .realm-quest .tidal-rules{display:none}}
@media(prefers-reduced-motion:reduce){body #app .tidal-meter *{animation:none!important;transition:none!important}}

/* Floating enchanted chest and a shifting rainbow inside the actual earned fill. */
body #app .tidal-art{position:relative;isolation:isolate}
body #app .tidal-art:before{content:"";position:absolute;inset:4% -5% 0;z-index:-1;background:radial-gradient(ellipse closest-side at 32% 43%,#b99cffb3,transparent),radial-gradient(ellipse closest-side at 67% 52%,#62dcf6c0,transparent),radial-gradient(ellipse closest-side at 50% 72%,#fbc5e5a1,transparent);animation:enchanted-aura 5s ease-in-out infinite}
body #app .chest-body{transform-box:fill-box;transform-origin:50% 80%;animation:enchanted-float 3.6s ease-in-out infinite}
body #app .chest-sparks{animation:enchanted-sparks 4.8s ease-in-out infinite}
body #app .chest-xp-track{height:15px;margin-top:12px;background:#c7dce4;overflow:hidden;border-radius:4px!important;box-shadow:inset 0 2px 2px #2339691a}
body #app .chest-xp-fill{height:100%;position:relative;overflow:hidden;border-radius:4px!important;isolation:isolate}
body #app .chest-rainbow{position:absolute;inset:0 auto 0 0;width:200%;background:linear-gradient(90deg,#ff8faa 0%,#ffd777 8%,#a9e98c 16%,#65dcf0 25%,#aa92ee 36%,#ff8faa 50%,#ffd777 58%,#a9e98c 66%,#65dcf0 75%,#aa92ee 86%,#ff8faa 100%);animation:enchanted-rainbow 7s linear infinite}
body #app .chest-bar-shine{position:absolute;inset:0 auto 0 -45%;width:40%;background:linear-gradient(110deg,transparent,#ffffffb3,transparent);animation:enchanted-sweep 4.2s ease-in-out infinite}
body #app .chest-bar-glitter{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;white-space:nowrap;color:#fff;font:900 12px/1 Nunito;letter-spacing:8px;animation:enchanted-glitter 3s ease-in-out infinite}
body #app .tidal-meter:not(.chest-in-view) *,body #app .tidal-meter:not(.chest-in-view) .tidal-art:before,
html.chest-motion-paused body #app .tidal-meter *,html.chest-motion-paused body #app .tidal-art:before{animation-play-state:paused!important}
body #app [inert] .tidal-meter *,body #app [inert] .tidal-art:before{animation-play-state:paused!important}
/* Low mode keeps the requested chest movement and color shift, with static aura and no glitter layers. */
html[data-graphics=low] body #app .tidal-art:before{animation:none}
html[data-graphics=low] body #app .chest-sparks{animation:none}
html[data-graphics=low] body #app :is(.chest-bar-glitter,.chest-bar-shine){display:none}
@keyframes enchanted-float{0%,100%{transform:translateY(2px) rotate(-2deg)}50%{transform:translateY(-6px) rotate(2deg)}}
@keyframes enchanted-aura{0%,100%{opacity:.6;transform:scale(.91)}50%{opacity:1;transform:scale(1.06)}}
@keyframes enchanted-sparks{0%,100%{opacity:.5;transform:translateY(2px) scale(.95)}50%{opacity:1;transform:translateY(-4px) scale(1.04)}}
@keyframes enchanted-rainbow{to{transform:translateX(-50%)}}
@keyframes enchanted-sweep{0%,30%{transform:translateX(0)}85%,100%{transform:translateX(370%)}}
@keyframes enchanted-glitter{0%,100%{opacity:.45;transform:translateX(-3px)}50%{opacity:.95;transform:translateX(3px)}}
@media(prefers-reduced-motion:reduce){body #app .tidal-art:before,body #app .tidal-meter *{animation:none!important;transition:none!important}}

/* Official arena: compact scorecards and a readable global ladder. */
body #app .ranked-intro h3{font-size:27px;margin:8px 0}
body #app .ranked-ratings{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}
body #app .ranked-ratings article{display:grid;gap:4px;background:#d9ecf1;padding:14px 10px;min-width:0}
body #app .ranked-ratings article:nth-child(2){background:#e6e4f5}
body #app .ranked-ratings article>span{font-size:12px;font-weight:900}
body #app .ranked-ratings strong{font:700 32px/1.1 'Baloo 2',Nunito,sans-serif}
body #app .ranked-ratings small{font-size:10px;line-height:1.5;color:#456576}
body #app .arena-entry{display:grid;gap:7px;padding:13px;background:#f5e8bf;margin-bottom:14px}
body #app .arena-entry small{font-size:11px;line-height:1.5;color:#66593b}
body #app .arena-here{background:#d6ede2;padding:10px;color:#266552;font-weight:800}
body #app .arena-opponent{padding:12px;background:#dfedf0;margin:9px 0}
body #app .arena-player{display:flex;align-items:center;gap:10px;width:100%;background:none;border:0;padding:0;text-align:left;color:inherit}
body #app .arena-player>svg{width:40px;height:40px;flex:0 0 40px}
body #app .arena-player span{min-width:0;display:grid;gap:3px;overflow-wrap:anywhere}
body #app .arena-player small{font-size:11px;color:#456576}
body #app .arena-opponent .summary-actions{margin-top:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px}
body #app .global-ladder{margin-top:24px}
body #app .ladder-self{padding:10px;background:#d6e9ed;font-size:12px;margin:12px 0}
body #app .ladder-list{list-style:none;margin:0;padding:0}
body #app .ladder-list li{display:grid;grid-template-columns:30px 32px minmax(0,1fr) auto;gap:7px;align-items:center;padding:12px 0;border-bottom:1px solid #ccdee3;font-size:12px}
body #app .ladder-list li.is-self{background:#d2e9e8}
body #app .ladder-list svg{width:32px;height:32px}
body #app .ladder-list span{display:grid;gap:3px;overflow-wrap:anywhere;min-width:0}
body #app .ladder-list small{font-size:10px;color:#456576;line-height:1.4}
body #app .arena-rules,body #app .arena-connection{margin:18px 0;font-size:12px;line-height:1.6}
body #app .arena-rules summary,body #app .arena-connection summary{cursor:pointer;font-weight:900;min-height:30px}
body .ranked-result{display:grid;gap:6px;background:#d5eaf0;color:#20576e;padding:16px;margin-top:14px}
body .ranked-result span{font-size:20px;font-weight:900}
body #app .match-row small{color:#406775}
body #app .realm-world-tools .settings-launch{height:58px;display:flex;flex-direction:column;gap:2px;justify-content:center}
body #app .settings-launch small{display:block;font-size:10px;font-weight:900;color:#244e61;text-shadow:0 1px 2px #f3f8e8}
body .game-settings section{padding:4px 0 18px;margin-bottom:15px;border-bottom:1px solid #c7dde2}
body .game-settings h3{font-size:20px;margin:3px 0 12px}
body .settings-toggle,body .volume-control>span{display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:800;font-size:14px;color:#24556b}
body .settings-toggle input{width:21px;height:21px;accent-color:#197b94}
body .volume-control{display:block;margin:18px 0}
body .volume-control output{font-size:12px;color:#427080;font-variant-numeric:tabular-nums}
body .volume-control input[type=range]{width:100%;padding:0;margin:8px 0 0;height:32px;accent-color:#17829f;cursor:pointer}
body .settings-music{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#dfeaf0;padding:12px}
body .settings-music span{font-weight:900;min-width:0;font-size:13px}
body .settings-music small{display:block;font-weight:600;font-size:10px;line-height:1.5;margin-top:5px}
body .settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:13px 10px;margin:5px 0;background:#dcebf0;color:#214d62;border:0;text-align:left;font-size:13px;line-height:1.4}
body .settings-row strong{font-size:12px;flex-shrink:0}
body .settings-account{display:grid;gap:6px;padding:12px;background:#e4edf1;overflow-wrap:anywhere;margin-bottom:12px;font-size:13px}
body .settings-account small{font-size:11px;color:#416777;line-height:1.5}
body .settings-credits{font-size:11px;line-height:1.65}
body .settings-credits summary{cursor:pointer;font-weight:800;padding:8px 0}
body .settings-credits a{color:#176c89;text-decoration:underline}
body .title-picker{margin:22px 0}
body .title-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
body .title-options button{display:grid;gap:6px;text-align:left;padding:12px;background:#dcebf0;color:#24556b;border:1px solid transparent;font-size:12px}
body .title-options button[aria-pressed=true]{background:#176f87;color:#fff;border-color:#176f87}
body .title-options small{font-size:10px;line-height:1.4}
body .title-options button:disabled{opacity:.65;cursor:not-allowed}
body .equipped-player-title{display:block;font-size:9px;line-height:1.4;letter-spacing:.3px;color:#d4eff7;font-weight:700}
body .profile-title{font-weight:900;color:#276f85}

/* Shared close controls: animate only the glyph, keeping the tap target steady. */
body :is(#app,#modal-root,#account-root) .close-control,
body .cl-modalCloseButton{min-width:44px;min-height:44px;flex-shrink:0;touch-action:manipulation;background:transparent!important;border-color:transparent!important;box-shadow:none!important;transition:background-color .16s ease}
body :is(#app,#modal-root,#account-root) .close-control svg,
body .cl-modalCloseButton svg{width:25px;height:25px;flex-shrink:0;color:#c63342!important;transform-origin:center;animation:close-glyph-arrive .32s ease-out both;transition:transform .18s ease,color .18s ease}
body :is(#app,#modal-root,#account-root) .close-control .icon{stroke-width:2.8;stroke-linecap:round}
body :is(#app,#modal-root,#account-root) .close-control:focus-visible,
body .cl-modalCloseButton:focus-visible{outline:2px solid #b52b3b!important;outline-offset:3px;background:#ffe7e8!important}
@media(hover:hover){
 body :is(#app,#modal-root,#account-root) .close-control:hover,
 body .cl-modalCloseButton:hover{background:#ffe7e8!important}
 body :is(#app,#modal-root,#account-root) .close-control:hover svg,
 body .cl-modalCloseButton:hover svg{color:#a91e31!important;transform:rotate(90deg) scale(1.12)}
}
body :is(#app,#modal-root,#account-root) .close-control:active svg,
body .cl-modalCloseButton:active svg{transform:rotate(90deg) scale(.82);color:#a91e31!important}
@keyframes close-glyph-arrive{from{opacity:0;rotate:-55deg;scale:.65}to{opacity:1;rotate:0deg;scale:1}}
@media(prefers-reduced-motion:reduce){
 body :is(#app,#modal-root,#account-root) .close-control,
 body .cl-modalCloseButton,
 body :is(#app,#modal-root,#account-root) .close-control svg,
 body .cl-modalCloseButton svg{animation:none!important;transition:none!important;transform:none!important}
}
