:root {
      --bg: #f8f4ec;
      --panel: #ffffff;
      --panel-soft: #fbfaf6;
      --ink: #26302d;
      --muted: #71807a;
      --line: #e7e0d3;
      --accent: #2f9c86;
      --accent-dark: #217865;
      --accent-soft: #dff3ed;
      --warn: #bc7b2c;
      --danger: #bd4b44;
      --shadow: 0 18px 45px rgba(44, 55, 49, 0.09);
      --radius: 18px;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background: var(--bg);
      color: var(--ink);
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      letter-spacing: 0;
    }

    body.auth-required .app-shell {
      display: none;
    }

    .skip-link {
      position: absolute;
      top: -100px;
      left: 16px;
      z-index: 100;
      padding: 10px 14px;
      border-radius: 12px;
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      text-decoration: none;
      transition: top 0.2s ease;
    }

    .skip-link:focus {
      top: 16px;
      outline: 2px solid var(--ink);
      outline-offset: 2px;
    }

    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .offline-banner {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 40;
      padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
      background: rgba(188, 123, 44, 0.95);
      color: #fff;
      text-align: center;
      font-size: 0.88rem;
      font-weight: 600;
      box-shadow: 0 8px 24px rgba(91, 65, 35, 0.18);
    }

    .offline-banner[hidden] {
      display: none;
    }

    body:has(.offline-banner:not([hidden])) .mobile-topbar {
      top: 42px;
    }

    .delivery-screen {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      padding: 24px;
      overflow: hidden;
      background:
        radial-gradient(circle at 10% 8%, rgba(72, 101, 51, 0.36) 0 7%, transparent 15%),
        radial-gradient(circle at 0% 38%, rgba(89, 63, 31, 0.42) 0 10%, transparent 18%),
        linear-gradient(105deg, rgba(71, 48, 28, 0.34), transparent 32%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.72) 0 24%, transparent 42%),
        linear-gradient(0deg, rgba(134, 82, 34, 0.38), rgba(221, 182, 125, 0.42)),
        #d6b784;
      transition: opacity 260ms ease, visibility 260ms ease;
    }

    .delivery-screen::before,
    .delivery-screen::after {
      content: "";
      position: absolute;
      pointer-events: none;
    }

    .delivery-screen::before {
      left: -54px;
      bottom: -26px;
      width: 330px;
      height: 180px;
      border-radius: 28px;
      background:
        linear-gradient(34deg, transparent 49%, rgba(145, 95, 47, 0.34) 50%, transparent 51%),
        linear-gradient(154deg, transparent 49%, rgba(145, 95, 47, 0.3) 50%, transparent 51%),
        #e5d0a8;
      box-shadow: 0 18px 45px rgba(55, 35, 18, 0.26);
      transform: rotate(-9deg);
    }

    .delivery-screen::after {
      right: -42px;
      bottom: 56px;
      width: 284px;
      height: 118px;
      border-radius: 12px;
      background:
        repeating-linear-gradient(0deg, transparent 0 18px, rgba(119, 92, 61, 0.18) 19px 20px),
        linear-gradient(90deg, rgba(250, 241, 219, 0.92), rgba(237, 218, 184, 0.88));
      box-shadow: 0 16px 38px rgba(60, 38, 19, 0.24);
      transform: rotate(-3deg);
    }

    .delivery-screen.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .delivery-card {
      position: relative;
      z-index: 1;
      width: min(560px, 100%);
      padding: 38px 54px 48px;
      border: 1px solid rgba(210, 178, 126, 0.5);
      border-radius: 24px;
      background:
        radial-gradient(circle at 20% 24%, rgba(185, 136, 70, 0.08), transparent 18%),
        radial-gradient(circle at 78% 76%, rgba(47, 156, 134, 0.08), transparent 16%),
        linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(254, 247, 234, 0.96));
      box-shadow: 0 30px 70px rgba(62, 40, 19, 0.28);
      text-align: center;
    }

    .delivery-card::before {
      content: "";
      position: absolute;
      inset: 10px;
      border: 1px solid rgba(199, 160, 100, 0.22);
      border-radius: 18px;
      pointer-events: none;
    }

    .delivery-card::after {
      content: "";
      position: absolute;
      left: 50%;
      bottom: 100px;
      width: 200px;
      height: 1px;
      background: linear-gradient(90deg, transparent, #cba66d, transparent);
      transform: translateX(-50%);
      pointer-events: none;
    }

    body.auth-required .delivery-card {
      width: min(940px, 100%);
      padding: 0;
      overflow: hidden;
      text-align: left;
    }

    body.auth-required .delivery-card::after {
      display: none;
    }

    .delivery-postmark {
      position: absolute;
      top: 68px;
      right: 48px;
      width: 142px;
      height: 82px;
      object-fit: contain;
      opacity: 0.34;
      transform: rotate(3deg);
    }

    .delivery-screen.opening .delivery-card {
      animation: dailyEnvelope 820ms ease forwards;
    }

    .delivery-stack-preview {
      display: grid;
      gap: 14px;
      margin: 20px 0 24px;
      text-align: left;
    }

    .delivery-letter {
      position: relative;
      display: grid;
      grid-template-columns: 76px minmax(0, 1fr) 54px;
      align-items: center;
      min-height: 82px;
      gap: 10px;
      padding: 12px 18px 12px 16px;
      border: 1px solid rgba(207, 179, 132, 0.72);
      border-radius: 5px;
      background:
        linear-gradient(138deg, transparent 0 76%, rgba(204, 174, 126, 0.32) 76.3%, transparent 77%),
        linear-gradient(42deg, transparent 0 72%, rgba(204, 174, 126, 0.3) 72.3%, transparent 73%),
        linear-gradient(180deg, #fff9ed, #f7ebd6);
      box-shadow: 0 10px 20px rgba(91, 65, 35, 0.16);
      overflow: hidden;
    }

    .delivery-letter::before {
      content: "";
      position: absolute;
      left: -18px;
      top: -18px;
      width: 62px;
      height: 62px;
      border-right: 1px solid rgba(204, 174, 126, 0.38);
      background: rgba(255, 250, 239, 0.7);
      transform: rotate(45deg);
    }

    .delivery-letter::after {
      content: "";
      position: absolute;
      right: 18px;
      bottom: 12px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #d97749;
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    }

    .delivery-letter-icon,
    .delivery-letter-stamp {
      position: relative;
      z-index: 1;
      display: grid;
      place-items: center;
    }

    .delivery-letter-copy {
      position: relative;
      z-index: 1;
      min-width: 0;
    }

    .delivery-letter-copy strong {
      display: block;
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 0.95rem;
      line-height: 1.2;
    }

    .delivery-letter-copy span {
      display: -webkit-box;
      margin-top: 4px;
      overflow: hidden;
      color: #5e665f;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 0.86rem;
      line-height: 1.28;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .delivery-letter-stamp {
      width: 42px;
      height: 48px;
      border: 1px dashed rgba(162, 129, 76, 0.74);
      background: rgba(246, 237, 216, 0.85);
      box-shadow: 0 2px 5px rgba(88, 64, 35, 0.12);
    }

    .delivery-letter-stamp .mikci-icon {
      width: 26px;
      height: 26px;
    }

    .delivery-divider {
      position: relative;
      width: min(210px, 60%);
      height: 18px;
      margin: 4px auto 0;
    }

    .delivery-divider::before {
      content: "";
      position: absolute;
      top: 9px;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(181, 137, 78, 0.72), transparent);
    }

    .delivery-divider::after {
      content: "";
      position: absolute;
      top: 5px;
      left: 50%;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #cfac74;
      transform: translateX(-50%) rotate(45deg);
    }

    .delivery-note {
      margin: 8px 0 12px;
      color: #b5834c;
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .delivery-card .logo-welcome {
      width: 112px;
      height: 112px;
      margin: 0 auto 6px;
      padding: 14px;
      border-radius: 28px;
      background: linear-gradient(180deg, #ffffff, #f3e6cd);
      border: 1px solid rgba(207, 179, 132, 0.75);
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 16px 34px rgba(91, 65, 35, 0.18);
      filter: none;
    }

    .delivery-card .label {
      position: relative;
      z-index: 1;
      margin: 0;
      color: #b17b43;
      font-size: 0.8rem;
    }

    .delivery-card .label::before,
    .delivery-card .label::after {
      content: "";
      display: inline-block;
      width: 28px;
      height: 1px;
      margin: 0 8px 4px;
      background: linear-gradient(90deg, transparent, #b98d53);
    }

    .delivery-card .label::after {
      background: linear-gradient(90deg, #b98d53, transparent);
    }

    .delivery-card h1 {
      position: relative;
      z-index: 1;
      margin: 8px 0 0;
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(2rem, 5vw, 2.85rem);
      line-height: 1.05;
    }

    .delivery-card .subtitle {
      position: relative;
      z-index: 1;
      margin: 6px 0 0;
      color: #69716c;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.06rem;
    }

    .delivery-card .btn.primary {
      min-width: 264px;
      min-height: 50px;
      border: 1px solid rgba(23, 105, 89, 0.55);
      background: linear-gradient(180deg, #3f967f, #2b7968);
      box-shadow: 0 10px 22px rgba(37, 101, 85, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
      color: #fffdf8;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.02rem;
    }

    .delivery-card .btn.primary .mikci-icon {
      filter: brightness(0) invert(1);
    }

    .delivery-login-form {
      position: relative;
      z-index: 1;
      display: none;
      gap: 14px;
      margin: 22px 0 10px;
      text-align: left;
    }

    body.auth-required .delivery-login-form {
      display: grid;
    }

    body.auth-required .delivery-stack-preview,
    body.auth-required .delivery-note,
    body.auth-required #openDailyMail {
      display: none;
    }

    .delivery-login-form .btn.primary {
      justify-self: end;
      min-width: 160px;
    }

    .auth-helper-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: -4px;
    }

    .text-button {
      border: 0;
      background: transparent;
      color: var(--accent-dark);
      cursor: pointer;
      font-weight: 800;
      padding: 0;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .auth-message {
      border: 1px solid rgba(47, 156, 134, 0.25);
      border-radius: 8px;
      background: rgba(238, 248, 243, 0.86);
      color: var(--ink);
      padding: 12px 14px;
      font-size: 0.92rem;
      line-height: 1.45;
    }

    .auth-message.error {
      border-color: rgba(176, 70, 58, 0.28);
      background: rgba(255, 242, 238, 0.9);
    }

    .auth-mode-toggle {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 4px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
    }

    .auth-mode-toggle button {
      min-height: 34px;
      border-radius: 999px;
      color: var(--muted);
      font-weight: 800;
    }

    .auth-mode-toggle button.active {
      background: var(--accent);
      color: white;
      box-shadow: 0 8px 18px rgba(47, 156, 134, 0.18);
    }

    /* Two-panel auth layout */
    .delivery-card img {
      max-width: 100%;
    }

    .auth-aside {
      display: none;
    }

    body.auth-required .delivery-card {
      display: grid;
      grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
      align-items: stretch;
    }

    body.auth-required .auth-aside {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 4px;
      padding: 46px 40px;
      text-align: center;
      background:
        radial-gradient(circle at 22% 18%, rgba(185, 136, 70, 0.14), transparent 42%),
        radial-gradient(circle at 82% 88%, rgba(47, 156, 134, 0.1), transparent 40%),
        linear-gradient(165deg, #fbf2e1, #f3e7cf);
      border-right: 1px solid rgba(207, 179, 132, 0.5);
    }

    .auth-aside-logo {
      display: grid;
      place-items: center;
      margin-bottom: 4px;
    }

    .auth-aside-logo img {
      width: 164px;
      max-width: 60%;
      height: auto;
      filter: none;
    }

    .auth-aside-title {
      margin: 6px 0 2px;
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 2rem;
      line-height: 1.08;
    }

    .auth-aside-title span {
      color: #c08a3d;
    }

    .auth-aside-heart {
      display: block;
      margin: 6px 0 2px;
    }

    .auth-aside-heart img {
      width: 18px;
      height: 18px;
      opacity: 0.75;
      filter: sepia(0.4) saturate(1.5) hue-rotate(320deg);
    }

    .auth-aside-sub {
      max-width: 260px;
      margin: 4px auto 0;
      color: #6f7671;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 0.98rem;
      line-height: 1.4;
    }

    .auth-features {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      width: 100%;
      max-width: 340px;
      margin: 26px 0 0;
      padding: 0;
      list-style: none;
    }

    .auth-features li {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      text-align: center;
    }

    .auth-feature-icon {
      display: grid;
      place-items: center;
      width: 46px;
      height: 46px;
      margin-bottom: 4px;
      border-radius: 50%;
      border: 1px solid rgba(199, 160, 100, 0.5);
      background: rgba(255, 255, 255, 0.6);
    }

    .auth-feature-icon .mikci-icon {
      width: 22px;
      height: 22px;
    }

    .auth-features strong {
      color: #3a4642;
      font-size: 0.78rem;
    }

    .auth-features li span {
      color: #8b938d;
      font-size: 0.72rem;
      line-height: 1.3;
    }

    body.auth-required .auth-main {
      padding: 44px 48px 40px;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    body.auth-required .auth-main > .logo-welcome,
    body.auth-required .auth-main > .delivery-postmark,
    body.auth-required .auth-main > .label,
    body.auth-required .auth-main > #deliveryTitle,
    body.auth-required .auth-main > #deliverySubtitle,
    body.auth-required .auth-main > .delivery-divider {
      display: none;
    }

    body.auth-required .delivery-login-form {
      margin: 0;
    }

    /* Underline tab style */
    body.auth-required .auth-mode-toggle {
      grid-template-columns: auto auto;
      justify-content: start;
      gap: 22px;
      padding: 0 0 2px;
      margin-bottom: 6px;
      border: 0;
      border-bottom: 1px solid var(--line);
      border-radius: 0;
      background: transparent;
    }

    body.auth-required .auth-mode-toggle button {
      position: relative;
      min-height: 40px;
      padding: 0 2px 8px;
      border-radius: 0;
      color: var(--muted);
      font-size: 1rem;
    }

    body.auth-required .auth-mode-toggle button.active {
      background: transparent;
      color: #c08a3d;
      box-shadow: none;
    }

    body.auth-required .auth-mode-toggle button.active::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -3px;
      height: 2px;
      border-radius: 2px;
      background: #c08a3d;
    }

    /* Fields with inline icons */
    .field.with-icon {
      position: relative;
    }

    .field.with-icon input {
      padding-left: 42px;
    }

    .field-icon {
      position: absolute;
      left: 13px;
      bottom: 13px;
      display: grid;
      place-items: center;
      pointer-events: none;
      opacity: 0.6;
    }

    .field-icon img {
      width: 18px;
      height: 18px;
    }

    #loginPasswordField input {
      padding-right: 44px;
    }

    .field-reveal {
      position: absolute;
      right: 8px;
      bottom: 7px;
      display: grid;
      place-items: center;
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: transparent;
      color: var(--muted);
    }

    .field-reveal:hover {
      color: var(--accent-dark);
      background: rgba(47, 156, 134, 0.08);
    }

    .field-hint {
      margin: -6px 0 0;
      color: var(--muted);
      font-size: 0.78rem;
    }

    body.auth-required .delivery-login-form .btn.primary.auth-submit {
      justify-self: stretch;
      width: 100%;
      min-width: 0;
      margin-top: 4px;
    }

    .auth-switch {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 0.86rem;
      text-align: center;
    }

    .auth-switch button {
      background: transparent;
      color: var(--accent-dark);
      font-weight: 800;
      padding: 0 2px;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
    }

    .mikci-icon {
      display: inline-block;
      width: 32px;
      height: 32px;
      flex-shrink: 0;
      object-fit: contain;
      image-rendering: auto;
      shape-rendering: geometricPrecision;
      vertical-align: middle;
      filter: drop-shadow(0 2px 2px rgba(38, 48, 45, 0.08));
      transition: transform 200ms ease, filter 200ms ease;
    }

    .mikci-logo {
      display: inline-block;
      flex-shrink: 0;
      object-fit: contain;
      vertical-align: middle;
      filter: drop-shadow(0 2px 5px rgba(91, 65, 35, 0.16));
    }

    .logo-sidebar {
      width: 50px;
      height: 50px;
    }

    .logo-top {
      width: 38px;
      height: 38px;
    }

    .logo-letter {
      width: 44px;
      height: 44px;
    }

    .logo-welcome {
      width: 150px;
      height: 150px;
      margin: 0 auto 18px;
    }

    .brand-mark .logo-sidebar {
      width: 68px;
      height: 68px;
      padding: 0;
      border-radius: 0;
      background: none;
    }

    .logo-loading {
      width: 128px;
      height: 128px;
    }

    .logo-footer {
      width: 24px;
      height: 24px;
    }

    .logo-certificate {
      width: 28px;
      height: 28px;
    }

    .mikci-icon:hover,
    button:hover .mikci-icon,
    .card:hover > .mikci-icon {
      transform: scale(1.05);
    }

    .icon-nav,
    .icon-sm {
      width: 22px;
      height: 22px;
    }

    .icon-card,
    .icon-lg {
      width: 50px;
      height: 50px;
    }

    .icon-insight,
    .icon-md {
      width: 34px;
      height: 34px;
    }

    .icon-goal {
      width: 42px;
      height: 42px;
    }

    .icon-xl {
      width: 64px;
      height: 64px;
    }

    .icon-hero {
      width: 72px;
      height: 72px;
    }

    .inline-title-icon {
      margin-right: 8px;
      vertical-align: -10px;
    }

    .icon-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      line-height: 1.2;
    }

    .app-shell {
      display: grid;
      grid-template-columns: 260px minmax(0, 1fr) 320px;
      gap: 22px;
      min-height: 100vh;
      padding: 22px;
    }

    @media (min-width: 1181px) {
      .app-shell {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
      }

      .app-shell .main {
        height: calc(100vh - 44px);
        height: calc(100dvh - 44px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        padding-right: 4px;
      }

      .app-shell .sidebar,
      .app-shell .insights {
        position: static;
        height: calc(100vh - 44px);
        height: calc(100dvh - 44px);
        overflow-y: auto;
        scrollbar-width: thin;
      }
    }

    .sidebar,
    .main,
    .insights {
      min-width: 0;
    }

    .sidebar {
      position: sticky;
      top: 22px;
      display: flex;
      flex-direction: column;
      height: calc(100vh - 44px);
      padding: 18px;
      border: 1px solid rgba(231, 224, 211, 0.9);
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.76);
      box-shadow: var(--shadow);
      backdrop-filter: blur(18px);
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 22px;
      font-weight: 800;
      font-size: 1.25rem;
      letter-spacing: 0;
    }

    .brand-mark {
      display: grid;
      width: 68px;
      height: 68px;
      place-items: center;
      border: none;
      border-radius: 0;
      background: none;
      box-shadow: none;
    }

    .brand > span:last-child {
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.38rem;
      line-height: 1;
      text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    }

    .nav {
      display: grid;
      gap: 8px;
    }

    .nav button {
      display: flex;
      align-items: center;
      gap: 11px;
      width: 100%;
      min-height: 44px;
      padding: 10px 12px;
      border: 1px solid transparent;
      border-radius: 14px;
      background: transparent;
      color: var(--muted);
      text-align: left;
      outline: none;
      transition: background 160ms ease, color 160ms ease, transform 160ms ease;
    }

    .nav button .nav-icon {
      padding: 3px;
      border-radius: 9px;
      background: rgba(255, 253, 248, 0.78);
      box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    }

    .nav-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 22px;
      height: 22px;
      margin-left: auto;
      padding: 0 7px;
      border-radius: 999px;
      background: var(--accent);
      color: #fff;
      font-size: 0.74rem;
      font-weight: 900;
      line-height: 1;
    }

    .nav button:hover,
    .nav button.active {
      background: var(--accent-soft);
      color: var(--accent-dark);
      transform: translateX(2px);
    }

    .nav button.active .mikci-icon {
      transform: translateY(-1px) scale(1.04);
      filter: brightness(1.08) drop-shadow(0 4px 8px rgba(47, 156, 134, 0.18));
    }

    .nav button:focus-visible {
      border-color: rgba(47, 156, 134, 0.32);
      box-shadow: 0 0 0 4px rgba(47, 156, 134, 0.11);
    }

    .nav-icon {
      width: 28px;
      height: 28px;
      flex: 0 0 28px;
    }

    .streak-card {
      margin-top: auto;
      padding: 16px;
      border: 1px solid rgba(47, 156, 134, 0.18);
      border-radius: 18px;
      background: linear-gradient(160deg, #ffffff 0%, #f2f9f6 100%);
      box-shadow: 0 10px 24px rgba(38, 48, 45, 0.06);
    }

    .streak-card-head {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .streak-card-icon {
      width: 34px;
      height: 34px;
      flex: 0 0 34px;
    }

    .streak-card strong {
      display: block;
      margin-top: 2px;
      font-size: 1.35rem;
    }

    .streak-card-meter {
      margin: 12px 0 8px;
      height: 6px;
      border-radius: 999px;
      background: rgba(47, 156, 134, 0.14);
      overflow: hidden;
    }

    .streak-card-meter span {
      display: block;
      height: 100%;
      width: 0;
      border-radius: 999px;
      background: var(--accent);
      transition: width 0.5s ease;
    }

    .streak-card .subtitle {
      margin: 0;
      font-size: 0.82rem;
    }

    .main {
      display: grid;
      gap: 18px;
      align-content: start;
      grid-auto-rows: max-content;
      position: relative;
    }

    .topbar {
      position: relative;
      display: flex;
      justify-content: space-between;
      gap: 22px;
      align-items: flex-start;
      padding: 8px 2px 0;
      overflow: hidden;
      isolation: isolate;
      transition: min-height 180ms ease, padding 180ms ease;
    }

    .dashboard-view .topbar {
      min-height: 278px;
      padding: 34px 28px 102px;
      border-radius: 22px;
      background:
        linear-gradient(90deg, rgba(248, 244, 236, 0.97) 0%, rgba(248, 244, 236, 0.84) 34%, rgba(248, 244, 236, 0.18) 64%, rgba(248, 244, 236, 0) 100%),
        linear-gradient(180deg, rgba(248, 244, 236, 0.04), rgba(248, 244, 236, 0.2)),
        url("assets/background/dashboard.png") center / cover no-repeat;
      box-shadow: 0 16px 34px rgba(188, 123, 44, 0.08);
    }

    .dashboard-view .topbar::after {
      content: "";
      position: absolute;
      right: 20px;
      bottom: 22px;
      width: 68px;
      height: 44px;
      border: 1px solid rgba(231, 224, 211, 0.92);
      border-radius: 10px;
      background: rgba(255, 253, 248, 0.72);
      box-shadow: 0 12px 28px rgba(44, 55, 49, 0.08);
      transform: rotate(-5deg);
      z-index: -1;
    }

    h1,
    h2,
    h3,
    p {
      margin: 0;
    }

    h1 {
      font-size: clamp(1.8rem, 2.65vw, 2.45rem);
      line-height: 1.08;
      max-width: 760px;
    }

    .dashboard-view h1 {
      max-width: 440px;
      font-size: clamp(2rem, 3.55vw, 3.35rem);
      line-height: 1.02;
      letter-spacing: 0;
    }

    h2 {
      font-size: 1.1rem;
    }

    h2:has(.inline-title-icon) {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    h3 {
      font-size: 1rem;
    }

    .subtitle {
      margin-top: 10px;
      color: var(--muted);
      font-size: 1.05rem;
    }

    .actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-end;
      padding-top: 58px;
    }

    .dashboard-view .actions {
      align-self: center;
      display: grid;
      min-width: 220px;
      padding-top: 28px;
      justify-items: stretch;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 42px;
      padding: 0 15px;
      border-radius: 999px;
      background: #edf1ee;
      color: var(--ink);
      font-weight: 700;
      transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
      white-space: nowrap;
    }

    .btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 10px 22px rgba(44, 55, 49, 0.12);
    }

    .btn.primary {
      background: var(--accent);
      color: #fff;
    }

    .btn.primary:hover {
      background: var(--accent-dark);
    }

    .btn.ghost {
      background: #ffffff;
      border: 1px solid var(--line);
    }

    .btn.danger {
      background: #fff0ed;
      color: var(--danger);
    }

    .btn:disabled {
      cursor: not-allowed;
      opacity: 0.55;
    }

    .btn.small {
      min-height: 34px;
      padding: 0 11px;
      font-size: 0.86rem;
    }

    .stats-grid,
    .goals-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 14px;
    }

    #dashboard .stats-grid {
      position: relative;
      z-index: 2;
    }

    .dashboard-view #dashboard .stats-grid {
      margin-top: -82px;
    }

    .goals-grid {
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      padding: 0 20px 20px;
      align-items: stretch;
    }

    .card {
      border: 1px solid rgba(231, 224, 211, 0.95);
      border-radius: var(--radius);
      background: var(--panel);
      box-shadow: var(--shadow);
    }

    .stat-card {
      position: relative;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 14px;
      padding: 18px;
      min-height: 112px;
      display: grid;
      align-items: center;
      text-align: left;
      overflow: hidden;
    }

    .stat-card::after {
      content: "";
      position: absolute;
      right: -22px;
      bottom: -32px;
      width: 104px;
      height: 76px;
      border: 1px solid rgba(231, 224, 211, 0.72);
      border-radius: 12px;
      background: rgba(251, 250, 246, 0.58);
      transform: rotate(-12deg);
    }

    .stat-icon {
      display: grid;
      width: 58px;
      height: 58px;
      place-items: center;
    }

    .stat-card p {
      margin-top: 4px;
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.25;
    }

    .goal-card {
      grid-template-columns: 1fr;
      min-height: 170px;
      width: 100%;
      justify-items: center;
      text-align: center;
      align-content: start;
      padding: 22px;
      background: #fffdf8;
    }

    .goal-card .progress-bar {
      width: 100%;
      max-width: 210px;
    }

    .goal-card .journey-album {
      width: 100%;
      margin-top: 18px;
      text-align: left;
    }

    .label {
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 700;
      text-transform: uppercase;
    }

    .stat-value {
      margin-top: 8px;
      font-size: 1.75rem;
      font-weight: 800;
    }

    #dashboard .stats-grid .stat-card {
      grid-template-columns: 1fr;
      justify-items: center;
      text-align: center;
      gap: 8px;
      padding: 20px 16px;
    }

    #dashboard .stats-grid .stat-card .stat-icon {
      margin: 0 auto;
    }

    #dashboard .stats-grid .stat-card .stat-value {
      margin-top: 4px;
    }

    .content-section {
      display: none;
      gap: 16px;
      align-content: start;
    }

    .content-section.active {
      display: grid;
    }

    .dashboard-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
      gap: 14px;
      align-items: stretch;
    }

    .dashboard-grid.lower {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-card {
      padding-bottom: 18px;
      min-height: 0;
    }

    .section-head.compact {
      padding-bottom: 12px;
    }

    .bar-chart {
      display: grid;
      gap: 12px;
      padding: 0 20px;
    }

    .bar-row {
      display: grid;
      grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1.5fr) minmax(118px, 0.45fr);
      gap: 14px;
      align-items: center;
      color: var(--muted);
      font-size: 0.88rem;
      font-weight: 750;
    }

    .bar-row > span,
    .bar-row > strong {
      min-width: 0;
      line-height: 1.25;
    }

    .bar-row > strong {
      justify-self: end;
      text-align: right;
      max-width: 140px;
    }

    .bar-track {
      height: 12px;
      overflow: hidden;
      border-radius: 999px;
      background: #edf0eb;
    }

    .bar-fill {
      height: 100%;
      border-radius: inherit;
      background: var(--accent);
      transition: width 240ms ease;
    }

    .donut-wrap {
      display: grid;
      grid-template-columns: 126px minmax(0, 1fr);
      gap: 18px;
      align-items: center;
      padding: 0 20px;
    }

    .donut {
      display: grid;
      width: 126px;
      height: 126px;
      place-items: center;
      border-radius: 50%;
      border: 12px solid var(--accent-soft);
      background: #fff;
    }

    .donut span {
      display: grid;
      width: 82px;
      height: 82px;
      place-items: center;
      border-radius: 50%;
      background: #fff;
      font-size: 1rem;
      font-weight: 850;
      line-height: 1.15;
      text-align: center;
    }

    .legend-list,
    .priority-list {
      display: grid;
      gap: 10px;
      padding: 0 20px;
    }

    .legend-list {
      padding: 0;
    }

    .legend-item,
    .priority-item {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-soft);
      color: var(--muted);
      font-weight: 750;
    }

    .legend-item .icon-insight {
      width: 34px;
      height: 34px;
    }

    .legend-dot {
      display: inline-block;
      width: 10px;
      height: 10px;
      margin-right: 8px;
      border-radius: 999px;
      background: var(--accent);
    }

    .calendar-list {
      padding: 0 20px;
    }

    .section-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      padding: 20px;
    }

    .filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 0 20px 20px;
    }

    .chip {
      min-height: 34px;
      padding: 0 14px;
      border-radius: 999px;
      background: #f4f1ea;
      color: var(--muted);
      font-weight: 700;
      transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
    }

    .chip.active {
      background: var(--accent-soft);
      color: var(--accent-dark);
      box-shadow: inset 0 0 0 1px rgba(47, 156, 134, 0.18);
      transform: translateY(-1px);
    }

    .account-pill {
      align-self: center;
      max-width: 220px;
      overflow: hidden;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .account-panel,
    .bank-panel,
    .weather-panel,
    .danger-zone-panel,
    .account-controls-panel {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      margin: 0;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-soft);
    }

    .account-sections {
      display: grid;
      gap: 18px;
      padding: 0 20px 20px;
    }

    .account-section-title {
      margin: 0 0 10px;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .account-section-danger .account-section-title {
      color: var(--danger);
    }

    .achievement-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 10px;
    }

    .achievement-pill {
      display: inline-flex;
      align-items: center;
      padding: 4px 10px;
      border-radius: 999px;
      background: rgba(47, 156, 134, 0.1);
      color: var(--accent-dark);
      font-size: 0.74rem;
      font-weight: 700;
    }

    .welcome-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 14px;
      padding: 18px 20px;
      border-color: rgba(47, 156, 134, 0.28);
      background: linear-gradient(135deg, rgba(223, 243, 237, 0.85), rgba(255, 253, 248, 0.95));
    }

    .welcome-banner[hidden] {
      display: none;
    }

    .welcome-banner-copy {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      min-width: 0;
    }

    .welcome-banner-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .quick-actions {
      padding: 16px 18px;
    }

    .quick-actions-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
    }

    .quick-actions-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
    }

    .quick-action-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 84px;
      padding: 12px 8px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fffdf8;
      color: var(--ink);
      font: inherit;
      font-size: 0.78rem;
      font-weight: 700;
      cursor: pointer;
      transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    }

    .quick-action-btn:hover,
    .quick-action-btn:focus-visible {
      transform: translateY(-1px);
      border-color: rgba(47, 156, 134, 0.35);
      box-shadow: 0 8px 18px rgba(91, 65, 35, 0.08);
    }

    .readiness-dashboard-card {
      padding: 18px 20px;
      border-color: rgba(47, 156, 134, 0.22);
      background: linear-gradient(180deg, rgba(223, 243, 237, 0.35), #fffdf8);
    }

    .readiness-dashboard-card[hidden] {
      display: none;
    }

    .readiness-dashboard-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 12px;
    }

    .readiness-dashboard-head h2 {
      margin: 4px 0 0;
      font-size: 1.15rem;
    }

    .readiness-item {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .readiness-action {
      margin-left: auto;
    }

    .command-palette-backdrop .modal {
      width: min(560px, calc(100vw - 28px));
      padding-bottom: 14px;
    }

    .command-search-field input {
      width: 100%;
      margin-top: 12px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fffdf8;
      font: inherit;
      font-size: 1rem;
    }

    .command-results {
      display: grid;
      gap: 6px;
      max-height: 320px;
      margin-top: 12px;
      overflow-y: auto;
    }

    .command-result {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      width: 100%;
      padding: 12px 14px;
      border: 1px solid transparent;
      border-radius: 12px;
      background: transparent;
      color: var(--ink);
      text-align: left;
      font: inherit;
      cursor: pointer;
    }

    .command-result:hover,
    .command-result.active,
    .command-result:focus-visible {
      border-color: rgba(47, 156, 134, 0.25);
      background: rgba(47, 156, 134, 0.08);
    }

    .command-result em {
      color: var(--muted);
      font-style: normal;
      font-size: 0.76rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .command-empty {
      padding: 18px 8px;
      color: var(--muted);
      text-align: center;
      font-size: 0.9rem;
    }

    .command-kbd-hint,
    .command-trigger kbd {
      display: inline-flex;
      align-items: center;
      padding: 3px 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--muted);
      font-family: inherit;
      font-size: 0.72rem;
      font-weight: 700;
    }

    body.celebrate-milestone .main {
      animation: celebratePulse 1.2s ease;
    }

    @keyframes celebratePulse {
      0%, 100% { transform: none; }
      35% { transform: scale(1.002); }
    }

    :focus-visible {
      outline: 2px solid rgba(47, 156, 134, 0.65);
      outline-offset: 2px;
    }

    button:focus:not(:focus-visible),
    a:focus:not(:focus-visible),
    input:focus:not(:focus-visible),
    select:focus:not(:focus-visible),
    textarea:focus:not(:focus-visible) {
      outline: none;
    }

    .modal-backdrop {
      transition: opacity 0.22s ease;
    }

    .modal-backdrop.open .modal {
      animation: modalSlide 0.24s ease;
    }

    body.modal-open {
      overflow: hidden;
    }

    @keyframes modalSlide {
      from { opacity: 0; transform: translateY(10px) scale(0.985); }
      to { opacity: 1; transform: none; }
    }

    .account-panel strong,
    .bank-panel strong {
      display: block;
      margin-top: 4px;
      color: var(--ink);
    }

    .weather-panel:empty,
    .danger-zone-panel:empty {
      display: none;
    }

    .weather-panel strong,
    .danger-zone-panel strong {
      display: block;
      margin-top: 4px;
      color: var(--ink);
    }

    .danger-zone-panel {
      position: relative;
      border-color: rgba(189, 75, 68, 0.25);
      background: rgba(189, 75, 68, 0.04);
    }

    .danger-zone-panel .label {
      color: var(--danger);
    }

    .account-version {
      margin-top: 10px;
      font-size: 0.78rem;
    }

    .text-button-link {
      color: var(--accent-dark);
      text-decoration: none;
      border-bottom: 1px dashed rgba(33, 120, 101, 0.4);
    }

    .text-button-link:hover {
      border-bottom-style: solid;
    }

    .account-email-line {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 6px;
    }

    .verified-badge {
      display: inline-flex;
      align-items: center;
      min-height: 24px;
      padding: 0 9px;
      border: 1px solid rgba(47, 156, 134, 0.24);
      border-radius: 999px;
      background: rgba(238, 248, 243, 0.9);
      color: var(--accent-dark);
      font-size: 0.76rem;
      font-weight: 900;
    }

    .verified-badge.unverified {
      border-color: rgba(176, 70, 58, 0.24);
      background: rgba(255, 242, 238, 0.9);
      color: #9b3329;
    }

    .bank-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-end;
    }

    .bank-list {
      display: grid;
      flex-basis: 100%;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 8px;
    }

    .bank-list span {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
      color: var(--muted);
      font-size: 0.9rem;
    }

    .transactions-panel {
      display: grid;
      flex-basis: 100%;
      gap: 10px;
      min-width: 0;
    }

    .transactions-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }

    .transactions-scroll {
      display: grid;
      max-height: 320px;
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: white;
    }

    .transaction-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      min-width: 0;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
    }

    .transaction-row:last-child {
      border-bottom: 0;
    }

    .transaction-row div {
      min-width: 0;
    }

    .transaction-row strong,
    .transaction-row span {
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .transaction-row span {
      margin-top: 3px;
      color: var(--muted);
      font-size: 0.84rem;
    }

    .transaction-row em {
      flex: 0 0 auto;
      font-style: normal;
      font-weight: 900;
    }

    .transaction-row em.outflow {
      color: var(--danger);
    }

    .transaction-row em.inflow {
      color: var(--accent-dark);
    }

    .login-code-field {
      display: none;
      margin-top: 12px;
    }

    .login-code-field.visible {
      display: grid;
    }

    .bill-list {
      display: grid;
      gap: 14px;
    }

    .mailbox-stack {
      gap: 16px;
      padding-bottom: 18px;
    }

    .mailbox-stack .letter-card {
      margin-bottom: 0;
    }

    .mailbox-stack .letter-card:nth-child(2) {
      transform: none;
    }

    .mailbox-stack .letter-card:nth-child(3) {
      transform: none;
    }

    .mailbox-stack .letter-card:hover {
      z-index: 3;
      transform: translateY(-6px);
    }

    .bill-card {
      padding: 26px;
    }

    .sealed-letter {
      opacity: 0.82;
    }

    .letter-card {
      position: relative;
      overflow: hidden;
      min-height: 260px;
      padding: 26px;
      background: #fffdf8;
      transform: translateY(0);
      transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    }

    .letter-card::before,
    .letter-card::after {
      content: "";
      position: absolute;
      pointer-events: none;
    }

    .letter-card::before {
      inset: 0;
      border-radius: inherit;
      border: 1px solid rgba(231, 224, 211, 0.75);
    }

    .letter-card::after {
      right: -40px;
      bottom: -56px;
      width: 220px;
      height: 160px;
      border: 1px solid rgba(231, 224, 211, 0.9);
      transform: rotate(-18deg);
      background: rgba(248, 244, 236, 0.48);
    }

    .letter-card .progress-bar::after,
    .stationery::after {
      content: "";
      position: absolute;
      pointer-events: none;
    }

    .letter-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 22px 50px rgba(44, 55, 49, 0.13);
    }

    .letter-card.read {
      opacity: 0.72;
    }

    .letter-stamp {
      position: absolute;
      top: 18px;
      right: 18px;
      display: grid;
      width: 72px;
      height: 72px;
      place-items: center;
      border: 1px dashed rgba(47, 156, 134, 0.55);
      border-radius: 12px;
      background: rgba(255, 253, 248, 0.72);
      color: var(--accent-dark);
      overflow: hidden;
      z-index: 1;
    }

    .letter-stamp::after {
      content: "";
      position: absolute;
      inset: 5px;
      border: 1px solid rgba(47, 156, 134, 0.25);
      border-radius: 8px;
      pointer-events: none;
    }

    .letter-stamp .mikci-icon,
    .wax-seal .mikci-icon {
      position: relative;
      z-index: 1;
    }

    .letter-stamp .icon-goal {
      width: 44px;
      height: 44px;
    }

    .stamp-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .unread-badge {
      position: relative;
      z-index: 1;
      display: inline-flex;
      width: fit-content;
      min-height: 24px;
      align-items: center;
      padding: 0 9px;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-dark);
      font-size: 0.72rem;
      font-weight: 850;
    }

    .letter-address {
      position: relative;
      z-index: 1;
      display: grid;
      gap: 16px;
      max-width: calc(100% - 92px);
      margin-top: 18px;
    }

    .letter-preview {
      position: relative;
      z-index: 1;
      max-width: min(560px, calc(100% - 92px));
      margin-top: 18px;
      color: var(--ink);
      font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
      line-height: 1.45;
    }

    .letter-label {
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 850;
      text-transform: uppercase;
    }

    .letter-meta {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      margin-top: 18px;
      color: var(--muted);
      font-size: 0.86rem;
      font-weight: 800;
    }

    .letter-meta::after {
      content: "POSTMARK " attr(data-date);
      display: none;
    }

    .letter-amount {
      position: relative;
      z-index: 1;
      display: inline-grid;
      gap: 2px;
      margin-top: 14px;
      color: var(--muted);
      font-size: 1.2rem;
      font-weight: 850;
      line-height: 1.12;
    }

    .letter-amount span {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 850;
      text-transform: uppercase;
    }

    .bill-top {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 14px;
      align-items: start;
    }

    .bill-icon {
      display: grid;
      width: 48px;
      height: 48px;
      place-items: center;
    }

    .bill-desc {
      margin-top: 4px;
      color: var(--muted);
      line-height: 1.45;
    }

    .status-pill {
      padding: 8px 12px;
      border-radius: 999px;
      background: #eff4f1;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
      white-space: nowrap;
      transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
    }

    .status-pill.due {
      background: #fff4d7;
      color: #8a5b0f;
    }

    .status-pill.overdue {
      background: #ffe8e2;
      color: var(--danger);
    }

    .status-pill.paid {
      background: var(--accent-soft);
      color: var(--accent-dark);
    }

    .progress-wrap {
      position: relative;
      z-index: 1;
      margin: 16px 0 10px;
    }

    .journey-focus {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 10px;
    }

    .journey-focus div {
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 253, 248, 0.72);
    }

    .journey-focus strong {
      display: block;
      margin-top: 3px;
      color: var(--ink);
    }

    .progress-meta {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted);
      font-size: 0.9rem;
      font-weight: 700;
    }

    .progress-bar {
      height: 10px;
      margin-top: 8px;
      overflow: hidden;
      border-radius: 999px;
      background: #edf0eb;
    }

    .progress-fill {
      height: 100%;
      border-radius: inherit;
      background: var(--accent);
      transition: width 240ms ease;
    }

    .bill-footer {
      position: relative;
      z-index: 1;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
    }

    .bill-facts {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      color: var(--muted);
      font-size: 0.9rem;
    }

    .bill-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
    }

    .letter-overflow {
      position: relative;
    }

    .letter-overflow summary {
      display: inline-flex;
      min-width: 34px;
      min-height: 34px;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #fff;
      color: var(--muted);
      font-weight: 900;
      list-style: none;
      cursor: pointer;
    }

    .letter-overflow summary::-webkit-details-marker {
      display: none;
    }

    .letter-overflow div {
      position: absolute;
      right: 0;
      bottom: calc(100% + 8px);
      z-index: 5;
      display: grid;
      gap: 4px;
      min-width: 150px;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fffdf8;
      box-shadow: 0 14px 28px rgba(44, 55, 49, 0.12);
    }

    .letter-overflow button {
      min-height: 34px;
      padding: 0 10px;
      border-radius: 9px;
      background: transparent;
      color: var(--ink);
      text-align: left;
      font-weight: 750;
    }

    .letter-overflow button:hover {
      background: var(--panel-soft);
    }

    .insights {
      position: sticky;
      top: 22px;
      display: grid;
      align-content: start;
      gap: 16px;
      height: calc(100vh - 44px);
      overflow: auto;
    }

    .insight-card {
      padding: 18px;
    }

    .stash-balance,
    .future-suggestion-card {
      position: relative;
      overflow: hidden;
      padding: 20px;
      background: #ffffff;
    }

    .future-suggestion-card {
      border-color: rgba(207, 179, 132, 0.78);
      overflow: visible;
      background:
        radial-gradient(circle at 85% 20%, rgba(47, 156, 134, 0.1), transparent 28%),
        linear-gradient(180deg, #fffdf8, #f7ecd8);
      box-shadow: 0 18px 36px rgba(91, 65, 35, 0.12);
    }

    .card-corner-icon {
      position: absolute;
      right: 20px;
      bottom: 18px;
      opacity: 0.72;
    }

    .stash-balance .amount {
      margin-top: 10px;
      font-size: 2.2rem;
      font-weight: 850;
    }

    .future-suggestion-card h2 {
      position: relative;
      z-index: 1;
      margin-top: 10px;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.28rem;
    }

    .future-suggestion-copy {
      position: relative;
      z-index: 1;
      margin: 8px 0 0;
      color: #59665f;
      line-height: 1.35;
    }

    .future-suggestion-amount {
      position: relative;
      z-index: 1;
      margin-top: 4px;
      color: var(--accent-dark);
      font-family: Georgia, "Times New Roman", serif;
      font-size: 2.45rem;
      font-weight: 800;
      line-height: 1;
    }

    .future-suggestion-goal {
      position: relative;
      z-index: 1;
      display: block;
      margin-top: 6px;
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.16rem;
    }

    .future-suggestion-actions {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 14px;
    }

    .future-suggestion-actions .btn {
      min-width: 0;
      padding-inline: 10px;
    }

    .future-suggestion-note {
      position: relative;
      z-index: 1;
      margin: 12px 0 0;
      color: var(--muted);
      font-size: 0.8rem;
      line-height: 1.35;
    }

    .sandbox-badge {
      position: relative;
      z-index: 1;
      display: inline-flex;
      width: max-content;
      margin-top: 8px;
      padding: 4px 8px;
      border: 1px solid rgba(47, 156, 134, 0.24);
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-dark);
      font-size: 0.72rem;
      font-weight: 900;
      text-transform: uppercase;
    }

    .suggestion-why {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 1fr;
      gap: 7px;
      margin-top: 12px;
      width: 100%;
      min-width: 0;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.66);
    }

    .suggestion-why span {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .suggestion-why strong {
      flex: 0 1 auto;
      min-width: 0;
      color: var(--ink);
      font-size: 0.88rem;
      text-align: right;
      overflow-wrap: anywhere;
    }

    .suggestion-why p {
      margin: 2px 0 0;
      color: var(--muted);
      font-size: 0.84rem;
      line-height: 1.35;
    }

    .today-card {
      position: relative;
      overflow: hidden;
      padding: 20px;
      border-color: rgba(207, 179, 132, 0.7);
      background: #fffdf8;
      box-shadow: 0 18px 36px rgba(91, 65, 35, 0.1);
    }

    .today-card.morning {
      background: #fff1cc;
    }

    .today-card.afternoon {
      background: #eaf3f4;
    }

    .today-card.evening {
      background: #f4d6a7;
    }

    .today-card.night {
      background: #26334c;
      color: #fff9ed;
      border-color: rgba(255, 249, 237, 0.22);
    }

    .today-card.night .label,
    .today-card.night .today-date {
      color: rgba(255, 249, 237, 0.72);
    }

    .today-scene {
      position: absolute;
      inset: 0;
      pointer-events: none;
      opacity: 0.9;
    }

    .today-sun,
    .today-moon,
    .today-star,
    .today-cloud {
      position: absolute;
      display: block;
    }

    .today-sun {
      right: 24px;
      top: 24px;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: #e8ad4f;
      box-shadow: 0 0 0 10px rgba(232, 173, 79, 0.13);
    }

    .today-moon {
      display: none;
      right: 26px;
      top: 24px;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      background: #f5ead5;
      box-shadow: -10px 4px 0 #26334c inset, 0 0 16px rgba(245, 234, 213, 0.22);
    }

    .today-cloud {
      width: 54px;
      height: 20px;
      border-radius: 999px;
      background: rgba(255, 253, 248, 0.72);
      animation: cloudDrift 28s ease-in-out infinite alternate;
    }

    .today-cloud::before,
    .today-cloud::after {
      content: "";
      position: absolute;
      bottom: 7px;
      border-radius: 50%;
      background: inherit;
    }

    .today-cloud::before {
      left: 10px;
      width: 22px;
      height: 22px;
    }

    .today-cloud::after {
      right: 9px;
      width: 18px;
      height: 18px;
    }

    .today-cloud.one {
      right: 56px;
      top: 70px;
    }

    .today-cloud.two {
      right: 10px;
      top: 104px;
      opacity: 0.62;
      animation-duration: 34s;
    }

    .today-star {
      display: none;
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #fff9ed;
    }

    .today-star.one {
      right: 86px;
      top: 40px;
    }

    .today-star.two {
      right: 52px;
      top: 84px;
    }

    .today-card.night .today-sun,
    .today-card.night .today-cloud {
      display: none;
    }

    .today-card.night .today-moon,
    .today-card.night .today-star {
      display: block;
    }

    .today-card.weather-cloudy {
      background: #e3e8e6;
    }

    .today-card.weather-cloudy .today-sun {
      opacity: 0.45;
    }

    .today-card.weather-rainy {
      background: #dbe4e9;
    }

    .today-card.night.weather-rainy {
      background: #202b40;
    }

    .today-card.weather-rainy .today-sun {
      display: none;
    }

    .today-card.weather-snowy {
      background: #eef2f5;
    }

    .today-card.night.weather-snowy {
      background: #2b3752;
    }

    .today-card.weather-snowy .today-sun {
      opacity: 0.3;
    }

    .today-drop {
      display: none;
      position: absolute;
      width: 3px;
      height: 10px;
      border-radius: 999px;
      background: rgba(103, 132, 150, 0.55);
      animation: dropFall 1.6s linear infinite;
    }

    .today-card.weather-rainy .today-drop {
      display: block;
    }

    .today-card.weather-snowy .today-drop {
      display: block;
      width: 6px;
      height: 6px;
      background: rgba(255, 255, 255, 0.9);
      animation-duration: 3.2s;
    }

    .today-drop.one {
      right: 40px;
      top: 46px;
    }

    .today-drop.two {
      right: 74px;
      top: 62px;
      animation-delay: 0.5s;
    }

    .today-drop.three {
      right: 22px;
      top: 78px;
      animation-delay: 1s;
    }

    @keyframes dropFall {
      from {
        transform: translateY(-8px);
        opacity: 0;
      }
      30% {
        opacity: 1;
      }
      to {
        transform: translateY(26px);
        opacity: 0;
      }
    }

    .today-weather {
      position: relative;
      z-index: 1;
      margin-top: 6px;
      font-size: 0.92rem;
      font-weight: 600;
      color: inherit;
      opacity: 0.85;
    }

    .today-time {
      position: relative;
      z-index: 1;
      margin-top: 12px;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 2.35rem;
      font-weight: 800;
      line-height: 1;
    }

    .today-day {
      position: relative;
      z-index: 1;
      margin-top: 6px;
      font-weight: 800;
    }

    .today-date {
      position: relative;
      z-index: 1;
      margin-top: 4px;
      color: var(--muted);
      font-size: 0.92rem;
    }

    .quote-card {
      position: relative;
      overflow: hidden;
      padding: 20px;
      background: var(--ink);
      color: #fff;
    }

    .quote-card .card-corner-icon {
      opacity: 0.94;
      filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.16));
    }

    .quote-card h2,
    .quote-card p {
      position: relative;
      z-index: 1;
      max-width: 220px;
    }

    .quote-card p {
      color: #dfe9e5;
      line-height: 1.45;
    }

    .coach-list,
    .calendar-list,
    .history-list {
      display: grid;
      gap: 10px;
    }

    .coach-item,
    .calendar-item,
    .history-item {
      padding: 13px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-soft);
      color: var(--ink);
      line-height: 1.35;
    }

    .coach-item {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 10px;
      align-items: center;
    }

    .journey-year-group {
      display: grid;
      gap: 18px;
    }

    .journey-year-group h3 {
      margin: 0;
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.4rem;
    }

    .journey-month-group {
      display: grid;
      gap: 12px;
    }

    .journey-month-head {
      padding: 4px 2px;
      border-bottom: 1px solid rgba(207, 179, 132, 0.56);
    }

    .journey-month-head h4 {
      margin: 0;
      color: #26302d;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.12rem;
    }

    .journey-month-head p {
      margin: 5px 0 0;
      color: var(--muted);
      font-family: Georgia, "Times New Roman", serif;
      line-height: 1.35;
    }

    .journey-story-list {
      display: grid;
      gap: 12px;
    }

    .journey-story-entry {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 14px;
      align-items: start;
      padding: 16px;
      border: 1px solid rgba(231, 224, 211, 0.95);
      border-radius: 16px;
      background: #fffdf8;
      box-shadow: 0 12px 24px rgba(91, 65, 35, 0.08);
      animation: storyEntryIn 420ms ease both;
      animation-delay: var(--entry-delay);
      transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .journey-story-entry:hover {
      transform: translateY(-2px);
      box-shadow: 0 16px 30px rgba(91, 65, 35, 0.12);
    }

    .journey-entry-art {
      display: grid;
      width: 58px;
      height: 58px;
      place-items: center;
      border: 1px solid rgba(207, 179, 132, 0.58);
      border-radius: 14px;
      background: #f8eedc;
    }

    .journey-entry-topline {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
    }

    .journey-entry-topline strong {
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.08rem;
    }

    .journey-entry-topline time {
      color: var(--muted);
      font-size: 0.8rem;
      white-space: nowrap;
    }

    .journey-entry-copy p {
      margin: 7px 0 0;
      color: #4d5a54;
      line-height: 1.42;
    }

    .journey-entry-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
      align-items: center;
    }

    .journey-mood-badge,
    .journey-amount {
      display: inline-flex;
      align-items: center;
      min-height: 26px;
      padding: 0 10px;
      border-radius: 999px;
      background: #f6efe1;
      color: #59665f;
      font-size: 0.78rem;
      font-weight: 800;
    }

    .journey-amount {
      background: #dff3ed;
      color: var(--accent-dark);
    }

    .reflection-page-card {
      overflow: hidden;
      background:
        radial-gradient(circle at 12% 0%, rgba(207, 172, 116, 0.1), transparent 28%),
        linear-gradient(180deg, #fffdf8, #fbf4e8);
    }

    .daily-reflection-card {
      position: relative;
      min-height: 330px;
      padding: 38px clamp(24px, 6vw, 62px) 46px;
      border: 1px solid rgba(207, 179, 132, 0.72);
      border-radius: 16px;
      background:
        radial-gradient(circle at 18% 18%, rgba(185, 136, 70, 0.08), transparent 18%),
        linear-gradient(90deg, rgba(205, 174, 126, 0.13) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(248, 238, 219, 0.98));
      background-size: auto, 100% 34px, auto;
      box-shadow: 0 18px 36px rgba(91, 65, 35, 0.12);
      overflow: hidden;
    }

    .daily-reflection-card::before {
      content: "";
      position: absolute;
      inset: 12px;
      border: 1px solid rgba(199, 160, 100, 0.22);
      border-radius: 11px;
      pointer-events: none;
    }

    .reflection-leaf {
      position: absolute;
      top: 26px;
      right: 34px;
      width: 42px;
      height: 42px;
      opacity: 0.74;
      transform: rotate(8deg);
    }

    .reflection-seal {
      position: absolute;
      right: 38px;
      bottom: 34px;
      width: 58px;
      height: 58px;
      opacity: 0.82;
    }

    .reflection-handwritten {
      position: relative;
      z-index: 1;
      max-width: 620px;
      margin-top: 18px;
      color: #2c3731;
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(1.35rem, 3vw, 2.05rem);
      line-height: 1.28;
    }

    .reflection-handwritten p,
    .reflection-letter-card p {
      margin: 0 0 8px;
    }

    .reflection-space {
      min-height: 12px;
    }

    .reflection-observations {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 10px;
      margin-top: 16px;
    }

    .reflection-observation,
    .reflection-encouragement,
    .reflection-sidebar-note {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 10px;
      align-items: center;
      padding: 13px;
      border: 1px solid rgba(231, 224, 211, 0.95);
      border-radius: 14px;
      background: rgba(255, 253, 248, 0.76);
      color: var(--ink);
      line-height: 1.38;
    }

    .reflection-letter-card {
      margin-top: 16px;
      padding: 24px;
      border: 1px solid rgba(207, 179, 132, 0.62);
      border-radius: 16px;
      background:
        linear-gradient(135deg, transparent 0 78%, rgba(204, 174, 126, 0.22) 78.4%, transparent 79%),
        #fff9ed;
      box-shadow: 0 12px 24px rgba(91, 65, 35, 0.1);
      color: #34403b;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.08rem;
      line-height: 1.5;
    }

    .reflection-encouragement {
      margin-top: 16px;
      background: #f6efe1;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.04rem;
    }

    .reflection-signature {
      display: grid;
      justify-items: end;
      gap: 4px;
      padding: 18px 8px 0;
      color: #59665f;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.08rem;
    }

    .reflection-signature strong {
      color: #26302d;
      font-weight: 700;
    }

    .reflection-sidebar-note {
      grid-template-columns: 1fr;
      gap: 12px;
      padding: 15px;
      background: #fff9ed;
    }

    .reflection-sidebar-head {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .reflection-sidebar-note strong {
      display: block;
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1rem;
    }

    .reflection-sidebar-note p {
      margin: 0;
      color: var(--muted);
      font-family: Georgia, "Times New Roman", serif;
      line-height: 1.45;
    }

    .reflection-sidebar-insight {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(47, 156, 134, 0.07);
      font-size: 0.84rem;
      color: var(--ink);
      line-height: 1.4;
    }

    .reflection-sidebar-action {
      justify-self: start;
    }

    .calendar-grid {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      gap: 10px;
      padding: 20px;
    }

    .calendar-day {
      min-height: 108px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel);
      color: var(--ink);
      text-align: left;
      transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
    }

    .calendar-day.outside-month {
      opacity: 0.45;
      background: var(--panel-soft);
    }

    .calendar-day.has-mail {
      cursor: pointer;
    }

    .calendar-day.has-mail:hover {
      transform: translateY(-2px);
      border-color: rgba(47, 156, 134, 0.35);
      box-shadow: 0 12px 26px rgba(44, 55, 49, 0.1);
    }

    .calendar-day strong {
      display: block;
      margin-bottom: 8px;
    }

    .calendar-event {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 6px;
      padding: 6px;
      border-radius: 9px;
      background: var(--accent-soft);
      color: var(--accent-dark);
      font-size: 0.78rem;
      font-weight: 800;
    }

    .calendar-event.income {
      background: rgba(47, 156, 134, 0.12);
      color: var(--accent-dark);
    }

    .calendar-event.bill {
      background: rgba(183, 121, 31, 0.13);
      color: var(--warn);
    }

    .calendar-event.reminder {
      background: rgba(91, 116, 107, 0.12);
      color: var(--muted);
    }

    .calendar-event.more {
      background: var(--panel-soft);
      color: var(--muted);
    }

    .calendar-event .icon-goal {
      width: 34px;
      height: 34px;
    }

    #calendarItemForm[data-type="income"] .calendar-due-field,
    #calendarItemForm[data-type="income"] .calendar-reminder-field,
    #calendarItemForm[data-type="reminder"] .calendar-money-field,
    #calendarItemForm[data-type="reminder"] .calendar-due-field,
    #calendarItemForm[data-type="reminder"] .calendar-reminder-field,
    #calendarItemForm[data-type="bill"] .calendar-start-field {
      display: none;
    }

    .calendar-summary-grid {
      margin-bottom: 18px;
    }

    .goal-card-head {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .goal-card-head h3 {
      margin: 0;
    }

    .goal-percent {
      margin-left: auto;
      font-weight: 700;
      font-size: 1.05rem;
      color: var(--accent);
    }

    .goal-card .progress-bar {
      margin-top: 12px;
    }

    .goal-card-amounts {
      display: flex;
      justify-content: space-between;
      margin-top: 8px;
      font-size: 0.88rem;
      font-weight: 600;
    }

    .goal-card-amounts span:last-child {
      color: var(--muted);
      font-weight: 500;
    }

    .goal-recent-moments {
      display: grid;
      gap: 4px;
      margin-top: 10px;
      padding: 10px 12px;
      border-radius: 12px;
      background: rgba(47, 156, 134, 0.06);
      font-size: 0.82rem;
      color: var(--muted);
    }

    .goal-letter-note {
      margin-top: 8px;
      font-size: 0.82rem;
    }

    .goal-empty-state {
      display: grid;
      justify-items: center;
      gap: 14px;
      padding: 12px 0 20px;
      grid-column: 1 / -1;
    }

    .calendar-plaid-row {
      display: flex;
      flex-wrap: wrap;
      gap: 3px;
      margin-top: 3px;
    }

    .calendar-plaid-badge {
      display: inline-block;
      padding: 1px 6px;
      border-radius: 999px;
      font-size: 0.62rem;
      font-weight: 700;
      line-height: 1.5;
      white-space: nowrap;
    }

    .calendar-plaid-badge.out {
      background: rgba(189, 75, 68, 0.12);
      color: var(--danger);
    }

    .calendar-plaid-badge.in {
      background: rgba(47, 156, 134, 0.14);
      color: var(--accent-dark);
    }

    .day-details-plaid {
      margin-top: 14px;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-soft);
      display: grid;
      gap: 8px;
    }

    .day-details-plaid-totals {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .day-details-plaid-totals .calendar-plaid-badge {
      font-size: 0.74rem;
      padding: 3px 10px;
    }

    .day-details-transaction {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      padding: 8px 0;
      border-top: 1px dashed var(--line);
    }

    .day-details-transaction strong {
      display: block;
      font-size: 0.88rem;
    }

    .day-details-transaction span {
      display: block;
      color: var(--muted);
      font-size: 0.76rem;
    }

    .day-details-transaction em {
      font-style: normal;
      font-weight: 700;
      font-size: 0.88rem;
    }

    .day-details-transaction em.inflow {
      color: var(--accent-dark);
    }

    .day-details-transaction em.outflow {
      color: var(--danger);
    }

    .account-controls {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px dashed var(--line);
    }

    .notifications-panel {
      display: grid;
      gap: 12px;
      margin: 0;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-soft);
    }

    .notifications-panel:empty {
      display: none;
    }

    .push-pref-list {
      display: grid;
      gap: 10px;
      padding-top: 4px;
    }

    .push-pref-list.disabled {
      opacity: 0.55;
    }

    .goal-priority-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px dashed var(--line);
    }

    .goal-priority-row select {
      flex: 1;
      min-width: 0;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fffdf8;
      color: var(--ink);
      font: inherit;
      font-size: 0.85rem;
    }

    #readinessCard:empty,
    #readinessCard[hidden] {
      display: none;
    }

    .readiness-list {
      display: grid;
      gap: 8px;
      margin-top: 12px;
    }

    .readiness-item {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 0.86rem;
      color: var(--muted);
    }

    .readiness-item.done {
      color: var(--ink);
    }

    .readiness-check {
      display: grid;
      place-items: center;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      border: 1px solid var(--line);
      background: #fffdf8;
      font-size: 0.7rem;
      color: var(--muted);
      flex-shrink: 0;
    }

    .readiness-item.done .readiness-check {
      border-color: rgba(47, 156, 134, 0.4);
      background: rgba(47, 156, 134, 0.12);
      color: var(--accent-dark);
    }

    .readiness-score {
      margin-top: 6px;
      font-size: 1.4rem;
      font-weight: 800;
    }

    .account-controls .bank-actions {
      margin-top: 8px;
    }

    .delete-account-body {
      display: grid;
      gap: 14px;
      margin-top: 14px;
    }

    .delete-step {
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel-soft);
      display: grid;
      gap: 8px;
    }

    .delete-step-head {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .delete-step-number {
      display: grid;
      place-items: center;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: rgba(189, 75, 68, 0.12);
      color: var(--danger);
      font-size: 0.82rem;
      font-weight: 700;
      flex: 0 0 26px;
    }

    .delete-final-warning {
      border-color: rgba(189, 75, 68, 0.35);
      background: rgba(189, 75, 68, 0.05);
    }

    .onboarding-modal {
      max-width: 440px;
      text-align: center;
    }

    .onboarding-logo {
      width: 58px;
      height: 58px;
      margin: 4px auto 10px;
      display: block;
    }

    .onboarding-progress {
      display: flex;
      justify-content: center;
      gap: 7px;
      margin-bottom: 14px;
    }

    .onboarding-progress span {
      width: 26px;
      height: 5px;
      border-radius: 999px;
      background: rgba(38, 48, 45, 0.14);
      transition: background 0.3s ease;
    }

    .onboarding-progress span.done {
      background: var(--accent);
    }

    .onboarding-modal h2 {
      margin: 8px 0 6px;
    }

    .onboarding-actions {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 18px;
    }

    .calendar-reminder-field {
      display: grid;
      gap: 8px;
    }

    .calendar-reminder-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.9rem;
      color: var(--muted);
      cursor: pointer;
    }

    .calendar-reminder-toggle input {
      width: auto;
      min-height: 0;
      accent-color: var(--accent);
    }

    .calendar-items-list {
      display: grid;
      gap: 10px;
    }

    .calendar-item-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: var(--panel);
    }

    .calendar-item-row .calendar-item-main {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .calendar-item-row .calendar-item-meta {
      color: var(--muted);
      font-size: 0.85rem;
    }

    .calendar-item-row .actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .calendar-type-pill {
      display: inline-flex;
      align-items: center;
      padding: 2px 10px;
      border-radius: 999px;
      font-size: 0.72rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      background: var(--accent-soft);
      color: var(--accent-dark);
    }

    .calendar-type-pill.bill {
      background: rgba(183, 121, 31, 0.13);
      color: var(--warn);
    }

    .calendar-type-pill.reminder {
      background: rgba(91, 116, 107, 0.12);
      color: var(--muted);
    }

    .day-details-body {
      display: grid;
      gap: 10px;
      margin-top: 16px;
    }

    .day-details-body .day-details-empty {
      color: var(--muted);
      text-align: center;
      padding: 18px 0 6px;
    }

    .day-details-body .day-details-add {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: center;
      padding-top: 8px;
    }

    .empty-state {
      display: grid;
      gap: 12px;
      place-items: center;
      padding: 28px;
      color: var(--muted);
      text-align: center;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .memory-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fffdf8;
    }

    .field {
      display: grid;
      gap: 6px;
    }

    [hidden] {
      display: none !important;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    label {
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 800;
    }

    input,
    select,
    textarea {
      width: 100%;
      min-height: 42px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fff;
      color: var(--ink);
      outline: 0;
    }

    textarea {
      min-height: 82px;
      resize: vertical;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: rgba(47, 156, 134, 0.7);
      box-shadow: 0 0 0 4px rgba(47, 156, 134, 0.12);
    }

    .login-code-field {
      display: none;
    }

    .login-code-field.visible {
      display: grid;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 20;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(38, 48, 45, 0.28);
      backdrop-filter: blur(6px);
    }

    .modal-backdrop.open {
      display: flex;
      animation: modalFade 160ms ease;
    }

    .modal {
      width: min(680px, 100%);
      max-height: calc(100vh - 40px);
      overflow: auto;
      padding: 20px;
      border-radius: 22px;
      background: #fff;
      box-shadow: 0 26px 70px rgba(38, 48, 45, 0.22);
      animation: paperUnfold 190ms ease;
    }

    .suggestion-why-modal {
      display: grid;
      gap: 12px;
      margin-top: 16px;
    }

    .suggestion-why-modal-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .suggestion-why-modal-grid span {
      min-width: 0;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      color: var(--muted);
      font-size: 0.8rem;
    }

    .suggestion-why-modal-grid strong {
      display: block;
      margin-top: 4px;
      color: var(--ink);
      font-size: 0.96rem;
      overflow-wrap: anywhere;
    }

    .suggestion-why-modal p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
    }

    @media (max-width: 560px) {
      .suggestion-why-modal-grid {
        grid-template-columns: 1fr;
      }
    }

    .letter-modal {
      background: #fffdf8;
    }

    .open-ritual {
      display: grid;
      place-items: center;
      height: 170px;
      margin-top: 16px;
    }

    .ritual-envelope {
      position: relative;
      width: 210px;
      height: 128px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fffdf8;
      box-shadow: var(--shadow);
      animation: envelopeLift 700ms ease forwards;
      transform-style: preserve-3d;
    }

    .ritual-envelope::before,
    .ritual-envelope::after {
      content: "";
      position: absolute;
      inset: auto 0 0;
      height: 78px;
      background: #fbf6eb;
      clip-path: polygon(0 100%, 50% 28%, 100% 100%);
      border-radius: 0 0 14px 14px;
    }

    .ritual-flap {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 76px;
      background: #f7f0e3;
      clip-path: polygon(0 0, 50% 78%, 100% 0);
      transform-origin: top;
      animation: flapOpen 700ms ease forwards;
      z-index: 3;
    }

    .ritual-paper {
      position: absolute;
      left: 24px;
      bottom: 14px;
      width: 162px;
      height: 92px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fffaf1;
      animation: paperSlide 700ms ease forwards;
      z-index: 2;
    }

    .modal-backdrop:not(.opening-letter) .open-ritual {
      display: none;
    }

    .closing-letter .stationery {
      animation: foldAway 520ms ease forwards;
    }

    .closing-letter .letter-modal {
      animation: envelopeReturn 520ms ease forwards;
    }

    .stationery {
      position: relative;
      margin-top: 16px;
      padding: 28px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fffaf1;
      color: var(--ink);
      line-height: 1.7;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 180ms ease, transform 180ms ease;
      overflow: hidden;
      font-family: "Segoe Print", "Bradley Hand ITC", "Comic Sans MS", cursive;
      font-size: 1.02rem;
    }

    .stationery.revealed {
      opacity: 1;
      transform: translateY(0);
    }

    .stationery::before {
      content: "";
      position: absolute;
      top: 18px;
      right: 24px;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: rgba(188, 123, 44, 0.08);
      filter: blur(0.4px);
    }

    .stationery::after {
      inset: 0;
      background:
        repeating-linear-gradient(0deg, rgba(231, 224, 211, 0.18), rgba(231, 224, 211, 0.18) 1px, transparent 1px, transparent 28px);
      opacity: 0.45;
    }

    .stationery p + p {
      margin-top: 16px;
    }

    .signature {
      font-family: "Segoe Script", "Bradley Hand ITC", cursive;
      font-size: 1.15rem;
    }

    .time-capsule-text {
      white-space: normal;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fffdf8;
    }

    .taped-photo {
      position: relative;
      width: min(260px, 100%);
      margin: 0 0 18px auto;
      padding: 8px;
      background: #fffdf8;
      border: 1px solid var(--line);
      transform: rotate(1.5deg);
      box-shadow: 0 12px 26px rgba(44, 55, 49, 0.12);
    }

    .taped-photo::before {
      content: "";
      position: absolute;
      top: -10px;
      left: 50%;
      width: 86px;
      height: 22px;
      transform: translateX(-50%) rotate(-3deg);
      background: rgba(223, 243, 237, 0.72);
      border: 1px solid rgba(47, 156, 134, 0.12);
    }

    .taped-photo img {
      display: block;
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: cover;
      border-radius: 10px;
    }

    .future-timeline {
      display: grid;
      grid-template-columns: auto minmax(120px, 1fr) auto;
      gap: 10px;
      align-items: center;
      margin: 18px 0;
      color: var(--muted);
      font-family: Inter, ui-sans-serif, system-ui, sans-serif;
      font-size: 0.82rem;
      font-weight: 800;
    }

    .timeline-track {
      position: relative;
      height: 2px;
      background: var(--line);
    }

    .timeline-track i {
      position: absolute;
      top: 50%;
      left: var(--progress);
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--accent);
      transform: translate(-50%, -50%);
      box-shadow: 0 0 0 6px var(--accent-soft);
    }

    .memory-notes {
      display: grid;
      gap: 8px;
      margin-top: 18px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: rgba(255, 253, 248, 0.72);
      font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    }

    .memory-notes p {
      display: grid;
      gap: 2px;
      margin: 0;
    }

    .memory-notes span {
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 800;
    }

    .journey-album {
      padding: 16px;
      border: 1px solid rgba(231, 224, 211, 0.95);
      border-radius: 18px;
      background: #fffdf8;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
    }

    .album-teaser {
      display: flex;
      width: 100%;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-top: 18px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fffdf8;
      text-align: left;
    }

    .album-teaser strong {
      display: block;
      margin-top: 3px;
    }

    .album-modal {
      width: min(820px, 100%);
    }

    .album-player {
      margin-top: 18px;
    }

    .album-stage {
      display: grid;
      gap: 18px;
      place-items: center;
      min-height: 420px;
      padding: 24px;
      border: 1px solid var(--line);
      border-radius: 22px;
      background: #fffdf8;
      text-align: center;
    }

    .album-step-count {
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 850;
      text-transform: uppercase;
    }

    .album-stage-art {
      display: grid;
      width: min(420px, 100%);
      min-height: 220px;
      place-items: center;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fbfaf6;
      box-shadow: 0 16px 32px rgba(44, 55, 49, 0.1);
    }

    .album-stage-art img {
      display: block;
      max-width: 100%;
      max-height: 320px;
      object-fit: contain;
      border-radius: 14px;
    }

    .album-stage-copy {
      max-width: 560px;
    }

    .album-stage-copy h3 {
      margin-top: 8px;
      font-size: 1.35rem;
    }

    .album-stage-copy p {
      margin-top: 8px;
      color: var(--muted);
      line-height: 1.5;
    }

    .album-filmstrip {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
      margin-top: 14px;
    }

    .album-filmstrip button {
      width: 34px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #fff;
      color: var(--muted);
      font-weight: 850;
    }

    .album-filmstrip button.active {
      background: var(--accent-soft);
      color: var(--accent-dark);
      border-color: rgba(47, 156, 134, 0.28);
    }

    .album-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }

    .album-head h3 {
      margin-top: 3px;
    }

    .album-timeline {
      position: relative;
      display: grid;
      gap: 14px;
      padding-left: 22px;
    }

    .album-timeline::before {
      content: "";
      position: absolute;
      left: 8px;
      top: 8px;
      bottom: 8px;
      width: 2px;
      background: var(--line);
    }

    .album-entry {
      position: relative;
      display: grid;
      grid-template-columns: 54px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      padding: 12px;
      border: 1px solid rgba(231, 224, 211, 0.9);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.72);
      box-shadow: 0 10px 24px rgba(44, 55, 49, 0.05);
    }

    .album-entry::before {
      content: "";
      position: absolute;
      left: -20px;
      top: 24px;
      width: 10px;
      height: 10px;
      border: 2px solid #fffdf8;
      border-radius: 999px;
      background: var(--accent);
      box-shadow: 0 0 0 1px rgba(47, 156, 134, 0.2);
    }

    .album-entry > img:first-child {
      width: 54px;
      height: 54px;
      object-fit: contain;
      background: #fbfaf6;
      border: 5px solid #fffdf8;
      border-radius: 12px;
      box-shadow: 0 10px 20px rgba(44, 55, 49, 0.12);
    }

    .album-entry.milestone-entry > img:first-child {
      object-fit: contain;
      border: 0;
      box-shadow: none;
    }

    .album-entry span {
      display: block;
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 800;
    }

    .album-entry strong {
      display: block;
      margin-top: 3px;
    }

    .album-entry p {
      margin-top: 4px;
      color: var(--muted);
      line-height: 1.35;
    }

    .journey-summary {
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px dashed var(--line);
    }

    .summary-grid,
    .certificate-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
      gap: 10px;
      margin-top: 12px;
    }

    .summary-grid span,
    .certificate-stats span {
      display: grid;
      gap: 4px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 253, 248, 0.72);
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 800;
    }

    .summary-grid strong,
    .certificate-stats strong {
      color: var(--ink);
      font-size: 0.95rem;
    }

    .memory-collage {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 12px;
      margin-top: 14px;
      align-items: start;
    }

    .memory-collage figure {
      margin: 0;
      padding: 8px 8px 24px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fffdf8;
      box-shadow: 0 14px 28px rgba(44, 55, 49, 0.1);
      transform: rotate(var(--tilt));
    }

    .memory-collage img {
      display: block;
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: contain;
      background: #fbfaf6;
      border-radius: 8px;
    }

    .memory-collage figcaption {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 800;
      text-align: center;
    }

    .archive-card {
      margin-top: 8px;
    }

    .archive-list {
      padding: 0 20px 20px;
    }

    .future-shelf {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
      gap: 16px;
      padding: 18px 20px 28px;
      background:
        linear-gradient(#d9b889 0 12px, transparent 12px),
        linear-gradient(90deg, rgba(188, 123, 44, 0.12), transparent);
      border-radius: 0 0 var(--radius) var(--radius);
    }

    .vault-keepsake {
      position: relative;
      display: grid;
      gap: 14px;
      min-height: 310px;
      padding: 20px;
      overflow: hidden;
      cursor: pointer;
      background:
        linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 248, 223, 0.88)),
        #fffdf8;
      border-color: rgba(188, 123, 44, 0.24);
      box-shadow: 0 18px 38px rgba(44, 55, 49, 0.1);
      transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .vault-keepsake:hover {
      transform: translateY(-3px);
      box-shadow: 0 22px 48px rgba(44, 55, 49, 0.14);
    }

    .vault-keepsake::before,
    .vault-keepsake::after {
      content: "";
      position: absolute;
      pointer-events: none;
    }

    .vault-keepsake::before {
      inset: 12px;
      border: 1px solid rgba(188, 123, 44, 0.16);
      border-radius: 14px;
    }

    .vault-keepsake::after {
      right: -30px;
      bottom: -30px;
      width: 112px;
      height: 112px;
      border-radius: 999px;
      background: rgba(188, 123, 44, 0.12);
    }

    .vault-ribbon {
      position: absolute;
      top: 0;
      left: 22px;
      padding: 10px 10px 14px;
      background: #8f5c2d;
      color: #fffdf8;
      font-size: 0.7rem;
      font-weight: 850;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%);
    }

    .certificate-badge {
      justify-self: end;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 7px 10px;
      border: 1px solid rgba(188, 123, 44, 0.28);
      border-radius: 999px;
      background: rgba(255, 253, 248, 0.82);
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 850;
    }

    .vault-keepsake-art {
      display: grid;
      place-items: center;
      margin-top: 8px;
    }

    .vault-keepsake-copy {
      text-align: center;
    }

    .vault-keepsake-copy h3 {
      margin-top: 6px;
      font-size: 1.2rem;
    }

    .vault-keepsake-copy p {
      margin-top: 6px;
      color: var(--muted);
      line-height: 1.35;
    }

    .vault-keepsake-stats,
    .vault-stats {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .vault-keepsake-stats span,
    .vault-stats span {
      display: grid;
      gap: 4px;
      padding: 10px;
      border: 1px solid rgba(231, 224, 211, 0.92);
      border-radius: 12px;
      background: rgba(255, 253, 248, 0.72);
      color: var(--muted);
      font-size: 0.74rem;
      font-weight: 850;
    }

    .vault-keepsake-stats strong,
    .vault-stats strong {
      color: var(--ink);
      font-size: 0.88rem;
    }

    .vault-keepsake .btn {
      position: relative;
      z-index: 2;
      justify-self: center;
    }

    .memory-vault-page {
      display: grid;
      gap: 18px;
      animation: paperUnfold 420ms ease both;
    }

    .vault-hero {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 18px;
      align-items: center;
      padding: 20px;
      background:
        linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(251, 250, 246, 0.92)),
        var(--panel);
    }

    .vault-hero-copy {
      display: grid;
      gap: 8px;
      justify-items: start;
    }

    .vault-hero-copy h2 {
      font-size: clamp(1.8rem, 3vw, 3rem);
      line-height: 1;
    }

    .vault-hero-copy p {
      max-width: 620px;
      color: var(--muted);
      line-height: 1.5;
    }

    .vault-hero-art {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .vault-final-letter {
      position: relative;
      min-height: 360px;
      padding: clamp(26px, 4vw, 54px);
      overflow: hidden;
      border: 1px solid rgba(188, 123, 44, 0.22);
      border-radius: 18px;
      background:
        repeating-linear-gradient(0deg, rgba(188, 123, 44, 0.045) 0 1px, transparent 1px 31px),
        #fffdf8;
      box-shadow: 0 22px 54px rgba(44, 55, 49, 0.11);
      color: var(--ink);
      font-family: Georgia, "Times New Roman", serif;
      animation: paperUnfold 520ms ease both;
    }

    .vault-final-letter p {
      max-width: 760px;
      margin-top: 18px;
      font-size: 1.12rem;
      line-height: 1.75;
    }

    .vault-final-letter h2 {
      margin-top: 26px;
      font-size: clamp(1.7rem, 3vw, 2.7rem);
      line-height: 1.05;
    }

    .vault-letter-tools {
      position: relative;
      z-index: 2;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
    }

    .vault-letter-tools span {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      color: var(--muted);
      font-family: Inter, ui-sans-serif, system-ui, sans-serif;
      font-size: 0.82rem;
      font-weight: 850;
      text-transform: uppercase;
    }

    .vault-final-letter .signature {
      font-family: cursive;
      font-size: 1.55rem;
      line-height: 1.25;
    }

    .vault-postmark {
      position: absolute;
      top: 78px;
      right: 28px;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 850;
      text-transform: uppercase;
    }

    .paper-corner {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 72px;
      height: 72px;
      background: linear-gradient(135deg, transparent 50%, rgba(188, 123, 44, 0.12) 50%);
    }

    .vault-section {
      padding-bottom: 20px;
    }

    .vault-timeline {
      position: relative;
      display: grid;
      gap: 14px;
      padding: 0 20px 4px 44px;
    }

    .vault-timeline::before {
      content: "";
      position: absolute;
      left: 26px;
      top: 8px;
      bottom: 16px;
      width: 2px;
      background: linear-gradient(var(--accent), rgba(188, 123, 44, 0.28));
    }

    .vault-timeline-item {
      position: relative;
      display: grid;
      grid-template-columns: 62px minmax(0, 1fr);
      gap: 14px;
      align-items: center;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: rgba(255, 253, 248, 0.82);
      box-shadow: 0 12px 24px rgba(44, 55, 49, 0.06);
      animation: paperUnfold 420ms ease both;
    }

    .vault-timeline-item:nth-child(2) { animation-delay: 40ms; }
    .vault-timeline-item:nth-child(3) { animation-delay: 80ms; }
    .vault-timeline-item:nth-child(4) { animation-delay: 120ms; }
    .vault-timeline-item:nth-child(5) { animation-delay: 160ms; }

    .vault-timeline-item::before {
      content: "";
      position: absolute;
      left: -25px;
      top: 28px;
      width: 12px;
      height: 12px;
      border: 3px solid #fffdf8;
      border-radius: 999px;
      background: var(--accent);
      box-shadow: 0 0 0 1px rgba(47, 156, 134, 0.25);
    }

    .vault-timeline-icon,
    .vault-page-media {
      display: grid;
      place-items: center;
      min-width: 0;
    }

    .vault-timeline-icon img,
    .vault-page-media img {
      width: 100%;
      max-width: 62px;
      aspect-ratio: 1;
      object-fit: contain;
      border-radius: 12px;
    }

    .vault-timeline-item.has-photo .vault-timeline-icon img,
    .vault-page-media img {
      object-fit: cover;
      background: #fffdf8;
      border: 5px solid #fff;
      box-shadow: 0 10px 18px rgba(44, 55, 49, 0.12);
    }

    .vault-timeline-item span,
    .vault-timeline-item small {
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 850;
    }

    .vault-timeline-item h3 {
      margin-top: 3px;
    }

    .vault-timeline-item p {
      margin: 5px 0;
      color: var(--muted);
      line-height: 1.4;
    }

    .milestone-collage {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
      padding: 0 20px;
    }

    .milestone-collage article {
      display: grid;
      gap: 8px;
      justify-items: center;
      min-height: 154px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fffdf8;
      text-align: center;
      box-shadow: 0 12px 24px rgba(44, 55, 49, 0.06);
    }

    .milestone-collage span {
      color: var(--muted);
      font-size: 0.84rem;
      line-height: 1.35;
    }

    .vault-book {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 14px;
      padding: 0 20px;
    }

    .vault-page-card {
      display: grid;
      grid-template-columns: 94px minmax(0, 1fr);
      gap: 14px;
      padding: 16px;
      border: 1px solid rgba(188, 123, 44, 0.2);
      border-radius: 16px;
      background:
        repeating-linear-gradient(0deg, rgba(188, 123, 44, 0.035) 0 1px, transparent 1px 28px),
        #fffdf8;
      box-shadow: 0 12px 26px rgba(44, 55, 49, 0.07);
    }

    .vault-page-card .vault-page-media img {
      max-width: 94px;
    }

    .vault-page-card p {
      margin-top: 8px;
      color: var(--muted);
      line-height: 1.45;
    }

    .vault-page-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
      color: var(--muted);
      font-size: 0.76rem;
      font-weight: 800;
    }

    .vault-page-meta span {
      padding: 6px 8px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(251, 250, 246, 0.72);
    }

    .vault-stats {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      padding: 0 20px;
    }

    .memory-box-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 12px;
      padding: 0 20px;
    }

    .memory-box-grid article {
      display: grid;
      gap: 8px;
      place-items: center;
      min-height: 136px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: linear-gradient(145deg, #fffdf8, #fbfaf6);
      text-align: center;
      box-shadow: 0 10px 20px rgba(44, 55, 49, 0.06);
      transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .memory-box-grid article:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 28px rgba(44, 55, 49, 0.1);
    }

    .memory-box-grid span {
      color: var(--accent-dark);
      font-weight: 900;
    }

    .archive-envelope {
      min-height: 240px;
      background: #fff8df;
      border-color: rgba(188, 123, 44, 0.34);
      border-left: 12px solid #bc7b2c;
      border-radius: 10px 18px 18px 10px;
    }

    .archive-envelope .letter-address {
      margin-top: 4px;
      gap: 10px;
    }

    .archive-envelope .letter-amount {
      max-width: 84%;
      font-size: clamp(1.2rem, 1.7vw, 1.55rem);
    }

    .archive-envelope .bill-actions {
      position: relative;
      right: auto;
      bottom: auto;
      margin-top: 18px;
      z-index: 3;
    }

    .wax-seal {
      position: absolute;
      right: 28px;
      bottom: 76px;
      z-index: 2;
      display: grid;
      width: 48px;
      height: 48px;
      place-items: center;
      filter: drop-shadow(0 8px 12px rgba(38, 48, 45, 0.18));
      animation: waxSet 520ms ease;
    }

    .modal-head,
    .modal-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .modal-actions {
      margin-top: 18px;
      justify-content: flex-end;
    }

    .modal-head h2 {
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .completed-letter .letter-payment-action {
      display: none;
    }

    .completed-letter-action {
      display: none;
    }

    .completed-letter .completed-letter-action {
      display: inline-flex;
    }

    .certificate {
      margin-top: 18px;
      padding: 24px;
      border: 2px solid var(--line);
      border-radius: 18px;
      background: #fffdf8;
      text-align: center;
      font-family: Georgia, serif;
    }

    .certificate .icon-card {
      margin: 10px auto;
    }

    .certificate-message {
      max-width: 520px;
      margin: 18px auto;
      color: var(--muted);
      line-height: 1.5;
    }

    .certificate footer {
      display: inline-flex;
      gap: 8px;
      align-items: center;
      justify-content: center;
      margin-top: 18px;
      color: var(--muted);
      font-weight: 800;
    }

    .toast {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 40;
      max-width: min(440px, calc(100vw - 44px));
      padding: 14px 16px;
      border-radius: 16px;
      background: var(--ink);
      color: #fff;
      box-shadow: 0 18px 44px rgba(38, 48, 45, 0.24);
      opacity: 0;
      transform: translateY(14px);
      pointer-events: none;
      transition: opacity 160ms ease, transform 160ms ease;
    }

    .toast.show {
      opacity: 1;
      transform: translateY(0);
    }

    .toast.error {
      background: var(--danger);
    }

    .mail-note {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      gap: 12px;
      align-items: center;
      width: 100%;
      padding: 12px 14px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fffdf8;
      color: var(--ink);
      text-align: left;
      transition: transform 160ms ease, box-shadow 160ms ease;
    }

    .mail-note:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 26px rgba(44, 55, 49, 0.1);
    }

    .mail-note.read {
      opacity: 0.66;
    }

    .mail-note em {
      color: var(--accent-dark);
      font-style: normal;
      font-weight: 850;
    }

    @keyframes modalFade {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes sheetUp {
      from {
        opacity: 0.6;
        transform: translateY(48px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes paperUnfold {
      from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    @keyframes foldAway {
      0% { opacity: 1; transform: translateY(0) scaleY(1); }
      45% { opacity: 1; transform: translateY(10px) scaleY(0.45); }
      100% { opacity: 0; transform: translateY(58px) scale(0.78); }
    }

    @keyframes envelopeReturn {
      0% { transform: translateY(0) scale(1); opacity: 1; }
      100% { transform: translateY(24px) scale(0.96); opacity: 0; }
    }

    @keyframes envelopeLift {
      0% { transform: translateY(0) scale(1); }
      28% { transform: translateY(-8px) scale(1.015); }
      100% { transform: translateY(-4px) scale(1); }
    }

    @keyframes flapOpen {
      0% { transform: rotateX(0deg); }
      42% { transform: rotateX(-132deg); }
      100% { transform: rotateX(-168deg); }
    }

    @keyframes paperSlide {
      0% { transform: translateY(34px) scaleY(0.72); opacity: 0; }
      55% { transform: translateY(-42px) scaleY(0.86); opacity: 1; }
      100% { transform: translateY(-72px) scaleY(1); opacity: 1; }
    }

    @keyframes waxSet {
      from { transform: scale(1.18); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .confetti-burst {
      position: fixed;
      inset: 0;
      z-index: 80;
      pointer-events: none;
      overflow: hidden;
    }

    .confetti-burst i {
      position: absolute;
      left: 50%;
      top: 45%;
      width: 9px;
      height: 14px;
      border-radius: 3px;
      background: var(--accent);
      animation: confettiFall 1200ms ease-out forwards;
      animation-delay: var(--d);
      transform: translate(-50%, -50%);
    }

    .confetti-burst i:nth-child(3n) {
      background: #bc7b2c;
    }

    .confetti-burst i:nth-child(4n) {
      background: var(--accent-soft);
    }

    @keyframes confettiFall {
      to {
        opacity: 0;
        transform: translate(calc(var(--x) * 28px), 260px) rotate(280deg);
      }
    }

    .sound-toggle {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: #fff;
      color: var(--muted);
    }

    .sound-toggle input {
      width: 16px;
      height: 16px;
      min-height: 0;
      padding: 0;
      accent-color: var(--accent);
    }

    .volume-control input {
      width: 92px;
      height: auto;
    }

    .voice-select {
      width: auto;
      max-width: 220px;
      min-height: 42px;
      border-radius: 999px;
    }

    .promise-modal {
      text-align: center;
    }

    .promise-envelope {
      position: relative;
      width: 190px;
      height: 118px;
      margin: 0 auto 18px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fffdf8;
      box-shadow: var(--shadow);
      transition: transform 420ms ease, opacity 420ms ease;
    }

    .promise-copy {
      margin-top: 10px;
      color: var(--muted);
      font-size: 1.25rem;
    }

    .promise-sealed .promise-envelope {
      animation: promiseSlide 620ms ease forwards;
    }

    .promise-sealed .promise-seal {
      animation: waxSet 420ms ease, stampPress 620ms ease;
    }

    .stamp-book-card {
      background: #fffdf8;
    }

    .stamp-book {
      display: flex;
      flex-direction: column;
      gap: 18px;
      align-items: stretch;
      width: 100%;
      padding: 0 20px 24px;
    }

    .collectible-stamp {
      display: grid;
      gap: 8px;
      min-height: 160px;
      place-items: center;
      padding: 16px;
      border: 1px dashed rgba(188, 123, 44, 0.52);
      border-radius: 14px;
      background: #f6ecd8;
      text-align: center;
      color: var(--ink);
    }

    .collectible-stamp div {
      display: grid;
      width: 54px;
      height: 54px;
      place-items: center;
    }

    .collector-filter-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 0 20px 16px;
    }

    .stamp-book > * {
      width: 100%;
      min-width: 0;
    }

    .collector-cover {
      position: relative;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 18px;
      min-height: 168px;
      align-content: center;
      align-items: center;
      justify-items: center;
      padding: 24px 28px;
      overflow: hidden;
      border: 1px solid rgba(143, 92, 45, 0.35);
      border-radius: 18px;
      background:
        linear-gradient(90deg, rgba(38, 48, 45, 0.16) 0 16px, transparent 16px),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 3px, transparent 3px 9px),
        #8f5c2d;
      color: #fffdf8;
      text-align: center;
      box-shadow: 0 24px 56px rgba(44, 55, 49, 0.18);
    }

    .collector-cover.opened {
      grid-template-columns: auto minmax(0, 1fr);
      min-height: 132px;
      padding-top: 20px;
      padding-bottom: 20px;
    }

    .collector-cover::before {
      content: "";
      position: absolute;
      inset: 18px;
      border: 1px solid rgba(255, 253, 248, 0.28);
      border-radius: 14px;
      pointer-events: none;
    }

    .collector-foil {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      color: #ffe8a7;
      font-weight: 900;
      text-transform: uppercase;
    }

    .collector-cover h2 {
      color: #ffe8a7;
      font-family: Georgia, "Times New Roman", serif;
      font-size: clamp(1.75rem, 3vw, 2.8rem);
      line-height: 1;
      text-shadow: 0 2px 0 rgba(38, 48, 45, 0.16);
    }

    .collector-cover.opened h2 {
      font-size: clamp(1.55rem, 2.2vw, 2.25rem);
    }

    .collector-cover.opened .collector-cover-grid {
      grid-column: 1 / -1;
      width: 100%;
      max-width: 460px;
    }

    .collector-cover.opened .btn {
      grid-column: 1 / -1;
    }

    .collector-cover-title {
      display: grid;
      gap: 8px;
      justify-items: start;
      text-align: left;
    }

    .collector-cover p {
      color: rgba(255, 253, 248, 0.86);
      font-weight: 800;
    }

    .collector-cover .btn {
      grid-column: 1 / -1;
      justify-self: center;
    }

    .collector-cover-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 10px;
      width: min(520px, 100%);
    }

    .collector-cover-grid span {
      display: grid;
      gap: 5px;
      padding: 12px;
      border: 1px solid rgba(255, 253, 248, 0.22);
      border-radius: 12px;
      background: rgba(255, 253, 248, 0.08);
      color: rgba(255, 253, 248, 0.76);
      font-size: 0.78rem;
      font-weight: 850;
    }

    .collector-cover-grid strong {
      color: #fffdf8;
      font-size: 1.2rem;
    }

    .collector-ribbon {
      position: absolute;
      top: 0;
      right: 38px;
      width: 28px;
      height: 92px;
      background: #2f9c86;
      box-shadow: 0 8px 18px rgba(38, 48, 45, 0.18);
      clip-path: polygon(0 0, 100% 0, 100% 86%, 50% 100%, 0 86%);
    }

    .collector-progress {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(180px, 0.34fr);
      gap: 18px;
      align-items: center;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fffdf8;
      box-shadow: 0 12px 26px rgba(44, 55, 49, 0.06);
    }

    .collector-progress:not(.open),
    .collector-pages.book-closed {
      display: none;
    }

    .collector-progress strong {
      display: block;
      margin-top: 4px;
      font-size: 1.08rem;
    }

    .collector-progress-track {
      height: 12px;
      overflow: hidden;
      border-radius: 999px;
      background: #ece8dd;
    }

    .collector-progress-track span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--accent), #d9b889);
    }

    .collector-pages {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 16px;
      width: 100%;
      max-width: 100%;
      padding: 20px;
      border: 1px solid rgba(143, 92, 45, 0.18);
      border-radius: 18px;
      background:
        linear-gradient(90deg, transparent calc(50% - 1px), rgba(143, 92, 45, 0.14) calc(50% - 1px), rgba(143, 92, 45, 0.14) calc(50% + 1px), transparent calc(50% + 1px)),
        #fffaf0;
      box-shadow: inset 0 0 30px rgba(143, 92, 45, 0.06);
      animation: paperUnfold 260ms ease both;
    }

    .collector-stamp {
      position: relative;
      display: grid;
      gap: 10px;
      min-height: 250px;
      align-content: start;
      padding: 18px;
      overflow: hidden;
      border: 1px dashed rgba(143, 92, 45, 0.5);
      border-radius: 12px;
      background:
        radial-gradient(circle at 20% 18%, rgba(188, 123, 44, 0.08), transparent 34px),
        repeating-linear-gradient(0deg, rgba(188, 123, 44, 0.035) 0 1px, transparent 1px 26px),
        #fffdf8;
      color: var(--ink);
      cursor: pointer;
      text-align: center;
      transition: transform 180ms ease, box-shadow 180ms ease;
    }

    .collector-stamp:hover {
      transform: translateY(-3px);
      box-shadow: 0 16px 34px rgba(44, 55, 49, 0.11);
    }

    .collector-stamp.large {
      min-height: 330px;
      cursor: default;
    }

    .collector-stamp.large:hover {
      transform: none;
      box-shadow: none;
    }

    .stamp-perf {
      position: absolute;
      left: 0;
      right: 0;
      height: 8px;
      background: radial-gradient(circle, var(--panel) 0 4px, transparent 4px) 0 0 / 16px 8px repeat-x;
    }

    .stamp-perf.top {
      top: -4px;
    }

    .stamp-perf.bottom {
      bottom: -4px;
    }

    .stamp-cancel {
      position: absolute;
      top: 12px;
      right: 10px;
      width: 82px;
      height: 42px;
      display: grid;
      place-items: center;
      border: 2px solid rgba(38, 48, 45, 0.2);
      border-radius: 50%;
      color: rgba(38, 48, 45, 0.42);
      font-size: 0.56rem;
      font-weight: 900;
      text-transform: uppercase;
      transform: rotate(-12deg);
    }

    .collector-stamp-art {
      display: grid;
      min-height: 74px;
      place-items: center;
      margin-top: 18px;
      color: var(--muted);
      font-size: 1.4rem;
      font-weight: 900;
    }

    .collector-stamp-copy {
      display: grid;
      gap: 4px;
    }

    .collector-stamp-copy strong {
      font-size: 1rem;
    }

    .collector-stamp-copy span,
    .collector-stamp p,
    .collector-stamp em {
      color: var(--muted);
      font-size: 0.78rem;
      line-height: 1.35;
    }

    .collector-stamp p {
      font-family: Georgia, "Times New Roman", serif;
      font-style: italic;
    }

    .collector-stamp em {
      justify-self: center;
      padding: 6px 9px;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-dark);
      font-style: normal;
      font-weight: 850;
    }

    .collector-stamp.rare {
      border-color: rgba(188, 123, 44, 0.72);
      background:
        linear-gradient(135deg, rgba(255, 232, 167, 0.28), transparent),
        #fffdf8;
    }

    .collector-stamp.special {
      border-color: rgba(113, 128, 122, 0.42);
      background:
        linear-gradient(135deg, rgba(113, 128, 122, 0.12), transparent),
        #fffdf8;
    }

    .hidden-stamp {
      opacity: 0.72;
      filter: saturate(0.75);
      cursor: default;
    }

    .hidden-stamp:hover {
      transform: none;
      box-shadow: none;
    }

    .stamp-detail-modal {
      width: min(860px, 100%);
    }

    .stamp-story {
      display: grid;
      gap: 18px;
      margin-top: 16px;
    }

    .stamp-story-hero {
      display: grid;
      grid-template-columns: minmax(220px, 0.44fr) minmax(0, 1fr);
      gap: 18px;
      align-items: center;
    }

    .stamp-quote {
      margin: 10px 0 14px;
      color: var(--accent-dark);
      font-family: Georgia, "Times New Roman", serif;
      font-size: 1.2rem;
      line-height: 1.45;
    }

    .memory-of-journey {
      display: grid;
      gap: 10px;
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 16px;
      background: #fffdf8;
    }

    .memory-of-journey > div {
      display: grid;
      grid-template-columns: 84px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
    }

    .memory-of-journey img {
      width: 84px;
      height: 84px;
      object-fit: cover;
      border: 5px solid #fff;
      border-radius: 12px;
      box-shadow: 0 10px 18px rgba(44, 55, 49, 0.1);
    }

    .memory-of-journey p {
      display: grid;
      gap: 4px;
      color: var(--muted);
      line-height: 1.4;
    }

    .memory-of-journey strong {
      color: var(--ink);
    }

    .stamp-story-actions,
    .share-toggle-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .share-toggle-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      margin-top: 16px;
    }

    .share-toggle-grid label {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: 44px;
      padding: 10px 12px;
      border: 1px solid var(--line);
      border-radius: 14px;
      background: #fffdf8;
      color: var(--ink);
      text-transform: none;
    }

    .share-toggle-grid input {
      width: 18px;
      height: 18px;
    }

    .share-link-box {
      display: grid;
      gap: 10px;
      margin-top: 16px;
      padding: 14px;
      border: 1px solid rgba(47, 156, 134, 0.24);
      border-radius: 14px;
      background: var(--accent-soft);
    }

    .share-link-box input {
      background: #fff;
    }

    .public-share-page {
      position: fixed;
      inset: 0;
      z-index: 90;
      overflow: auto;
      padding: 24px;
      background: var(--bg);
    }

    .public-share-page.hidden {
      display: none;
    }

    .public-share-wrap {
      display: grid;
      gap: 18px;
      max-width: 1060px;
      margin: 0 auto;
    }

    .public-share-header,
    .public-share-card,
    .public-share-section {
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #fffdf8;
      box-shadow: var(--shadow);
    }

    .public-share-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 16px;
    }

    .public-share-header h1 {
      font-size: clamp(1.4rem, 3vw, 2.2rem);
    }

    .public-share-card {
      display: grid;
      gap: 18px;
      padding: 20px;
    }

    .public-share-hero {
      display: grid;
      grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
      gap: 20px;
      align-items: center;
    }

    .public-share-hero > img {
      width: 100%;
      aspect-ratio: 4 / 3;
      object-fit: cover;
      border: 8px solid #fff;
      border-radius: 14px;
      box-shadow: 0 14px 28px rgba(44, 55, 49, 0.12);
    }

    .public-share-hero h2 {
      font-size: clamp(2rem, 4vw, 3.6rem);
      line-height: 1;
    }

    .public-share-section {
      padding: 18px;
      box-shadow: none;
    }

    .public-timeline {
      padding: 0 0 0 28px;
    }

    .stamp-press-overlay {
      position: fixed;
      inset: 0;
      z-index: 95;
      display: grid;
      place-items: center;
      pointer-events: none;
      background: rgba(38, 48, 45, 0.08);
    }

    .stamp-press-card {
      display: grid;
      gap: 8px;
      place-items: center;
      min-width: 220px;
      padding: 22px;
      border: 2px dashed rgba(143, 92, 45, 0.62);
      border-radius: 16px;
      background:
        repeating-linear-gradient(0deg, rgba(188, 123, 44, 0.04) 0 1px, transparent 1px 24px),
        #fffdf8;
      color: var(--ink);
      text-align: center;
      box-shadow: 0 22px 46px rgba(44, 55, 49, 0.18);
      animation: stampPressLand 960ms ease both;
    }

    .stamp-press-card::after {
      content: "POSTMARKED";
      color: rgba(47, 156, 134, 0.5);
      font-size: 0.72rem;
      font-weight: 900;
      letter-spacing: 0.12em;
      animation: inkAppear 960ms ease both;
    }

    .stamp-press-card span {
      color: var(--muted);
      font-size: 0.86rem;
      font-weight: 800;
    }

    @keyframes stampPressLand {
      0% { opacity: 0; transform: translateY(-26px) scale(1.08); }
      38% { opacity: 1; transform: translateY(0) scale(0.96); }
      62% { transform: translateY(0) scale(1); }
      100% { opacity: 0; transform: translateY(8px) scale(1); }
    }

    @keyframes inkAppear {
      0%, 36% { opacity: 0; transform: scale(1.12); }
      58%, 100% { opacity: 1; transform: scale(1); }
    }

    @keyframes cloudDrift {
      from { transform: translateX(0); }
      to { transform: translateX(-12px); }
    }

    @keyframes storyEntryIn {
      from { opacity: 0; transform: translateY(8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes dailyEnvelope {
      0% { transform: translateY(0); }
      45% { transform: translateY(-72px); }
      100% { transform: translate(0, -22px) scale(1.2); }
    }

    @keyframes mailboxOpen {
      0% { transform: scale(1); }
      40% { transform: scale(1.03); }
      100% { transform: scale(0.98); opacity: 0; }
    }

    @keyframes promiseSlide {
      0% { transform: translateY(0) scale(1); opacity: 1; }
      45% { transform: translateY(-8px) scale(0.98); opacity: 1; }
      100% { transform: translateY(80px) scale(0.82); opacity: 0; }
    }

    @keyframes stampPress {
      0% { transform: scale(1.35); }
      45% { transform: scale(0.92); }
      100% { transform: scale(1); }
    }

    .mobile-topbar,
    .mobile-nav-toggle,
    .mobile-nav-overlay,
    .mobile-insights-toggle,
    .mobile-insights-overlay,
    .mobile-insights-head {
      display: none;
    }

    @media (max-width: 680px) {
      .delivery-screen {
        padding: 14px;
      }

      .delivery-card {
        padding: 28px 18px 32px;
        border-radius: 20px;
      }

      body.auth-required .delivery-card {
        grid-template-columns: 1fr;
        width: min(440px, 100%);
      }

      body.auth-required .auth-aside {
        padding: 30px 24px 24px;
        border-right: 0;
        border-bottom: 1px solid rgba(207, 179, 132, 0.5);
      }

      .auth-aside-logo img {
        width: 120px;
      }

      .auth-aside-title {
        font-size: 1.6rem;
      }

      .auth-features {
        display: none;
      }

      body.auth-required .auth-main {
        padding: 26px 22px 30px;
      }

      .delivery-postmark {
        top: 56px;
        right: 18px;
        width: 96px;
        opacity: 0.25;
      }

      .delivery-card .logo-welcome {
        width: 82px;
        height: 82px;
      }

      .delivery-card .label::before,
      .delivery-card .label::after {
        width: 14px;
        margin-inline: 5px;
      }

      .delivery-stack-preview {
        gap: 10px;
      }

      .delivery-letter {
        grid-template-columns: 56px minmax(0, 1fr) 44px;
        min-height: 76px;
        padding: 10px 12px;
      }

      .delivery-letter-icon .mikci-icon {
        width: 42px;
        height: 42px;
      }

      .delivery-letter-copy strong {
        font-size: 0.88rem;
      }

      .delivery-letter-copy span {
        font-size: 0.78rem;
      }

      .delivery-letter-stamp {
        width: 34px;
        height: 40px;
      }

      .delivery-letter-stamp .mikci-icon {
        width: 22px;
        height: 22px;
      }

      .delivery-card .btn.primary {
        width: 100%;
        min-width: 0;
      }

      .journey-story-entry {
        grid-template-columns: 1fr;
      }

      .journey-entry-topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
      }

      .future-suggestion-actions {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 1180px) {
      .app-shell {
        grid-template-columns: 220px minmax(0, 1fr);
      }

      .insights {
        position: static;
        grid-column: 1 / -1;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        height: auto;
        overflow: visible;
      }
    }

    @media (max-width: 820px) {
      html {
        font-size: 16px;
      }

      .app-shell {
        display: block;
        padding: 0 14px calc(28px + env(safe-area-inset-bottom, 0px));
      }

      .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 18;
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 -14px 14px;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
        border-bottom: 1px solid rgba(231, 224, 211, 0.9);
        background: rgba(247, 243, 234, 0.92);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
      }

      .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-right: auto;
        font-weight: 800;
        font-size: 1.15rem;
        letter-spacing: 0.01em;
      }

      .mobile-brand .mikci-logo {
        width: 44px;
        height: 44px;
        object-fit: contain;
        filter: drop-shadow(0 2px 4px rgba(91, 65, 35, 0.18));
      }

      .mobile-insights-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: #fffdf8;
        box-shadow: 0 4px 12px rgba(91, 65, 35, 0.08);
        cursor: pointer;
      }

      .mobile-insights-toggle:active {
        transform: scale(0.94);
      }

      .mobile-insights-toggle .mikci-icon {
        width: 22px;
        height: 22px;
      }

      .mobile-nav-toggle {
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: #fffdf8;
        box-shadow: 0 4px 12px rgba(91, 65, 35, 0.08);
        cursor: pointer;
      }

      .mobile-nav-toggle:active {
        transform: scale(0.94);
      }

      .hamburger {
        display: grid;
        gap: 4px;
        width: 18px;
      }

      .hamburger span {
        display: block;
        height: 2px;
        border-radius: 2px;
        background: var(--ink);
        transition: transform 0.24s ease, opacity 0.2s ease;
      }

      body.nav-open .hamburger span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
      }

      body.nav-open .hamburger span:nth-child(2) {
        opacity: 0;
      }

      body.nav-open .hamburger span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
      }

      .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 29;
        background: rgba(38, 48, 45, 0.34);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        animation: modalFade 0.22s ease;
      }

      .mobile-nav-overlay[hidden] {
        display: none;
      }

      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 30;
        display: flex;
        width: min(300px, 84vw);
        height: 100dvh;
        margin: 0;
        padding: calc(20px + env(safe-area-inset-top, 0px)) 18px calc(20px + env(safe-area-inset-bottom, 0px));
        border-radius: 0 24px 24px 0;
        border-left: none;
        overflow-y: auto;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.28, 1), visibility 0.3s;
        overscroll-behavior: contain;
      }

      .sidebar.open {
        transform: none;
        visibility: visible;
        box-shadow: 0 24px 60px rgba(38, 48, 45, 0.3);
      }

      body.nav-open,
      body.insights-open {
        overflow: hidden;
      }

      .mobile-insights-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 29;
        background: rgba(38, 48, 45, 0.34);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        animation: modalFade 0.22s ease;
      }

      .mobile-insights-overlay[hidden] {
        display: none;
      }

      .insights {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        z-index: 30;
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: min(340px, 88vw);
        height: 100dvh;
        margin: 0;
        padding: calc(16px + env(safe-area-inset-top, 0px)) 18px calc(20px + env(safe-area-inset-bottom, 0px));
        border-radius: 24px 0 0 24px;
        background: var(--panel, #f7f3ea);
        overflow-y: auto;
        transform: translateX(105%);
        visibility: hidden;
        transition: transform 0.3s cubic-bezier(0.32, 0.72, 0.28, 1), visibility 0.3s;
        overscroll-behavior: contain;
      }

      .insights.open {
        transform: none;
        visibility: visible;
        box-shadow: -24px 0 60px rgba(38, 48, 45, 0.3);
      }

      .mobile-insights-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 4px;
      }

      .mobile-insights-title {
        font-weight: 800;
        font-size: 1.1rem;
      }

      .nav button {
        min-height: 48px;
        font-size: 1rem;
      }

      .btn {
        min-height: 44px;
      }

      .btn.small {
        min-height: 38px;
      }

      .chip {
        min-height: 38px;
        padding: 8px 14px;
      }

      .field input,
      .field select,
      .field textarea,
      .delivery-login-form input {
        min-height: 44px;
        font-size: 16px;
      }

      .card {
        border-radius: 18px;
      }

      .content-section {
        gap: 14px;
      }

      .topbar,
      .section-head,
      .bill-footer {
        align-items: stretch;
        flex-direction: column;
      }

      .actions {
        padding-top: 0;
        justify-content: flex-start;
      }

      .actions,
      .bill-actions {
        justify-content: flex-start;
      }

      .stats-grid,
      .goals-grid,
      .dashboard-grid,
      .dashboard-grid.lower,
      .insights,
      .form-grid,
      .memory-fields {
        grid-template-columns: 1fr;
      }

      .calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
      }

      .calendar-day {
        min-height: 58px;
        padding: 4px 3px;
      }

      .calendar-day strong {
        font-size: 0.68rem;
      }

      .calendar-event {
        font-size: 0.58rem;
        padding: 2px 3px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .calendar-plaid-badge {
        font-size: 0.55rem;
        padding: 1px 4px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .notifications-panel {
        margin: 0 14px 14px;
      }

      .donut-wrap,
      .bar-row,
      .vault-hero,
      .vault-timeline-item,
      .vault-page-card,
      .collector-progress,
      .stamp-story-hero,
      .public-share-hero {
        grid-template-columns: 1fr;
      }

      .collector-cover-grid,
      .share-toggle-grid {
        grid-template-columns: 1fr;
      }

      .collector-cover {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
      }

      .collector-cover-title {
        justify-items: center;
        text-align: center;
      }

      .public-share-header {
        align-items: stretch;
        flex-direction: column;
      }

      .vault-hero {
        justify-items: start;
      }

      .vault-hero-art {
        justify-self: center;
      }

      .vault-final-letter {
        padding-top: 56px;
      }

      .vault-postmark {
        left: 26px;
        right: auto;
        top: 92px;
      }

      .vault-keepsake-stats {
        grid-template-columns: 1fr;
      }

      .vault-timeline {
        padding-left: 32px;
      }

      .vault-timeline::before {
        left: 16px;
      }

      .vault-timeline-item::before {
        left: -21px;
      }

      .bill-top {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .status-pill {
        grid-column: 1 / -1;
        width: fit-content;
      }

      .btn,
      .nav button,
      .chip {
        min-height: 44px;
      }

      .btn.small {
        min-height: 40px;
      }

      .modal-backdrop {
        align-items: flex-end;
        padding: 0;
      }

      .modal {
        width: 100%;
        max-height: 92dvh;
        border-radius: 22px 22px 0 0;
        padding: 18px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        animation: sheetUp 0.28s cubic-bezier(0.32, 0.72, 0.28, 1);
      }

      .modal::before {
        content: "";
        display: block;
        width: 40px;
        height: 4px;
        margin: 0 auto 14px;
        border-radius: 999px;
        background: var(--line);
      }

      .calendar-item-row {
        grid-template-columns: 1fr;
        gap: 8px;
      }
    }

    html,
    body {
      overflow-x: hidden;
    }

    @supports (padding: env(safe-area-inset-top)) {
      body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
      }

      .app-shell {
        padding-top: max(18px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
      }

      .delivery-screen {
        padding-top: max(24px, env(safe-area-inset-top));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
      }

      .modal-backdrop {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
      }
    }

    @media (max-width: 820px) {
      .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .quick-action-btn {
        min-height: 92px;
        font-size: 0.82rem;
      }

      .welcome-banner {
        flex-direction: column;
        align-items: stretch;
      }

      .account-sections {
        padding: 0 14px 14px;
      }

      .command-palette-backdrop {
        align-items: flex-end;
      }

      .command-palette-backdrop .modal {
        width: 100%;
        max-height: 78dvh;
        border-radius: 22px 22px 0 0;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }

      body.celebrate-milestone .main {
        animation: none;
      }
    }
