/* ============================================================
   ゆうちょ通帳アプリ — Clone (app/) — SPA splash/passcode/lock
   Token màu đo pixel từ web-iphone/assets/tokens.css + easing iOS.
   ============================================================ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  src: url(fonts/inter-latin-300-normal.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  src: url(fonts/inter-latin-400-normal.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  src: url(fonts/inter-latin-500-normal.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 300;
  src: url(fonts/noto-sans-jp-japanese-300-normal.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 400;
  src: url(fonts/noto-sans-jp-japanese-400-normal.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 500;
  src: url(fonts/noto-sans-jp-japanese-500-normal.woff2) format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans JP";
  font-style: normal;
  font-weight: 700;
  src: url(fonts/noto-sans-jp-japanese-700-normal.woff2) format("woff2");
  font-display: swap;
}

:root {
  /* Palette (đo pixel từ screenshot app thật — docs/screenshots/*.jpg) */
  --brand: #009900;
  --brand-strong: #009000;
  --appbar-green: #86c678;
  /* Splash: gradient dọc thuần */
  --splash-top: #5ac963;
  --splash-mid: #91d56e;
  --splash-end: #cbe278;
  /* Home/passcode: gradient chéo 135° + tan dần sang trắng */
  --sky-a: #86c678;
  --sky-b: #9ccf70;
  --sky-c: #b2da6c;
  --sky-fade: #fbfefb;
  --surface: #ffffff;
  --line: #ececec;
  --text: #000000;
  --text-mute: #828282;
  --ok-blue: #007aff; /* iOS system blue cho nút OK alert */
  --key-bg: #f1faf5; /* vòng nền keypad */
  --dot: #1c1c1c; /* chấm passcode */
  --tab-active: #009801; /* tab home active */
  --tab-idle: #7d8786;

  /* Easing iOS */
  --ease-ios: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-ios-decel: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-shake: cubic-bezier(0.36, 0.07, 0.19, 0.97);

  --font:
    "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui,
    sans-serif;
  --font-num:
    -apple-system, "SF Pro Display", "SF Pro Text", "Inter", "Noto Sans JP",
    sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  height: 100%;
}
img {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-touch-callout: none;
  user-select: none;
  touch-action: manipulation;
  background: #c2c8ce;
  min-height: 100dvh;
}

/* ---- Canvas full viewport (mobile: fixed lấp đầy; desktop: frame giữa) ---- */
.phone {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
}
@media (min-width: 480px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
  }
  .phone {
    position: relative;
    inset: auto;
    width: 430px;
    height: 932px;
    max-height: calc(100dvh - 48px);
    border-radius: 0;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
  }
}

/* ---- Status bar iOS (giả lập cho desktop test; ẩn trên PWA thật nhờ .ios-pwa) ---- */
.statusbar {
  height: max(54px, env(safe-area-inset-top) + 8px);
  padding: 0 30px 7px;
  padding-top: env(safe-area-inset-top, 12px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 6;
  font-family: var(--font-num);
}
.statusbar .time {
  letter-spacing: 0.3px;
}
.statusbar .right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.statusbar .net {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.statusbar .island {
  position: absolute;
  top: calc(env(safe-area-inset-top, 11px) + 0px);
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 33px;
  background: #000;
  border-radius: 20px;
}
.ios-pwa .statusbar {
  display: none;
} /* PWA thật: để status bar iOS thật, nền xanh phủ lên dưới */

/* ============================================================
   VIEW system (SPA)
   ============================================================ */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.35s var(--ease-ios),
    transform 0.35s var(--ease-ios),
    visibility 0.35s;
  pointer-events: none;
}
.view.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

/* ============================================================
   SPLASH
   ============================================================ */
.view-splash {
  background: linear-gradient(
    180deg,
    var(--splash-top) 0%,
    var(--splash-mid) 50%,
    var(--splash-end) 100%
  );
  align-items: center;
  justify-content: center;
  text-align: center;
}
.view-splash .statusbar {
  background: transparent;
}
.splash-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding-top: 20px;
}
/* Ảnh gốc @3x: splash_icon 393×246, splash_text 363×45 (ios-source-extract) */
.splash-icon {
  width: 116px;
  height: auto;
}
.splash-title {
  width: 121px;
  height: auto;
}
.splash-footer {
  flex: none;
  padding-bottom: calc(env(safe-area-inset-bottom, 20px) + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.splash-footer .splash-brand {
  width: 121px;
  height: auto;
}
.splash-footer .copyright {
  color: #fff;
  font-size: 10.5px;
  opacity: 0.85;
  letter-spacing: 0.2px;
}
@keyframes splashIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes splashOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.view-splash.active .splash-body,
.view-splash.active .splash-footer {
  animation: splashIn 0.4s var(--ease-ios) both;
}

/* ============================================================
   PASSCODE
   ============================================================ */
/* Nền xanh chéo, tan dần sang trắng ở ~2/3 dưới; card trắng bo góc nổi lên trên nền đó. */
.view-passcode {
  background:
    linear-gradient(180deg, rgba(251, 254, 251, 0) 63%, var(--sky-fade) 79%),
    linear-gradient(
      135deg,
      var(--sky-a) 0%,
      var(--sky-b) 45%,
      var(--sky-c) 100%
    );
}
.view-passcode .statusbar {
  background: transparent;
}
.pass-header {
  flex: none;
  position: relative;
  padding: calc(env(safe-area-inset-top, 0px) + 68px) 22px 0;
  text-align: center;
}
.pass-header .title {
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1px;
}
.pass-header .sub {
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  margin-top: 38px;
  letter-spacing: 0.5px;
}
.pass-header .bubble {
  position: absolute;
  right: 17px;
  top: calc(env(safe-area-inset-top, 0px) + 11px);
  width: 26px;
  height: 24px;
  filter: brightness(0) invert(1); /* chat.png (icon xanh) → trắng trên bg xanh */
  object-fit: contain;
}
.pass-card {
  position: absolute;
  left: 19px;
  right: 19px;
  top: 29%;
  bottom: 0;
  background: #fff;
  border-radius: 11px 11px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
/* Ô nhập = 4 vạch xanh; chấm hiện lên phía trên khi đã nhập. */
.pass-dots {
  display: flex;
  gap: min(12px, 3.2vw);
  margin-top: min(77px, 8.2vh);
}
.pass-dots .dot {
  width: min(53px, 13.5vw);
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  position: relative;
}
.pass-dots .dot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -6px) scale(0);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand);
  transition: transform 0.15s var(--ease-ios);
}
.pass-dots .dot.filled::before {
  transform: translate(-50%, -6px) scale(1);
}

.keypad {
  --key: min(81px, 21.5vw, 8.7vh);
  margin-top: min(23px, 2.5vh);
  display: grid;
  grid-template-columns: repeat(3, calc(var(--key) + 20px));
  justify-content: center;
  column-gap: 0;
  row-gap: min(22px, 2.4vh);
}
.keypad .key {
  width: var(--key);
  height: var(--key);
  justify-self: center;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--key-bg);
  color: var(--brand);
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 400;
  transition:
    transform 0.1s ease-out,
    opacity 0.1s ease-out,
    background 0.1s;
}
.keypad .key:active {
  transform: scale(0.9);
  opacity: 0.5;
}
.keypad .key.empty {
  background: none;
  pointer-events: none;
}
.keypad .key.backspace {
  background: none;
}
.keypad .key.backspace img {
  width: 41px;
  height: auto;
}
.keypad .key.backspace:active {
  background: var(--key-bg);
}

/* 「パスコードを忘れた方はこちら」 — text căn giữa, chevron neo mép phải */
.pass-forgot {
  position: relative;
  width: 100%;
  margin-top: min(42px, 4.5vh);
  text-align: center;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pass-forgot .chev {
  position: absolute;
  right: 63px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 14px;
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(6px);
  }
}
.pass-card.shake {
  animation: shake 0.4s var(--ease-shake);
}

/* ============================================================
   LOCK (home đầy đủ + popup KHOÁ DP011) — RESPONSIVE full viewport
   Theo cam kết plan: KHÔNG khung cố định 430×932. Dùng % positioning
   + env(safe-area-inset-*) để chạy đúng iPhone 8 → 14 Pro Max.
   ============================================================ */
.view-lock {
  background:
    linear-gradient(180deg, rgba(251, 254, 251, 0) 57%, var(--sky-fade) 71%),
    linear-gradient(
      135deg,
      var(--sky-a) 0%,
      var(--sky-b) 45%,
      var(--sky-c) 100%
    );
  align-items: center;
}
.view-lock .statusbar {
  background: transparent;
}

.home-stage {
  position: absolute;
  inset: 0;
}

/* account bar — top, dưới status bar, căn giữa, tools dồn phải */
.h-acctbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.h-acct-wrap {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}
.h-adot {
  width: 15px;
  height: 15px;
}
.h-acct {
  font-family: var(--font-num);
  color: #fff;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.h-tools {
  position: absolute;
  right: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 2px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.h-chat {
  width: 26px;
  height: 24px;
}
.h-bell {
  width: 40px;
  height: 40px;
}

/* greeting bubble — ~34% từ đỉnh, rộng 72% (cap 310px) */
.h-bubble {
  position: absolute;
  left: 50%;
  top: 33%;
  transform: translateX(-50%);
  width: 72%;
  max-width: 310px;
  background: #e4f1d4;
  border-radius: 9px;
  padding: 11px 15px;
  font-size: 14px;
  font-weight: 400;
  color: #39414a;
  line-height: 1.42;
  white-space: pre-line;
  box-shadow: 0 1px 6px rgba(20, 40, 30, 0.08);
}
.h-bubble::after {
  content: "";
  position: absolute;
  left: 43%;
  bottom: -10px;
  transform: translateX(-50%);
  border: 12px solid transparent;
  border-top-width: 11px;
  border-top-color: #e4f1d4;
  border-bottom-width: 0;
}

/* mascot glow — dùng ảnh PNG gốc từ android (img_neko_bg.png) */
.h-glow {
  position: absolute;
  left: 50%;
  /* Neo theo top card (51.4%) để khoảng cách glow→card cố định trên mọi viewport */
  top: calc(51.4% - 63px);
  transform: translateX(-50%);
  width: 42%;
  max-width: 175px;
  height: auto;
  z-index: 1;
  pointer-events: none;
}
.h-mascot {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translateX(-50%);
  width: 22%;
  max-width: 95px;
  z-index: 4;
}

/* balance card — tỉ lệ ref: top 51.4%, w 87.1%(max375), h 21.9%(max204) */
.h-card {
  position: absolute;
  left: 50%;
  top: 51.4%;
  transform: translateX(-50%);
  width: 87%;
  max-width: 375px;
  height: 22vh;
  max-height: 204px;
  min-height: 170px;
  background: linear-gradient(135deg, #ebf6e4 0%, #f0f8ea 45%, #f5fbef 100%);
  border-radius: 11px;
  z-index: 3;
  box-shadow:
    0 16px 32px rgba(30, 70, 40, 0.18),
    0 5px 12px rgba(30, 70, 40, 0.1);
}
.h-disp {
  position: absolute;
  right: 66px;
  top: 8%;
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 400;
  z-index: 3;
}
.h-sw {
  position: absolute;
  right: 16px;
  top: 8%;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--brand);
  z-index: 3;
  cursor: pointer;
  transition: background 0.2s;
}
.h-sw::after {
  content: "";
  position: absolute;
  top: 2.5px;
  right: 2.5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition:
    right 0.2s,
    left 0.2s;
}
.h-sw.off {
  background: #c9d0d1;
}
.h-sw.off::after {
  right: auto;
  left: 2.5px;
}
.h-genzai {
  position: absolute;
  left: 50%;
  top: 13%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--brand-strong);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}
.h-genzai img {
  width: 19px;
  height: 19px;
}
.h-amount {
  position: absolute;
  left: 50%;
  top: 29%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  font-family: var(--font-num);
  color: var(--brand);
  font-size: 45px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  white-space: nowrap;
}
.h-amount small {
  font-size: 33px;
  font-weight: 300;
  margin-right: 6px;
  letter-spacing: 0;
  vertical-align: baseline;
}
/* Vào home: số dư hiện sẵn → ẩn → wipe từ góc trên-trái dần ra đủ */
.h-amount.is-revealing {
  animation: h-amount-reveal 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes h-amount-reveal {
  0% {
    clip-path: inset(0 100% 100% 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}
@supports not (clip-path: inset(0 0 0 0)) {
  .h-amount.is-revealing {
    animation: h-amount-reveal-fallback 1.5s ease-out both;
  }
  @keyframes h-amount-reveal-fallback {
    0% {
      opacity: 0;
      transform: translateX(-50%) translate(-6px, -4px);
    }
    100% {
      opacity: 1;
      transform: translateX(-50%) translate(0, 0);
    }
  }
}
.h-ts {
  position: absolute;
  left: 50%;
  top: 61%;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  color: #8a8e85;
  font-size: 10.5px;
  font-family: var(--font-num);
  white-space: nowrap;
}
.h-kdivider {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 75.5%;
  height: 1px;
  background: #e7eddb;
  z-index: 3;
}
.h-kind {
  position: absolute;
  left: 16.2%;
  right: 15px;
  top: 79.5%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}
.h-kind .k {
  color: #a3ada2;
}
.h-kind .opt {
  flex: 0 1 auto; /* cho phép co khi card hẹp */
  min-width: 0;
  text-align: center;
  padding: 9px 6px;
  border-radius: 4px;
  background: #e6edd4;
  color: #74836f;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.h-kind .opt.on {
  font-weight: 700;
}
.h-kind .sp {
  flex: 1;
}
.h-kind .link {
  color: #8d8d8d;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.h-kind .link img {
  width: 16px;
  height: 16px;
  filter: saturate(1.5) brightness(0.82);
}

/* tab bar — đáy, không viền/nền riêng (app thật liền mạch với nền trang) */
.h-tabbar {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 0 calc(env(safe-area-inset-bottom, 0px) + 2px);
}
.h-tabbar a {
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 10px;
  line-height: 1.15;
  color: var(--tab-idle);
}
.h-tabbar a.on {
  color: var(--tab-active);
  font-weight: 700;
}
/* Icon tab là template 1 màu → dùng mask để tô xám/xanh theo trạng thái. */
.ti {
  width: 27px;
  height: 27px;
  background: var(--tab-idle);
  -webkit-mask: var(--m) no-repeat center / contain;
  mask: var(--m) no-repeat center / contain;
}
.h-tabbar a.on .ti {
  background: var(--tab-active);
}
.ti-home {
  --m: url(icons/tab_home.png);
}
.ti-meisai {
  --m: url(icons/tab_meisai.png);
}
.ti-soukin {
  --m: url(icons/tab_soukin.png);
}
.ti-graph {
  --m: url(icons/tab_graph.png);
}
.ti-menu {
  --m: url(icons/tab_menu.png);
}

/* ---- iOS Alert (UIAlertController style) ----
   App thật: UIAlertController → nền home bị blur mạnh + dim.
   Clone: blur .home-stage khi .is-alert + scrim mờ. */
.view-lock > .home-stage {
  transition: filter 0.22s var(--ease-ios);
  will-change: filter;
}
.view-lock.is-alert > .home-stage {
  filter: blur(28px);
}
.alert-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s var(--ease-ios),
    visibility 0.2s;
  z-index: 50;
}
.alert-scrim.show {
  opacity: 1;
  visibility: visible;
}
.ios-alert {
  width: 270px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  transform: scale(1.1);
  opacity: 0;
  transition:
    transform 0.25s var(--ease-ios),
    opacity 0.25s var(--ease-ios);
}
.alert-scrim.show .ios-alert {
  transform: scale(1);
  opacity: 1;
}
.ios-alert .a-title {
  padding: 16px 16px 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.ios-alert .a-body {
  padding: 8px 16px 18px;
  text-align: center;
  font-size: 13px;
  color: #444;
  line-height: 1.45;
  white-space: pre-line;
}
.ios-alert .a-sep {
  height: 1px;
  background: var(--line);
}
.ios-alert .a-btn {
  width: 100%;
  padding: 13px 8px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--ok-blue);
}
.ios-alert .a-btn:active {
  background: #f2f2f2;
}

/* Nhỏ gọn hóa h-kind trên màn hình hẹp/thấp (iPhone SE…) */
@media (max-width: 380px), (max-height: 700px) {
  .h-kind { gap: 3px; font-size: 11px; }
  .h-kind .opt { padding: 7px 4px; font-size: 11.5px; }
  .h-kind .link { font-size: 11px; }
  .h-kind .link img { width: 14px; height: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .view,
  .ios-alert,
  .keypad .key,
  .pass-card,
  .view-splash .splash-body {
    transition: none !important;
    animation: none !important;
  }
}

/* ---- Notification badge + bubble ---- */
.h-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.h-bell-badge {
  position: absolute;
  top: 6px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f0a000;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(240, 160, 0, 0.3);
  z-index: 2;
}
.h-bell-badge[hidden] {
  display: none !important;
}

#notifyBubble {
  opacity: 0;
  transform: translateX(-50%) scale(0.96);
  transition: opacity 0.2s var(--ease-ios), transform 0.2s var(--ease-ios);
}
#notifyBubble.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
#notifyBubble[hidden] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

/* ============================================================
   HIỆU ỨNG CHUYỂN MÀN (theo anim gốc Yucho: 200ms, ease-ios)
   ============================================================ */

/* 1) Passcode → Home: màn passcode kéo từ trên xuống (rèm) + mờ dần.
      Dựa theo android/anim/slide_to_bottom.xml (translateY 0→100%p, α 1→0, ~200ms). */
.view-passcode.closing-down {
  opacity: 0;
  transform: translateY(100%);
  transition:
    opacity 0.2s var(--ease-ios),
    transform 0.2s var(--ease-ios),
    visibility 0s 0.2s;
}

/* Home vào: fade + scale nhẹ (theo android/animator/fragment_open_enter: scale + α, ~300ms). */
.view-lock.entering-up {
  animation: home-enter 0.3s var(--ease-ios) both;
}
@keyframes home-enter {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: none; }
}

/* 2) White fade overlay: nền home → fade qua trắng → splash.
      Theo android/animator/fragment_fade_enter/exit.xml (alpha 150ms linear). */
.white-fade {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s linear;
}
.white-fade.show {
  opacity: 1;
}
.white-fade[hidden] {
  display: block;
