* { box-sizing: border-box; }
:root { color-scheme: dark; font-family: Nunito, Arial, sans-serif; color: #edf7ff; background: #102c50; }
body { margin: 0; min-height: 100dvh; background: #102c50; }
body.has-bank-interior { background: #102c50 url('/optimized-v1/bank-interior-clerk-v1.webp?v=fluid-1') right bottom / cover no-repeat fixed; }
body::before { content: ''; position: fixed; z-index: 0; inset: 0; pointer-events: none; background: linear-gradient(180deg, #071e3612, transparent 35%, #071e3608); }
[hidden] { display: none !important; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font-family: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #a3e3ff; outline-offset: 3px; }
.bank-page-header { position: relative; z-index: 15; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 26px 0; }
.bank-brand { display: block; width: 146px; text-decoration: none; filter: drop-shadow(0 3px 5px #06142680); }
.bank-brand img { display: block; width: 100%; height: auto; }
.bank-home-link { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; margin-top: 9px; padding: 10px 20px; border: 1px solid #b3dfff9c; border-radius: 13px; background: linear-gradient(145deg, #214f7e, #092342); box-shadow: inset 0 1px 0 #e4f6ff22, 0 4px 12px #06172855; color: #f0f8ff; font-size: 14px; font-weight: 900; text-decoration: none; }
.bank-home-link:hover { filter: brightness(1.12); }
.bank-page { position: relative; width: 100%; margin: 0 auto; padding: 0 16px 25px; }
.bank-page-heading { position: relative; z-index: 6; width: max-content; max-width: 50%; margin: 0 auto 10px; text-align: center; }
.bank-page-heading h1 { margin: 0; padding: 8px 32px 10px; border: 1px solid #dcc897a8; border-radius: 15px; background: linear-gradient(145deg, #19426aee, #081d38ee); box-shadow: inset 0 1px 0 #e4f6ff33, 0 6px 17px #06172855; color: #fff6dc; font-size: 30px; font-weight: 950; line-height: 1.1; letter-spacing: -.6px; }
.bank-profile-message { position: relative; z-index: 15; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 22px; margin: 5px 0 8px; color: #eff8ff; }
.bank-profile-message p { margin: 0; padding: 5px 11px; border-radius: 9px; background: #071d38df; font-size: 12px; font-weight: 750; line-height: 1.3; }
.bank-profile-message p:empty { display: none; }
.bank-profile-message button { min-height: 30px; padding: 6px 11px; border: 1px solid #88b8de99; border-radius: 9px; background: #204a77; color: #e8f5ff; font-size: 12px; font-weight: 850; cursor: pointer; }
.bank-stage { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bank-vault { min-width: 0; text-align: center; }
.bank-vault h2 { position: relative; z-index: 4; width: max-content; max-width: 100%; margin: 0 auto 4px; padding: 8px 13px; border: 1px solid #9fd9ec8c; border-radius: 12px; background: #0a294bea; color: #e4f6ff; font-size: 18px; font-weight: 900; line-height: 1.2; }
.bank-vault-illustration { position: relative; width: 100%; height: clamp(230px, 45vw, 390px); }
.bank-vault-illustration img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 14px 12px #05132955); }
.bank-vault-balance { position: relative; isolation: isolate; overflow: hidden; z-index: 4; width: max-content; min-width: 210px; max-width: 96%; margin: 0 auto; padding: 11px 18px 12px; border: 1px solid #76dfff88; border-radius: 19px; background: radial-gradient(ellipse at 25% 0, #256b9655, transparent 75%), linear-gradient(155deg, #173b68, #081b36 70%, #132b53); box-shadow: inset 0 1px 0 #a2efff44, inset 0 -4px 9px #02091855, 0 3px 0 #06132e88, 0 0 12px #59cfff25; }
.bank-vault-balance::before { content: ''; position: absolute; z-index: 0; inset: -8px auto -8px -65%; width: 65%; pointer-events: none; background: linear-gradient(110deg, transparent 24%, #6fdcff13 43%, #b2f5ff33 50%, #6fdcff13 57%, transparent 76%); transform: translateX(0); animation: bank-xp-energy-scan 5.6s ease-in-out infinite; }
.bank-vault-balance strong { position: relative; z-index: 1; display: block; color: #fff9dd; font-size: 38px; font-weight: 950; font-variant-numeric: tabular-nums; line-height: 1.1; letter-spacing: -.6px; overflow-wrap: anywhere; text-shadow: 0 1px 2px #020a20, 0 0 7px #7fe9ff22; }
.bank-vault-balance span { position: relative; z-index: 1; display: block; margin-top: 4px; color: #ffe58d; font-size: 14px; font-weight: 800; line-height: 1.2; }
.bank-currency-shop-link { display: block; text-decoration: none; }
.bank-currency-shop-link:hover { filter: brightness(1.1); }
@keyframes bank-xp-energy-scan { 0%, 12% { transform: translateX(0); opacity: 0; } 22% { opacity: 1; } 70% { transform: translateX(265%); opacity: 1; } 82%, 100% { transform: translateX(300%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bank-vault-balance::before { animation: none; opacity: 0; } }
.bank-counter-zone { grid-column: 1 / -1; grid-row: 1; position: relative; min-width: 0; }
.bank-counter-illustration { position: relative; width: 100%; aspect-ratio: 1586 / 992; }
.bank-counter-illustration img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 12px #04192c33); }
#bank-exchange-layer { position: absolute; z-index: 10; inset: 0; pointer-events: none; overflow: visible; }
.bank-exchange-form { position: relative; z-index: 12; width: min(540px, 100%); margin: 31px auto 0; padding: 19px 13px 7px; border: 1px solid #9bcbe1a1; border-radius: 15px; background: linear-gradient(150deg, #143d62f5, #061d38f5); box-shadow: inset 0 1px 0 #e4f6ff24, 0 7px 22px #04162777; }
.bank-exchange-form > h2 { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); margin: 0; padding: 6px 20px 7px; border: 1px solid #dfcd99b0; border-radius: 11px; background: linear-gradient(145deg, #224d74, #081f3c); color: #fff5dc; font-size: 19px; font-weight: 950; line-height: 1.1; text-align: center; white-space: nowrap; }
.bank-form-selection { display: flex; gap: 12px; align-items: center; }
.bank-quantity { flex: 1 1 auto; min-width: 0; }
.bank-quantity > label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.bank-amount-row { display: flex; gap: 7px; align-items: stretch; }
.bank-amount-row input { min-width: 0; width: 100%; min-height: 36px; padding: 5px 10px; border: 1px solid #b6d5e9; border-radius: 9px; background: #f0f9ff; color: #19446b; font-size: 22px; font-weight: 950; line-height: 1.1; font-variant-numeric: tabular-nums; color-scheme: light; }
.bank-amount-row button { flex: 0 0 auto; min-height: 36px; padding: 6px 10px; border: 1px solid #a5cde78c; border-radius: 9px; background: #23517f; color: #f1f9ff; font-size: 12px; font-weight: 850; cursor: pointer; }
.bank-rate { display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; font-size: 12px; line-height: 1.15; }
.bank-rate span { color: #c5dfef; font-weight: 700; }
.bank-rate strong { color: #f0f7fc; font-weight: 850; }
.bank-selection-help { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-top: 4px; color: #c0dcee; font-size: 11px; font-weight: 700; line-height: 1.2; }
.bank-exchange-actions { display: flex; align-items: stretch; gap: 8px; margin-top: 7px; }
.bank-preview-action { flex: 1 1 auto; min-height: 36px; padding: 7px 12px; border: 1px solid #a5d7ee; border-radius: 10px; background: linear-gradient(145deg, #3b80b7, #255b8e); box-shadow: inset 0 1px 0 #d5f2ff40; color: #fff; font-size: 14px; font-weight: 950; line-height: 1.2; cursor: pointer; }
.bank-shop-action { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; min-width: 159px; padding: 6px 11px; border: 1px solid #a5c6df70; border-radius: 10px; background: #183f67; color: #e5f2fc; font-size: 13px; font-weight: 850; }
.bank-shop-action small { color: #c0d9eb; font-size: 10px; font-weight: 750; }
a.bank-shop-action { text-decoration: none; }
a.bank-shop-action:hover { filter: brightness(1.12); }
.bank-exchange-form button:disabled, .bank-amount-row input:disabled { cursor: default; opacity: .52; }
.bank-exchange-form .bank-shop-action:disabled { opacity: .9; }
.bank-exchange-form button:not(:disabled):hover { filter: brightness(1.1); }
.bank-preview-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin-top: 4px; }
.bank-preview-label, #bank-animation-status { margin: 0; color: #c5dfef; font-size: 11px; font-weight: 750; line-height: 1.2; }
#bank-animation-status:empty { display: none; }
.bank-preview-tools:has(#bank-animation-status:not(:empty)) .bank-preview-label { display: none; }
.bank-sound-toggle { flex: 0 0 auto; min-height: 24px; padding: 4px 9px; border: 1px solid #9bcce183; border-radius: 999px; background: #204a71; color: #e1f1fa; font-size: 11px; font-weight: 850; line-height: 1.2; cursor: pointer; }
.bank-progression { position: relative; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px 19px; width: max-content; max-width: 100%; margin: 13px auto 0; padding: 5px 13px; border: 1px solid #a1c5d75e; border-radius: 9px; background: #071d38d9; color: #d0e5f3; }
.bank-progression > div { display: flex; align-items: baseline; gap: 6px; }
.bank-progression span, .bank-progression p { font-size: 10px; font-weight: 750; line-height: 1.2; }
.bank-progression strong { color: #edf7ff; font-size: 12px; font-weight: 850; font-variant-numeric: tabular-nums; }
.bank-progression p { margin: 0; }
@media (min-width: 1000px) and (min-height: 701px) {
  body { height: 100dvh; overflow: hidden; }
  body.has-bank-interior { background-size: auto calc(100dvh + 135px); }
  .bank-page-header { position: absolute; inset: 0 0 auto; height: 112px; }
  .bank-page { height: 100dvh; padding: 0; }
  .bank-page-heading { position: absolute; top: 19px; left: 50%; transform: translateX(-50%); margin: 0; }
  .bank-profile-message { position: absolute; top: 71px; left: 180px; right: 170px; margin: 0; }
  .bank-stage { --counter-width: min(1000px, 81vw, calc((100dvh - 205px) * 1.6)); --safe-height: min(398px, calc((100dvh - 310px) * .75)); position: absolute; display: block; top: 85px; left: 50%; transform: translateX(-50%); width: min(1440px, 100%); height: calc(100dvh - 155px); }
  .bank-counter-zone { position: absolute; z-index: 1; top: 0; left: 50%; transform: translateX(-50%); width: var(--counter-width); }
  .bank-vault { position: absolute; z-index: 3; top: calc(min(120px, (100dvh - 620px) * .5) + min(132px, (100dvh - 310px) * .25)); width: calc(var(--safe-height) * 2 / 3); }
  .bank-xp-zone { left: 0; }
  .bank-money-zone { right: 0; }
  .bank-vault h2 { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); margin: 0; }
  .bank-vault-illustration { width: 100%; height: var(--safe-height); }
  .bank-vault-balance { margin-top: -2px; }
  .bank-exchange-form { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); margin: 0; width: min(640px, calc(100% - 40px)); padding: 23px 15px 9px; }
  .bank-exchange-form > h2 { top: -23px; font-size: 23px; padding: 7px 23px 8px; }
  .bank-amount-row input { min-height: 41px; font-size: 25px; }
  .bank-amount-row button { min-height: 41px; font-size: 14px; }
  .bank-rate { font-size: 13px; }
  .bank-selection-help { font-size: 12px; }
  .bank-preview-action, .bank-shop-action { min-height: 41px; font-size: 16px; }
  .bank-sound-toggle { min-height: 27px; font-size: 12px; }
  .bank-progression { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap; }
}
@media (min-width: 1000px) and (min-height: 701px) and (max-height: 790px) {
  .bank-brand { width: 120px; }
  .bank-stage { top: 72px; --safe-height: calc((100dvh - 305px) * .75); --counter-width: min(1000px, 81vw, calc((100dvh - 290px) * 1.6)); }
  .bank-vault { top: calc(72px + (100dvh - 305px) * .25); }
  .bank-vault-balance strong { font-size: 26px; }
  .bank-vault-balance span { font-size: 11px; }
}
@media (max-width: 999px), (max-height: 700px) {
  .bank-page-header { padding-bottom: 0; }
  .bank-page-heading { margin-top: -30px; }
  .bank-stage { width: min(850px, 100%); margin: 0 auto; gap: 15px; }
  .bank-xp-zone, .bank-money-zone { grid-row: 2; }
  .bank-counter-zone { width: 100%; }
  .bank-progression p { flex-basis: 100%; text-align: center; }
}
@media (max-width: 600px) {
  body.has-bank-interior { background-attachment: scroll; }
  .bank-page-header { padding: 10px 14px 0; }
  .bank-brand { width: 104px; }
  .bank-home-link { min-height: 38px; margin-top: 6px; padding: 8px 13px; font-size: 12px; }
  .bank-page { padding-left: 12px; padding-right: 12px; }
  .bank-page-heading { margin-top: -13px; max-width: 70%; }
  .bank-page-heading h1 { padding: 8px 24px; font-size: 26px; }
  .bank-profile-message { margin-bottom: 0; }
  .bank-vault-illustration { height: clamp(205px, 57vw, 330px); }
  .bank-vault h2 { padding: 5px 8px; font-size: 11px; }
  .bank-vault-balance { min-width: 0; padding: 7px 10px; }
  .bank-vault-balance strong { font-size: clamp(22px, 5.6vw, 28px); }
  .bank-vault-balance span { font-size: 10px; }
  .bank-exchange-form { margin-top: 30px; }
  .bank-form-selection { gap: 9px; }
  .bank-rate { font-size: 11px; }
  .bank-amount-row button { padding: 6px 8px; font-size: 11px; }
  .bank-amount-row input { font-size: 19px; }
  .bank-selection-help { font-size: 10px; }
  .bank-shop-action { min-width: 130px; gap: 4px; padding: 6px 8px; font-size: 12px; }
  .bank-shop-action small { font-size: 9px; }
  .bank-progression { gap: 7px 12px; }
}
@media (max-width: 380px) {
  .bank-form-selection { flex-wrap: wrap; }
  .bank-quantity { flex-basis: 100%; }
  .bank-rate { flex-direction: row; gap: 8px; font-size: 11px; }
  .bank-selection-help { gap: 3px 8px; }
  .bank-exchange-actions { gap: 6px; }
  .bank-preview-action { font-size: 12px; padding-left: 8px; padding-right: 8px; }
  .bank-shop-action { flex-direction: column; min-width: 93px; gap: 2px; }
  .bank-preview-label, #bank-animation-status { font-size: 10px; }
}
