:root {
  color-scheme: light;
  --canvas: #FAF9FA;
  --card: #FFFFFF;
  --lavender: #DCC6DB;
  --lavender-soft: #F3EDF3;
  --plum: #5F4453;
  --ink: #454547;
  --muted: #767275;
  --pending: #714A4D;
  --line: #EEE9ED;
  --green: #648575;
  --shadow: 0 12px 36px rgba(69, 69, 71, .055);
  font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(95, 68, 83, .28); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.sidebar { width: 244px; position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; padding: 28px 18px 20px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px; margin-bottom: 44px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; color: var(--plum); background: var(--lavender-soft); font-weight: 800; font-size: 18px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.nav-list { display: grid; gap: 7px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 47px; padding: 0 14px; border: 0; border-radius: 13px; color: #777176; background: transparent; text-align: left; font-size: 14px; font-weight: 600; transition: background .18s, color .18s, transform .18s; }
.nav-link:hover { background: #F8F5F8; color: var(--plum); }
.nav-link.active { color: var(--plum); background: var(--lavender-soft); }
.nav-icon { width: 21px; text-align: center; font-size: 18px; line-height: 1; }
.sidebar-note { margin: auto 9px 20px; padding: 16px 14px; border-radius: 16px; background: #FBF8FB; color: var(--muted); font-size: 12px; line-height: 1.7; }
.sidebar-note p { margin: 5px 0 0; }
.tiny-sparkle { color: var(--plum); }
.sidebar-footer { display: flex; align-items: center; gap: 8px; padding: 13px 8px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.privacy-dot { width: 7px; height: 7px; border-radius: 50%; background: #8EAD9A; }
.main-area { max-width: 1500px; margin-left: 244px; padding: 34px clamp(24px, 4vw, 64px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1180px; margin: 0 auto 28px; }
.topbar h1 { margin: 2px 0 0; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.035em; line-height: 1.25; }
.eyebrow { margin: 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; font-size: 14px; font-weight: 700; transition: transform .16s, box-shadow .16s, background .16s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: scale(.98); }
.button-primary { color: #fff; background: var(--plum); box-shadow: 0 6px 14px rgba(95, 68, 83, .15); }
.button-primary:hover { background: #4F3846; }
.button-secondary { color: var(--plum); background: #fff; border-color: #E8E0E8; }
.button-soft { color: var(--plum); background: var(--lavender-soft); }
.button-small { min-height: 34px; padding: 0 11px; border-radius: 10px; font-size: 13px; }
.button-danger { color: #A34D53; background: #FFF4F3; border-color: #F5DFDE; }
.page-content { max-width: 1180px; margin: 0 auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.section-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.pet-card { position: relative; display: grid; grid-template-columns: minmax(250px, 1.15fr) minmax(270px, .85fr); align-items: center; min-height: 230px; overflow: hidden; margin-bottom: 22px; padding: 20px 28px; border: 1px solid #EDE5EC; border-radius: 23px; background: linear-gradient(110deg, #F7F1F7 0%, #FBF9FB 53%, #F5F1F5 100%); box-shadow: var(--shadow); }
.pet-card::after { position: absolute; right: -48px; bottom: -103px; width: 260px; height: 260px; border: 1px solid rgba(220,198,219,.46); border-radius: 50%; content: ""; }
.pet-copy { position: relative; z-index: 1; align-self: center; padding: 8px 0 8px 4px; }
.pet-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--plum); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.pet-level { display: inline-flex; align-items: center; min-height: 25px; padding: 0 9px; border: 1px solid #E1D2E0; border-radius: 999px; background: rgba(255,255,255,.7); letter-spacing: 0; }
.pet-name { display: block; margin: 0; padding: 0; border: 0; color: inherit; background: transparent; font-size: 21px; font-weight: 700; letter-spacing: -.03em; text-align: left; }
.pet-name:hover { text-decoration: underline; text-decoration-color: #C8B7C1; text-underline-offset: 4px; }
.pet-name-input { width: min(100%, 240px); margin: 0; padding: 2px 0 5px; border: 0; border-bottom: 1px solid #BCAAB6; border-radius: 0; color: var(--ink); background: transparent; font-size: 19px; font-weight: 700; }
.pet-dialogue { max-width: 400px; margin: 7px 0 13px; color: #6D626A; font-size: 14px; line-height: 1.65; }
.exp-line { display: flex; align-items: center; gap: 9px; max-width: 340px; color: var(--muted); font-size: 12px; }
.progress-track { position: relative; width: 100%; height: 8px; overflow: hidden; border-radius: 99px; background: #E9E1E9; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--plum); transition: width .5s ease; }
.exp-line .progress-track { flex: 1; }
.pet-actions { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.feed-button { min-height: 38px; padding-inline: 14px; }
.feed-hint { color: var(--muted); font-size: 13px; }
.pet-edit { position: absolute; top: 17px; right: 18px; z-index: 3; width: 35px; height: 35px; border: 1px solid #E9E0E8; border-radius: 12px; color: var(--plum); background: rgba(255,255,255,.75); }
.pet-edit:hover { background: #fff; }
.pet-art-wrap { position: relative; z-index: 1; display: grid; place-items: center; align-self: stretch; min-height: 184px; }
.pet-art { display: block; width: min(100%, 220px); height: auto; object-fit: contain; overflow: visible; cursor: pointer; }
.pet-avatar-box { position: relative; display: grid; place-items: center; width: 154px; height: 154px; flex: 0 0 auto; overflow: visible; background: transparent; }
.pet-avatar-box .pet-state-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pet-image-fallback { display: none; width: 100%; height: 100%; place-items: center; background: transparent; font-size: 46px; }
.pet-avatar-box.pet-image-error .pet-state-image { display: none !important; }
.pet-avatar-box.pet-image-error .pet-image-fallback { display: grid; }
.pet-breathe { animation: petBreathe 2.8s ease-in-out infinite; transform-origin: bottom center; }
.pet-hop { animation: petHop .45s ease-in-out infinite; transform-origin: bottom center; }
.pet-munch { animation: petMunch .35s ease-in-out infinite; transform-origin: bottom center; }
.hidden { display: none !important; }
.ground-mark { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ground-mark.mint { stroke: #9ADAD7; stroke-width: 4; }
.ground-mark.peach { stroke: #F3C0B2; stroke-width: 3; }
.animate-bounce-soft { animation: bounce-soft 3.2s ease-in-out infinite; }
.pet-art.playful { animation: happy-bounce .72s ease-in-out 2; }
.pet-art.pet-jump { animation: celebrate-jump .72s ease-in-out 2; transform-origin: bottom center; }
.pet-heart { position: absolute; z-index: 2; width: 23px; height: 22px; pointer-events: none; animation: float-heart 1.1s ease-out forwards; }
.pet-card.is-idle .pet-dialogue { color: #817A80; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.summary-card { min-height: 142px; padding: 19px 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; }
.summary-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 11px; color: var(--plum); background: var(--lavender-soft); font-size: 17px; }
.summary-value { margin: 10px 0 2px; font-family: "Plus Jakarta Sans", "Noto Sans TC", sans-serif; font-size: clamp(22px, 3vw, 28px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.2; }
.summary-sub { color: var(--muted); font-size: 12px; }
.summary-sub.pending-text { color: var(--pending); }
.target-card { margin-bottom: 22px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.target-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.target-header h2 { margin: 0; font-size: 15px; }
.target-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.target-value { display: flex; align-items: center; gap: 7px; }
.target-value strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.icon-button { display: inline-grid; place-items: center; width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 10px; color: var(--plum); background: #fff; }
.target-progress { height: 10px; background: #F0EBF0; }
.target-caption { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 12px; }
.pending-section { margin: 0 0 24px; }
.pending-list { display: grid; gap: 9px; }
.pending-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 77px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: transform .18s, box-shadow .18s; touch-action: pan-y; }
.pending-item.swiping { transition: none; }
.pending-item:hover { box-shadow: 0 8px 22px rgba(69,69,71,.06); }
.entry-main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.entry-avatar { flex: 0 0 39px; display: grid; place-items: center; width: 39px; height: 39px; border-radius: 13px; color: var(--plum); background: var(--lavender-soft); font-size: 17px; }
.entry-title { min-width: 0; }
.entry-title strong { display: block; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.entry-title span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.entry-amount { white-space: nowrap; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.entry-amount.income { color: var(--green); }
.entry-amount.advance { color: var(--pending); }
.pending-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border-radius: 999px; color: var(--pending); background: #F6EEEE; font-size: 12px; font-weight: 700; }
.settle-button { white-space: nowrap; }
.empty-card { display: grid; justify-items: center; gap: 6px; padding: 35px 18px; border: 1px dashed #E8E0E8; border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.55); text-align: center; }
.empty-card .empty-emoji { margin-bottom: 5px; font-size: 29px; }
.empty-card strong { color: var(--ink); font-size: 15px; }
.empty-card p { max-width: 330px; margin: 0; font-size: 13px; }
.empty-card .button { margin-top: 9px; }
.content-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.filter-grid { display: grid; grid-template-columns: repeat(5, minmax(115px, 1fr)); gap: 10px; margin-bottom: 17px; }
.field { display: grid; gap: 6px; }
.field label, .field-label { color: #625D62; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea, .inline-input { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #E7E1E7; border-radius: 11px; background: #fff; font-size: 14px; }
.field textarea { min-height: 82px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #AAA4AA; }
.filter-actions { display: flex; align-items: end; }
.record-table { display: grid; }
.record-row { display: grid; grid-template-columns: minmax(180px, 1.5fr) 110px 120px minmax(100px, .8fr) 128px; align-items: center; gap: 12px; min-height: 68px; padding: 9px 5px; border-top: 1px solid #F1EDF1; }
.record-row.header { min-height: 38px; border-top: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.record-description strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.record-description span { display: block; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.record-actions { display: flex; justify-content: end; gap: 6px; }
.record-mobile-meta { display: none; }
.status-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-pill.pending { color: var(--pending); background: #F6EEEE; }
.status-pill.settled { color: #537665; background: #EEF5F1; }
.backup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.backup-card { padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.backup-card h2 { margin: 0; font-size: 16px; }
.backup-card p { min-height: 45px; margin: 7px 0 15px; color: var(--muted); font-size: 13px; }
.backup-card .button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.backup-card.danger-zone { grid-column: 1 / -1; border-color: #F1E3E1; background: #FFFBFA; }
.data-note { margin-top: 17px; padding: 14px 16px; border-radius: 13px; color: #6F6670; background: #F6F2F6; font-size: 13px; }
.file-input { display: none; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; overflow: auto; padding: 20px; background: rgba(42, 35, 41, .42); animation: fade-in .16s ease; }
.modal-panel { width: min(100%, 540px); max-height: min(90vh, 860px); overflow: auto; padding: 22px; border-radius: 21px; background: #fff; box-shadow: 0 24px 80px rgba(40,30,40,.2); animation: rise-in .22s ease; }
.modal-panel.wide { width: min(100%, 660px); }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-header h2 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.modal-header p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal-close { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 11px; color: var(--muted); background: #F6F3F6; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-grid .full { grid-column: 1 / -1; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 12px; background: #F5F2F5; }
.segmented button { min-height: 38px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 14px; font-weight: 600; }
.segmented button.active { color: var(--plum); background: #fff; box-shadow: 0 2px 8px rgba(60,48,60,.08); }
.calc-mode { display: flex; align-items: center; gap: 12px; color: #625D62; font-size: 13px; }
.calc-mode input { accent-color: var(--plum); }
.quick-hours { display: flex; gap: 6px; margin-top: 7px; }
.hour-chip { min-width: 38px; min-height: 30px; border: 1px solid #E8E2E8; border-radius: 9px; color: var(--plum); background: #fff; font-size: 12px; }
.hour-chip:hover, .hour-chip.selected { background: var(--lavender-soft); }
.calculated-amount { padding: 11px 13px; border-radius: 11px; color: var(--plum); background: #F7F2F7; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.template-row { display: flex; flex-wrap: wrap; gap: 7px; }
.template-chip { min-height: 31px; padding: 0 10px; border: 1px solid #E8E1E8; border-radius: 999px; color: var(--plum); background: white; font-size: 12px; }
.modal-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 19px; padding-top: 15px; border-top: 1px solid var(--line); }
.modal-footer-right { display: flex; gap: 8px; margin-left: auto; }
.adoption-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.adoption-option { display: grid; justify-items: center; gap: 7px; padding: 16px 12px; border: 1px solid #E8E0E8; border-radius: 15px; background: #FCFAFC; text-align: center; }
.adoption-option:hover, .adoption-option.selected { border-color: #C9B3C7; background: #F8F2F8; }
.adoption-art { display: grid; place-items: center; width: 105px; height: 105px; overflow: visible; }
.adoption-art .pet-art { width: 105px; height: auto; cursor: default; animation: none; }
.adoption-art .pet-avatar-box { width: 98px; height: 98px; }
.adoption-art .pet-avatar-box .pet-state-image { width: 100%; height: 100%; }
.adoption-art .pet-heart { display: none; }
.adoption-option strong { font-size: 14px; }
.adoption-option span:last-child { color: var(--muted); font-size: 12px; }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 80; display: grid; gap: 8px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #EBE4EB; border-radius: 13px; color: var(--ink); background: #fff; box-shadow: 0 12px 30px rgba(50,40,50,.14); font-size: 13px; animation: rise-in .2s ease; pointer-events: auto; }
.toast button { flex: 0 0 auto; border: 0; color: var(--plum); background: none; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.mobile-nav { display: none; }
.desktop-only { display: inline-flex; }
.spin-icon { display: inline-block; }

@keyframes bounce-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes happy-bounce { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-6px); } 68% { transform: translateY(1px); } }
@keyframes celebrate-jump { 0%, 100% { transform: translateY(0) scale(1); } 28% { transform: translateY(-14px) scale(1.04); } 52% { transform: translateY(-20px) scale(1.05); } 76% { transform: translateY(0) scale(1.08, .94); } }
@keyframes petBreathe { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.015); } }
@keyframes petHop { 0%, 100% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-6px) rotate(-2deg); } 70% { transform: translateY(-3px) rotate(2deg); } }
@keyframes petMunch { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(2px) scale(1.04, .95); } }
@keyframes float-heart { 0% { opacity: 0; transform: translateY(8px) scale(.65) rotate(-8deg); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-54px) scale(1.1) rotate(9deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (min-width: 1500px) { .pet-card { min-height: 245px; } }
@media (max-width: 1100px) {
  .sidebar { width: 214px; }
  .main-area { margin-left: 214px; padding-inline: 28px; }
  .filter-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .record-row { grid-template-columns: minmax(150px,1.3fr) 92px 110px 100px 118px; gap: 8px; }
}
@media (max-width: 780px) {
  body { font-size: 14px; }
  .sidebar { display: none; }
  .main-area { margin-left: 0; padding: 20px 18px calc(92px + env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 21px; }
  .topbar h1 { font-size: 25px; }
  .eyebrow { font-size: 13px; }
  .top-actions { gap: 7px; }
  .button { min-height: 40px; padding-inline: 12px; font-size: 13px; }
  .desktop-only { display: none; }
  .pet-card { grid-template-columns: minmax(0, 1fr) 42%; min-height: 198px; padding: 17px 14px 17px 18px; border-radius: 19px; }
  .pet-copy { padding-left: 0; }
  .pet-name { font-size: 19px; }
  .pet-dialogue { margin-block: 5px 10px; font-size: 13px; line-height: 1.55; }
  .pet-topline, .pet-level, .exp-line, .summary-sub, .target-header p, .target-caption, .pending-badge, .status-pill, .entry-title span, .record-description span, .backup-card p, .backup-card .summary-sub, .data-note, .field label, .field-label, .adoption-option span:last-child { font-size: 13px; }
  .pet-art-wrap { min-height: 155px; }
  .pet-edit { top: 10px; right: 10px; width: 32px; height: 32px; }
  .exp-line { gap: 6px; font-size: 13px; }
  .pet-actions { margin-top: 10px; }
  .feed-button { min-height: 35px; padding-inline: 10px; font-size: 13px; }
  .summary-grid { gap: 9px; }
  .summary-card { min-height: 128px; padding: 13px 12px; border-radius: 15px; }
  .summary-top { align-items: start; font-size: 13px; line-height: 1.4; }
  .summary-icon { width: 29px; height: 29px; border-radius: 10px; }
  .summary-value { margin-top: 12px; font-size: clamp(18px, 5vw, 24px); }
  .summary-sub { font-size: 13px; }
  .target-card { padding: 16px; }
  .section-heading h2 { font-size: 16px; }
  .section-heading p { font-size: 13px; }
  .pending-item { grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; padding: 11px; }
  .pending-item .entry-amount { grid-column: 2; grid-row: 1; align-self: center; }
  .pending-item .settle-button { grid-column: 2; grid-row: 2; justify-self: end; }
  .pending-item .entry-main { grid-column: 1; grid-row: 1 / span 2; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #EAE5EA; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
  .mobile-nav .nav-link { display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; padding: 3px; font-size: 13px; }
  .mobile-nav .nav-icon { font-size: 18px; }
  .filter-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .filter-grid .search-filter { grid-column: 1 / -1; }
  .filter-actions { grid-column: 1 / -1; }
  .hour-chip { font-size: 13px; }
  .template-chip { font-size: 13px; }
  .content-card { padding: 14px; }
  .record-row.header { display: none; }
  .record-row { grid-template-columns: minmax(0,1fr) auto; gap: 5px 10px; padding: 13px 2px; }
  .record-row > :nth-child(2), .record-row > :nth-child(4) { display: none; }
  .record-row > :nth-child(3) { grid-column: 2; grid-row: 1; justify-self: end; }
  .record-row > :nth-child(5) { grid-column: 2; grid-row: 2; }
  .record-description { grid-column: 1; grid-row: 1; }
  .record-description span { font-size: 13px; }
  .record-actions { gap: 5px; }
  .record-actions .icon-button { width: 31px; height: 31px; }
  .backup-grid { grid-template-columns: 1fr; }
  .backup-card.danger-zone { grid-column: auto; }
  .backup-card p { min-height: auto; }
  .toast-root { right: 14px; bottom: calc(78px + env(safe-area-inset-bottom)); }
}
@media (max-width: 430px) {
  .main-area { padding-inline: 13px; }
  .topbar { align-items: center; }
  .topbar h1 { font-size: 23px; }
  #add-entry span { display: none; }
  #add-entry { width: 42px; padding: 0; }
  #add-entry i { font-size: 19px; }
  .pet-card { grid-template-columns: minmax(0, 1fr) 39%; min-height: 205px; padding-left: 14px; }
  .pet-copy { min-width: 0; }
  .pet-art-wrap { min-height: 164px; }
  .pet-card .pet-avatar-box { width: min(154px, 40vw); height: min(154px, 40vw); }
  .pet-dialogue { max-width: 230px; }
  .pet-topline { font-size: 13px; }
  .pet-level { min-height: 23px; padding-inline: 7px; }
  .summary-grid { gap: 7px; }
  .summary-card { padding: 11px 9px; }
  .summary-top { font-size: 13px; }
  .summary-icon { width: 25px; height: 25px; font-size: 14px; }
  .summary-value { font-size: 18px; }
  .summary-sub { font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal-panel { width: 100%; max-height: 91vh; padding: 19px 17px calc(18px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; }
  .adoption-options { gap: 8px; }
  .filter-grid { gap: 9px; }
  .entry-avatar { flex-basis: 35px; width: 35px; height: 35px; border-radius: 12px; }
  .entry-title strong { font-size: 13px; }
  .entry-title span { font-size: 13px; }
  .pending-item .entry-amount { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
