/* Shared purple identity; scenes retain their artwork and independent progress. */
body,body[data-app-mode],body.clean-dashboard-on,body.clean-dashboard-on[data-app-mode]{--bg:#f8f6fc;--p:#ffffff;--ink:#30233e;--muted:#665873;--line:#e8e1ef;--b:#713bbb;--g:#713bbb;--income:#146443;--r:#b63846;--shadow:0 8px 28px #39204d08;background-color:var(--bg);color:var(--ink)}
body.dark,body.dark[data-app-mode],body.dark.clean-dashboard-on,body.dark.clean-dashboard-on[data-app-mode]{--bg:#18131f;--p:#241c2e;--ink:#f3edf8;--muted:#c3b4d1;--line:#43334f;--b:#c9a8f0;--g:#c9a8f0;--income:#a3d6b9;--r:#f3a3ab;--shadow:0 8px 28px #00000018}
body .main{padding-inline:clamp(16px,3vw,44px)}body .main>.view,body .main>.top,#defaultDashboard,#transactions{max-width:1160px;margin-inline:auto}
body .main .top{gap:16px;flex-wrap:wrap}body .main h1{font-size:clamp(24px,2.5vw,30px);font-weight:700;letter-spacing:-.7px}body .main h2{font-weight:650;letter-spacing:-.25px}
body .side,body.clean-dashboard-on .side{background:var(--p);color:var(--ink);border-color:var(--line);box-shadow:none}body .side nav button,body.clean-dashboard-on .side nav button{color:var(--muted);border:1px solid transparent;border-radius:12px}body .side nav button.on,body .side nav button:hover,body.clean-dashboard-on .side nav button.on,body.clean-dashboard-on .side nav button:hover{background:color-mix(in srgb,var(--b) 9%,var(--p));color:var(--ink);border-color:var(--line);box-shadow:none}body .side nav button.on{font-weight:700}body .host-sidebar-identity,body .side .free{background:var(--bg);border-color:var(--line);color:var(--muted)}body .host-sidebar-identity strong,body .side .free b{color:var(--ink)}body .host-sidebar-identity small,body .host-sidebar-identity b,body .host-sidebar-identity b::before{color:var(--muted)}body .host-sidebar-identity span{color:var(--b)}body .logo{background:color-mix(in srgb,var(--b) 12%,var(--p));border:1px solid var(--line)}
body .main .btn.primary,body .modal .btn.primary,body .host-modal .btn.primary{background:var(--b);border-color:var(--b);color:#ffffff}body.dark .main .btn.primary,body.dark .modal .btn.primary,body.dark .host-modal .btn.primary{color:#241c2e}
body .btn:focus-visible,body summary:focus-visible,body select:focus-visible,body input:focus-visible{outline:3px solid var(--b);outline-offset:3px}body input[type=checkbox],body input[type=radio]{accent-color:var(--b)}
body .main :is(.report-tab,.settings-tab,.scope-chip,.category-filter-chip,[data-goal-filter]):is(.on,.active,[aria-selected="true"],[aria-pressed="true"]){color:var(--ink)!important;background:color-mix(in srgb,var(--b) 8%,var(--p))!important;border-color:var(--b);box-shadow:inset 0 -3px 0 var(--b)}
body .main .panel,body .main .account,body .main .goal-card{border-radius:18px;border-color:var(--line)}
body.clean-dashboard-on .top>.actions{display:flex!important;gap:8px;flex-wrap:wrap}body.clean-dashboard-on .top>.actions .add,body.clean-dashboard-on .top>.actions .transferAdd{display:inline-flex!important;align-items:center;justify-content:center}body.clean-dashboard-on .top>.actions> :not(.add):not(.transferAdd):not(#theme){display:none!important}
body .clean-card{padding:24px;border-radius:20px;box-shadow:var(--shadow)}body #defaultDashboard{gap:20px}body .clean-balance{background:linear-gradient(120deg,color-mix(in srgb,var(--b) 8%,var(--p)),var(--p) 70%);position:relative;overflow:hidden}body .clean-balance-value{font-weight:700;letter-spacing:-1.3px;margin-top:20px}body .clean-totals{gap:32px}body .clean-totals div{padding-right:24px;border-right:1px solid var(--line)}body .clean-insight{font-size:13px;color:var(--muted)}body .clean-insight strong{color:var(--ink)}body .clean-card-head h2{font-size:17px}body .clean-link{color:var(--b);font-weight:600;white-space:normal}body .clean-controls select,body .clean-card select{border-radius:12px}
body .clean-account-balances li{background:var(--p);border-radius:14px;border-left:3px solid color-mix(in srgb,var(--b) 50%,var(--line));align-items:flex-start;flex-direction:column;gap:10px;box-shadow:0 3px 12px #39204d04}body .clean-account-balances b{font-size:14px}body .clean-account-balances strong{max-width:100%;text-align:left;font-size:21px;line-height:1.4}body .clean-account-balances small{font-size:12px}body .clean-row-icon{background:color-mix(in srgb,var(--b) 9%,var(--p));color:var(--b)}body .clean-row-amount.positive b{color:var(--income)}body .clean-game{background:linear-gradient(115deg,color-mix(in srgb,var(--b) 7%,var(--p)),var(--p));border-radius:18px}body .clean-game-icon{background:color-mix(in srgb,var(--b) 12%,var(--p));color:var(--b)}body .clean-track span{background:var(--b)}
body .search-filter-dialog header{background:linear-gradient(120deg,color-mix(in srgb,var(--b) 12%,var(--p)),var(--p))}body .search-filter-dialog footer .btn.primary{background:var(--b);border-color:var(--b);color:#ffffff}body.dark .search-filter-dialog footer .btn.primary{color:#241c2e}
body .modal .dialog,body .host-modal .host-dialog{background:var(--p);color:var(--ink);border-color:var(--line);border-radius:22px;box-shadow:0 24px 80px #17092733}body .modal .dialog:has(>.dialog-content)>h2,body .modal .dialog>.head{margin:0;padding:22px 24px;background:linear-gradient(120deg,color-mix(in srgb,var(--b) 9%,var(--p)),var(--p));border-bottom:1px solid var(--line);font-size:20px}body .modal .dialog-content{padding:24px;min-height:0}body .modal .dialog>.actions,body .modal .dialog>.confirm-actions{margin:0;padding:18px 24px;border-top:1px solid var(--line);background:color-mix(in srgb,var(--b) 3%,var(--p));gap:12px}body .modal .dialog label{color:var(--ink);font-size:13px;font-weight:600}body .modal .dialog label :is(input,select),body .modal .dialog small{font-weight:400}body .modal .dialog :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-color:var(--line);background:var(--p);color:var(--ink);border-radius:12px;font-size:16px}body .modal .dual-currency-card,body .modal .recurring-choice{border-color:var(--line);background:color-mix(in srgb,var(--b) 3%,var(--p));border-radius:14px}body .modal .currency-preview,body #currencyAccountPreview{color:var(--ink);border-color:var(--line);background:color-mix(in srgb,var(--b) 7%,var(--p));border-radius:12px}
.purple-type-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--bg);grid-column:1/-1;min-width:0}.purple-type-label{grid-column:1/-1;font-size:13px;font-weight:600;padding:2px 4px 4px;color:var(--ink)}body .modal .purple-type-button{color:var(--ink);background:var(--p);border-color:var(--line);min-width:0;padding:10px 8px}body .modal .purple-type-button[aria-pressed="true"]{color:var(--ink);background:color-mix(in srgb,var(--b) 12%,var(--p));border-color:var(--b);box-shadow:inset 0 -3px 0 var(--b);font-weight:700}.purple-native-type{display:none!important}
@media(max-width:680px){body .main,body.clean-dashboard-on .main{padding:22px 16px 110px}body .main .top{display:flex;align-items:flex-start;margin-bottom:20px}body .main .top .actions{width:100%;display:flex;flex-wrap:wrap}body .main .top .actions .add{flex:1}body .clean-card{padding:20px;border-radius:18px}body .clean-account-balances li{flex-direction:row;align-items:center;gap:12px;padding:14px}body .clean-account-balances strong{max-width:55%;text-align:right;font-size:18px}body .clean-totals{gap:16px;flex-wrap:wrap}body .clean-totals div{padding-right:16px}body .clean-balance .clean-card-head{flex-wrap:wrap}body .clean-activity li{align-items:flex-start}body .clean-row-amount{max-width:42%}body .modal .dialog:has(>.dialog-content)>h2,body .modal .dialog>.head{padding:18px 20px;font-size:19px}body .modal .dialog-content{padding:20px}body .modal .dialog>.actions{padding:16px 20px max(16px,env(safe-area-inset-bottom))}
/* Same table controls and cells, presented as cards at phone widths. */
#transactions .panel .tablewrap{overflow:visible}#transactions .panel .tablewrap>table{display:block;min-width:0;width:100%;border:0}#transactions .panel .tablewrap>table thead{display:block;margin-bottom:12px}#transactions .panel .tablewrap>table thead tr{display:block}#transactions .panel .tablewrap>table thead th{display:none}#transactions .panel .tablewrap>table thead th:first-child{display:flex;align-items:center;gap:10px;width:auto;padding:8px;border:0;border-radius:10px;color:var(--ink);font-size:12px;text-transform:none}#transactions .panel .tablewrap>table thead th:first-child::after{content:"Select this page"}#transactions .panel .tablewrap>table tbody{display:grid;gap:12px}#transactions .panel .tablewrap>table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 12px;position:relative;padding:16px;background:var(--p);border:1px solid var(--line);border-radius:16px}#transactions .panel .tablewrap>table tbody tr.selected-row{border-color:var(--b);background:color-mix(in srgb,var(--b) 6%,var(--p))}#transactions .panel .tablewrap>table tbody td{display:block;width:auto;min-width:0;max-width:none;border:0;padding:0;text-align:left;white-space:normal;overflow-wrap:anywhere}#transactions .panel .tablewrap>table tbody td:first-child{position:absolute;top:14px;right:14px;width:26px;text-align:right;padding:0}#transactions .panel .tablewrap>table tbody td:nth-child(2){grid-column:1/-1;grid-row:1;color:var(--muted);font-size:12px;padding-right:36px;white-space:normal}#transactions .panel .tablewrap>table tbody td:nth-child(3){grid-column:1;grid-row:2;font-size:15px;font-weight:650;min-width:0;max-width:none}#transactions .panel .tablewrap>table tbody td:nth-child(4){grid-column:1/-1;grid-row:5;color:var(--muted);font-size:12px;min-width:0;max-width:none}#transactions .panel .tablewrap>table tbody td:nth-child(4)::before{content:attr(data-label) ": ";font-weight:600}#transactions .panel .tablewrap>table tbody td:nth-child(5){grid-column:1;grid-row:3;min-width:0;max-width:none;font-size:12px}#transactions .panel .tablewrap>table tbody td:nth-child(6){grid-column:1;grid-row:4;min-width:0;max-width:none;font-size:12px;color:var(--muted)}#transactions .panel .tablewrap>table tbody td:nth-child(7){grid-column:2;grid-row:4;text-align:right;align-self:center}#transactions .panel .tablewrap>table tbody td:nth-child(8){grid-column:2;grid-row:2 / span 2;min-width:0;white-space:normal;text-align:right;font-size:16px}#transactions .panel .tablewrap>table tbody td:nth-child(9){grid-column:1/-1;grid-row:6;display:flex;justify-content:flex-end;gap:8px;padding-top:10px;border-top:1px solid var(--line);min-width:0;white-space:normal;text-align:right}#transactions .panel .tablewrap>table tbody td:nth-child(9) .btn{flex:1;max-width:150px;min-height:44px}#transactions .panel .tablewrap>table tbody .amount-original{font-size:11px;white-space:normal;overflow-wrap:anywhere}#transactions .panel .tablewrap>table tbody td.empty:first-child{position:static;grid-column:1/-1;width:100%;text-align:center;padding:20px 8px}#transactions .panel .tablewrap>table tbody td.empty .btn{margin-top:12px;white-space:normal}#transactions #pagination>div{width:100%;display:flex;justify-content:space-between}#transactions #pagination .btn{padding-inline:10px;min-width:0}}
@media(prefers-reduced-motion:reduce){body .clean-card,body .modal .dialog,body .btn{animation:none;transition:none}}

body .adventure-hero .adventure-daily .hub-checkin .btn{background:var(--b);border-color:var(--b);color:#ffffff;box-shadow:none}body.dark .adventure-hero .adventure-daily .hub-checkin .btn{color:#241c2e}
body .modal .dialog:has(>.dialog-content)>h2{padding-right:64px}
@media(max-width:680px){#transactions .panel .tablewrap>table thead th:not(:first-child){display:block;position:absolute;width:1px;height:1px;min-width:0;margin:-1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}#transactions .panel .tablewrap>table tbody td:nth-child(4)[data-empty="true"]{display:none}}
/* One consistent action row: secondary cancellation before the primary commit. */
body #modal .dialog>.actions #cancel{order:0}body #modal .dialog>.actions #submitTransaction{order:1}
@media(max-width:680px){body #modal .dialog>.actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}body #modal .dialog>.actions .btn{min-width:0;width:100%}}
/* Overview needs a visible purple anchor, rather than mostly white panels. */
body #defaultDashboard .clean-balance{background:linear-gradient(120deg,#713bbb,#51258b);border-color:#713bbb;color:#ffffff;box-shadow:0 10px 28px #713bbb24}
body #defaultDashboard .clean-balance .clean-balance-value,body #defaultDashboard .clean-balance .clean-totals b,body #defaultDashboard .clean-balance .clean-insight strong{color:#ffffff}
body #defaultDashboard .clean-balance .clean-caption,body #defaultDashboard .clean-balance .clean-card-head,body #defaultDashboard .clean-balance .clean-card-head small,body #defaultDashboard .clean-balance .clean-totals span,body #defaultDashboard .clean-balance .clean-totals small,body #defaultDashboard .clean-balance .clean-insight,body #defaultDashboard .clean-balance .clean-insight>span{color:#efe5fc}
body #defaultDashboard .clean-balance .clean-insight,body #defaultDashboard .clean-balance .clean-totals div{border-color:#ffffff35}
body #defaultDashboard .clean-balance select{background:#ffffff;color:#30233e;border-color:#ffffff80}
body #defaultDashboard .clean-balance select:focus-visible{outline-color:#efe5fc}
body #defaultDashboard .clean-card:not(.clean-balance){background:color-mix(in srgb,var(--b) 5%,var(--p));border-color:color-mix(in srgb,var(--b) 20%,var(--line))}
body #defaultDashboard .clean-account-balances li{background:color-mix(in srgb,var(--b) 10%,var(--p));border-color:color-mix(in srgb,var(--b) 25%,var(--line));border-left-color:var(--b)}
body #defaultDashboard .clean-account-balances strong:not(.negative){color:var(--b)}
body #defaultDashboard .clean-row-icon,body #defaultDashboard .clean-game-icon{background:color-mix(in srgb,var(--b) 16%,var(--p));color:var(--b)}
body #defaultDashboard .clean-game{background:linear-gradient(115deg,color-mix(in srgb,var(--b) 14%,var(--p)),color-mix(in srgb,var(--b) 5%,var(--p)));border-color:color-mix(in srgb,var(--b) 25%,var(--line))}
/* Sidebar colors are local, so mode backgrounds cannot inherit light-panel text. */
body .side,body[data-app-mode] .side,body.clean-dashboard-on .side,body.clean-dashboard-on[data-app-mode] .side{--p:#281c3e;--bg:#21172f;--ink:#f3edf8;--muted:#d7c8e6;--line:#554168;--b:#c9a8f0;--g:#c9a8f0;background:#281c3e;color:#f3edf8;border-color:#554168}
body .side .brand,body .side .brand>span{color:var(--ink)}
body .side .sidebar-collapse{background:var(--p);color:var(--ink);border-color:var(--line)}
body .side .host-sidebar-identity:hover{background:var(--bg);border-color:var(--b)}
