/* Compact phone layout. Keep controls touchable; do not scale the page. */
.entry-edit { width: 44px; height: 44px; min-width: 44px; padding: 12px; border: 0; border-radius: 10px; background: transparent; color: var(--deep); }
.entry-edit .ui-icon { width: 18px; height: 18px; }
.entry-edit:hover { background: #e7f3ed; }
.entry-edit:focus-visible { outline: 2px solid var(--deep); outline-offset: 2px; }
@media (max-width: 720px) {
  .workspace { padding: 16px 14px calc(88px + env(safe-area-inset-bottom)); }
  .sidebar { padding: 8px 14px; }
  .app-header { display: flex; align-items: center; gap: 12px; }
  .app-header h1, .page-heading h1 { font-size: 26px; line-height: 1.3; letter-spacing: -.025em; }
  .page-heading { gap: 12px; margin-bottom: 16px; }
  .page-heading > div > p:last-child { font-size: 14px; margin-top: 6px; }
  .eyebrow { font-size: 12px; margin-bottom: 5px; letter-spacing: .08em; }
  .panel, .budget-card, .summit-card { padding: 16px; border-radius: 18px; }
  .panel-title { flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
  h2, .panel-title h2 { font-size: 19px; line-height: 1.4; letter-spacing: -.02em; }
  .panel-title > h2, .panel-title > div { flex: 1 1 100%; min-width: 0; }
  .panel-title p, .muted { font-size: 14px; }
  .primary, .secondary, .google-button, .compact, .more-links button {
    min-height: 44px; padding: 9px 12px; border-radius: 11px;
    font-size: 14px; font-weight: 650; line-height: 1.4; max-width: 100%;
  }
  .primary { box-shadow: 0 3px 9px #0f766e16; }
  .icon-button { width: 44px; height: 44px; min-width: 44px; font-size: 18px; }
  .icon-button .ui-icon { width: 19px; height: 19px; }
  .danger-text, .text-button { min-height: 44px; padding: 8px 10px; font-size: 14px; }
  .header-actions { gap: 6px; flex-shrink: 0; }
  .header-actions .primary { padding-inline: 10px; }
  .header-actions .ui-icon { width: 18px; height: 18px; }
  .profile { grid-template-columns: 44px; }
  .dashboard-grid, .side-panels, .report-grid, .mountain-layout { gap: 14px; }
  .balance-panel { margin: 18px 0 14px; padding: 18px; gap: 12px; border-radius: 18px; }
  .balance-panel div:first-child strong { font-size: 28px; }
  .metric-grid, .budget-summary { gap: 10px; margin-bottom: 14px; }
  .metric-grid article, .budget-summary article { padding: 13px; border-radius: 14px; }
  .metric-grid strong, .budget-summary strong { font-size: 20px; line-height: 1.3; }
  .metric-grid small, .budget-summary small { font-size: 14px; }
  .budget-summary article:last-child { grid-column: auto; }
  .report-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; width: 100%; }
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { font-size: 16px; }
  .form-grid { gap: 12px; margin: 16px 0; }
  .form-grid label, .goal-form label, .steps-form label, .auth-card label { font-size: 14px; font-weight: 600; gap: 5px; }
  .form-grid input:not([type=checkbox]), .form-grid select, .goal-form input, .steps-form input, .auth-card input {
    min-height: 44px; padding: 9px 12px; border-radius: 11px;
  }
  select, input[type=date], input[type=month] { min-height: 44px; padding: 9px 12px!important; border-radius: 11px!important; }
  select { padding-right: 34px!important; background-position: right 9px center; }
  .report-filters { gap: 4px 12px; }
  .report-filters label { min-height: 44px; font-size: 14px; flex: 1 1 auto; }
  .report-filters input { width: 18px; min-width: 18px; height: 18px; margin: 0; }
  #report-comparison { padding: 12px; border-radius: 13px; }
  #report-comparison > p { margin: 0 0 12px; font-size: 14px; }
  #report-comparison .metric-grid { margin: 0; }
  #report-pie { width: 170px; margin: 12px auto 16px; box-shadow: none; }
  #report-categories button { padding: 9px 10px; margin: 4px 0; border-color: var(--line); font-weight: 500; }
  #report-categories button strong { font-weight: 650; }
  .bar-chart { min-height: 225px; padding-top: 12px; gap: 8px; }
  .bar-column { height: 205px; gap: 8px; }
  .bar-stack { height: 164px; }
  .bar-column small, .chart-legend { font-size: 12px; }
  #report-ranking li { padding: 12px 0; }
  .rank-number { min-width: 26px; width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
  .rank-detail small { font-size: 12px; }
  .entry-row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 8px; padding: 12px 0; }
  .entry-icon { width: 30px; height: 30px; border-radius: 9px; }
  .entry-copy small { font-size: 12px; line-height: 1.5; }
  .entry-amount { font-size: 14px; }
  .entry-row > button[data-edit] { grid-column: 2; grid-row: 2; justify-self: end; min-height: 44px; padding: 12px; }
  .entry-row > .icon-button { grid-column: 3; grid-row: 2; justify-self: end; background: transparent; }
  .entry-actions { grid-column: 2 / -1; gap: 8px; }
  .entry-actions button { background: transparent; border-color: var(--line); font-weight: 500; }
  .reserve-row { padding: 12px 0; gap: 8px; }
  .reserve-row p { margin: 4px 0; line-height: 1.6; }
  .reserve-row > div:last-child { max-width: 100%; flex-wrap: wrap; }
  .search-box { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .search-box input { min-width: 0; min-height: 44px; padding-inline: 10px; }
  .more-links { gap: 6px; margin-top: 14px; }
  .more-links button { justify-content: flex-start; border-color: var(--line); }
  .more-links .ui-icon { width: 20px; height: 20px; }
  .streak-hero, .mountain-hero { padding: 18px; gap: 12px; border-radius: 18px; }
  .mountain-mark .ui-icon { width: 40px; height: 40px; }
  .streak-hero strong, .mountain-hero strong { font-size: 26px; }
  .badge-card { padding: 14px; border-radius: 14px; }
  .summit-card > button { margin-top: 12px; }
  dialog, #fund-dialog { width: calc(100% - 20px); padding: 18px; border-radius: 20px; max-height: calc(100dvh - 20px); }
  dialog .dialog-head { top: -18px; padding: 8px 0; }
  .type-toggle { gap: 6px; margin: 14px 0; }
  .type-toggle span { min-height: 44px; border-radius: 10px; font-size: 14px; }
  .amount-input input { font-size: 34px!important; padding: 8px; }
  .lumen-picker { width: 100%; max-height: 82dvh; padding: 16px 14px max(16px,env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .lumen-picker header { margin-bottom: 12px; }
  .lumen-picker .picker-option { min-height: 44px; padding: 10px 12px; font-size: 16px; border-radius: 10px; }
  .picker-options { gap: 5px; }
  .lumen-picker footer { margin-top: 12px; padding-top: 12px; }
  .bottom-nav { align-items: stretch; padding: 5px 6px max(5px,env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px #123d380a; }
  .bottom-nav a, .bottom-nav button { min-height: 52px; padding: 4px 2px; gap: 2px; font-size: 12px; font-weight: 600; }
  .bottom-nav .ui-icon { width: 20px; height: 20px; }
  .bottom-nav button#quick-entry > span { width: 36px; height: 30px; margin-top: 0; border-radius: 10px; box-shadow: none; }
  .bottom-nav #quick-entry .ui-icon { width: 21px; height: 21px; }
  .bottom-nav a.active { border-radius: 12px; background: #e7f3ed; }
  .toast { inset: 10px 12px auto; max-width: none; font-size: 14px; }
  .offline { bottom: calc(68px + env(safe-area-inset-bottom)); }
  #page-reports > .panel, #page-mountains > .panel { margin-top: 14px; }
}
@media (max-width: 359px) {
  .workspace { padding-inline: 10px; }
  .panel { padding: 13px; }
  .app-header { flex-wrap: wrap; }
  .header-actions { margin-left: auto; }
  .metric-grid strong, .budget-summary strong { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto!important; animation: none!important; transition: none!important; }
}
