    :root {
      --bg: #f6f7f3;
      --white: #fff;
      --surface: #fffdf8;
      --surface-soft: #eceae1;
      --surface-disabled: #f2efe8;
      --ink: #1f2320;
      --muted: #68706b;
      --line: #d8d4c8;
      --line-dashed: #c5beb0;
      --line-strong: #c5beb0;
      --primary: #2e7d67;
      --green: #2e7d67;
      --green-soft: #dcefe8;
      --green-border-soft: rgba(46, 125, 103, 0.42);
      --amber: #b96a16;
      --amber-soft: #fff1d4;
      --red: #a24b43;
      --red-soft: #f8e4e0;
      --red-wash: #fff8f7;
      --blue: #3e6f8e;
      --blue-soft: #e4eef3;
      --focus-soft: #fff8e6;
      --done-soft: #f0faf5;
      --surface-glass: rgba(255, 253, 248, 0.78);
      --surface-glass-strong: rgba(255, 253, 248, 0.84);
      --scrim: rgba(32, 33, 36, 0.34);
      --scrim-soft: rgba(32, 33, 36, 0.32);
      --floating-surface: rgba(255, 253, 248, 0.96);
      --mobile-surface-glass: rgba(246, 247, 243, 0.94);
      --toggle-shadow: 0 2px 5px rgba(32, 33, 36, 0.16);
      --shadow: 0 18px 42px rgba(31, 35, 32, 0.08);
      --radius: 8px;
      --mobile-top-height: 74px;
      --view-head-action-width: 280px;
      --command-action-width: 280px;
      --overlay-pad-x: clamp(22px, 4vw, 54px);
      --overlay-pad-y: clamp(22px, 4vw, 54px);
    }

    * {
      box-sizing: border-box;
    }

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

    body {
      overflow-x: hidden;
    }

    [data-client-mode="web"] [data-pwa-only] {
      display: none !important;
    }

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

    button {
      cursor: pointer;
    }

    .visually-hidden {
      position: absolute !important;
      width: 1px !important;
      height: 1px !important;
      overflow: hidden !important;
      clip: rect(0 0 0 0) !important;
      white-space: nowrap !important;
    }

    body.auth-locked {
      overflow: hidden;
    }

    body.auth-locked .app,
    body.auth-locked .menu-drawer,
    body.auth-locked .overlay,
    body.auth-locked .confirm-overlay {
      display: none !important;
    }

    .auth-gate {
      min-height: 100vh;
      min-height: 100dvh;
      display: grid;
      place-items: center;
      padding: clamp(18px, 4vw, 44px);
      background: var(--bg);
    }

    .auth-gate[hidden] {
      display: none;
    }

    .auth-panel {
      width: min(100%, 470px);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      padding: clamp(20px, 4vw, 30px);
      display: grid;
      gap: 18px;
    }

    .auth-brand {
      display: grid;
      gap: 8px;
    }

    .auth-brand h1 {
      margin: 0;
      font-size: 34px;
      line-height: 1;
      font-weight: 950;
    }

    .auth-brand p {
      margin: 0;
      color: var(--green);
      font-size: 18px;
      line-height: 1.4;
      font-weight: 900;
    }

    .auth-social {
      display: grid;
      gap: 9px;
    }

    .auth-provider {
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 11px 14px;
      text-decoration: none;
      font-weight: 950;
    }

    .auth-provider-google {
      background: #ffffff;
    }

    .auth-provider-naver {
      border-color: #03c75a;
      background: #03c75a;
      color: #ffffff;
    }

    .auth-provider-kakao {
      border-color: #f3d83b;
      background: #fee500;
      color: #211b00;
    }

    .auth-divider {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
      gap: 12px;
      align-items: center;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .auth-divider::before,
    .auth-divider::after {
      content: "";
      height: 1px;
      background: var(--line);
    }

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

    .auth-tabs button {
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--muted);
      font-weight: 900;
    }

    .auth-tabs button.active {
      border-color: var(--green-border-soft);
      background: var(--green-soft);
      color: var(--ink);
    }

    .auth-form {
      display: grid;
      gap: 12px;
    }

    .auth-form label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .auth-form input {
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 0 12px;
      font-weight: 800;
    }

    .auth-result {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 16px;
      display: grid;
      gap: 10px;
    }

    .auth-result[hidden] {
      display: none;
    }

    .auth-result strong {
      font-size: 18px;
      line-height: 1.25;
      font-weight: 950;
    }

    .auth-result p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-weight: 800;
    }

    .auth-verify-link {
      color: var(--green);
      font-weight: 950;
    }

    .text-button {
      border: 0;
      background: transparent;
      color: var(--green);
      padding: 4px 0;
      text-align: left;
      font-weight: 950;
    }

    .auth-message {
      display: grid;
      gap: 8px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
      font-weight: 750;
    }

    .auth-message p {
      margin: 0;
    }

    .auth-message a {
      color: var(--green);
      font-weight: 950;
    }

    .contact-email-overlay {
      position: fixed;
      inset: 0;
      z-index: 70;
      display: grid;
      place-items: center;
      padding: clamp(18px, 4vw, 34px);
      background: var(--scrim);
    }

    .contact-email-overlay[hidden] {
      display: none;
    }

    .contact-email-dialog {
      width: min(100%, 440px);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      padding: clamp(18px, 4vw, 26px);
      display: grid;
      gap: 16px;
    }

    .contact-email-head {
      display: grid;
      gap: 7px;
    }

    .contact-email-head h2 {
      margin: 0;
      font-size: 25px;
      line-height: 1.18;
      font-weight: 950;
    }

    .contact-email-head p {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-weight: 800;
    }

    .contact-email-step {
      display: grid;
      gap: 12px;
    }

    .contact-email-step[hidden] {
      display: none;
    }

    .contact-email-step label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .contact-email-step input {
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 0 12px;
      font-weight: 850;
    }

    .contact-email-actions {
      display: grid;
      gap: 8px;
    }

    .contact-email-target,
    .contact-email-message {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
      font-weight: 800;
    }

    .contact-email-message {
      min-height: 20px;
      font-size: 14px;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 252px minmax(0, 1fr);
    }

    .sidebar {
      position: sticky;
      top: 0;
      height: 100vh;
      padding: 28px 22px;
      border-right: 1px solid var(--line);
      background: var(--surface-glass);
      display: flex;
      flex-direction: column;
      gap: 28px;
    }

    .brand {
      display: grid;
      gap: 4px;
    }

    .brand-refresh,
    .mobile-brand-refresh {
      appearance: none;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: left;
      padding: 0;
      cursor: pointer;
    }

    .brand-refresh:focus-visible,
    .mobile-brand-refresh:focus-visible {
      outline: 3px solid color-mix(in srgb, var(--green) 42%, white);
      outline-offset: 4px;
      border-radius: 8px;
    }

    .brand h1 {
      margin: 0;
      font-size: 34px;
      line-height: 1;
      font-weight: 950;
    }

    .brand p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 750;
    }

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

    .nav button,
    .nav > a {
      width: 100%;
      border: 0;
      border-radius: var(--radius);
      background: transparent;
      color: var(--muted);
      padding: 13px 14px;
      text-align: left;
      font-weight: 900;
      text-decoration: none;
    }

    .nav button.active,
    .nav > a:hover,
    .nav > a:focus-visible {
      background: var(--surface-soft);
      color: var(--ink);
    }

    .menu-bottom {
      margin-top: auto;
      display: grid;
      gap: 8px;
      padding-top: 18px;
      border-top: 1px solid var(--line);
    }

    .menu-logout-button {
      width: 100%;
      border: 1px solid var(--ink);
      border-radius: var(--radius);
      background: var(--ink);
      color: #fff;
      padding: 13px 14px;
      text-align: center;
      font: inherit;
      font-weight: 900;
    }

    .menu-logout-button:hover,
    .menu-logout-button:focus-visible {
      color: #fff;
      background: color-mix(in srgb, var(--ink) 88%, var(--green));
    }

    .nav-section {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 14px 2px 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
    }

    .nav-section::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--line);
    }

    .main {
      min-width: 0;
      padding: 28px clamp(18px, 4vw, 54px) 52px;
    }

    .mobile-top {
      display: none;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 16px;
    }

    .mobile-top strong {
      font-size: 24px;
      font-weight: 950;
    }

    .mobile-brand-refresh {
      display: block;
    }

    .mobile-console-label {
      margin: 4px 0 0;
      font-size: 14px;
    }

    .icon-button {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      color: var(--ink);
      width: 44px;
      height: 44px;
      font-size: 22px;
      font-weight: 950;
    }

    .view {
      display: none;
      gap: 18px;
    }

    .view.active {
      display: grid;
    }

    .hero {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      padding: clamp(18px, 3vw, 28px);
      display: grid;
      grid-template-columns: minmax(0, 1.16fr) minmax(280px, 0.84fr);
      gap: 28px;
      align-items: stretch;
    }

    .today-note {
      display: grid;
      gap: 20px;
      align-content: space-between;
      min-height: 282px;
    }

    .eyebrow {
      margin: 0 0 14px;
      color: var(--green);
      font-size: 17px;
      line-height: 1.4;
      font-weight: 950;
    }

    .buddy-copy {
      margin: 0;
      color: var(--muted);
      font-size: clamp(17px, 1.35vw, 22px);
      line-height: 1.58;
      font-weight: 800;
    }

    .review-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }

    .review-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      min-height: 34px;
      padding: 6px 11px;
      font-size: 13px;
      font-weight: 800;
    }

    .review-chip strong {
      color: var(--ink);
      font-weight: 900;
    }

    .flow {
      display: grid;
      gap: 14px;
    }

    .section-title {
      margin: 0;
      font-size: clamp(24px, 2.4vw, 34px);
      line-height: 1.2;
      font-weight: 950;
    }

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

    .flow-tile {
      min-height: 96px;
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 18px;
      display: grid;
      align-content: center;
      gap: 3px;
    }

    .flow-tile strong {
      font-size: clamp(30px, 3vw, 42px);
      line-height: 1;
      font-weight: 950;
    }

    .flow-tile span {
      color: var(--muted);
      font-weight: 900;
    }

    .primary-wide {
      width: 100%;
      border: 0;
      border-radius: var(--radius);
      background: var(--ink);
      color: var(--white);
      min-height: 54px;
      padding: 14px 18px;
      font-size: 18px;
      font-weight: 950;
    }

    .view-head-action {
      max-width: var(--view-head-action-width);
    }

    .quick-add {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 14px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 14px;
      align-items: center;
    }

    .quick-add strong {
      white-space: nowrap;
      font-size: 15px;
      font-weight: 950;
    }

    .quick-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
      gap: 10px;
    }

    .dash-button {
      min-height: 46px;
      border: 1px dashed var(--line-dashed);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 10px 12px;
      font-weight: 950;
    }

    .drawer-kicker {
      margin-bottom: 6px;
    }

    .content-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 22px;
      align-items: start;
    }

    .panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 22px;
      display: grid;
      gap: 16px;
    }

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

    .panel-head > div {
      min-width: 0;
    }

    .panel-head h2 {
      margin: 0;
      font-size: clamp(24px, 2vw, 30px);
      line-height: 1.25;
      font-weight: 950;
    }

    .panel-title-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: baseline;
      min-width: 0;
    }

    .panel-head p {
      max-width: 64ch;
      overflow-wrap: anywhere;
    }

    .count {
      flex: 0 0 auto;
      color: var(--muted);
      font-size: 18px;
      font-weight: 950;
      white-space: nowrap;
    }

    .inline-count {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-size: 16px;
    }

    .inline-count::before {
      content: "·";
      color: var(--muted);
      font-weight: 950;
    }

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

    .schedule-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 16px;
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
      align-items: start;
    }

    .schedule-card.important {
      border-color: color-mix(in srgb, var(--amber) 62%, white);
      background: var(--focus-soft);
    }

    .schedule-card.done {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--done-soft);
    }

    .schedule-card.canceled {
      border-color: color-mix(in srgb, var(--red) 32%, white);
      background: var(--red-wash);
      opacity: 0.78;
    }

    .card-main {
      min-width: 0;
      display: grid;
      gap: 10px;
    }

    .badges {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .badge {
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--muted);
      padding: 6px 10px;
      font-size: 12px;
      font-weight: 950;
    }

    .badge.must {
      background: var(--amber-soft);
      color: var(--amber);
    }

    .badge.sensitive {
      background: var(--blue-soft);
      color: var(--blue);
    }

    .schedule-card h3 {
      margin: 0;
      font-size: 23px;
      line-height: 1.28;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .schedule-card p {
      margin: 0;
      color: var(--muted);
      font-size: 15px;
      line-height: 1.55;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .card-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
      gap: 8px;
      width: 100%;
    }

    .action {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      min-height: 44px;
      padding: 8px 9px;
      font-size: 14px;
      font-weight: 950;
    }

    .action.primary {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--green-soft);
      color: var(--green);
    }

    .action.danger {
      border-color: color-mix(in srgb, var(--red) 32%, white);
      background: var(--white);
      color: var(--ink);
    }

    .action:disabled {
      cursor: default;
      opacity: 0.72;
    }

    .period-views,
    .settings-grid {
      display: grid;
      gap: 18px;
    }

    .view-head {
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 18px;
    }

    .view-head h2 {
      margin: 0;
      font-size: clamp(34px, 4vw, 54px);
      line-height: 1.08;
      font-weight: 950;
    }

    .view-head p {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 17px;
      line-height: 1.5;
      font-weight: 750;
    }

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

    .date-line {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--green);
      font-weight: 950;
    }

    .date-line::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--line);
    }

    .history-tools {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr) minmax(130px, 0.2fr);
      gap: 12px;
      padding: 14px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-glass-strong);
    }

    .history-tools label,
    .history-filter-field {
      min-width: 0;
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 950;
    }

    .history-tools input,
    .history-tools select {
      width: 100%;
      min-width: 0;
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 10px 12px;
      font-size: 15px;
      font-weight: 800;
    }

    .history-filter-options {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      min-height: 44px;
    }

    .history-filter-option {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      padding: 8px 12px;
      font-size: 14px;
      font-weight: 950;
      cursor: pointer;
    }

    .history-filter-option.active {
      border-color: var(--green-border-soft);
      background: var(--mint);
      color: var(--green);
    }

    .history-custom-range {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
    }

    .history-custom-range[hidden] {
      display: none;
    }

    .history-mode {
      color: var(--muted);
      font-size: 14px;
      font-weight: 850;
    }

    .notes-layout {
      display: grid;
      gap: 18px;
      align-items: start;
    }

    .notes-main-panel {
      display: grid;
      gap: 16px;
    }

    .notes-toolbar,
    .money-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      align-items: end;
    }

    .notes-toolbar {
      grid-template-columns: minmax(280px, 1fr) auto;
      gap: 12px;
    }

    .notes-toolbar .record-filter-row {
      flex-wrap: nowrap;
      justify-content: flex-end;
    }

    .notes-search,
    .money-search {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .notes-search input,
    .money-search input {
      width: 100%;
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      font-weight: 800;
    }

    .record-filter-row,
    .record-chip-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
    }

    .record-chip {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      padding: 8px 12px;
      font-size: 14px;
      font-weight: 950;
      white-space: nowrap;
    }

    .record-chip.active {
      border-color: var(--green-border-soft);
      background: var(--green-soft);
      color: var(--green);
    }

    .record-origin-card {
      display: grid;
      gap: 9px;
      border: 1px solid var(--green-border-soft);
      border-radius: 8px;
      background: color-mix(in srgb, var(--green-soft) 42%, var(--white));
      padding: 15px 16px;
    }

    .record-origin-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
      align-items: center;
    }

    .record-origin-chip {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      padding: 5px 9px;
      font-size: 12px;
      font-weight: 900;
      white-space: nowrap;
    }

    .record-origin-chip.active {
      border-color: var(--green-border-soft);
      color: var(--green);
    }

    .record-origin-title {
      color: var(--ink);
      font-size: 17px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }

    .record-origin-description,
    .record-origin-meta {
      margin: 0;
      color: var(--muted);
      line-height: 1.5;
    }

    .record-origin-description {
      font-size: 14px;
      font-weight: 760;
    }

    .record-origin-meta {
      font-size: 12px;
      font-weight: 850;
    }

    .search-state {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 10px 12px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .search-state strong {
      color: var(--ink);
      font-weight: 950;
    }

    .record-tag {
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--surface-soft);
      color: var(--muted);
      padding: 5px 9px;
      font-size: 12px;
      line-height: 1.15;
      font-weight: 950;
      white-space: nowrap;
    }

    .record-tag-green {
      border-color: var(--green-border-soft);
      background: var(--green-soft);
      color: var(--green);
    }

    .record-tag-blue {
      border-color: rgba(62, 111, 142, 0.28);
      background: var(--blue-soft);
      color: var(--blue);
    }

    .record-tag-amber {
      border-color: rgba(185, 106, 22, 0.3);
      background: var(--amber-soft);
      color: var(--amber);
    }

    .record-tag-red {
      border-color: rgba(162, 75, 67, 0.3);
      background: var(--red-soft);
      color: var(--red);
    }

    .note-editor-panel {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 252px;
      z-index: 35;
      width: calc(100vw - 252px);
      height: 100vh;
      height: 100dvh;
      box-sizing: border-box;
      border: 0;
      border-left: 1px solid var(--line);
      border-radius: 0;
      background: var(--surface);
      padding: 0 var(--overlay-pad-x) 0;
      align-content: start;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      animation: noteEditorIn 0.18s ease both;
    }

    .note-editor-panel > .panel-head {
      padding-top: var(--overlay-pad-y);
      padding-bottom: 14px;
    }

    .note-editor-panel[hidden] {
      display: none;
    }

    @keyframes noteEditorIn {
      from {
        opacity: 0;
        transform: translateX(28px);
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    .note-form {
      display: grid;
      gap: 13px;
    }

    .note-write-mode,
    .money-type-switch,
    .money-category-switch {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 8px;
    }

    .note-write-mode {
      margin-bottom: 14px;
    }

    .note-write-mode button,
    .money-type-switch button,
    .money-category-switch button {
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--muted);
      padding: 9px 12px;
      font-weight: 950;
    }

    .note-write-mode button.active,
    .money-type-switch button.active,
    .money-category-switch button.active {
      border-color: var(--green-border-soft);
      background: var(--green-soft);
      color: var(--green);
    }

    .note-append-panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 14px;
      display: grid;
      gap: 12px;
    }

    .note-append-panel[hidden] {
      display: none;
    }

    .compact-head {
      margin: 0;
    }

    .existing-note-list,
    .existing-record-list {
      display: grid;
      gap: 8px;
    }

    .existing-record-choice {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      text-align: left;
      display: grid;
      gap: 4px;
    }

    .existing-record-choice.active {
      border-color: var(--green);
      background: var(--green-soft);
    }

    .existing-record-choice strong {
      font-weight: 950;
    }

    .existing-record-choice span {
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .note-form label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .note-form input,
    .note-form textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      font-weight: 800;
    }

    .note-form input {
      min-height: 48px;
    }

    .note-form textarea {
      min-height: 190px;
      line-height: 1.55;
      resize: vertical;
    }

    .input-section {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 16px;
      display: grid;
      gap: 14px;
    }

    .file-attach-section .panel-head,
    .money-receipt-section .panel-head {
      margin-bottom: 0;
    }

    .file-select-button {
      cursor: pointer;
      display: inline-grid;
      min-height: 44px;
      place-items: center;
    }

    .note-file-list {
      display: grid;
      gap: 12px;
    }

    .note-file-list .muted {
      border: 1px dashed var(--line-strong);
      border-radius: var(--radius);
      background: var(--surface-soft);
      margin: 0;
      padding: 13px 14px;
    }

    .money-receipt-gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 220px));
      gap: 12px;
      align-items: start;
    }

    .money-receipt-preview {
      min-width: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
    }

    .money-receipt-preview-media {
      position: relative;
      display: grid;
      aspect-ratio: 4 / 3;
      overflow: hidden;
      place-items: center;
      background: var(--surface-soft);
    }

    .money-receipt-preview-media img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    .money-receipt-preview.preview-ready .money-receipt-preview-media img {
      opacity: 1;
    }

    .money-receipt-preview-fallback {
      color: var(--blue);
      font-size: 18px;
      font-weight: 950;
    }

    .money-receipt-preview.preview-ready .money-receipt-preview-fallback {
      display: none;
    }

    .money-receipt-preview-status {
      position: absolute;
      z-index: 1;
      left: 8px;
      bottom: 8px;
      max-width: calc(100% - 16px);
      overflow: hidden;
      border-radius: 6px;
      background: rgba(30, 35, 31, 0.78);
      color: #fff;
      padding: 5px 7px;
      font-size: 11px;
      font-weight: 900;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .money-receipt-preview-remove {
      position: absolute;
      z-index: 2;
      top: 8px;
      right: 8px;
      width: 34px;
      height: 34px;
      border: 1px solid rgba(255, 255, 255, 0.82);
      border-radius: 50%;
      background: rgba(30, 35, 31, 0.78);
      color: #fff;
      display: grid;
      place-items: center;
      padding: 0;
      font-size: 22px;
      line-height: 1;
      cursor: pointer;
    }

    .money-receipt-preview-info {
      display: grid;
      min-width: 0;
      gap: 4px;
      padding: 10px;
    }

    .money-receipt-preview-info strong,
    .money-receipt-preview-info > span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .money-receipt-preview-info strong {
      color: var(--ink);
      font-size: 14px;
      font-weight: 950;
    }

    .money-receipt-preview-info > span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .money-receipt-preview-info .note-file-progress {
      margin-top: 4px;
    }

    .money-receipt-preview-retry {
      width: 100%;
      margin-top: 4px;
    }

    .money-receipt-preview[data-upload-status="failed"] {
      border-color: rgba(168, 62, 50, 0.55);
    }

    .money-receipt-preview[data-upload-status="failed"] .note-file-progress span {
      background: #a83e32;
    }

    .note-upload-tray,
    .note-complete-panel {
      display: grid;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      overflow: hidden;
    }

    .note-upload-tray {
      gap: 14px;
      border-color: rgba(47, 130, 103, 0.22);
      background: rgba(47, 130, 103, 0.035);
      padding: 14px;
    }

    .note-complete-panel {
      background: #fff;
    }

    .note-complete-panel .note-file-section-title {
      padding: 9px 12px;
    }

    .note-complete-panel .note-file-item {
      grid-template-columns: 40px minmax(0, 1fr) auto;
      gap: 10px;
      padding: 10px 12px;
      min-height: 74px;
    }

    .note-complete-panel .note-file-icon {
      width: 40px;
      height: 40px;
    }

    .note-complete-panel .note-file-item strong {
      font-size: 16px;
      line-height: 1.2;
      margin-bottom: 3px;
    }

    .note-complete-panel .note-file-actions .setting-edit-button {
      min-height: 36px;
      padding: 7px 11px;
    }

    .note-upload-tray-head {
      display: flex;
      gap: 12px;
      align-items: flex-start;
      justify-content: space-between;
    }

    .note-upload-tray-head > div {
      display: grid;
      gap: 3px;
      min-width: 0;
    }

    .note-upload-tray-head strong {
      color: var(--ink);
      font-size: 18px;
      font-weight: 950;
    }

    .note-upload-tray-head span,
    .note-upload-overall > span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .note-upload-tray-head b {
      color: var(--primary);
      font-size: 24px;
      font-weight: 950;
      line-height: 1;
    }

    .note-upload-current {
      display: grid;
      grid-template-columns: 48px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      border: 1px solid rgba(47, 130, 103, 0.18);
      border-radius: var(--radius);
      background: #fff;
      padding: 12px;
    }

    .note-upload-current .note-file-icon {
      width: 48px;
      height: 48px;
    }

    .note-file-info {
      display: grid;
      min-width: 0;
      gap: 4px;
    }

    .note-upload-current strong {
      color: var(--ink);
      display: block;
      font-size: 17px;
      line-height: 1.25;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .note-upload-current .note-file-info > span {
      color: var(--muted);
      display: block;
      font-size: 12px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }

    .note-upload-overall {
      display: grid;
      gap: 7px;
    }

    .note-upload-queue {
      display: grid;
      gap: 8px;
      padding-top: 2px;
    }

    .note-file-section-title {
      display: block;
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      color: var(--muted);
      font-size: 12px;
      font-weight: 950;
    }

    .note-file-item {
      display: grid;
      grid-template-columns: 42px minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      border-bottom: 1px solid var(--line);
      box-sizing: border-box;
      padding: 13px 12px;
    }

    .note-upload-queue .note-file-item {
      border: 1px solid rgba(47, 130, 103, 0.14);
      border-radius: var(--radius);
      background: rgba(255, 255, 255, 0.7);
    }

    .note-file-item:last-child {
      border-bottom: 0;
    }

    .note-file-icon {
      width: 42px;
      height: 42px;
      border-radius: var(--radius);
      background: var(--blue-soft);
      color: var(--blue);
      display: grid;
      place-items: center;
      font-size: 12px;
      font-weight: 950;
      overflow: hidden;
    }

    .note-file-item strong {
      color: var(--ink);
      display: block;
      font-size: 17px;
      line-height: 1.25;
      margin-bottom: 4px;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .note-file-item span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      overflow-wrap: anywhere;
    }

    .note-file-progress {
      height: 9px;
      border-radius: 999px;
      background: #e5e2da;
      margin-top: 10px;
      overflow: hidden;
    }

    .note-file-progress span {
      display: block;
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: var(--primary);
      transition: width 0.18s ease;
    }

    .note-current-progress {
      height: 10px;
    }

    .note-overall-progress {
      height: 7px;
      margin-top: 0;
    }

    .note-file-item[data-upload-status="preparing"] .note-file-progress span,
    .note-upload-current[data-upload-status="preparing"] .note-file-progress span {
      background: var(--blue);
      animation: uploadPulse 0.9s ease-in-out infinite alternate;
    }

    .note-file-item[data-upload-status="done"] {
      background: #fff;
      box-shadow: none;
    }

    .note-file-item[data-upload-status="done"] .note-file-progress span,
    .note-upload-current[data-upload-status="done"] .note-file-progress span {
      background: #2f8267;
    }

    .note-file-item[data-upload-status="failed"],
    .note-upload-current[data-upload-status="failed"] {
      background: rgba(168, 62, 50, 0.06);
      box-shadow: inset 4px 0 0 rgba(168, 62, 50, 0.75);
    }

    .note-file-item[data-upload-status="failed"] .note-file-progress span,
    .note-upload-current[data-upload-status="failed"] .note-file-progress span {
      background: #a83e32;
    }

    .note-file-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      justify-content: flex-end;
    }

    .note-file-actions .setting-edit-button {
      min-height: 34px;
      padding: 7px 10px;
      font-size: 13px;
      border-radius: 7px;
    }

    @keyframes uploadPulse {
      from { opacity: 0.45; }
      to { opacity: 1; }
    }

    .note-file-remove {
      min-height: 40px;
    }

    .note-form-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      align-items: center;
    }

    .note-form-actions button {
      width: 100%;
      min-height: 52px;
    }

    .note-form-actions .setting-edit-button[hidden] {
      display: none;
    }

    .notes-list {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 12px;
    }

    .note-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      display: grid;
      gap: 12px;
      min-height: 0;
      padding: 16px;
    }

    .note-card-body {
      appearance: none;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      padding: 0;
      display: grid;
      align-content: start;
      gap: 7px;
      cursor: pointer;
    }

    .note-card-context {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 8px;
      align-items: center;
      justify-content: space-between;
      min-width: 0;
    }

    .note-card-context .record-chip-row {
      gap: 6px;
      flex: 1 1 auto;
      min-width: 0;
    }

    .note-card-context .note-meta {
      flex: 0 0 auto;
      margin-left: auto;
    }

    .note-card-context .record-tag,
    .note-card-context .note-meta span {
      padding: 4px 8px;
      font-size: 11px;
      line-height: 1.2;
    }

    .note-card-body strong {
      font-size: 19px;
      line-height: 1.3;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .note-card-body p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 750;
      overflow-wrap: anywhere;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .note-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .note-meta span {
      border-radius: 999px;
      background: var(--surface-soft);
      padding: 5px 8px;
    }

    .storage-layout {
      display: grid;
      gap: 18px;
      align-items: start;
    }

    .storage-main-panel {
      display: grid;
      gap: 16px;
    }

    .storage-toolbar {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 10px;
      align-items: end;
    }

    .storage-search {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .storage-search input {
      width: 100%;
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      font-weight: 800;
    }

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

    .storage-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      display: grid;
      gap: 10px;
      padding: 15px;
    }

    .storage-card-body {
      display: grid;
      gap: 8px;
    }

    .storage-card-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .storage-card-head strong {
      font-size: 20px;
      line-height: 1.3;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .storage-card-head span {
      color: var(--green);
      white-space: nowrap;
      font-weight: 950;
    }

    .storage-card-body p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .storage-card-links {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .storage-card-links span {
      border-radius: 999px;
      background: var(--surface-soft);
      padding: 5px 8px;
    }

    .storage-card-actions {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
    }

    .storage-card-actions a {
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 8px 10px;
      font-weight: 950;
      text-align: center;
      text-decoration: none;
      display: grid;
      place-items: center;
    }

    .projects-layout {
      display: grid;
      grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
      gap: 18px;
      align-items: start;
    }

    .project-editor-panel {
      position: sticky;
      top: 24px;
    }

    .project-form {
      display: grid;
      gap: 13px;
    }

    .project-form label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .project-form input,
    .project-form select,
    .project-form textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      font-weight: 800;
    }

    .project-form input,
    .project-form select {
      min-height: 48px;
    }

    .project-form input[type="color"] {
      padding: 4px;
    }

    .project-form textarea {
      min-height: 130px;
      line-height: 1.55;
      resize: vertical;
    }

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

    .project-form-actions {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
    }

    .project-form-actions .setting-edit-button[hidden] {
      display: none;
    }

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

    .project-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      display: grid;
      gap: 10px;
      padding: 15px;
    }

    .project-card-body {
      appearance: none;
      border: 0;
      background: transparent;
      color: inherit;
      text-align: left;
      padding: 0;
      display: grid;
      gap: 8px;
    }

    .project-card-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .project-card-head strong {
      font-size: 20px;
      line-height: 1.3;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .project-color-chip {
      width: 18px;
      height: 18px;
      border: 1px solid var(--line);
      border-radius: 999px;
      flex: 0 0 auto;
      margin-top: 4px;
    }

    .project-card-body p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .project-card-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .project-card-actions button {
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 8px 10px;
      font-weight: 950;
    }

    .money-layout {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 18px;
      align-items: start;
    }

    .money-list-panel {
      grid-column: 1 / -1;
    }

    .money-flow-panel {
      grid-column: 1 / -1;
    }

    .money-editor-panel {
      position: relative;
      top: auto;
    }

    .money-form {
      display: grid;
      gap: 13px;
    }

    .money-classification-field {
      display: grid;
      gap: 8px;
    }

    .money-classification-field > strong {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .money-form label {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .money-form input,
    .money-form select,
    .money-form textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      font-weight: 800;
    }

    .money-form input,
    .money-form select {
      min-height: 48px;
    }

    .money-form textarea {
      min-height: 130px;
      line-height: 1.55;
      resize: vertical;
    }

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

    .money-form-actions {
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
    }

    .money-form-actions .setting-edit-button[hidden] {
      display: none;
    }

    .money-debt-fields {
      border: 1px dashed var(--line);
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 13px;
      display: grid;
      gap: 12px;
    }

    .money-debt-fields[hidden] {
      display: none;
    }

    .money-records-list {
      display: grid;
      gap: 12px;
    }

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

    .money-summary-card,
    .money-watch-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      min-height: 112px;
      padding: 15px;
      display: grid;
      gap: 7px;
      text-align: left;
    }

    .context-note {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-soft);
      display: grid;
      gap: 6px;
      margin-top: 12px;
      padding: 13px 14px;
      color: var(--muted);
    }

    .context-note strong {
      color: var(--green);
      font-size: 14px;
      font-weight: 950;
    }

    .context-note p {
      margin: 0;
      line-height: 1.55;
      font-size: 14px;
      font-weight: 800;
    }

    .money-summary-card span {
      color: var(--muted);
      font-size: 13px;
      font-weight: 950;
    }

    .money-summary-card strong {
      font-size: clamp(22px, 2.4vw, 34px);
      line-height: 1.05;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .money-summary-card p,
    .money-watch-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
      font-size: 13px;
      font-weight: 800;
    }

    .money-watch-list {
      display: grid;
      gap: 10px;
    }

    .money-watch-card {
      width: 100%;
      cursor: pointer;
    }

    .money-watch-card strong {
      font-size: 18px;
      line-height: 1.25;
      font-weight: 950;
    }

    .money-record-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      display: grid;
      gap: 10px;
      padding: 16px;
    }

    .money-row-card {
      width: 100%;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      min-height: 96px;
      text-align: left;
      cursor: pointer;
    }

    .money-row-icon {
      width: 48px;
      height: 48px;
      border-radius: var(--radius);
      background: var(--surface-soft);
      display: grid;
      place-items: center;
    }

    .money-category-icon {
      width: 25px;
      height: 25px;
      display: block;
      flex: 0 0 auto;
    }

    .money-row-icon-income,
    .amount-income {
      color: var(--green);
    }

    .money-row-icon-expense,
    .amount-expense {
      color: var(--red);
    }

    .money-row-icon-paid_debt,
    .money-row-icon-debt,
    .amount-paid_debt,
    .amount-debt {
      color: var(--amber);
    }

    .money-row-amount {
      font-size: 18px;
      font-weight: 950;
      white-space: nowrap;
    }

    .money-record-card-body {
      display: grid;
      gap: 8px;
    }

    .money-record-card-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .money-record-card-head strong {
      font-size: 20px;
      line-height: 1.3;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .money-record-card-head span {
      color: var(--green);
      white-space: nowrap;
      font-weight: 950;
    }

    .money-record-card-body p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .record-detail-overlay {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      left: 252px;
      z-index: 45;
      width: calc(100vw - 252px);
      height: 100vh;
      height: 100dvh;
      background: var(--surface);
      border-left: 1px solid var(--line);
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      opacity: 0;
      pointer-events: none;
      transform: translateX(28px);
      transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .record-detail-overlay.open {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(0);
    }

    .record-detail-overlay[hidden] {
      display: none;
    }

    .record-detail-panel {
      min-height: 100%;
      padding: 0 var(--overlay-pad-x) 0;
      display: grid;
      gap: 18px;
      align-content: start;
    }

    .overlay-command-head {
      position: sticky;
      top: 0;
      z-index: 6;
      border-bottom: 1px solid var(--line);
      background: var(--surface);
    }

    .overlay-command-footer {
      position: sticky;
      bottom: 0;
      z-index: 6;
      border-top: 1px solid var(--line);
      background: var(--surface-glass-strong);
      backdrop-filter: blur(12px);
      padding-top: 14px;
      padding-bottom: var(--overlay-pad-y);
    }

    .command-actions:has(> :not([hidden])):not(:has(> :not([hidden]) ~ :not([hidden]))) {
      grid-template-columns: minmax(0, var(--command-action-width));
      justify-content: end;
    }

    .command-actions:has(> :not([hidden])):not(:has(> :not([hidden]) ~ :not([hidden]))) > :not([hidden]) {
      width: min(100%, var(--command-action-width));
      justify-self: end;
      flex: 0 1 var(--command-action-width);
    }

    .record-detail-head {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px;
      align-items: start;
      padding-top: var(--overlay-pad-y);
      padding-bottom: 16px;
    }

    .record-detail-head h2 {
      margin: 0;
      font-size: clamp(30px, 4vw, 48px);
      line-height: 1.12;
      font-weight: 950;
    }

    .record-detail-head p {
      margin: 8px 0 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 780;
    }

    .record-close-button {
      width: 44px;
      height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      font-size: 24px;
      line-height: 1;
      font-weight: 950;
    }

    .record-detail-body {
      display: grid;
      gap: 14px;
    }

    .record-detail-section {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 16px;
      display: grid;
      gap: 10px;
    }

    .record-detail-section h3 {
      margin: 0;
      font-size: 20px;
      line-height: 1.3;
      font-weight: 950;
    }

    .record-detail-section p {
      margin: 0;
      color: var(--muted);
      line-height: 1.65;
      font-weight: 760;
      white-space: pre-wrap;
    }

    .memo-prose p {
      color: var(--ink);
      font-size: 18px;
      font-weight: 780;
    }

    .record-section-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: center;
    }

    .record-file-row {
      border: 1px dashed var(--line-strong);
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 10px;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
    }

    .record-file-icon {
      width: 44px;
      height: 44px;
      border-radius: var(--radius);
      background: var(--white);
      color: var(--green);
      display: grid;
      place-items: center;
      font-size: 12px;
      font-weight: 950;
    }

    .record-file-row strong {
      display: block;
      margin-bottom: 3px;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .record-file-action {
      display: grid;
      place-items: center;
      text-decoration: none;
      min-height: 40px;
    }

    .detail-link-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface-soft);
      padding: 12px;
      display: grid;
      gap: 8px;
    }

    .detail-link-card strong {
      font-size: 16px;
      line-height: 1.35;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .money-file-field input {
      min-height: 48px;
      padding-top: 12px;
    }

    .money-summary-grid-compact {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .money-trend-section {
      gap: 16px;
    }

    .money-trend-head > div:first-child {
      min-width: 0;
      display: grid;
      gap: 5px;
    }

    .money-trend-period {
      display: grid;
      grid-template-columns: 42px 112px 42px;
      align-items: stretch;
      flex: 0 0 auto;
    }

    .money-trend-period button,
    .money-trend-period input {
      min-width: 0;
      min-height: 42px;
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--ink);
      text-align: center;
      font-weight: 900;
    }

    .money-trend-period button:first-child {
      border-radius: var(--radius) 0 0 var(--radius);
    }

    .money-trend-period button:last-child {
      border-radius: 0 var(--radius) var(--radius) 0;
    }

    .money-trend-period input {
      border-right: 0;
      border-left: 0;
      border-radius: 0;
      appearance: textfield;
    }

    .money-trend-period input::-webkit-inner-spin-button,
    .money-trend-period input::-webkit-outer-spin-button {
      margin: 0;
      appearance: none;
    }

    .money-trend-card {
      min-width: 0;
      padding: 14px;
      border-radius: var(--radius);
      background: var(--surface-soft);
      display: grid;
      gap: 14px;
    }

    .money-trend-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }

    .money-trend-toolbar > strong {
      font-size: 17px;
      font-weight: 950;
    }

    .money-trend-modes {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .money-trend-modes button {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--muted);
      padding: 0 13px;
      font-size: 13px;
      font-weight: 900;
    }

    .money-trend-modes button.active {
      border-color: var(--green-border-soft);
      background: var(--green-soft);
      color: var(--green);
    }

    .money-trend-chart-scroll {
      width: 100%;
      overflow-x: auto;
      overscroll-behavior-inline: contain;
    }

    .money-trend-chart {
      width: 100%;
      min-width: 620px;
      height: auto;
      display: block;
      overflow: visible;
    }

    .money-trend-grid {
      stroke: var(--line);
      stroke-width: 1;
    }

    .money-trend-axis-label {
      fill: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }

    .money-trend-line {
      fill: none;
      stroke-width: 4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .money-trend-point {
      stroke: var(--white);
      stroke-width: 3;
      transition: r 120ms ease;
    }

    .money-trend-point:is(:hover, :focus) {
      r: 8;
      outline: none;
    }

    .money-trend-income .money-trend-line {
      stroke: var(--green);
    }

    .money-trend-income .money-trend-point {
      fill: var(--green);
    }

    .money-trend-expense .money-trend-line {
      stroke: var(--red);
    }

    .money-trend-expense .money-trend-point {
      fill: var(--red);
    }

    .money-trend-mode-income .money-trend-expense,
    .money-trend-mode-expense .money-trend-income {
      display: none;
    }

    .money-trend-legend {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .money-trend-legend span {
      display: inline-flex;
      align-items: center;
      gap: 6px;
    }

    .money-trend-legend i {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      display: inline-block;
    }

    .money-trend-legend .income-dot {
      background: var(--green);
    }

    .money-trend-legend .expense-dot {
      background: var(--red);
    }

    .money-trend-empty {
      text-align: center;
    }

    .money-detail-amount {
      font-size: clamp(34px, 5vw, 58px);
      line-height: 1;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .record-detail-footer {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 10px;
      align-items: center;
    }

    .money-record-card-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .money-record-card-actions button {
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 8px 10px;
      font-weight: 950;
    }

    .history-days {
      display: grid;
      gap: 16px;
    }

    .history-day {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 18px;
      display: grid;
      gap: 16px;
    }

    .history-day-head {
      display: block;
      border-bottom: 1px solid var(--line);
      padding-bottom: 14px;
      cursor: pointer;
      list-style: none;
    }

    .history-day-head::-webkit-details-marker {
      display: none;
    }

    .history-day:not([open]) .history-day-head {
      border-bottom: 0;
      padding-bottom: 0;
    }

    .history-day-head h3 {
      margin: 0;
      font-size: 24px;
      line-height: 1.24;
      font-weight: 950;
    }

    .history-morning-message {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.55;
    }

    .history-day:not([open]) .history-morning-message {
      display: none;
    }

    .history-summary-line {
      color: var(--green);
      font-size: 18px;
      font-weight: 950;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      margin-top: 6px;
    }

    .history-summary-line strong {
      font: inherit;
    }

    .history-toggle-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .history-toggle-label::before {
      content: "· 접기";
    }

    .history-day:not([open]) .history-toggle-label::before {
      content: "· 펼치기";
    }

    .history-groups {
      display: grid;
      gap: 14px;
    }

    .history-group {
      display: grid;
      gap: 10px;
    }

    .history-group-title {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--green);
      font-weight: 950;
    }

    .history-group-title::after {
      content: "";
      height: 1px;
      flex: 1;
      background: var(--line);
    }

    .history-card-note {
      color: var(--muted);
      font-size: 13px;
      font-weight: 850;
    }

    .week-flow {
      display: grid;
      gap: 10px;
    }

    .week-row {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 15px 16px;
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr);
      gap: 12px;
      align-items: center;
    }

    .week-row strong {
      font-size: 17px;
      font-weight: 950;
    }

    .week-row span {
      color: var(--muted);
      line-height: 1.5;
      font-weight: 780;
    }

    .settings-card {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 20px;
      display: grid;
      gap: 16px;
    }

    .settings-card-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: start;
    }

    .settings-card-head > div:first-child {
      display: grid;
      gap: 6px;
      width: 100%;
      min-width: 0;
    }

    .settings-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .settings-title-row > .toggle {
      flex: 0 0 58px;
    }

    .settings-card h3 {
      margin: 0;
      font-size: 22px;
      font-weight: 950;
    }

    .settings-card-head p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
      font-weight: 750;
    }

    .settings-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(300px, 0.46fr);
      gap: 14px;
      align-items: center;
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }

    .settings-card.notifications-off [data-notification-dependent] {
      opacity: 0.62;
      background: var(--surface-disabled);
      border-radius: 12px;
      padding: 12px;
      border-top-color: transparent;
    }

    .settings-card.notifications-off [data-notification-dependent] + [data-notification-dependent] {
      margin-top: -4px;
    }

    .settings-row:first-of-type {
      border-top: 0;
      padding-top: 0;
    }

    .settings-row label,
    .settings-label {
      display: grid;
      gap: 4px;
      font-weight: 950;
    }

    .settings-row small {
      color: var(--muted);
      font-weight: 700;
      line-height: 1.45;
    }

    .settings-link-button {
      min-height: 44px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 14px;
      text-align: center;
      text-decoration: none;
      font-weight: 900;
    }

    .settings-row input,
    .settings-row select {
      width: 100%;
      min-width: 0;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 9px 10px;
    }

    .settings-row input:disabled,
    .settings-row select:disabled {
      background: var(--surface-disabled);
      color: var(--muted);
      -webkit-text-fill-color: var(--muted);
      opacity: 1;
    }

    .settings-control {
      display: grid;
      min-width: 0;
      gap: 8px;
    }

    .settings-control.inline {
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
    }

    .settings-control.split {
      grid-template-columns: minmax(0, 1fr) minmax(120px, 0.46fr);
      align-items: center;
      gap: 10px;
    }

    .quiet-times {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      align-items: end;
    }

    .time-field {
      display: grid;
      min-width: 0;
      gap: 5px;
    }

    .time-field span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 850;
    }

    .setting-edit-button {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      min-height: 42px;
      padding: 9px 13px;
      font-weight: 950;
      white-space: nowrap;
    }

    .setting-edit-button.primary {
      border-color: var(--ink);
      background: var(--ink);
      color: var(--white);
    }

    .setting-edit-button:disabled {
      cursor: wait;
      opacity: 0.72;
    }

    @media (max-width: 1500px) {
      .settings-row {
        grid-template-columns: 1fr;
        align-items: start;
      }

      .settings-control.split,
      .quiet-times {
        grid-template-columns: 1fr;
      }

      .history-tools {
        grid-template-columns: 1fr;
      }

      .notes-layout {
        grid-template-columns: 1fr;
      }

      .projects-layout {
        grid-template-columns: 1fr;
      }

      .project-editor-panel {
        position: static;
      }

      .money-layout {
        grid-template-columns: 1fr;
      }

      .money-editor-panel {
        position: static;
      }
    }

    .overlay {
      position: fixed;
      inset: 0;
      z-index: 50;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    .overlay.open {
      pointer-events: auto;
      opacity: 1;
    }

    .confirm-overlay {
      position: fixed;
      inset: 0;
      z-index: 80;
      pointer-events: none;
      opacity: 0;
      display: grid;
      place-items: center;
      padding: 24px 18px;
      transition: opacity 0.18s ease;
    }

    .confirm-overlay.open {
      pointer-events: auto;
      opacity: 1;
    }

    .confirm-overlay[data-first-push-prompt] {
      place-items: end center;
      padding: 18px;
      padding-bottom: max(18px, env(safe-area-inset-bottom));
      background: var(--scrim);
    }

    .confirm-overlay[data-first-push-prompt] .confirm-dialog {
      width: min(520px, 100%);
      border-radius: 18px 18px 12px 12px;
      padding: 24px 22px 22px;
      transform: translateY(24px);
      transition: transform 0.22s ease;
    }

    .confirm-overlay[data-first-push-prompt].open .confirm-dialog {
      transform: translateY(0);
    }

    .confirm-overlay[data-first-push-prompt] .confirm-dialog h2 {
      font-size: 26px;
    }

    .confirm-overlay[data-first-push-prompt] .confirm-dialog p {
      color: var(--text);
      font-size: 16px;
    }

    .confirm-overlay[data-cancel-confirm].open {
      z-index: 90;
    }

    .scrim {
      position: absolute;
      inset: 0;
      background: var(--scrim-soft);
    }

    .confirm-dialog {
      position: relative;
      z-index: 1;
      width: min(420px, 100%);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      box-shadow: var(--shadow);
      padding: 22px;
      display: grid;
      gap: 14px;
    }

    .confirm-dialog h2 {
      margin: 0;
      font-size: 24px;
      line-height: 1.25;
      font-weight: 950;
    }

    .confirm-dialog p {
      margin: 0;
      color: var(--muted);
      line-height: 1.55;
      font-weight: 750;
    }

    .project-link-select {
      display: grid;
      gap: 7px;
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .project-link-select[hidden] {
      display: none;
    }

    .project-link-select select {
      width: 100%;
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      color: var(--ink);
      padding: 11px 12px;
      font: inherit;
      font-weight: 850;
    }

    .confirm-target {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: color-mix(in srgb, var(--surface) 72%, var(--surface-soft));
      padding: 12px;
      font-weight: 950;
    }

    .modal-list {
      display: grid;
      gap: 10px;
      align-content: start;
      align-items: start;
    }

    .work-dialog {
      width: min(860px, 100%);
      height: min(720px, 78vh);
      max-height: calc(100vh - 48px);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .work-dialog .modal-list {
      min-height: 0;
      flex: 1 1 auto;
      overflow-y: auto;
      padding-right: 4px;
      padding-bottom: 14px;
      grid-auto-rows: max-content;
      align-content: start;
      align-items: start;
    }

    .modal-group {
      display: grid;
      gap: 10px;
      align-content: start;
      align-items: start;
    }

    .modal-line {
      margin-top: 4px;
      font-size: 14px;
    }

    .modal-group:first-child .modal-line {
      margin-top: 0;
    }

    .work-dialog .schedule-card {
      padding: 12px;
      gap: 9px;
      align-self: start;
    }

    .work-dialog .card-main {
      gap: 7px;
    }

    .work-dialog .badges {
      gap: 6px;
    }

    .work-dialog .badge {
      padding: 4px 8px;
      font-size: 11px;
    }

    .work-dialog .schedule-card h3 {
      font-size: 18px;
      line-height: 1.25;
    }

    .work-dialog .schedule-card p {
      font-size: 13px;
      line-height: 1.35;
    }

    .work-dialog .card-actions {
      gap: 6px;
      grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    }

    .work-dialog .action {
      min-height: 36px;
      padding: 6px 8px;
      font-size: 13px;
    }

    .schedule-detail {
      display: grid;
      gap: 10px;
    }

    .detail-row {
      display: grid;
      grid-template-columns: minmax(90px, 0.34fr) minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: color-mix(in srgb, var(--surface) 76%, var(--surface-soft));
      padding: 11px 12px;
    }

    .detail-row span,
    .detail-note span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 900;
    }

    .detail-row strong {
      min-width: 0;
      color: var(--ink);
      font-size: 14px;
      line-height: 1.4;
      overflow-wrap: anywhere;
    }

    .detail-note {
      display: grid;
      gap: 7px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      padding: 12px;
    }

    .detail-note p {
      color: var(--ink);
      font-size: 14px;
      line-height: 1.55;
      font-weight: 760;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }

    .work-dialog .confirm-actions {
      flex: 0 0 auto;
      padding-top: 14px;
      border-top: 1px solid var(--line);
      background: var(--surface);
    }

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

    .confirm-actions.single {
      grid-template-columns: 1fr;
    }

    .work-dialog .confirm-actions.single {
      grid-template-columns: minmax(0, var(--command-action-width));
      justify-content: end;
    }

    .confirm-actions button {
      min-height: 44px;
      border-radius: var(--radius);
      padding: 10px 14px;
      font-weight: 950;
    }

    .drawer {
      position: absolute;
      top: 0;
      right: 0;
      width: min(620px, 100%);
      height: 100%;
      background: var(--surface);
      padding: 0 26px;
      overflow: auto;
      transform: translateX(100%);
      transition: transform 0.2s ease;
      display: grid;
      gap: 18px;
      align-content: start;
    }

    .overlay.open .drawer {
      transform: translateX(0);
    }

    .drawer-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
    }

    .overlay .overlay-command-head {
      padding-top: 26px;
      padding-bottom: 14px;
    }

    .drawer-head h2 {
      margin: 0;
      font-size: 31px;
      line-height: 1.18;
      font-weight: 950;
    }

    .form {
      display: grid;
      gap: 14px;
    }

    .form-section {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: color-mix(in srgb, var(--surface) 72%, var(--surface-soft));
      padding: 16px;
      display: grid;
      gap: 12px;
    }

    .form-section h3 {
      margin: 0;
      font-size: 16px;
      font-weight: 950;
    }

    .form-help {
      margin: 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.55;
      font-weight: 760;
    }

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

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

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

    .field label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 900;
    }

    .field input,
    .field textarea,
    .field select {
      width: 100%;
      min-height: 42px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 10px 11px;
    }

    .field textarea {
      min-height: 86px;
      resize: vertical;
      line-height: 1.5;
    }

    .option-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .repeat-options {
      display: none;
    }

    .repeat-options.show {
      display: flex;
    }

    .repeat-detail {
      display: none;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      padding: 12px;
      gap: 10px;
    }

    .repeat-detail.show {
      display: grid;
    }

    .repeat-date-list {
      display: grid;
      gap: 7px;
    }

    .repeat-date-list[hidden] {
      display: none;
    }

    .repeat-date-list-title {
      margin: 0;
      font-size: 13px;
      font-weight: 800;
      color: var(--muted);
    }

    .repeat-date-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .repeat-add-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }

    .repeat-date-chip {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 30px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--soft);
      padding: 5px 10px;
      font-size: 13px;
      font-weight: 800;
      color: var(--ink);
      line-height: 1.2;
    }

    button.repeat-date-chip {
      cursor: pointer;
      font-family: inherit;
    }

    .repeat-date-chip.current {
      border-color: var(--green);
      color: var(--green);
      background: var(--green-soft);
    }

    .repeat-date-chip.editable {
      border-color: color-mix(in srgb, var(--green) 48%, white);
      background: var(--green-soft);
      color: var(--green);
    }

    .repeat-date-chip.changed {
      border-style: dashed;
    }

    .repeat-date-chip.done {
      color: var(--muted);
    }

    .repeat-date-picker {
      position: absolute;
      inline-size: 1px;
      block-size: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .repeat-date-icon {
      font-size: 12px;
      line-height: 1;
      opacity: .85;
    }

    .repeat-date-remove {
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-weight: 900;
      cursor: pointer;
      padding: 0 0 0 4px;
    }

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

    .weekday-row {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
    }

    .weekday-row button {
      min-width: 38px;
      min-height: 34px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      font-weight: 900;
    }

    .weekday-row button.active {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--green-soft);
      color: var(--green);
    }

    .option {
      min-height: 38px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      padding: 8px 12px;
      font-weight: 900;
    }

    .option.active {
      background: var(--green-soft);
      border-color: color-mix(in srgb, var(--green) 35%, white);
      color: var(--green);
    }

    .switch-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
    }

    .toggle-label {
      color: var(--muted);
      font-weight: 900;
    }

    .toggle {
      width: 58px;
      height: 34px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--surface-soft);
      padding: 3px;
      position: relative;
      transition: background 0.18s ease, border-color 0.18s ease;
    }

    .toggle::after {
      content: "";
      position: absolute;
      top: 3px;
      left: 3px;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--white);
      box-shadow: var(--toggle-shadow);
      transition: transform 0.18s ease;
    }

    .toggle.on {
      border-color: color-mix(in srgb, var(--green) 35%, white);
      background: var(--green-soft);
    }

    .toggle.on::after {
      transform: translateX(24px);
    }

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

    .preview-card {
      border: 1px solid color-mix(in srgb, var(--amber) 62%, white);
      border-radius: var(--radius);
      background: var(--focus-soft);
      padding: 14px;
      display: grid;
      gap: 8px;
    }

    .preview-card h3 {
      margin: 0;
      font-size: 18px;
      line-height: 1.28;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .preview-card p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.45;
      font-weight: 760;
      overflow-wrap: anywhere;
    }

    .drawer-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      padding-top: 14px;
      padding-bottom: 26px;
    }

    .drawer-actions button {
      width: 100%;
      border-radius: var(--radius);
      min-height: 54px;
      padding: 10px 16px;
      font-weight: 950;
    }

    .picker-field-control {
      position: relative;
      display: grid;
      width: 100%;
      min-width: 0;
      min-height: 48px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--white);
      overflow: hidden;
      cursor: pointer;
    }

    .picker-field-control:focus-within {
      border-color: var(--green);
      box-shadow: 0 0 0 3px var(--green-soft);
    }

    .picker-field-display {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: center;
      min-width: 0;
      min-height: 46px;
      padding: 10px 12px;
      pointer-events: none;
    }

    .picker-field-value {
      min-width: 0;
      color: var(--muted);
      font-size: 16px;
      line-height: 1.3;
      font-weight: 800;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .picker-field-control.has-value .picker-field-value {
      color: var(--ink);
    }

    .picker-field-action {
      color: var(--green);
      font-size: 13px;
      line-height: 1;
      font-weight: 950;
    }

    .picker-field-native {
      position: absolute !important;
      inset: 0 !important;
      z-index: 2;
      width: 100% !important;
      height: 100% !important;
      min-height: 0 !important;
      margin: 0 !important;
      border: 0 !important;
      padding: 0 !important;
      opacity: 0;
      cursor: pointer;
    }

    .picker-field-control.is-disabled {
      background: var(--surface-disabled);
      opacity: 0.72;
    }

    .secondary {
      border: 1px solid var(--line);
      background: var(--white);
      color: var(--ink);
    }

    .primary {
      border: 0;
      background: var(--ink);
      color: var(--white);
    }

    .primary.danger {
      background: var(--red);
      color: var(--white);
    }

    .toast {
      position: fixed;
      left: 50%;
      bottom: 22px;
      z-index: 60;
      transform: translate(-50%, 16px);
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--ink);
      color: var(--white);
      box-shadow: var(--shadow);
      padding: 11px 16px;
      font-size: 14px;
      font-weight: 900;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .toast.show {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .pull-refresh {
      position: fixed;
      left: 50%;
      top: calc(12px + env(safe-area-inset-top));
      z-index: 45;
      min-width: 132px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--floating-surface);
      color: var(--muted);
      box-shadow: var(--shadow);
      padding: 9px 14px;
      font-size: 13px;
      font-weight: 900;
      text-align: center;
      opacity: 0;
      pointer-events: none;
      transform: translate(-50%, -18px);
      transition: opacity 0.16s ease, transform 0.16s ease, color 0.16s ease;
    }

    .pull-refresh.visible {
      opacity: 1;
      transform: translate(-50%, 0);
    }

    .pull-refresh.ready {
      color: var(--green);
    }

    .menu-drawer {
      position: fixed;
      inset: 0;
      z-index: 30;
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    .menu-drawer.open {
      pointer-events: auto;
      opacity: 1;
    }

    .menu-panel {
      position: absolute;
      inset: 0 auto 0 0;
      width: min(320px, 100%);
      height: 100vh;
      height: 100dvh;
      box-sizing: border-box;
      background: var(--surface);
      padding: 26px 22px max(26px, env(safe-area-inset-bottom));
      transform: translateX(-100%);
      transition: transform 0.2s ease;
      display: flex;
      flex-direction: column;
      gap: 24px;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
    }

    .menu-drawer.open .menu-panel {
      transform: translateX(0);
    }

    @media (max-width: 1180px) {
      html,
      body {
        height: 100%;
        overflow: hidden;
      }

      .app {
        grid-template-columns: 1fr;
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        overflow: hidden;
      }

      .sidebar {
        display: none;
      }

      .note-editor-panel {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        border-left: 0;
        padding: 0 14px 0;
      }

      .note-editor-panel > .panel-head {
        padding-top: 18px;
      }

      .note-form-actions {
        padding-bottom: max(26px, env(safe-area-inset-bottom));
      }

      .record-detail-overlay {
        left: 0;
        width: 100vw;
        border-left: 0;
      }

      .record-detail-panel {
        padding: 0 14px 0;
      }

      .record-detail-head {
        padding-top: 18px;
      }

      .mobile-top {
        display: flex;
        position: sticky;
        top: 0;
        z-index: 15;
        min-height: var(--mobile-top-height);
        margin: 0 0 18px;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        background: var(--mobile-surface-glass);
        backdrop-filter: blur(10px);
      }

      .main {
        padding-top: 0;
        height: 100vh;
        height: 100dvh;
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom));
      }

      .hero {
        grid-template-columns: 1fr;
      }

      .today-note {
        min-height: auto;
      }

      .content-grid {
        grid-template-columns: 1fr;
      }

      .settings-row {
        grid-template-columns: 1fr;
        align-items: start;
      }
    }

    @media (max-width: 760px) {
      .main {
        padding-inline: 14px;
      }

      .mobile-top {
        margin-bottom: 16px;
      }

      .hero,
      .panel,
      .settings-card {
        padding: 16px;
      }

      .settings-card-head {
        display: grid;
      }

      .settings-title-row {
        width: 100%;
      }

      .hero {
        gap: 14px;
      }

      .today-note {
        gap: 14px;
      }

      .quick-add {
        grid-template-columns: 1fr;
      }

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

      .field-grid {
        grid-template-columns: 1fr;
      }

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

      .history-custom-range {
        grid-template-columns: 1fr;
      }

      .note-form-actions {
        grid-template-columns: 1fr;
      }

      .notes-toolbar {
        grid-template-columns: 1fr;
      }

      .notes-toolbar .record-filter-row {
        flex-wrap: wrap;
        justify-content: flex-start;
      }

      .money-layout {
        grid-template-columns: 1fr;
      }

      .money-receipt-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

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

      .money-trend-head {
        display: grid;
        align-items: stretch;
      }

      .money-trend-period {
        width: 100%;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
      }

      .money-trend-toolbar {
        display: grid;
      }

      .money-trend-modes {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .money-trend-modes button {
        padding-inline: 8px;
      }

      .money-trend-card {
        padding-inline: 10px;
      }

      .money-trend-chart-scroll {
        overflow-x: hidden;
      }

      .money-trend-chart {
        min-width: 0;
      }

      .money-trend-axis-label {
        font-size: 21px;
      }

      .money-trend-month-even {
        display: none;
      }

      .project-form-grid,
      .project-form-actions {
        grid-template-columns: 1fr;
      }

      .project-card-head {
        display: grid;
      }

      .money-form-grid,
      .money-form-actions {
        grid-template-columns: 1fr;
      }

      .money-record-card-head {
        display: grid;
      }

      .money-row-card {
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: start;
      }

      .money-row-icon {
        width: 40px;
        height: 40px;
      }

      .money-category-icon {
        width: 22px;
        height: 22px;
      }

      .money-row-amount {
        grid-column: 2;
        white-space: normal;
      }

      .record-detail-head {
        grid-template-columns: minmax(0, 1fr) auto;
      }

      .record-detail-footer {
        grid-template-columns: 1fr;
        padding-bottom: max(26px, env(safe-area-inset-bottom));
      }

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

      .command-actions:has(> :not([hidden])):not(:has(> :not([hidden]) ~ :not([hidden]))) {
        grid-template-columns: 1fr;
        justify-content: stretch;
      }

      .command-actions:has(> :not([hidden])):not(:has(> :not([hidden]) ~ :not([hidden]))) > :not([hidden]) {
        width: 100%;
        justify-self: stretch;
        flex-basis: 100%;
      }

      .work-dialog .confirm-actions.single {
        grid-template-columns: 1fr;
        justify-content: stretch;
      }

      .record-file-row {
        grid-template-columns: minmax(0, 1fr);
      }

      .record-file-icon {
        display: none;
      }

      .note-file-item {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .note-upload-current {
        grid-template-columns: auto minmax(0, 1fr);
      }

      .note-file-actions {
        grid-column: 2;
        justify-self: start;
      }

      .note-complete-panel .note-file-item {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 0;
      }

      .note-write-mode {
        grid-template-columns: 1fr;
      }

      .money-type-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .money-category-switch {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .money-summary-grid-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .storage-card-head {
        display: grid;
      }

      .review-chip {
        width: 100%;
        min-height: 38px;
        padding: 7px 8px;
        font-size: 12px;
        text-align: center;
      }

      .flow {
        gap: 10px;
      }

      .section-title {
        font-size: 30px;
      }

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

      .flow-tile {
        min-height: 74px;
        padding: 12px 14px;
      }

      .flow-tile strong {
        font-size: 32px;
      }

      .flow-tile span {
        font-size: 13px;
        line-height: 1.25;
      }

      .primary-wide {
        min-height: 48px;
        padding: 12px 14px;
        font-size: 16px;
      }

      .schedule-card {
        grid-template-columns: 1fr;
      }

      .history-day {
        padding: 14px;
      }

      .history-day-head {
        display: block;
      }

      .buddy-copy {
        font-size: clamp(16px, 4.2vw, 19px);
      }

      .week-row,
      .settings-row {
        grid-template-columns: 1fr;
      }

      .settings-control.inline,
      .quiet-times {
        grid-template-columns: 1fr;
      }

      .drawer {
        width: 100%;
        padding: 0 14px;
      }

      .overlay .overlay-command-head {
        padding-top: 20px;
      }

      .overlay .overlay-command-footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
      }

      .view-head {
        display: grid;
        align-items: start;
      }
    }
