.bank-active .town-app main,.bank-active.premium-shell .town-app main{width:100%;max-width:none;margin:0;padding:0}
.bank-active .town-header,.bank-active .town-app footer{display:none}
.bank-active #content{margin:0;padding:0}
.bank-active .profile-status:not([hidden]){position:fixed;top:max(8px,env(safe-area-inset-top,0px));bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:min(92vw,780px);margin:0;z-index:40;box-shadow:0 6px 24px #06121b70}
.bank-world{position:relative;min-height:100svh;width:100%;display:flex;align-items:center;justify-content:center;padding:94px max(4vw,env(safe-area-inset-left,0px)) 112px;isolation:isolate;background:#173d42;overflow:hidden}
.bank-world-interior{position:absolute;inset:0;z-index:-3;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none}
.bank-world-shade{position:absolute;inset:0;z-index:-2;background:linear-gradient(0deg,#0828388c,transparent 28%);pointer-events:none}
.bank-world-hud{position:absolute;left:max(22px,env(safe-area-inset-left,0px));right:max(22px,env(safe-area-inset-right,0px));top:max(16px,env(safe-area-inset-top,0px));z-index:10;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.bank-world-hud>div{display:flex;align-items:center;gap:12px}
.bank-world-hud h2{color:#fff;background:#12343cdb;backdrop-filter:blur(12px);padding:11px 15px;border:1px solid #d0e7df50;border-radius:12px;font-size:22px;line-height:1.3;letter-spacing:-.025em;margin:0;font-weight:650}
.bank-world-back,.bank-world-total,.bank-world-dock{background:#102e3eea;backdrop-filter:blur(16px);border:1px solid #c6e5da54;color:#e7f4ef;box-shadow:0 4px 16px #061c3533}
.bank-world-back{display:flex;align-items:center;gap:8px;min-height:48px;font:inherit;font-size:14px;padding:10px 13px;border-radius:12px}
.bank-world-back svg{width:23px;height:23px;color:#bbebd9}
.bank-world-total{display:flex;flex-direction:column;text-align:right;min-height:48px;border-radius:12px;padding:6px 14px;font:inherit}
.bank-world-total small{font-size:12px;line-height:1.4;color:#c8ddd4}
.bank-world-total strong{font-size:20px;font-variant-numeric:tabular-nums;line-height:1.35}
.bank-scene-counter{width:min(1160px,100%);border:1px solid #fff9;border-radius:24px;background:#f7faf7ed;backdrop-filter:blur(16px);box-shadow:0 16px 42px #08233438;padding:22px;color:#173d42}
.bank-scene-counter-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.bank-scene-eyebrow{font-size:12px;letter-spacing:.09em;font-weight:700;color:#507a74}
.bank-scene-update{font-size:12px;color:#607b78}
.bank-scene-accounts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.bank-scene-card{--scene-account-accent:#37668b;display:flex;flex-direction:column;min-width:0;padding:19px 18px 12px;border:1px solid #cfddd9;border-top:3px solid var(--scene-account-accent);border-radius:16px;background:#f3f7f9}
.bank-scene-savings{--scene-account-accent:#286c5e;background:#eff7f1}
.bank-scene-investment{--scene-account-accent:#62528c;background:#f5f2fa}
.bank-scene-debt{--scene-account-accent:#86562f;background:#faf5ed}
.bank-scene-card h3{font-size:18px;font-weight:650;line-height:1.4;letter-spacing:-.02em;margin:0 0 17px;color:#244c4c}
.bank-scene-balance{display:flex;flex-direction:column;gap:4px}
.bank-scene-balance>span{font-size:13px;color:#5e7a76}
.bank-scene-balance>strong{font-size:clamp(28px,2.8vw,38px);line-height:1.25;letter-spacing:-.035em;font-weight:650;font-variant-numeric:tabular-nums;color:#173f3b;overflow-wrap:anywhere}
.bank-scene-description{font-size:13px;line-height:1.65;color:#59736f;margin:14px 0 10px}
.bank-scene-card-info{margin-bottom:8px}
.bank-scene-detail-note{font-size:13px;line-height:1.6;color:#59736f;margin:0}
.bank-scene-metrics{margin:0;display:grid;gap:8px}
.bank-scene-metrics>div{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:3px 10px}
.bank-scene-metrics dt{font-size:12px;line-height:1.6;color:#5d756d}
.bank-scene-metrics dd{font-size:15px;font-weight:650;margin:0;line-height:1.5;font-variant-numeric:tabular-nums;color:var(--scene-account-accent);overflow-wrap:anywhere}
.bank-scene-metrics dd.bank-scene-negative{color:#a34e3d}
.bank-scene-metrics+.bank-scene-detail-note{margin-top:6px;font-size:12px}
.bank-scene-card-controls{margin-top:auto}
.bank-scene-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px 0 3px}
.bank-scene-action{border:1px solid #a2c1b7;border-radius:10px;background:transparent;color:#245b50;min-height:48px;padding:9px 6px;font:inherit;font-size:13px;font-weight:650;line-height:1.4}
.bank-scene-action-primary{background:#205c50;border-color:#205c50;color:#fff}
.bank-scene-action:hover:not(:disabled){background:#dfece5}
.bank-scene-action-primary:hover:not(:disabled){background:#16483e}
.bank-scene-action:disabled{opacity:.45;cursor:not-allowed}
.bank-scene-card-foot{display:flex;align-items:center;min-height:40px}
.bank-scene-text{background:transparent;border:0;min-height:40px;padding:7px 0;color:#246457;text-align:left;font:inherit;font-size:13px;font-weight:650}
.bank-scene-card-note{font-size:12px;line-height:1.5;color:#657c75;padding:5px 0}
.bank-scene-chart{display:block;background:transparent;border:0;border-radius:10px;width:100%;padding:8px 0 0;text-align:left;margin-top:4px;min-height:44px}
.bank-scene-chart>span{font-size:12px;color:#56736c}
.bank-scene-chart .bank-sparkline{height:48px}
.bank-scene-chart .bank-chart-line{stroke:var(--scene-account-accent);stroke-width:3}
.bank-scene-chart .bank-chart-point{fill:var(--scene-account-accent);stroke:#f7faf7}
.bank-scene-utilities{display:flex;flex-wrap:wrap;gap:5px 22px;border-top:1px solid #c6d8ce;margin-top:18px;padding-top:8px}
.bank-scene-utilities button{background:transparent;border:0;min-height:44px;padding:7px 0;font:inherit;font-size:14px;color:#386b61;font-weight:550}
.bank-scene-utilities button:hover,.bank-scene-text:hover{text-decoration:underline;text-underline-offset:4px}
.bank-scene-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:2px 10px;margin-top:6px;font-size:12px;line-height:1.5;color:#6b837a}
.bank-scene-footer button{background:transparent;border:0;padding:5px 0;min-height:36px;font:inherit;color:#446f61;font-weight:650}
.bank-world-dock{position:absolute;left:50%;transform:translateX(-50%);bottom:max(17px,env(safe-area-inset-bottom,0px));z-index:10;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;padding:8px;border-radius:19px;width:min(500px,calc(100% - 28px))}
.bank-world-dock button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:56px;padding:7px 4px;border:0;border-radius:11px;background:transparent;color:#dbefec;font:inherit;font-size:14px;line-height:1.4}
.bank-world-dock button svg{width:24px;height:24px;color:#b0e4d3}
.bank-world-dock button:hover{background:#ffffff12}
.bank-world button:focus-visible,.bank-scene-details button:focus-visible{outline:3px solid #368879;outline-offset:3px}
.bank-world-hud button:focus-visible,.bank-world-dock button:focus-visible{outline-color:#c7f6de}
.bank-active #modal{background:#f7faf7;color:#234647}
.bank-active #modal .close{width:44px;height:44px;color:#315b50}
.bank-active #modal .btn{background:#205c50;color:#fff}
.bank-active #modal .btn.secondary{background:#e4eee8;color:#315b50}
.bank-active #modal .question-input:focus-visible{outline:3px solid #368879;outline-offset:2px;border-color:#368879}
.bank-scene-details,.bank-scene-rules,.bank-scene-summary{color:#365750}
.bank-scene-details p,.bank-scene-rules p,.bank-scene-summary p{font-size:16px;line-height:1.7}
.bank-scene-details .bank-chart-summary>strong{color:#214f40}
.bank-scene-details .bank-chart-summary>span,.bank-scene-details .bank-chart-caption,.bank-scene-details .bank-statement time{color:#617f73}
.bank-scene-details .bank-chart-grid{stroke:#9ab9a755}
.bank-scene-details .bank-chart-label{fill:#527565}
.bank-scene-details .bank-chart-line{stroke:#267f68}
.bank-scene-details .bank-chart-point{fill:#267f68;stroke:#f7faf7}
.bank-scene-details .bank-zero-line{stroke:#658875}
.bank-scene-details .bank-market-empty{fill:#59796b}
.bank-scene-details .bank-statement p{color:#365b4d}
.bank-scene-details .bank-statement li{border-color:#b8d1c444}
.bank-scene-details .bank-statement-dot{background:#508e75}
.bank-scene-details .bank-statement-dot.daily{background:#ae8649}
.bank-scene-details .bank-data-table summary{color:#335f4b}
.bank-scene-details .bank-data-table td,.bank-scene-details .bank-data-table th{color:#426753;border-color:#b8d1c444}
.bank-active #modal:has(.bank-scene-history){max-width:1040px}
.bank-scene-history-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.bank-scene-history-grid>section{--history-colour:#37668b;min-width:0;border:1px solid #ccddd5;border-radius:15px;padding:18px;background:#fff8}
.bank-scene-history-grid>section:nth-child(2){--history-colour:#286c5e}
.bank-scene-history-grid>section:nth-child(3){--history-colour:#62528c}
.bank-scene-history-grid>section:nth-child(4){--history-colour:#86562f}
.bank-scene-history-grid h3{margin:0 0 12px;font-size:18px}
.bank-scene-history-grid .bank-chart-summary{display:block;margin-bottom:8px}
.bank-scene-history-grid .bank-chart-summary>strong{font-size:27px}
.bank-scene-history-grid .bank-chart-summary>span{display:block;margin-top:5px}
.bank-scene-history-grid .bank-chart-line{stroke:var(--history-colour)}
.bank-scene-history-grid .bank-chart-point{fill:var(--history-colour)}
.bank-scene-history-grid .bank-chart-label{font-size:19px}
.bank-scene-history .bank-data-table td:not(:first-child),.bank-scene-history .bank-data-table th:not(:first-child){text-align:right;white-space:nowrap}
.bank-scene-summary dl{margin:18px 0}
.bank-scene-summary dl>div{display:flex;justify-content:space-between;gap:18px;padding:14px 0;border-bottom:1px solid #c6dbcf;font-size:16px}
.bank-scene-summary dd{margin:0;font-weight:650;font-variant-numeric:tabular-nums}
.bank-scene-summary-total{font-weight:700}
@media(max-width:1100px){
 .bank-world{padding:88px 24px 108px}
 .bank-scene-counter{width:min(800px,100%)}
 .bank-scene-accounts{grid-template-columns:repeat(2,minmax(0,1fr))}
 .bank-world-interior{object-position:65% center}
 .bank-scene-balance>strong{font-size:35px}
}
@media(max-width:780px){
 .bank-scene-history-grid{grid-template-columns:1fr;gap:18px}
 .bank-scene-history-grid .bank-chart-label{font-size:22px}
}
@media(max-width:600px){
 .bank-world{padding:82px 12px 104px}
 .bank-world-hud{top:max(10px,env(safe-area-inset-top,0px));left:max(10px,env(safe-area-inset-left,0px));right:max(10px,env(safe-area-inset-right,0px));gap:8px}
 .bank-world-hud>div{gap:7px}
 .bank-world-back{width:44px;padding:9px;justify-content:center;min-height:44px}
 .bank-world-back>span{display:none}
 .bank-world-hud h2{font-size:18px;padding:11px 13px}
 .bank-world-total{padding:5px 10px;min-height:44px}
 .bank-world-total strong{font-size:17px}
 .bank-world-total small{font-size:11px}
 .bank-scene-counter{padding:16px 12px 12px;border-radius:20px}
 .bank-scene-counter-heading{margin-bottom:14px}
 .bank-scene-accounts{gap:10px}
 .bank-scene-card{padding:14px 12px 8px;border-radius:13px}
 .bank-scene-card h3{font-size:16px;margin-bottom:13px}
 .bank-scene-balance>span{font-size:12px}
 .bank-scene-balance>strong{font-size:28px}
 .bank-scene-description{font-size:12px;line-height:1.6}
 .bank-scene-metrics>div{display:block}
 .bank-scene-metrics dt{font-size:12px}
 .bank-scene-metrics dd{font-size:15px;margin-top:2px}
 .bank-scene-detail-note{font-size:12px}
 .bank-scene-actions{grid-template-columns:1fr;gap:6px;margin-top:13px}
 .bank-scene-action{min-height:44px;font-size:13px}
 .bank-scene-utilities{gap:4px 16px;margin-top:14px}
 .bank-scene-utilities button{font-size:13px}
 .bank-scene-footer>span{max-width:240px}
 .bank-world-dock{bottom:max(10px,env(safe-area-inset-bottom,0px));width:calc(100% - 20px);padding:7px}
 .bank-world-dock button{font-size:13px}
 .bank-scene-history-grid .bank-chart-label{font-size:27px}
}
@media(prefers-reduced-motion:reduce){.bank-world *{animation:none!important;transition:none!important}}

/* Reuse the town-map destination artwork in the Bank's return control. */
.bank-world-back>.location-logo{width:28px;height:28px}
@media(max-width:700px){.bank-world-back>.location-logo{width:24px;height:24px}}
