
:root {
  color-scheme:light;
  --ink:rgba(235,242,247,0.8);
  --muted:rgba(235,242,247,0.8);
  --cream:rgba(235,242,247,0.8);
  --paper:rgba(235,242,247,0.8);
  --yellow:rgba(235,242,247,0.8);
  --pink:rgba(235,242,247,0.8);
  --pink-bg:rgba(235,242,247,0.8);
  --mint:rgba(235,242,247,0.8);
  --line:rgba(235,242,247,0.8);
  --shadow:rgba(0,0,0,0.13);
  --white:rgba(235,242,247,0.8);
  --border:1px solid rgba(164,122,66,0.32);
  --satin:rgba(235,242,247,0.8);
  --shell-dark:rgba(235,242,247,0.8);
  --jewel-blue:rgba(235,242,247,0.8);
  --jewel-cobalt:rgba(235,242,247,0.8);
  --jewel-teal:rgba(235,242,247,0.8);
  --jewel-red:rgba(235,242,247,0.8);
  font-family:"Noto Serif SC","Songti SC","STSong","SimSun","AR PL SungtiL GB",serif;
  color:var(--ink);
}
html {background:rgba(235,242,247,0.8);}
body {
  color:var(--ink);
  
  background-color:rgba(235,242,247,0.8);
  background-image:
    radial-gradient(ellipse at 5% 12%,rgba(235,242,247,0.22),transparent 52%),
    radial-gradient(ellipse at 90% 78%,rgba(235,242,247,0.15),transparent 49%),
    repeating-linear-gradient(128deg,rgba(235,242,247,0.016) 0 1px,transparent 1px 10px),
    radial-gradient(rgba(235,242,247,0.05) .5px,transparent .95px);
  background-size:auto,auto,auto,26px 26px;
}
.shell {
  
  background-color:rgba(235,242,247,0.8);
  background-image:
    radial-gradient(ellipse at 60% -9%,rgba(235,242,247,0.09),transparent 43%),
    radial-gradient(ellipse at 92% 88%,rgba(235,242,247,0.07),transparent 56%),
    repeating-linear-gradient(139deg,transparent 0 9px,rgba(235,242,247,0.009) 10px 10.8px,transparent 12px 24px),
    radial-gradient(rgba(235,242,247,0.037) .45px,transparent .75px);
  background-size:auto,auto,auto,25px 25px;
  box-shadow:0 0 45px rgba(0,0,0,0.13);
  -webkit-backdrop-filter:blur(5px);
  backdrop-filter:blur(5px);
}
button,input,select,textarea {font-family:inherit;}
.topbar {
  background:linear-gradient(125deg,rgba(235,242,247,0.8) 0%,rgba(235,242,247,0.8) 55%,rgba(235,242,247,0.8) 100%);
  border-bottom:1px solid rgba(164,122,66,0.27);
}
.brandmark {
  color:#243441;
  border:1px solid rgba(164,122,66,0.35);
  background:radial-gradient(circle at 28% 22%,rgba(235,242,247,0.8) 0%,rgba(235,242,247,0.8) 42%,rgba(235,242,247,0.8) 85%);
  box-shadow:inset 0 0 0 3px rgba(0,0,0,0.13),0 0 0 1px rgba(0,0,0,0.13),0 5px 18px rgba(0,0,0,0.13);
  text-shadow:0 0 11px rgba(0,0,0,0.13);
  font-family:Georgia,serif;
}
.top-title strong,.page-heading h1,.section-row h2,.month-row strong,.modal-head h2,.book-title {
  font-family:"Noto Serif SC","Songti SC","STSong","SimSun","AR PL SungtiL GB",serif;
  color:#243441;
  font-weight:600;
  letter-spacing:1.1px;
}
.top-title strong {font-size:25px;letter-spacing:2px;}
.eyebrow {
  font-family:"Cormorant Garamond","Baskerville","Palatino Linotype",Georgia,serif;
  color:#243441;
  font-weight:500;
  letter-spacing:3px;
  font-size:12px;
}
.page-heading h1 {font-size:25px;}
.subheading,.muted,.tx-sub {color:#243441;}
.icon-btn {
  background:rgba(235,242,247,0.8);
  border:1px solid rgba(164,122,66,0.35);
  color:#243441;
  box-shadow:inset 0 1px 0 rgba(0,0,0,0.078);
}
.icon-btn:hover,.button:hover{border-color:rgba(164,122,66,0.35);}
.bottom-nav {
  background:linear-gradient(180deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  border-top:1px solid rgba(164,122,66,0.35);
  box-shadow:0 -7px 24px rgba(0,0,0,0.13);
}
.nav-item {color:#243441;font-weight:550;}
.nav-item.active {
  background:linear-gradient(130deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  box-shadow:inset 0 0 0 1px rgba(0,0,0,0.13),0 2px 8px rgba(0,0,0,0.13);
  color:#243441;
}
.nav-item.active .nav-icon {color:#243441;}
.button {
  background:linear-gradient(160deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  border:1px solid rgba(164,122,66,0.35);
  color:#243441;
  box-shadow:0 2px 0 rgba(0,0,0,0.13);
  font-weight:650;
}
.button.primary {
  background:linear-gradient(150deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  border-color:rgba(164,122,66,0.35);
  color:#243441;
}
.button.pink {
  background:linear-gradient(155deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  border-color:rgba(164,122,66,0.35);
  color:#243441;
}
.button.soft {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441;}
.button.text {color:#243441;box-shadow:none;}
.button.danger {color:#243441;}
.card {
  background:linear-gradient(140deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8) 68%,rgba(235,242,247,0.8));
  border:1px solid rgba(164,122,66,0.35);
  box-shadow:inset 0 1px 0 rgba(0,0,0,0.043),0 3px 0 rgba(0,0,0,0.13),0 10px 20px rgba(0,0,0,0.13);
}
.soft-card {background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);color:#243441;}
.hero-main {
  background:radial-gradient(ellipse at 98% -6%,rgba(235,242,247,0.25),transparent 55%),linear-gradient(150deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8) 75%);
  border-color:rgba(164,122,66,0.35);
  position:relative;
}
.hero-main::before {
  content:"";
  position:absolute;top:9px;right:9px;width:7px;height:7px;border-radius:50%;
  background:rgba(235,242,247,0.8);box-shadow:0 0 0 2px rgba(0,0,0,0.13),0 0 10px rgba(0,0,0,0.13);
  pointer-events:none;
}
.big-amount {
  font-family:"Cormorant Garamond","Baskerville","Palatino Linotype",Georgia,serif;
  font-weight:500;
  font-size:clamp(31px,5.2vw,43px);
  letter-spacing:1px;
  color:#243441;
  text-shadow:none;
}
.money-secondary {color:#243441;}
.hero-sum {border-top:1px solid rgba(164,122,66,0.3);color:#243441;}
.small-stat {
  background:radial-gradient(circle at 90% -20%,rgba(235,242,247,0.16),transparent 65%),linear-gradient(140deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  border-color:rgba(164,122,66,0.35);
}
.small-stat .number {font-family:"Cormorant Garamond",Georgia,serif;font-size:32px;color:#243441;font-weight:500;}
.small-stat .label {color:#243441;}
.select,.input,textarea,input,select {background-color:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35);}
.input::placeholder,textarea::placeholder {color:#243441;opacity:1;}
input[type="checkbox"],input[type="radio"] {accent-color:rgba(235,242,247,0.8);}
select option,select optgroup {background-color:rgba(235,242,247,0.8);color:#243441;}
.field label {color:#243441;font-weight:600;}
.field-note {color:#243441;}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {outline-color:rgba(164,122,66,0.35);}
.pill {background:rgba(235,242,247,0.8);color:#243441;border:1px solid rgba(164,122,66,0.35);font-weight:600;}
.pill.selected {background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35);}
.datehead {color:#243441;font-weight:650;}
.transaction {
  background:linear-gradient(125deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  border:1px solid rgba(164,122,66,0.35);
  color:#243441;
  box-shadow:inset 0 1px 0 rgba(0,0,0,0.027);
}
.transaction:hover {border-color:rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);}
.category-icon {
  background:radial-gradient(circle at 30% 20%,rgba(235,242,247,0.8),rgba(235,242,247,0.8) 58%,rgba(235,242,247,0.8) 100%);
  border:1px solid rgba(164,122,66,0.35);
  box-shadow:inset 0 1px 4px rgba(0,0,0,0.082);
}
.tx-title,.tx-amount {color:#243441;font-weight:650;}
.tx-amount,.rank-amount,.summary-tile .value {font-family:"Baskerville","Palatino Linotype",Georgia,serif;font-weight:600;}
.tx-meta {color:#243441;}
.merchant-logo,.merchant-icon {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441;}
.empty {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441;}
.empty strong {color:#243441;}
.summary-tile {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);}
.summary-tile .value {color:#243441;}
.summary-tile .caption {color:#243441;}
.tabs {background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);}
.tab {color:#243441;font-weight:600;}
.tab.active {background:linear-gradient(140deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));color:#243441;box-shadow:inset 0 0 0 1px rgba(0,0,0,0.13);}
.calendar-week {color:#243441;}
.day {border-color:rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);color:#243441;}
.day small {color:#243441;}
.day.today {border-color:rgba(164,122,66,0.35);}
.day.selected {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);}
.day.blank {background:transparent;border-color:transparent;}
.rank-sub,.rank-text .muted {color:#243441;}
.progress {background:rgba(235,242,247,0.8);}
.progress>span {background:linear-gradient(90deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));}
.chart-bars {border-color:rgba(164,122,66,0.35);}
.chart-bar {background:linear-gradient(rgba(235,242,247,0.8),rgba(235,242,247,0.8));}
.chart-bar:nth-child(3n) {background:linear-gradient(rgba(235,242,247,0.8),rgba(235,242,247,0.8));}
.chart-bar:hover::after {background:rgba(235,242,247,0.8);color:#243441;border:1px solid rgba(164,122,66,0.35);}
.chart-axis {color:#243441;}
.notice {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441;}
.notice.warn {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441;}
.product-card {background:linear-gradient(140deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));border-color:rgba(164,122,66,0.35);}
.product-card .secondary-line {color:#243441;}
.badge {background:rgba(235,242,247,0.8);color:#243441;}
.badge.green {background:rgba(235,242,247,0.8);color:#243441;}
.badge.gold {background:rgba(235,242,247,0.8);color:#243441;}
.line-row {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);}
.overlay {background:rgba(235,242,247,0.8);}
.modal {background:radial-gradient(circle at 93% 0%,rgba(235,242,247,0.125),transparent 40%),rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);box-shadow:0 -15px 40px rgba(0,0,0,0.13);}
.modal-head {background:rgba(235,242,247,0.8);border-bottom-color:rgba(164,122,66,0.35);}
.modal-actions {border-top-color:rgba(164,122,66,0.35);}
.receipt-preview img {border-color:rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);}
.toggle input {accent-color:rgba(235,242,247,0.8);}
.rating-actions .button[aria-pressed="true"] {background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);}
.product-detail-hero {background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);}
.product-detail-hero p {color:#243441;}
.loading {color:#243441;}
.hr {border-top-color:rgba(164,122,66,0.35);}
.book-tile {background:linear-gradient(140deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));border-color:rgba(164,122,66,0.35);color:#243441;}
.book-meta {color:#243441;}
.price-table th,.price-table td {border-bottom-color:rgba(164,122,66,0.35);}
.price-table th {color:#243441;}
.donut>span {background:rgba(235,242,247,0.8);color:#243441;}
.donut strong {color:#243441;}
.group-legend>div span:last-child {color:#243441;}
.toast {background:rgba(235,242,247,0.8);color:#243441;border:1px solid rgba(164,122,66,0.35);}
::selection {background:rgba(235,242,247,0.8);color:#243441;}
@media(min-width:760px){.shell{border-left:1px solid rgba(164,122,66,0.35);border-right:1px solid rgba(164,122,66,0.35);}}
@media(max-width:410px){.top-title strong{font-size:23px;}.big-amount{font-size:31px;}}



.shell {position:relative;isolation:isolate;}
.shell::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image:none,none,none;
  background-position:left top,right top,center top;
  background-repeat:no-repeat;
  
  background-size:clamp(26px,4.9vw,48px) min(1200px,100%),clamp(25px,4.6vw,46px) min(1200px,100%),100% 54px;
  opacity:.72;
}
.topbar,.main {position:relative;z-index:1;}
.topbar {background:linear-gradient(120deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);}

.transaction {
  background:linear-gradient(120deg,rgba(235,242,247,0.66),rgba(235,242,247,0.59));
  border-color:rgba(164,122,66,0.35);
  box-shadow:inset 0 1px rgba(0,0,0,0.12),0 3px 10px rgba(0,0,0,0.09);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
}
.transaction:hover {background:linear-gradient(120deg,rgba(235,242,247,0.75),rgba(235,242,247,0.68));}
.product-card {
  background:linear-gradient(120deg,rgba(235,242,247,0.62),rgba(235,242,247,0.54));
  border-color:rgba(164,122,66,0.34);
  -webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);
}
.line-row {background:rgba(235,242,247,0.78);}
@media(max-width:430px){
  .shell::before {background-size:30px min(1080px,100%),29px min(1080px,100%),100% 43px;opacity:.68;}
}
@media(prefers-reduced-transparency:reduce){
  .transaction,.product-card{background:rgba(235,242,247,0.8);-webkit-backdrop-filter:none;backdrop-filter:none;}
}


body.modal-open { overflow:hidden; }
.modal { display:flex; flex-direction:column; min-height:0; }
.modal-head { flex:0 0 auto; position:relative; top:auto; margin-bottom:0; padding-bottom:12px; }
.modal-content { min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; flex:1 1 auto; padding-top:13px; padding-bottom:6px; }
.modal > .modal-actions {flex:0 0 auto;}
@media (max-width:759px) {
  .overlay { align-items:flex-start; justify-content:center; height:100dvh; min-height:0; overflow:hidden; padding:calc(10px + env(safe-area-inset-top,0px)) 10px calc(10px + env(safe-area-inset-bottom,0px)); }
  .modal { width:100%; border-radius:18px; padding:14px 13px 12px; overflow:hidden; max-height:calc(100dvh - 20px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)); box-shadow:0 10px 38px rgba(0,0,0,0.13); }
  .modal-head { padding:3px 0 10px; }
  .modal-content {padding-top:13px;}
  .modal-head h2 { font-size:20px; line-height:1.3; }
  .modal .field-grid {column-gap:8px;}
  .modal .field-grid .input {width:100%;}
  .modal .soft-card {margin-top:5px!important;}
  .modal .quick-actions { margin:11px 0;}
  .modal .quick-actions .button {line-height:1.4;}
}
@supports not (height:100dvh) {
  @media(max-width:759px){.overlay{height:100vh}.modal{max-height:calc(100vh - 30px)}}
}


body > .overlay {
  position:fixed;inset:0;top:0;left:0;right:0;bottom:0;
  width:100%;height:100dvh;max-height:100dvh;z-index:10000;
  display:flex;align-items:center;justify-content:center;
  padding:clamp(10px,2vw,20px);
  overflow:hidden;
}
body > .overlay[hidden] {display:none!important;}
body > .overlay .modal {
  display:flex;flex-direction:column;min-height:0;
  width:min(720px,100%);max-height:calc(100dvh - 40px);
  overflow:hidden;margin:0;
}
body > .overlay .modal-head {flex-shrink:0;position:relative;top:auto;}
body > .overlay .modal-content {min-height:0;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;}
body > .toast {z-index:10001;}
.app-update-notice {position:fixed;z-index:10010;top:calc(12px + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);width:min(490px,calc(100% - 24px));background:rgba(235,242,247,0.8);color:#243441;border:1px solid rgba(164,122,66,0.35);border-radius:14px;box-shadow:0 12px 30px rgba(0,0,0,0.13);display:flex;align-items:center;gap:10px;padding:10px 12px;font-size:13px;justify-content:space-between}
.app-update-notice .icon-btn{font-size:16px;width:32px;height:32px;min-width:32px;flex:none}
@media(max-width:759px){
  body > .overlay {align-items:flex-start;padding:calc(8px + env(safe-area-inset-top,0px)) 10px calc(8px + env(safe-area-inset-bottom,0px));}
  body > .overlay .modal {max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));}
  .app-update-notice {flex-wrap:wrap}
}


@media(max-width:759px) {
  .topbar {
    position:sticky;
    top:0;
    z-index:65;
    height:auto;
    min-height:calc(78px + env(safe-area-inset-top,0px));
    padding:calc(11px + env(safe-area-inset-top,0px)) 14px 11px;
    background:linear-gradient(120deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
    -webkit-backdrop-filter:blur(16px);
    backdrop-filter:blur(16px);
    isolation:isolate;
  }
  .topbar .top-title{display:flex;flex-direction:column;justify-content:center;min-width:0;}
  .topbar .top-title strong {display:block;font-size:clamp(19px,5.5vw,25px);white-space:nowrap;overflow:visible;line-height:1.3;}
  .topbar .eyebrow {font-size:clamp(8px,2.5vw,11px);letter-spacing:clamp(.5px,.5vw,2px);white-space:nowrap;}
  .topbar .brandmark {flex:0 0 47px;width:47px;height:47px;}
  .topbar .icon-btn {flex:0 0 42px;min-width:42px;min-height:42px;}
}

.book-page-heading{gap:10px;}
.book-heading-controls{display:flex;align-items:center;gap:9px;flex-wrap:nowrap;margin-left:auto;}
.book-visibility-switch,.book-visibility-action{
  display:grid;place-items:center;cursor:pointer;color:#243441;
  border:1px solid rgba(164,122,66,0.35);
  background:linear-gradient(145deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));
  box-shadow:inset 0 1px 0 rgba(0,0,0,0.094);
  transition:border-color .18s ease,background .18s ease;
}
.book-visibility-switch:hover,.book-visibility-action:hover{border-color:rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);}
.book-visibility-switch{width:45px;height:45px;flex:none;border-radius:14px;}
.book-visibility-switch svg{width:23px;height:23px;}
.book-visibility-switch.is-hidden-view{border-color:rgba(164,122,66,0.35);color:#243441;}
.book-card-wrap{position:relative;display:flex;min-width:0;}
.book-card-wrap>.book-tile{width:100%;height:100%;min-width:0;padding-right:65px;}
.book-card-wrap.total-book-card>.book-tile{padding-right:18px;}
.book-visibility-action{position:absolute;right:14px;top:14px;width:39px;height:39px;border-radius:11px;z-index:2;}
.book-visibility-action svg{width:22px;height:22px;}
.book-card-hidden>.book-tile{opacity:.85;cursor:default;}
.book-hidden-empty{grid-column:1/-1;width:100%;}
@media(max-width:520px){
  .book-page-heading{align-items:flex-start;}
  .book-heading-controls .button{font-size:13px;padding:8px 11px;white-space:nowrap;}
  .book-visibility-switch{width:43px;height:43px;}
  .book-card-wrap>.book-tile{padding-right:64px;}
}

.book-heading-title{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1;}
.book-heading-title-line{display:flex;align-items:center;gap:9px;}
.book-heading-title-line h1{flex:0 1 auto;white-space:nowrap;}
.book-create-button{white-space:nowrap;flex-shrink:0;}
@media(max-width:520px){.book-heading-title-line h1{font-size:23px}.book-create-button{margin-left:auto;}}


.book-filter{position:relative;min-width:0;max-width:100%;z-index:25;}
.book-filter-trigger{display:flex;align-items:center;justify-content:space-between;gap:18px;width:min(235px,100%);min-height:47px;padding:9px 13px;border:1.5px solid rgba(164,122,66,0.35);border-radius:14px;background:rgba(235,242,247,0.8);color:#243441;text-align:left;font-weight:650;box-shadow:inset 0 1px rgba(0,0,0,0.067);}
.book-filter-trigger>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.book-filter-chevron{font-size:19px;flex-shrink:0;color:#243441}
.book-filter-options{position:absolute;top:calc(100% + 5px);right:0;min-width:100%;width:max-content;max-width:min(90vw,320px);max-height:38vh;overflow-y:auto;padding:6px;border-radius:14px;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);box-shadow:0 18px 30px rgba(0,0,0,0.13);}
.book-filter-options[hidden]{display:none!important}
.book-filter-option{display:block;width:100%;padding:11px 13px;margin:1px 0;border:0;border-radius:9px;background:transparent;color:#243441;text-align:left;font-size:14px;white-space:normal;}
.book-filter-option.current{background:rgba(235,242,247,0.8);color:#243441}
.book-filter-option:active,.book-filter-option:hover{background:rgba(235,242,247,0.8)}

.product-transaction{margin-bottom:9px;align-items:center;min-width:0;}
.product-transaction-body{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:4px;align-items:center;flex:1;min-width:0;}
.product-name{grid-column:1;grid-row:1;font-size:16px;font-weight:700;color:#243441;min-width:0;overflow-wrap:anywhere;text-align:left;}
.product-value{grid-column:2;grid-row:1;white-space:nowrap;font-size:16px;color:#243441;font-weight:650;text-align:right;}
.product-description{grid-column:1;grid-row:2;color:#243441;font-size:12px;overflow-wrap:anywhere;text-align:left;min-width:0;}
.product-unit{grid-column:2;grid-row:2;color:#243441;font-size:11px;text-align:right;white-space:normal;}
.product-foot{grid-column:1/-1;grid-row:3;color:#243441;font-size:11px;text-align:left;min-width:0;overflow-wrap:anywhere;}
.product-foot .merchant-logo,.product-foot .merchant-icon{width:19px;height:19px;}

body>.overlay,body>.overlay .modal,body>.overlay .modal-content,body>.overlay .modal-content form,
body>.overlay .line-list,body>.overlay .line-row,body>.overlay .soft-card{min-width:0;max-width:100%;box-sizing:border-box;}
body>.overlay .modal-content{overflow-x:hidden;overflow-y:auto;}
body>.overlay .modal-content form{overflow-x:clip;}
body>.overlay .field-grid,body>.overlay .line-row .field-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;max-width:100%;}
body>.overlay .field-grid.three{grid-template-columns:repeat(3,minmax(0,1fr));}
body>.overlay .field,body>.overlay .field>*,body>.overlay .line-row .input{max-width:100%;min-width:0;}
body>.overlay input[type="file"]{width:100%;max-width:100%;}
body>.overlay .inline-control{max-width:100%;}
body>.overlay .inline-control>.input{flex:1 1 130px;min-width:0;}
@media(max-width:520px){
 .page-heading>.book-filter{margin-left:auto;flex:0 1 49%;}
 .book-filter-trigger{width:100%;padding:8px 10px;gap:8px;font-size:13px;min-height:43px;}
 .book-filter-options{max-width:85vw;}
 .product-transaction{align-items:flex-start;padding:12px 10px;gap:10px;}
 .product-transaction .category-icon{width:38px;height:38px;}
 .product-transaction-body{grid-template-columns:minmax(0,1fr);row-gap:5px;}
 .product-name,.product-value,.product-description,.product-unit,.product-foot{grid-column:1;grid-row:auto;text-align:left;}
 .product-value{font-size:15px;}
 .product-unit{font-size:11px;}
 .product-description{font-size:12px;line-height:1.45;}
 body>.overlay .modal-content{overflow-x:hidden!important;}
 body>.overlay .field-grid.three{grid-template-columns:repeat(2,minmax(0,1fr));}
 body>.overlay .field-grid.three>.field:last-child{grid-column:1/-1;}
 body>.overlay .line-row{padding:10px;}
}


.book-card-wrap>.book-tile{padding-right:65px;}
.book-card-wrap.total-book-card>.book-tile{padding-right:65px;}
.book-default-action{
  position:absolute;top:58px;right:14px;z-index:3;
  display:grid;place-items:center;width:39px;height:39px;
  border:1px solid rgba(164,122,66,0.35);border-radius:11px;
  background:rgba(235,242,247,0.8);color:#243441;cursor:pointer;
  font-size:25px;line-height:1;font-family:Georgia,serif;
}
.book-default-action.active{color:#243441;border-color:rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);}
.book-default-action:hover{color:#243441;border-color:rgba(164,122,66,0.35);}
.total-book-card .book-default-action{top:14px;}
.settlement-box{margin:12px 0;padding:14px;border:1px solid rgba(164,122,66,0.35);border-radius:13px;background:rgba(235,242,247,0.38);}
.settlement-box>.toggle{line-height:1.7;cursor:pointer;}
.settlement-box .field-grid{margin:12px 0 5px;}
.settlement-box [hidden],.receipt-summary-row[hidden]{display:none!important;}
@media(max-width:520px){
 .book-default-action{width:36px;height:36px;top:54px;right:12px;font-size:23px;}
 .total-book-card .book-default-action{top:12px;}
 .book-card-wrap>.book-tile,.book-card-wrap.total-book-card>.book-tile{padding-right:60px;}
 .settlement-box{padding:11px;}
}


.identity-editor{margin:12px 0;padding:10px 12px;border:1px solid rgba(164,122,66,0.35);border-radius:12px;background:rgba(235,242,247,0.28);max-width:100%;min-width:0}
.identity-editor summary{cursor:pointer;font-size:12px;line-height:1.5;color:#243441;overflow-wrap:anywhere}
.identity-editor textarea{min-height:68px;white-space:pre-wrap;overflow-wrap:anywhere}
.identity-editor .field{margin-top:10px}
.identity-editor .toggle{margin:12px 0 3px}


body > .bottom-nav {
  position:fixed !important;
  bottom:0 !important;
  left:50%;right:auto;
  transform:translateX(-50%);
  width:min(1020px,100%);
  max-width:1020px;
  margin:0;
  z-index:100;
  isolation:isolate;
  padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));
  -webkit-transform:translateX(-50%);
}
.shell > .bottom-nav {display:none;}
.main{padding-bottom:max(130px,calc(106px + env(safe-area-inset-bottom,0px)));}
body > .overlay {
  box-sizing:border-box;
  min-height:0;
  max-width:100vw;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:auto;
}
body > .overlay .modal {
  box-sizing:border-box;
  flex:0 1 auto;
  max-height:100%;
  min-height:0;
  min-width:0;
  margin:auto;
  overflow:hidden;
  transform:translateZ(0);
}
body > .overlay .modal-content{
  flex:1 1 auto;
  min-height:0;
  max-width:100%;
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-y:contain;
}
body > .overlay .modal-head{flex-shrink:0;}
body > .overlay .modal-actions{flex-shrink:0;}
body.modal-open {overflow:hidden;}
html.dialog-lock {overscroll-behavior:none;}
.archive-record[hidden]{display:none!important;}
.receipt-photo-entry{display:flex;flex-direction:column;align-items:center;gap:6px;max-width:190px;}
.receipt-photo-entry img{max-width:160px;max-height:220px;object-fit:contain;}
.metadata-json{max-height:220px;overflow:auto;white-space:pre-wrap;word-break:break-all;color:#243441;font-size:11px;}
@media(max-width:759px){
 body>.overlay {align-items:center;justify-content:center;padding:calc(8px + env(safe-area-inset-top,0px)) 10px calc(10px + env(safe-area-inset-bottom,0px));}
 body>.overlay .modal {max-height:100%;width:100%;margin:auto 0;}
 body>.bottom-nav{left:0;right:0;width:100%;transform:none;-webkit-transform:none;}
}



@media (max-width:759px){
 body.modal-open{
  position:fixed!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  overflow:hidden!important;
 }
 body>.overlay{
  right:auto!important;
  bottom:auto!important;
  box-sizing:border-box!important;
  max-width:none!important;
  min-width:0!important;
  overflow:hidden!important;
  padding:calc(8px + env(safe-area-inset-top,0px)) 10px max(8px,env(safe-area-inset-bottom,0px))!important;
  align-items:flex-start!important;
  justify-content:center!important;
 }
 body>.overlay .modal{
  width:100%!important;
  max-width:720px!important;
  max-height:100%!important;
  margin:0!important;
  flex:0 1 auto!important;
  min-width:0!important;
  transform:none!important;
 }
 body>.overlay .modal-content{overflow-x:hidden!important;overflow-y:auto!important;min-width:0!important;}
 
 body>.overlay input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
 body>.overlay textarea,
 body>.overlay select{
  font-size:16px!important;
  line-height:1.35;
 }
 body>.overlay .line-row .input{font-size:16px!important;}
 body>.overlay .field-grid>.field,body>.overlay .inline-control{min-width:0!important;}
 body>.overlay .modal-head h2{overflow-wrap:anywhere;min-width:0;}
}

.import-flow [data-stage] { display:none!important; }
.import-flow[data-step="upload"] > [data-stage="upload"],
.import-flow[data-step="review"] > [data-stage="review"],
.import-flow[data-step="overview"] > [data-stage="overview"],
.import-flow[data-step="items"] > [data-stage="items"] { display:block!important; }
.manual-flow [data-stage="review"] {display:block;}
.import-flow .import-step-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:3px 0 15px;flex-wrap:wrap;color:#243441;}
.import-flow .import-step-heading strong{font-size:17px;}
.import-step-actions,.import-final-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin:20px 0 4px;padding-top:13px;border-top:1px solid rgba(164,122,66,0.35);}
.import-step-actions .button,.import-final-actions .button{min-height:43px;}
.import-review-screen{color:#243441;padding:5px 1px 10px;}
.import-review-kicker{font-size:12px;letter-spacing:.14em;color:#243441;margin:5px 0 14px;}
.import-review-hero{background:linear-gradient(145deg,rgba(235,242,247,0.8) 0%,rgba(235,242,247,0.8) 58%,rgba(235,242,247,0.8) 100%);border:1px solid rgba(164,122,66,0.35);border-radius:18px;padding:19px 20px 17px;margin-bottom:14px;position:relative;overflow:hidden;}
.import-review-hero:after{content:'✦';position:absolute;right:18px;top:10px;font-size:39px;color:rgba(244,240,228,0.467);pointer-events:none;}
.import-review-merchant{font-size:17px;font-weight:700;overflow-wrap:anywhere;max-width:87%;}
.import-review-amount{font-family:Georgia,'Noto Serif SC',serif;font-size:36px;line-height:1.45;margin:5px 0 0;color:#243441;}
.import-review-meta{font-size:12px;color:#243441;}
.import-review-links{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:15px;}
.import-review-card{border:1px solid rgba(164,122,66,0.35);min-width:0;border-radius:15px;background:rgba(235,242,247,0.8);color:#243441;padding:15px 13px;text-align:left;display:flex;gap:9px;position:relative;cursor:pointer;min-height:126px;}
.import-card-mark{font-family:Georgia,serif;font-size:22px;font-weight:700;color:#243441;min-width:26px;}
.import-card-content{display:flex;flex-direction:column;gap:9px;min-width:0;flex:1;}
.import-card-content strong{font-size:17px;font-weight:750;line-height:1.25;}
.import-card-content small{font-size:11px;color:#243441;line-height:1.4;word-break:break-word;}
.import-card-chevron{align-self:flex-start;font-size:23px;line-height:1;color:#243441;}
.import-card-state{position:absolute;bottom:12px;right:12px;font-size:11px;color:#243441;}
.import-count{font-size:12px;font-weight:500;color:#243441;}
.import-mini-list{display:flex;gap:5px;flex-wrap:wrap;padding-bottom:19px;}
.import-mini-item{font-size:11px;background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);border-radius:5px;padding:3px 6px;color:#243441;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.import-review-note{margin-top:16px;}
.import-review-note textarea{resize:vertical;min-height:78px;}
.import-review-tip{line-height:1.55;margin-top:11px;}

.import-flow .line-row{padding:14px;border-radius:15px;margin-bottom:11px;}
.import-flow .line-head{margin-bottom:7px;}
.import-flow .line-head span{font-size:14px;}
.import-flow .line-row>.field{margin-bottom:10px;}
.import-flow .line-row .field label{margin-bottom:5px;}
.import-flow .line-row .field-grid{gap:9px;}
.import-flow .line-row .input{min-height:42px;}
@media(max-width:759px){
 body>.overlay:has(.import-dialog){background:rgba(235,242,247,0.8);padding:calc(6px + env(safe-area-inset-top,0px)) 5px max(5px,env(safe-area-inset-bottom,0px))!important;}
 body>.overlay .modal.import-dialog{height:100%!important;max-height:100%!important;width:100%!important;max-width:none!important;border-radius:17px!important;}
 body>.overlay .modal.import-dialog .modal-content{padding:12px 12px 25px;}
 body>.overlay .modal.import-dialog .modal-head{padding:12px 10px 13px;}
 .import-review-links{grid-template-columns:1fr 1fr;gap:8px;}
 .import-review-card{padding:12px 10px;min-height:131px;}
 .import-review-amount{font-size:33px;}
 .import-step-actions .button,.import-final-actions .button{flex:1 1 auto;}
 .import-flow .field-grid.three{grid-template-columns:repeat(2,minmax(0,1fr));}
 .import-flow .field-grid.three>.field:last-child{grid-column:1 / -1;}
}
@media(max-width:359px){.import-review-links{grid-template-columns:1fr;}.import-review-card{min-height:98px;}}

#portrait-only-notice{display:none;}
@media (orientation:landscape) and (max-height:550px) and (max-width:1000px){
 #portrait-only-notice{position:fixed;z-index:1000000;inset:0;background:rgba(235,242,247,0.8);color:#243441;display:flex;align-items:center;justify-content:center;text-align:center;font-size:19px;line-height:1.8;padding:22px;}
}

.manual-flow .import-step-heading,.manual-flow .import-step-actions,.manual-flow .import-step-actions{display:none!important;}


.import-flow .compact-receipt-line{padding:0!important;overflow:hidden;margin-bottom:8px!important;}
.import-flow .compact-receipt-line .receipt-line-summary{list-style:none;display:flex;align-items:center;gap:10px;padding:12px 12px;min-height:68px;cursor:pointer;color:#243441;}
.import-flow .compact-receipt-line .receipt-line-summary::-webkit-details-marker{display:none;}
.import-flow .compact-receipt-line .receipt-line-num{font-size:20px;font-family:Georgia,serif;color:#243441;flex:0 0 27px;}
.import-flow .compact-receipt-line .receipt-line-info{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1;}
.import-flow .compact-receipt-line .receipt-line-info strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.import-flow .compact-receipt-line .receipt-line-info small{font-size:11px;color:#243441;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.import-flow .compact-receipt-line .receipt-line-price{font-family:Georgia,serif;white-space:nowrap;color:#243441;font-size:17px;}
.import-flow .compact-receipt-line .receipt-line-chevron{font-size:20px;color:#243441;transition:transform .2s;}
.import-flow .compact-receipt-line[open] .receipt-line-chevron{transform:rotate(180deg);}
.import-flow .compact-receipt-line .receipt-line-body{padding:0 12px 14px;border-top:1px solid rgba(164,122,66,0.35);}
.import-flow .compact-receipt-line.needs-review>.receipt-line-summary{box-shadow:inset 3px 0 0 rgba(0,0,0,0.13);}


.import-flow[data-step="items"] .import-step-actions .button,.import-flow[data-step="overview"] .import-step-actions .button{min-width:160px;}


.import-flow[data-step="review"] .import-review-screen{display:block!important;}


.product-sort-tools{align-items:center;gap:9px;flex-wrap:nowrap;}
.product-sort-tools .book-filter{z-index:42;flex:0 1 220px;}
.product-sort-tools .book-filter-trigger{width:100%;min-width:0;}
.product-sort-tools .book-filter-options{left:0;right:auto;max-width:min(86vw,260px);}
.product-sort-order{width:44px;min-width:44px;height:44px;padding:0;display:grid;place-items:center;font-size:24px;}
.favorite-input-row{display:flex;gap:8px;min-width:0;align-items:center;}
.favorite-input-row>.input{flex:1 1 0;min-width:0;}
.favorite-input-row>.button{flex:0 0 auto;}
#favorite-form[hidden],#favorite-picker[hidden]{display:none!important;}
.picker-heading{display:flex;align-items:center;gap:12px;margin-bottom:12px;}
.picker-heading strong{font-size:16px;}
.favorite-picker-list{display:flex;flex-direction:column;gap:5px;overflow:auto;max-height:min(53vh,420px);margin-top:10px;}
.favorite-picker-row{border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);color:#243441;border-radius:11px;min-height:46px;padding:10px 12px;text-align:left;display:flex;flex-direction:column;gap:4px;}
.favorite-picker-row small{color:#243441;}
.favorite-picker-row[hidden]{display:none;}
.optional-store-fields{border-top:1px solid rgba(164,122,66,0.35);padding:10px 0;margin:14px 0;}
.optional-store-fields>summary{color:#243441;font-size:13px;cursor:pointer;margin:2px 0 12px;}
@media(max-width:759px){
 .product-sort-tools .book-filter{flex:0 1 195px;}
 .product-sort-tools>.tiny{white-space:nowrap;}
 
 body>.overlay .modal.import-dialog{height:100%!important;}
 .favorite-picker-list{max-height:45vh;}
}


.custom-choice-source{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;}
.custom-choice-trigger{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;width:100%;border:1.5px solid rgba(164,122,66,0.35);border-radius:12px;background:rgba(235,242,247,0.8);color:#243441;padding:10px 12px;font:inherit;text-align:left;cursor:pointer;min-width:0;}
.custom-choice-trigger span:first-child{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0;}
.custom-choice-trigger span:last-child{flex:none;color:#243441;font-size:19px;}
.custom-choice-options{position:fixed;z-index:10025;overflow:auto;overscroll-behavior:contain;background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);box-shadow:0 16px 38px rgba(0,0,0,0.13);border-radius:14px;padding:5px;-webkit-overflow-scrolling:touch;}
.custom-choice-option{display:block;width:100%;padding:12px;border:0;border-radius:9px;background:transparent;color:#243441;text-align:left;font:inherit;font-size:15px;white-space:normal;line-height:1.4;}
.custom-choice-option.current{background:rgba(235,242,247,0.8);color:#243441;}
.choice-group-title{font-size:12px;color:#243441;padding:10px 11px 5px;font-weight:700;}
.product-sort-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.product-sort-controls .custom-choice-trigger{width:160px;max-width:55vw;}
.product-sort-controls .sort-direction{min-width:46px;min-height:44px;padding:5px 12px;font-size:22px;font-weight:650;}
.product-sort-controls .tiny{margin-left:auto;}
.favorite-entry{display:flex;gap:7px;min-width:0;align-items:stretch;}
.favorite-entry>.input{min-width:0;flex:1 1 auto;}
.favorite-entry>.favorite-choose{flex:none;min-width:70px;font-size:14px;}
body>.overlay .modal{position:relative;}
.favorite-picker-screen{position:absolute;inset:0;z-index:16;display:flex;flex-direction:column;min-height:0;gap:12px;background:rgba(235,242,247,0.8);padding:14px;border-radius:inherit;}
.favorite-picker-head{display:flex;align-items:center;gap:12px;flex:none;}
.favorite-picker-options{min-height:0;overflow-y:auto;flex:1;overscroll-behavior:contain;}
.favorite-picker-row{width:100%;display:flex;align-items:center;gap:12px;justify-content:space-between;text-align:left;background:transparent;border:0;border-bottom:1px solid rgba(164,122,66,0.35);color:#243441;padding:13px 6px;min-height:48px;}
.favorite-picker-row strong{font-size:15px;font-weight:600;overflow-wrap:anywhere;}
.favorite-picker-row small{font-size:12px;color:#243441;flex:0 0 auto;}
.favorite-picker-row[hidden]{display:none!important;}
.optional-order-metadata{border-top:1px solid rgba(164,122,66,0.35);padding:12px 0 0;margin-top:12px;}
.optional-order-metadata>summary{font-size:14px;color:#243441;padding:8px 0;cursor:pointer;}
.optional-order-metadata[open] .field-grid{margin-top:12px;}
.import-flow .field-note:empty{display:none;}
.import-flow .field-note{font-size:12px;line-height:1.45;}
@media(max-width:759px){
 body>.overlay:has(.import-dialog){padding:0!important;background:rgba(235,242,247,0.8)!important;}
 body>.overlay .modal.import-dialog{height:100%!important;border-radius:0!important;border-left:0!important;border-right:0!important;padding:calc(8px + env(safe-area-inset-top,0px)) 10px 7px!important;box-shadow:none!important;}
 body>.overlay .modal.import-dialog .modal-content{padding-bottom:max(20px,var(--keyboard-space,20px))!important;scroll-padding-bottom:20px;}
 .favorite-picker-screen{padding:13px 10px;}
}



.receipt-upload-card{margin:4px 0 0!important;padding:13px 13px 12px;border-radius:15px;}
.receipt-upload-card .field{margin:0;}
.receipt-upload-card .field>label{display:block;margin:0 0 9px;font-size:13px;}
.receipt-upload-card input[type="file"]{padding:9px 10px;min-height:47px;}
.receipt-upload-card .receipt-preview{padding:5px 0;}
.receipt-upload-card .receipt-preview:empty{display:none;}
.receipt-upload-actions{display:flex;gap:9px;align-items:center;margin:15px 0 0;flex-wrap:wrap;}
.receipt-upload-actions .button{min-height:42px;flex:1 1 0;white-space:nowrap;}
.receipt-upload-status{margin:9px 0 0;line-height:1.5;}
.receipt-upload-status:empty{display:none;}
.receipt-upload-extras{margin:12px 0 0;padding-top:10px;border-top:1px solid rgba(164,122,66,0.35);}
.receipt-upload-extras>summary{font-size:13px;color:#243441;cursor:pointer;}
.receipt-upload-extras .quick-actions{margin:11px 0 7px;gap:8px;}
.receipt-upload-extras>p{margin:7px 0 0;line-height:1.5;}
@media(max-width:759px){
 
 body>.overlay:has(.import-dialog):has(.import-flow[data-step="upload"]){
  background:rgba(235,242,247,0.8)!important;
  align-items:center!important;
  justify-content:center!important;
  padding:calc(10px + env(safe-area-inset-top,0px)) 12px calc(10px + env(safe-area-inset-bottom,0px))!important;
 }
 body>.overlay .modal.import-dialog:has(.import-flow[data-step="upload"]){
  height:auto!important;
  max-height:calc(100dvh - 26px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))!important;
  width:100%!important;
  max-width:720px!important;
  border:1px solid rgba(164,122,66,0.35)!important;
  border-radius:18px!important;
  box-shadow:0 14px 38px rgba(0,0,0,0.13)!important;
  margin:auto 0!important;
  padding:12px 11px 12px!important;
  flex:0 1 auto!important;
 }
 body>.overlay .modal.import-dialog:has(.import-flow[data-step="upload"]) .modal-content{flex:0 1 auto;padding:10px 7px 8px;}
 .receipt-upload-card{padding:13px 12px;}
}


.rating-switch{display:flex;gap:8px;margin:10px 0 13px;max-width:460px}
.rating-switch-btn{flex:1;min-width:0;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);color:#243441;border-radius:11px;padding:11px 9px;cursor:pointer;font-size:15px;white-space:nowrap}
.rating-switch-btn.active{background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441}
.rating-switch-btn small{margin-left:5px;color:#243441}
.rating-compact-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.rating-mini{display:flex;align-items:center;gap:7px;min-width:0;min-height:78px;padding:10px;border-radius:12px;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8)}
.rating-mini-icon{font-size:19px;flex:none}
.rating-mini-text{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.rating-mini-text strong{font-size:14px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rating-mini-note,.rating-mini-text small{font-size:11px;color:#243441;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rating-mini .button{font-size:11px;padding:6px 7px;flex:none;min-height:32px}
@media(max-width:530px){.rating-compact-list{grid-template-columns:1fr}.rating-mini{min-height:61px;padding:8px 12px}.rating-mini-text strong{font-size:15px}}
.unit-kind-row{display:flex;align-items:center;gap:7px;min-width:0}
.unit-kind-toggle{border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);border-radius:10px;color:#243441;padding:9px 7px;flex:0 0 auto;font-size:12px;white-space:nowrap;cursor:pointer;max-width:105px}
.unit-kind-row select{flex:1;min-width:0;width:100%}
.unit-kind-row>.custom-choice-trigger{flex:1;min-width:0;width:100%}
.pack-spec-details{border:1px solid rgba(164,122,66,0.35);border-radius:12px;padding:0 12px;margin:12px 0}
.pack-spec-details>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;padding:12px 2px;color:#243441;font-size:14px}
.pack-spec-details>summary::after{content:'⌄';font-size:20px;color:#243441}
.pack-spec-details[open]>summary::after{transform:rotate(180deg)}
.pack-spec-details .field-grid{padding:0 0 12px}
.category-value-source{display:none!important}
.category-picker{border:1px solid rgba(164,122,66,0.35);border-radius:12px;min-width:0;margin:2px 0 10px}
.category-picker>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 12px;cursor:pointer;list-style:none;min-height:49px}
.category-picker>summary::-webkit-details-marker{display:none}
.category-picker-body{padding:5px 10px 12px;border-top:1px solid rgba(164,122,66,0.35);max-height:310px;overflow-y:auto;overscroll-behavior:contain}
.category-picker-group{display:grid;grid-template-columns:75px minmax(0,1fr);align-items:start;gap:9px;padding:10px 0;border-bottom:1px solid rgba(164,122,66,0.35)}
.category-picker-group:last-child{border-bottom:0}
.category-picker-group>strong{font-size:12px;color:#243441;padding-top:14px;line-height:1.4}
.category-picker-circles{display:flex;flex-wrap:wrap;gap:8px}
.category-mini-choice{display:flex;flex-direction:column;align-items:center;gap:4px;border:1px solid transparent;background:transparent;color:#243441;padding:5px 2px;border-radius:9px;cursor:pointer;width:55px;min-width:0}
.category-mini-icon{height:42px;width:42px;display:grid;place-items:center;background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);border-radius:50%;font-size:21px}
.category-mini-name{font-size:11px;white-space:nowrap}
.category-mini-choice.selected .category-mini-icon{border:2px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8)}
@media(max-width:400px){.category-picker-group{grid-template-columns:59px minmax(0,1fr);gap:5px}.category-mini-choice{width:49px}.category-mini-icon{height:39px;width:39px}}


.unit-kind-row{min-width:0}
.unit-kind-row>.custom-choice-trigger{flex:1 1 0!important;min-width:0!important;width:auto!important;max-width:none!important}
.unit-kind-toggle{width:37px;min-width:37px;max-width:37px;flex:0 0 37px;display:grid;place-items:center;font-size:22px;padding:5px;border-radius:9px;min-height:44px}
.unit-kind-label{white-space:nowrap}
.rating-compact-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rating-mini{width:100%;min-width:0;text-align:left;cursor:pointer;gap:6px;min-height:82px;padding:9px 7px;position:relative}
.rating-mini-icon{font-size:16px}
.rating-mini-text{min-width:0;flex:1}
.rating-mini-text strong{font-size:13px;max-width:100%}
.rating-mini-arrow{font-size:18px;color:#243441;align-self:center;flex:none}
@media(max-width:530px){.rating-compact-list{grid-template-columns:repeat(2,minmax(0,1fr))}.rating-mini{min-height:72px;padding:7px}.rating-mini-text strong{font-size:13px}}


.topbar .archive-launch{font-size:13px;width:auto;min-width:53px;padding:0 10px;white-space:nowrap;letter-spacing:.5px;color:#243441}
body>.bottom-nav{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 74px;gap:9px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));}
body>.bottom-nav.archive-bottom-hidden{display:none!important}
body>.bottom-nav>.nav-item{min-width:0;width:100%;}
body>.bottom-nav>.nav-settings{font-size:11px;padding-inline:2px}
body>.bottom-nav>.nav-settings .nav-icon{font-size:22px}
.topbar.archive-topbar-hidden{display:none!important}
.archive-navline{display:flex;align-items:center;gap:14px;margin-bottom:17px;min-height:46px;}
.archive-navline>strong{font-size:21px;letter-spacing:2px;color:#243441}
.archive-back{border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);color:#243441;border-radius:12px;width:43px;height:43px;font-size:28px;line-height:1;cursor:pointer;transform:none;}
.archive-back:first-letter{transform:rotate(90deg)}
.archive-tabs{display:flex;gap:4px;background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);border-radius:15px;padding:5px;margin:0 0 22px;}
.archive-tabs>button{flex:1;border:0;background:transparent;color:#243441;border-radius:10px;min-height:46px;font-size:16px;font-weight:bold;cursor:pointer;}
.archive-tabs>button.selected{background:rgba(235,242,247,0.8);box-shadow:inset 0 0 0 1px rgba(0,0,0,0.13);color:#243441}
.archive-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0 19px;}
.archive-title-row h1{font-size:29px;margin:0 0 4px;color:#243441}
.archive-title-row .subheading{font-size:13px;margin:0}
.archive-type-tabs{display:flex;gap:8px;overflow-x:auto;max-width:100%;margin:8px 0 17px;padding:2px 0 6px}
.archive-type-tabs>button{flex:0 0 auto;border:1px solid rgba(164,122,66,0.35);border-radius:24px;background:rgba(235,242,247,0.8);color:#243441;padding:10px 18px;font-size:14px;cursor:pointer;}
.archive-type-tabs>button.active{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35)}
.archive-tools-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 14px;min-width:0;}
.archive-tools{display:flex;align-items:center;gap:7px;margin-left:auto;flex-wrap:nowrap;}
.archive-tool{display:inline-flex;align-items:center;justify-content:center;gap:4px;min-height:37px;min-width:36px;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);border-radius:11px;color:#243441;padding:6px 9px;font-size:16px;white-space:nowrap;cursor:pointer;}
.archive-tool.active{color:#243441;background:rgba(235,242,247,0.8)}
.archive-sort-trigger{font-size:12px;}
.archive-sort-filter{position:relative;min-width:0;}
.archive-sort-filter>.book-filter-options{right:0;left:auto;min-width:125px;max-width:min(260px,85vw);z-index:30;}
.archive-search-holder{margin:0 0 12px}.archive-search-holder[hidden]{display:none}
.archive-search-holder .input{min-height:44px;font-size:16px}
.archive-merchant-row,.archive-product-row{display:flex;align-items:center;gap:11px;min-height:72px;padding:10px 4px;border-bottom:1px solid rgba(164,122,66,0.3);min-width:0;}
.archive-merchant-row .merchant-logo,.archive-merchant-row .merchant-icon{width:48px;height:48px;border-radius:11px;flex-shrink:0;}
.archive-number{min-width:31px;flex-shrink:0;text-align:center;font-size:22px;font-family:Georgia,serif;color:#243441;font-variant-numeric:tabular-nums;}
.archive-merchant-main,.archive-product-main{display:flex;align-items:center;gap:10px;flex:1;min-width:0;background:none;border:0;color:#243441;text-align:left;cursor:pointer;padding:2px;}
.archive-merchant-label,.archive-product-main>span:first-child{display:flex;flex:1;flex-direction:column;gap:6px;min-width:0;}
.archive-merchant-label strong,.archive-product-main strong{font-size:16px;white-space:normal;overflow-wrap:anywhere;}
.archive-merchant-label small,.archive-product-main small{font-size:12px;color:#243441;white-space:normal;}
.archive-edit-btn,.archive-move-btn{background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);border-radius:10px;color:#243441;width:37px;min-width:37px;height:37px;cursor:pointer;}
.archive-drag-handle{touch-action:none;user-select:none;color:#243441;min-width:26px;text-align:center;font-size:23px;cursor:grab;}
.archive-product-amount{font-size:14px;color:#243441;white-space:nowrap;}
.archive-chevron{font-size:24px;color:#243441;}
.merchant-hero{border-radius:21px;min-height:213px;position:relative;isolation:isolate;overflow:hidden;border:1px solid rgba(164,122,66,0.35);background:linear-gradient(130deg,rgba(235,242,247,0.8) 0%,rgba(235,242,247,0.8) 65%,rgba(235,242,247,0.8) 100%);padding:25px 20px;margin:0 0 18px;}
.merchant-hero-watermark{position:absolute;right:-10px;top:-35px;width:190px;height:190px;opacity:.1;filter:blur(13px);z-index:-1;}
.merchant-hero-watermark .merchant-logo,.merchant-hero-watermark .merchant-icon{width:100%;height:100%;object-fit:contain;}
.merchant-hero-contents{display:flex;flex-direction:column;align-items:flex-start;gap:8px;}
.merchant-hero-contents>.merchant-logo,.merchant-hero-contents>.merchant-icon{width:69px;height:69px;border-radius:14px;border:1px solid rgba(164,122,66,0.35);object-fit:contain;background:rgba(235,242,247,0.8);color:#243441;font-size:28px;}
.merchant-hero h1{margin:5px 0 0;font-size:28px;color:#243441;overflow-wrap:anywhere}
.merchant-hero p{margin:0;color:#243441;font-size:12px}
.merchant-hero .button{margin-top:5px;min-height:34px;}
.merchant-products-title{margin-top:20px}
.merchant-products-title>strong{font-size:17px;min-width:0}
.paper-note{margin:17px 6px 21px;position:relative;background:rgba(235,242,247,0.8) url('paper-note.svg') center/100% 100% no-repeat;border-radius:5px 12px 10px 5px;color:#243441;transform:rotate(-.35deg);box-shadow:2px 7px 0 rgba(0,0,0,0.13),2px 11px 22px rgba(0,0,0,0.13);}
.paper-note:after{content:'';position:absolute;right:0;bottom:0;border-width:0 0 16px 16px;border-style:solid;border-color:transparent transparent rgba(164,122,66,0.35) transparent;filter:drop-shadow(-1px -1px 1px rgba(235,242,247,0.8))}
.paper-folded{display:flex;align-items:center;justify-content:center;position:relative;width:100%;height:70px;border:0;background:transparent;color:#243441;cursor:pointer;}
.paper-pin{position:absolute;left:calc(50% - 12px);top:-15px;width:24px;height:24px;border-radius:50%;background:radial-gradient(circle at 32% 26%,rgba(235,242,247,0.8),rgba(235,242,247,0.8) 35%,rgba(235,242,247,0.8) 70%,rgba(235,242,247,0.8));box-shadow:2px 5px 3px rgba(0,0,0,0.13),inset -2px -2px 2px rgba(0,0,0,0.13);}
.paper-handwriting{font-family:'STKaiti','KaiTi','Kaiti SC',cursive;font-size:25px;font-weight:600;letter-spacing:5px;}
.paper-arrow{position:absolute;right:23px;top:20px;font-size:22px;}
.paper-content{padding:8px 20px 22px;font-family:'STKaiti','KaiTi','Kaiti SC',cursive;animation:paper-open .3s ease both;}
@keyframes paper-open{from{opacity:.4;transform:scaleY(.85);transform-origin:top}to{opacity:1;transform:scaleY(1)}}
.paper-note-line{padding:9px 0;border-bottom:1px dashed rgba(164,122,66,0.35);display:grid;grid-template-columns:minmax(60px,30%) 1fr;gap:8px;}
.paper-note-line strong{color:#243441}.paper-note-line span{color:#243441;overflow-wrap:anywhere}
.paper-edit{text-align:right;padding-top:10px}.paper-edit button{border:0;background:transparent;color:#243441;text-decoration:underline;font:inherit;font-weight:bold;cursor:pointer;}
.merchant-note-input{border:1px solid rgba(164,122,66,0.35);padding:10px;border-radius:12px;margin:8px 0;display:grid;gap:8px;}
.archive-product-hero{min-height:190px;padding:27px 20px;text-align:center;background:linear-gradient(140deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));border-radius:18px;border:1px solid rgba(164,122,66,0.35);margin-bottom:15px;}
.archive-product-hero .product-hero-icon{display:block;font-size:50px;margin-bottom:8px}.archive-product-hero h1{margin:0 0 10px}.archive-product-hero p{color:#243441;margin:0;font-size:12px;overflow-wrap:anywhere}
.archive-product-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:13px 0}.archive-product-facts>div{border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);border-radius:14px;padding:15px;display:grid;gap:7px}.archive-product-facts small{color:#243441}.archive-product-facts strong{font-size:19px}
.archive-history{margin:10px 0 40px;}.archive-history-row{display:flex;justify-content:space-between;width:100%;gap:12px;padding:14px 2px;background:none;border:0;border-bottom:1px solid rgba(164,122,66,0.35);color:#243441;cursor:pointer;text-align:left}.archive-history-row>span{overflow-wrap:anywhere}

body>.overlay:has(.settings-dialog){align-items:flex-end!important;justify-content:center!important;padding:0!important;background:rgba(235,242,247,0.631)!important;}
body>.overlay .modal.settings-dialog{width:min(850px,100%);height:min(56dvh,590px)!important;max-height:min(78dvh,670px)!important;min-height:310px!important;margin:0!important;position:relative!important;top:auto!important;left:auto!important;border-radius:22px 22px 0 0!important;border-bottom:0!important;box-shadow:0 -16px 45px rgba(0,0,0,0.13)!important;}
body>.overlay .settings-dialog .modal-head{padding:13px 20px 10px!important;}
body>.overlay .settings-dialog .modal-content{padding:8px 17px 25px!important;overflow-y:auto!important;flex:1 1 auto;}
.settings-sheet-body{display:grid;gap:13px;min-width:0;}
.settings-section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.settings-section-title>strong{font-size:16px;letter-spacing:1px}.settings-section-title>div{display:flex;align-items:center;gap:10px}
.settings-eye{display:grid;place-items:center;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);width:38px;height:38px;border-radius:11px;color:#243441;}
.settings-eye svg,.settings-book-actions svg{width:20px;height:20px;}
.settings-books-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
.settings-book-card{display:flex;align-items:center;gap:2px;min-width:0;min-height:59px;border-radius:12px;border:1px solid rgba(164,122,66,0.35);background:linear-gradient(130deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));padding:7px 8px;}
.settings-book-open{display:flex;align-items:center;gap:6px;flex:1;min-width:0;border:0;background:transparent;color:#243441;text-align:left;font-size:12px;}
.settings-book-open>span{font-size:19px;flex-shrink:0}.settings-book-open strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.settings-book-actions{display:flex;gap:1px;flex-shrink:0;}
.settings-book-actions button{background:none;border:0;padding:3px;min-width:26px;height:29px;color:#243441;cursor:pointer;}
.settings-book-actions button.current{color:#243441;}
.settings-link,.settings-section>summary{font-size:15px;color:#243441;display:flex;align-items:center;justify-content:space-between;padding:16px 10px;border:0;border-top:1px solid rgba(164,122,66,0.35);background:none;width:100%;text-align:left;cursor:pointer;}
.settings-section>summary{list-style:none}.settings-section>summary::-webkit-details-marker{display:none}.settings-section>summary>span{color:#243441;font-size:20px;}
.settings-section-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:8px 4px 14px;}
.settings-section-links button{border:1px solid rgba(164,122,66,0.35);border-radius:10px;color:#243441;background:rgba(235,242,247,0.8);padding:12px 7px;text-align:left;font-size:12px;cursor:pointer;}
@media(max-width:620px){
 .archive-navline{margin-top:6px;}
 .archive-tools{gap:4px}.archive-tool{min-width:33px;padding:5px 6px}.archive-sort-trigger{font-size:11px}
 .archive-merchant-row,.archive-product-row{gap:7px}.archive-number{min-width:25px;font-size:18px}
 .archive-merchant-row .merchant-logo,.archive-merchant-row .merchant-icon{width:39px;height:39px}
 .archive-merchant-label strong,.archive-product-main strong{font-size:14px}
 .archive-product-amount{font-size:12px}.archive-edit-btn,.archive-move-btn{min-width:29px;width:29px;height:33px}
 .settings-books-grid{grid-template-columns:1fr 1fr;gap:7px}.settings-book-card{padding:6px 5px}.settings-book-open strong{font-size:11px}.settings-book-actions button{min-width:21px;padding:1px}.settings-book-open>span{font-size:17px}
 body>.overlay .modal.settings-dialog{max-height:75dvh!important;}
}


.topbar.archive-topbar-hidden + .main{padding-top:max(20px,calc(env(safe-area-inset-top,0px) + 14px));}



body>.overlay .modal{isolation:isolate;}
body>.overlay .modal>.custom-choice-layer{
 position:absolute;inset:0;z-index:35;pointer-events:auto;
 background:rgba(235,242,247,0.13);border-radius:inherit;
 touch-action:none;
}
body>.overlay .modal .custom-choice-layer>.custom-choice-options.in-modal-choice{
 position:absolute!important;right:auto!important;bottom:auto!important;
 display:flex;flex-direction:column;min-width:0;min-height:0;
 overflow:hidden!important;box-sizing:border-box;
 background:rgba(235,242,247,0.8);border:1px solid rgba(164,122,66,0.35);border-radius:16px;
 padding:7px;box-shadow:0 14px 30px rgba(0,0,0,0.13);
 touch-action:auto;
}
.choice-modal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto;padding:4px 5px 8px;border-bottom:1px solid rgba(164,122,66,0.35);}
.choice-modal-head strong{font-size:14px;color:#243441;overflow-wrap:anywhere;}
.choice-modal-close{display:grid;place-items:center;background:rgba(235,242,247,0.8);color:#243441;border:1px solid rgba(164,122,66,0.35);border-radius:9px;width:33px;height:33px;flex:none;font-size:18px;}
.choice-modal-list{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px 0;touch-action:pan-y;}
.choice-modal-list .custom-choice-option{min-height:42px;padding:9px 12px;border-bottom:1px solid rgba(164,122,66,0.35);font-size:15px;}
.choice-modal-list .custom-choice-option:last-child{border-bottom:0;}

body>.overlay:has(.settings-dialog){align-items:stretch!important;justify-content:flex-end!important;padding:0!important;background:rgba(235,242,247,0.667)!important;}
body>.overlay .modal.settings-dialog{
 width:min(55vw,390px)!important;max-width:min(55vw,390px)!important;
 height:100dvh!important;max-height:100dvh!important;min-height:0!important;
 margin:0!important;border-radius:20px 0 0 20px!important;border:1px solid rgba(164,122,66,0.35)!important;border-right:0!important;
 box-shadow:-13px 0 40px rgba(0,0,0,0.13)!important;animation:settings-slide-in .22s cubic-bezier(.2,.75,.3,1) both;
}
@keyframes settings-slide-in{from{transform:translateX(100%);opacity:.7}to{transform:translateX(0);opacity:1}}
body>.overlay .settings-dialog .modal-head{padding:calc(12px + env(safe-area-inset-top,0px)) 6px 12px!important;}
body>.overlay .settings-dialog .modal-content{padding:9px 7px max(20px,env(safe-area-inset-bottom,0px))!important;}
.settings-books-grid{grid-template-columns:1fr!important;}
.settings-book-card{min-height:52px!important;padding:8px!important;gap:8px!important;}
.settings-book-caption{display:flex;align-items:center;gap:8px;flex:1;min-width:0;color:#243441;font-size:13px;}
.settings-book-caption>span{font-size:19px;flex:none;}.settings-book-caption strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.settings-book-card.editing .settings-book-actions{margin-left:auto;}
.settings-book-actions .settings-edit-target{padding:5px 11px!important;min-width:50px!important;border:1px solid rgba(164,122,66,0.35)!important;border-radius:9px!important;height:36px!important;font-size:13px;}
.settings-eye.current{background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);}
.settings-section-title{gap:5px}.settings-section-title>div{gap:3px}.settings-eye{width:33px;height:35px;}
.settings-section-links{grid-template-columns:1fr;}
.settings-link,.settings-section>summary{padding:12px 3px;}
@media(max-width:600px){body>.overlay .modal.settings-dialog{width:62vw!important;max-width:62vw!important;}}
@media(max-width:360px){body>.overlay .modal.settings-dialog{width:70vw!important;max-width:70vw!important;}}


.import-preview-settlement{margin:14px 0 12px;border:1px solid rgba(164,122,66,0.35);border-radius:15px;background:rgba(235,242,247,0.8);padding:12px 13px;}
.import-preview-settlement-head{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#243441;margin-bottom:5px;font-size:15px;}
.import-preview-settlement-head span{color:#243441;font:20px Georgia,serif;white-space:nowrap;}
.import-preview-settlement .receipt-summary-block{margin:0!important;padding:2px 0!important;border:0!important;background:transparent!important;}
.import-preview-settlement .receipt-summary-row{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:6px 0;font-size:13px;}
.import-preview-settlement .receipt-summary-row span{color:#243441;}
.import-preview-settlement .import-payable-row{border-top:1px solid rgba(164,122,66,0.35);padding-top:9px;font-weight:700;}
.import-preview-settlement .import-editable-total{border-top:1px solid rgba(164,122,66,0.35);margin-top:7px;padding-top:12px;display:flex;gap:10px;align-items:center;}
.import-preview-settlement .import-editable-total label{font-size:13px;flex:1;}
.import-preview-settlement .import-editable-total .input{flex:0 1 135px;width:135px;min-width:0;text-align:right;font-size:16px;min-height:39px;}
.import-preview-settlement #receipt-difference-display{margin-top:8px;font-size:12px;line-height:1.4;}
@media(max-width:759px){.import-flow[data-step="overview"] .import-step-actions .button,.import-flow[data-step="items"] .import-step-actions .button{flex:1 1 43%;min-width:0!important;}}

.archive-item-more{margin:11px 0;border:1px solid var(--stroke,rgba(164,122,66,0.35));border-radius:13px;padding:10px 12px;}
.archive-item-more>summary{font-size:14px;cursor:pointer;list-style:revert;padding:5px 2px;}
.archive-item-more[open]>summary{margin-bottom:14px;}
.archive-sync-scope{margin:16px 0 11px;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.35);padding:12px 13px;border-radius:13px;min-width:0;display:grid;gap:10px;}
.archive-sync-scope legend{font-weight:600;padding:0 5px;font-size:14px;}
.archive-sync-scope label{font-size:14px;display:flex;align-items:center;gap:9px;line-height:1.55;min-height:30px;cursor:pointer;}
.archive-sync-scope input[type=radio]{width:18px;height:18px;flex:0 0 18px;margin:0;accent-color:rgba(235,242,247,0.8);}
.archive-sync-scope p{font-size:12px;margin:1px 0 0;line-height:1.6;}
@media(max-width:520px){
 body>.overlay .archive-sync-scope{padding:12px 10px;}
 body>.overlay .archive-sync-scope label{align-items:flex-start;}
 body>.overlay .archive-sync-scope input[type=radio]{margin-top:2px;}
}

body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,[contenteditable="true"],select,.selectable-text{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
.archive-merchant-row.is-reordering,.archive-product-row.is-reordering{
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.archive-merchant-row.is-reordering .archive-merchant-main,
.archive-product-row.is-reordering .archive-product-main{pointer-events:none;}
.archive-drag-handle{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 36px;
  width:36px;height:42px;border:1px solid rgba(164,122,66,0.35);
  border-radius:10px;background:rgba(235,242,247,0.33);touch-action:none;
  -webkit-touch-callout:none;-webkit-user-select:none;user-select:none;
  cursor:grab;color:#243441;font-size:22px;
}
.archive-drag-handle:active{cursor:grabbing;background:rgba(235,242,247,0.8)}
.archive-dragging{position:relative;z-index:5;background:rgba(235,242,247,0.8);box-shadow:0 6px 20px rgba(0,0,0,0.13);border-radius:12px;}
.archive-drop-target{box-shadow:inset 0 3px 0 rgba(0,0,0,0.13);background:rgba(235,242,247,0.21);}
.uncat-review-list{display:flex;flex-direction:column;gap:10px;margin-top:12px;}
.uncat-review-row{padding:11px 12px;border:1px solid rgba(164,122,66,0.35);border-radius:12px;background:rgba(235,242,247,0.8);display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.uncat-review-info{display:flex;flex-direction:column;gap:5px;min-width:0}
.uncat-review-info strong{overflow-wrap:anywhere;font-size:14px}
.uncat-review-info small{font-size:12px;color:#243441}
.uncat-category-select{width:100%;font-size:16px;min-height:42px}


.card-photo-target{position:relative;isolation:isolate;overflow:hidden;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:pan-y;cursor:default}
.card-photo-target>.card-photo-layer{position:absolute;inset:0;z-index:0;background-position:center;background-repeat:no-repeat;background-size:cover;pointer-events:none}
.card-photo-target>:not(.card-photo-layer){position:relative;z-index:1}
.card-photo-target:has(.card-photo-layer) .eyebrow,.card-photo-target:has(.card-photo-layer) .label,.card-photo-target:has(.card-photo-layer) .big-amount,.card-photo-target:has(.card-photo-layer) .number,.card-photo-target:has(.card-photo-layer) .money-secondary,.card-photo-target:has(.card-photo-layer) .hero-sum{text-shadow:0 1px 4px rgba(0,0,0,0.13),0 0 10px rgba(0,0,0,0.13)}
.card-photo-menu{display:grid;gap:10px;padding:5px 0}
.card-photo-menu .button{width:100%;justify-content:center;min-height:44px}
.card-photo-menu .tiny{margin:5px 0 0;line-height:1.6}
.card-photo-dialog{width:min(500px,100%)}
.card-photo-editor{display:grid;gap:14px}
.card-photo-crop{position:relative;width:100%;aspect-ratio:960/500;overflow:hidden;border-radius:14px;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);touch-action:none;cursor:grab}
.card-photo-crop.is-items{aspect-ratio:680/570}
.card-photo-crop canvas{display:block;width:100%;height:100%;touch-action:none}
.card-photo-crop-guide{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);font-size:11px;white-space:nowrap;color:#243441;background:rgba(235,242,247,0.667);padding:4px 11px;border-radius:16px;pointer-events:none}
.card-photo-control{display:grid;grid-template-columns:74px minmax(0,1fr);align-items:center;gap:12px;color:#243441;font-size:14px}
.card-photo-control.fusion{grid-template-columns:110px minmax(0,1fr) 42px}
.card-photo-control label{white-space:nowrap}
.card-photo-control input[type=range]{width:100%;accent-color:rgba(235,242,247,0.8);min-height:32px;cursor:pointer}
.card-photo-apply{height:42px;width:42px;border-radius:13px;border:1px solid rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);color:#243441;font-size:22px}
@media(max-width:410px){.card-photo-control.fusion{grid-template-columns:93px minmax(0,1fr) 42px;gap:7px}.card-photo-control{gap:7px}}


.card-photo-menu-layer{position:fixed;inset:0;z-index:11000;pointer-events:none}
.card-photo-menu-dismiss{position:absolute;inset:0;pointer-events:auto;background:transparent}
.card-photo-popover{position:fixed;width:min(258px,calc(100vw - 20px));z-index:1;pointer-events:auto;box-sizing:border-box;padding:10px 10px 9px;border:1px solid rgba(164,122,66,0.35);border-radius:15px;background:linear-gradient(145deg,rgba(235,242,247,0.8),rgba(235,242,247,0.8));box-shadow:0 12px 34px rgba(0,0,0,0.13), inset 0 1px 0 rgba(0,0,0,0.078);color:#243441;font-size:13px;line-height:1.3;touch-action:manipulation}
.card-photo-popover-head{display:flex;justify-content:space-between;align-items:center;gap:4px;min-height:25px;margin-bottom:7px;font-size:14px;font-weight:650;white-space:nowrap}
.card-photo-popover-tools{display:flex;gap:3px;align-items:center}
.card-photo-popover button{font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.card-photo-default{border:0;background:none;color:#243441;font-size:11px;white-space:nowrap;padding:5px 3px}
.card-photo-pin,.card-photo-menu-close{display:grid;place-items:center;width:27px;height:27px;min-width:27px;background:rgba(235,242,247,0.8);color:#243441;border:1px solid rgba(164,122,66,0.35);border-radius:8px;padding:0}
.card-photo-pin.is-pinned{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35)}
.card-photo-menu-close{border-color:transparent;background:transparent;font-size:20px;font-weight:400;color:#243441}
.card-photo-popover-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.card-photo-popover-actions:has(>button:only-child){grid-template-columns:1fr}
.card-photo-popover-actions button,.card-photo-restore{border:1px solid rgba(164,122,66,0.35);border-radius:9px;background:rgba(235,242,247,0.8);color:#243441;min-width:0;min-height:33px;font-size:12px;padding:6px 5px;white-space:nowrap}
.card-photo-popover-actions button:first-child{border-color:rgba(164,122,66,0.35);background:rgba(235,242,247,0.8);color:#243441}
.card-photo-restore{display:block;width:100%;margin-top:6px;background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);min-height:30px}
.card-photo-target{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}


.quick-actions:has(>[data-action="open-voice"]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.quick-actions>[data-action="open-voice"]{min-width:0;white-space:nowrap}
.voice-ledger-box{display:flex;flex-direction:column;gap:12px}
.voice-recorder-controls{display:flex;align-items:center;justify-content:space-between;gap:12px}
.voice-recorder-controls .button{flex:1}
.voice-recorder-controls .button.recording{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35);animation:voice-pulse 1.5s infinite}
@keyframes voice-pulse{50%{box-shadow:0 0 0 4px rgba(0,0,0,0.13)}}
.voice-status{border-radius:9px;border:1px solid rgba(164,122,66,0.35);padding:10px;line-height:1.6;min-height:38px}
.voice-audio-label,.voice-transcript-label{display:block;font-size:13px}
.voice-audio-label input{display:block;margin-top:6px;max-width:100%;box-sizing:border-box}
#voice-transcript{line-height:1.7;resize:vertical;min-height:125px}
.voice-parse-button{width:100%;min-height:46px}
@media(max-width:420px){.quick-actions:has(>[data-action="open-voice"]){gap:5px}.quick-actions:has(>[data-action="open-voice"])>.button{padding-left:3px;padding-right:3px;font-size:11px;letter-spacing:-.25px}}


.summary-tile.blue-summary{background:rgba(235,242,247,0.18)!important;border:1px solid rgba(164,122,66,0.32)!important}
.quantity-details>summary{cursor:pointer;font-size:20px;font-weight:700;padding:18px 0}.quantity-details>summary small{font-size:12px;font-weight:400;opacity:.7;margin-left:12px}.product-photo-thumb{object-fit:cover;padding:0!important;border-radius:50%;width:42px;height:42px}.product-detail-hero{border-radius:20px;overflow:hidden}.product-detail-hero .big-icon{margin-top:14px}


.product-detail-hero .product-photo-control{background:rgba(235,242,247,0.09)!important;background-image:none!important;border:1px solid rgba(164,122,66,0.19)!important;box-shadow:none!important;color:rgba(244,240,228,0.88)!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-weight:400;border-radius:12px}
.product-detail-hero .product-photo-control:hover{background:rgba(235,242,247,0.17)!important}

/* Sister edition: ivory, pine green and muted tartan red. */
:root{--ink:rgba(235,242,247,0.8);--muted:rgba(235,242,247,0.8);--cream:rgba(235,242,247,0.8);--paper:rgba(235,242,247,0.8);--white:rgba(235,242,247,0.8);--yellow:rgba(235,242,247,0.8);--pink:rgba(235,242,247,0.8);--pink-bg:rgba(235,242,247,0.8);--mint:rgba(235,242,247,0.8);--line:rgba(235,242,247,0.8);--border:1px solid rgba(164,122,66,0.35);--shadow:rgba(0,0,0,0.22);--jewel-blue:rgba(235,242,247,0.8);--jewel-cobalt:rgba(235,242,247,0.8);--jewel-teal:rgba(235,242,247,0.8);--jewel-red:rgba(235,242,247,0.8);color-scheme:light;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
html,body{background:rgba(235,242,247,0.8);color:var(--ink)}
.shell{background:rgba(235,242,247,0.8);background-image:none;box-shadow:0 0 36px rgba(0,0,0,0.063)}
.shell::before,.shell::after{display:none!important;background-image:none!important}
.topbar{background:rgba(235,242,247,0.8);border-bottom:1px solid rgba(164,122,66,0.35)}
.brandmark{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35);box-shadow:none;text-shadow:none}
.top-title strong,.page-heading h1,.section-row h2,.month-row strong,.modal-head h2,.book-title{color:#243441}
.eyebrow,.datehead{color:#243441}
.bottom-nav{background:rgba(235,242,247,0.8);box-shadow:0 -4px 20px rgba(0,0,0,0.039);border-color:rgba(164,122,66,0.35)}
.nav-item.active,.tab.active,.pill.selected{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35);box-shadow:none}
.nav-item.active .nav-icon{color:#243441}
.button,.icon-btn{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35);box-shadow:none}
.button.primary{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35)}
.button.pink{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35)}
.button.danger{color:#243441}.button.soft{background:rgba(235,242,247,0.8);color:#243441}
.card,.transaction,.product-card,.book-tile{background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);box-shadow:0 3px 12px rgba(0,0,0,0.027)}
.hero-main,.small-stat{background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);color:#243441}
.big-amount,.small-stat .number,.tx-title,.tx-amount,.summary-tile .value{color:#243441}
.summary-tile,.summary-tile.blue-summary{background:rgba(235,242,247,0.48);border-color:rgba(164,122,66,0.35)}
.input,.select,input,select,textarea,select option{background:rgba(235,242,247,0.8);color:#243441;border-color:rgba(164,122,66,0.35)}
.overlay{background:rgba(235,242,247,0.38)}.modal,.modal-head{background:rgba(235,242,247,0.8);color:#243441}
.progress>span{background:rgba(235,242,247,0.8)}.chart-bar{background:rgba(235,242,247,0.8)}.chart-bar:nth-child(3n){background:rgba(235,242,247,0.8)}
.toast{background:rgba(235,242,247,0.8);color:#243441}.category-icon{background:rgba(235,242,247,0.8);border-color:rgba(164,122,66,0.35);box-shadow:none}
.notice{background:rgba(235,242,247,0.8);color:#243441}.notice.warn{background:rgba(235,242,247,0.8);color:#243441}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid rgba(164,122,66,0.35);outline-offset:3px}

/* Dad edition: translucent navy, a single golden-olive accent, black and cream. */
:root{color-scheme:light;--ink:#243441;--muted:#60717d;--cream:#e5edf2;--paper:#f4f7f9;--white:#243441;--yellow:#a47a42;--pink:#a47a42;--pink-bg:#eadcc9;--mint:#eadcc9;--line:#aab9c3;--border:1px solid rgba(164,122,66,.28);--shadow:#000000;--jewel-blue:#d2e0e9;--jewel-cobalt:#bdcfdd;--jewel-teal:#99703e;--jewel-red:#a47a42}
html{background:#e5edf2}
body{color:var(--ink);background-color:#e8eff4;background-image:radial-gradient(ellipse at 15% 5%,rgba(94,139,167,.29),transparent 52%),radial-gradient(ellipse at 95% 65%,rgba(164,122,66,.12),transparent 50%),linear-gradient(155deg,#e8eff4,#d9e4ec);background-attachment:fixed}
.shell{background:rgba(230,238,244,.55);background-image:none;box-shadow:0 0 45px #00000026;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.topbar{background:rgba(241,246,249,.8);border-color:rgba(164,122,66,.25);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.brandmark{background:rgba(0,0,0,.35);color:#896032;border:1px solid #ad8753;box-shadow:inset 0 1px 0 #f4f0e41a}
.top-title strong,.page-heading h1,.section-row h2,.month-row strong,.modal-head h2,.book-title{color:#243441}
.eyebrow,.datehead{color:#896032}.muted,.subheading,.tx-sub,.tx-meta,.money-secondary,.caption,.field-note{color:#60717d}
.card,.transaction,.product-card,.book-tile,.soft-card{background:linear-gradient(130deg,rgba(247,250,252,.36),rgba(222,234,242,.58));border-color:rgba(244,240,228,.19);box-shadow:inset 0 1px 0 rgba(244,240,228,.07),0 5px 18px #00000014;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.hero-main,.small-stat{background:linear-gradient(135deg,rgba(247,250,252,.44),rgba(215,230,240,.64));border-color:rgba(164,122,66,.4)}
.big-amount,.small-stat .number,.tx-title,.tx-amount,.summary-tile .value{color:#243441}
.summary-tile,.summary-tile.blue-summary{background:rgba(244,240,228,.055);border-color:rgba(164,122,66,.22)}
.button,.icon-btn{background:rgba(244,240,228,.065);color:#243441;border-color:rgba(244,240,228,.25);box-shadow:none}
.button.primary,.button.pink{background:linear-gradient(135deg,#c5a16c,#b18b55);color:#000000;border-color:#d0b58c;box-shadow:inset 0 1px 0 #f4f0e44d}
.button.soft{background:rgba(164,122,66,.13);color:#805a30;border-color:rgba(164,122,66,.4)}
.button.danger{color:#9a463d}.button:hover,.icon-btn:hover{border-color:#c5a16c}
.nav-item.active,.tab.active,.pill.selected{background:rgba(164,122,66,.18);color:#79552d;border-color:rgba(164,122,66,.45);box-shadow:none}
.nav-item.active .nav-icon{color:#896032}.bottom-nav{background:rgba(242,247,250,.89);border-color:rgba(164,122,66,.26);box-shadow:0 -5px 22px #00000022;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.input,.select,input,select,textarea{background:rgba(0,0,0,.18);color:#243441;border-color:rgba(244,240,228,.25)}
select option,select optgroup{background:#f4f7f9;color:#243441}.input::placeholder,textarea::placeholder{color:#687a86}
.overlay{background:rgba(0,0,0,.55)}.modal,.modal-head{background:#f1f5f8;color:#243441}.modal{border-color:rgba(164,122,66,.36)}
.progress>span{background:linear-gradient(90deg,#99703e,#ceb084)}.progress{background:rgba(0,0,0,.25)}
.chart-bar,.chart-bar:nth-child(3n){background:linear-gradient(#be9860,#87613b)}
.toast{background:#000000;color:#243441;border-color:#a47a42}.category-icon{background:rgba(164,122,66,.1);border-color:rgba(164,122,66,.3);box-shadow:none}
.notice{background:rgba(164,122,66,.12);color:#77542e;border-color:rgba(164,122,66,.35)}.notice.warn{background:rgba(144,79,62,.18);color:#914b35}
.donut>span{background:#f1f5f8;color:#243441}.donut strong{color:#79552d}
.paper-note{background:rgba(244,240,228,.08);color:#243441;border:1px solid rgba(244,240,228,.2)}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #896032;outline-offset:3px}
::selection{background:#a47a42;color:#000000}

/* v1.0.1 — low-saturation lavender mist, secondary to navy and golden olive. */
:root{--mist:#bbb7ca;--mist-light:#d3cfdf;}
body{background-image:radial-gradient(ellipse at 88% 9%,rgba(187,183,202,.16),transparent 48%),radial-gradient(ellipse at 10% 48%,rgba(154,151,176,.10),transparent 47%),radial-gradient(ellipse at 15% 5%,rgba(94,139,167,.23),transparent 52%),radial-gradient(ellipse at 95% 75%,rgba(164,122,66,.09),transparent 50%),linear-gradient(155deg,#e8eff4,#d9e4ec);}
.hero-main{background:radial-gradient(ellipse at 90% 0%,rgba(211,207,223,.16),transparent 65%),linear-gradient(135deg,rgba(247,250,252,.40),rgba(215,230,240,.64));border-color:rgba(187,183,202,.38);box-shadow:inset 0 1px 0 rgba(211,207,223,.14),0 5px 18px #00000014;}
.small-stat{background:linear-gradient(135deg,rgba(187,183,202,.17),rgba(227,234,243,.42) 60%,rgba(215,230,240,.62));border-color:rgba(187,183,202,.32);}
.summary-tile.blue-summary{background:linear-gradient(140deg,rgba(187,183,202,.15),rgba(187,183,202,.055));border-color:rgba(187,183,202,.25);}
.summary-tile.blue-summary .caption{color:#716b82;}
.transaction:nth-child(3n){background:linear-gradient(130deg,rgba(187,183,202,.12),rgba(222,234,242,.58));border-color:rgba(187,183,202,.23);}
.product-card:nth-child(2n),.book-tile:nth-child(2n){background:linear-gradient(135deg,rgba(187,183,202,.12),rgba(222,234,242,.58));}
.chart-bar:nth-child(3n){background:linear-gradient(#b8b4c8,#747b94);}
.product-detail-hero{border-color:rgba(187,183,202,.3);}
.paper-note{background:linear-gradient(125deg,rgba(211,207,223,.13),rgba(244,240,228,.06));border-color:rgba(187,183,202,.3);}

/* v1.0.2 — visible mist-lavender panels and voice controls. */
.small-stat[data-photo-card="items"]{background:linear-gradient(135deg,rgba(199,192,215,.55),rgba(157,151,178,.38) 58%,rgba(213,209,225,.55));border-color:rgba(211,204,228,.55);box-shadow:inset 0 1px 0 rgba(244,240,228,.2),0 5px 18px #00000014;}
.small-stat[data-photo-card="items"] .label{color:#514b63;}
.button.soft[data-action="open-voice"]{background:linear-gradient(135deg,rgba(205,198,222,.68),rgba(170,162,193,.55));border-color:rgba(220,214,234,.65);color:#343144;box-shadow:inset 0 1px 0 rgba(244,240,228,.22);}
.button.soft[data-action="open-voice"]:hover{background:linear-gradient(135deg,rgba(215,208,230,.76),rgba(181,173,202,.65));}
.voice-ledger-box{padding:12px;border-radius:14px;background:linear-gradient(145deg,rgba(187,179,208,.16),rgba(187,179,208,.07));border:1px solid rgba(211,204,228,.28);}
.voice-status,#voice-transcript{background:rgba(187,179,208,.12);border-color:rgba(211,204,228,.35);color:#243441;}
.voice-recorder-controls .button:not(.recording),.voice-parse-button{background:linear-gradient(135deg,#c5bfd5,#a6a0bb);border-color:#d5cfe3;color:#172438;}
.summary-tile.blue-summary{background:linear-gradient(140deg,rgba(187,179,208,.29),rgba(187,179,208,.13));border-color:rgba(211,204,228,.35);}

/* v1.0.3: compact Android/Huawei layout; deterministic SVG controls. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
.ui-symbol{display:block;width:21px;height:21px;flex:0 0 auto;}
.brandmark .ui-symbol{width:27px;height:27px;}
.topbar .eyebrow{display:flex;flex-direction:column;gap:3px;letter-spacing:1.3px;line-height:1.25;}
.topbar .build-version{font-size:11px;letter-spacing:.5px;white-space:nowrap;color:#716b82;}
.ledger-entry-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.ledger-entry-actions>.button{min-width:0;white-space:nowrap;gap:5px;}
.hero-main .eyebrow{display:flex;flex-wrap:wrap;column-gap:8px;row-gap:4px;letter-spacing:.5px;line-height:1.4;}
.hero-period,.hero-caption{white-space:nowrap;}
@media(max-width:759px){
 body,.topbar,.main,.modal,.button,.input,.select,.nav-item,.page-heading h1,.section-row h2,.top-title strong,.month-row strong,.book-title,.small-stat .label{font-family:Arial,"HarmonyOS Sans SC","Huawei Sans","Noto Sans CJK SC","PingFang SC","Microsoft YaHei",sans-serif;}
 .topbar{display:grid;grid-template-columns:34px minmax(0,1fr) 44px 38px;column-gap:8px;min-height:86px;height:auto;padding:10px 12px;border-bottom-width:1px;}
 .topbar .brandmark{width:34px;height:38px;min-width:0;border-radius:10px;transform:none;}
 .topbar .top-title{display:flex;flex-direction:column;gap:3px;min-width:0;}
 .topbar .eyebrow{font-size:8px;letter-spacing:1px;margin:0;white-space:normal;}
 .topbar .brand-en{white-space:nowrap;}
 .topbar .top-title strong{font-size:21px;line-height:1.3;letter-spacing:1px;}
 .topbar .icon-btn{width:38px;min-width:0;min-height:40px;height:40px;padding:0;border-radius:12px;}
 .topbar #header-archive{width:44px;font-size:13px;white-space:nowrap;}
 .main{padding:18px 12px calc(100px + env(safe-area-inset-bottom,0px));}
 .page-heading{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin-bottom:13px;}
 .page-heading h1{font-size:23px;line-height:1.3;letter-spacing:.2px;}
 .subheading{font-size:12px;line-height:1.5;margin-top:5px;}
 .page-heading>.book-filter{width:100%;min-width:0;margin:0;}
 .book-filter-trigger{width:100%;min-height:38px;padding:7px 11px;font-size:13px;line-height:1.4;border-radius:11px;}
 .hero{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:9px;}
 .hero>.card{margin-bottom:12px;min-width:0;padding:13px 11px;border-radius:16px;}
 .hero-main .eyebrow{font-size:11px;letter-spacing:0;}
 .hero-main .big-amount{font-size:32px;line-height:1.2;letter-spacing:0;margin:13px 0 8px;}
 .hero-sum{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 8px;font-size:11px;line-height:1.5;margin-top:10px;padding-top:9px;}
 .hero-sum>span{white-space:nowrap;}
 .small-stat{gap:9px;}
 .small-stat .label{font-size:12px;line-height:1.5;white-space:nowrap;}
 .small-stat .number{font-size:37px;line-height:1.15;}
 .quick-actions.ledger-entry-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 17px;}
 .quick-actions.ledger-entry-actions>.button{font-family:inherit;min-height:44px;padding:9px 3px;font-size:12px;line-height:1.3;letter-spacing:0;gap:4px;white-space:nowrap;border-radius:12px;}
 .ledger-entry-actions .ui-symbol{width:16px;height:16px;}
 body>.bottom-nav{min-height:65px;padding:6px 10px calc(7px + env(safe-area-inset-bottom,0px));}
 .bottom-nav .nav-item{min-height:50px;padding:5px 1px;font-size:11px;gap:4px;line-height:1.3;}
 .bottom-nav .nav-icon,.bottom-nav .ui-symbol{width:23px;height:23px;font-size:23px;line-height:1;}
 .modal-head h2{font-size:18px;}
}
@media(max-width:340px){
 .topbar{grid-template-columns:30px minmax(0,1fr) 42px 36px;column-gap:6px;padding-left:10px;padding-right:10px;}
 .topbar .brandmark{width:30px;height:34px;}
 .topbar .top-title strong{font-size:19px;}
 .topbar .eyebrow{font-size:7px;letter-spacing:.6px;}
 .topbar .build-version{font-size:10px;}
 .main{padding-left:10px;padding-right:10px;}
 .hero>.card{padding:12px 9px;}
 .small-stat .label{font-size:11px;}
 .quick-actions.ledger-entry-actions>.button{font-size:11px;gap:3px;}
 .ledger-entry-actions .ui-symbol{width:14px;height:14px;}
}

/* v1.0.4: shorter first screen and persistent personal edition label. */
.dad-edition-label{display:block!important;color:#716b82;font-size:12px;line-height:1.4;letter-spacing:.7px;white-space:nowrap;}
.app-update-notice{top:auto!important;bottom:calc(76px + env(safe-area-inset-bottom,0px));display:grid!important;grid-template-columns:minmax(0,1fr) auto 28px;gap:8px;max-width:340px;padding:8px 10px;font-size:12px;line-height:1.3;background:#f1f5f8;flex-wrap:nowrap!important;}
.app-update-notice>.button{min-height:32px;padding:6px 12px;font-size:12px;white-space:nowrap;}
.app-update-notice>.icon-btn{width:28px;min-width:28px;height:28px;min-height:28px;font-size:18px;}
@media(max-width:759px){
 .topbar{min-height:64px;padding-top:8px;padding-bottom:8px;}
 .topbar .top-title{gap:3px;}
 .topbar .top-title strong{font-size:20px;line-height:1.25;}
 .topbar .dad-edition-label{display:block!important;font-size:11px;line-height:1.4;}
 .main{padding-top:12px;}
 .details-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(136px,1.15fr);align-items:center;gap:9px;margin-bottom:11px;}
 .details-heading h1{font-size:20px;white-space:nowrap;}
 .details-heading>.book-filter{margin:0;width:100%;}
 .details-heading .book-filter-trigger{min-height:36px;padding:6px 9px;font-size:12px;}
 .hero>.card{padding:10px 10px;margin-bottom:9px;}
 .hero-main .eyebrow{font-size:10px;gap:4px 7px;margin-bottom:0;}
 .hero-main .big-amount{font-size:29px;margin:8px 0 5px;line-height:1.15;}
 .hero-main .money-secondary:empty{display:none;}
 .hero-sum{margin-top:7px;padding-top:7px;font-size:11px;gap:3px 6px;}
 .small-stat{gap:5px;}
 .small-stat .number{font-size:31px;line-height:1.1;}
 .small-stat .label{font-size:11px;line-height:1.35;}
 .quick-actions.ledger-entry-actions{margin-bottom:10px;}
 .quick-actions.ledger-entry-actions>.button{min-height:40px;padding-top:7px;padding-bottom:7px;}
 .section-row{margin-top:13px;margin-bottom:8px;gap:6px;}
 .section-row h2{font-size:18px;}
 .tabs{padding:3px;}.tab{padding:7px 9px;font-size:12px;min-height:32px;}
 .month-row{margin-top:9px;margin-bottom:10px;gap:6px;}
 .month-row strong{font-size:18px;letter-spacing:0;}
 body>.bottom-nav{min-height:58px;padding-top:4px;padding-bottom:calc(5px + env(safe-area-inset-bottom,0px));}
 .bottom-nav .nav-item{min-height:45px;padding:3px 1px;}
}

/* v1.0.5: airy grey-blue surfaces and warm golden-brown accents. */
:root{--ink:#243441;--muted:#60717d;--cream:#e5edf2;--paper:#f4f7f9;--white:#fffdf7;--yellow:#a47a42;--pink:#a47a42;--jewel-teal:#a47a42;--jewel-red:#a47a42;}
html{background:#e5edf2;}
body{background-color:#e5edf2;}
.brandmark{background:#f8f4ed;color:#896032;}
.input,.select,input,select,textarea{background:rgba(255,255,255,.7);border-color:#b8c7d1;color:#243441;}
.book-filter-trigger,.book-filter-options,.card-photo-popover{background:#f1f6f9;color:#243441;}
.bottom-nav .nav-item{color:#60717d;}
.bottom-nav .nav-item.active{color:#79552d;background:#eadfcd;}
.nav-item.active .nav-icon{color:#896032;}
.button.primary,.button.pink{background:linear-gradient(135deg,#d7ba8d,#bf985f);color:#302317;border-color:#b18b55;}
.button.soft{background:#eee3d2;color:#79552d;}
.button.soft[data-action="open-voice"]{background:linear-gradient(135deg,#e1ddea,#cfc9df);color:#494159;border-color:#b5acc8;}
.small-stat[data-photo-card="items"]{background:linear-gradient(135deg,#e8e4ef,#d7d4e3);border-color:#bab4ca;}
.small-stat[data-photo-card="items"] .label,.small-stat[data-photo-card="items"] .number{color:#494159;}
.hero-sum{border-color:rgba(133,154,169,.35);}
.hero-main::before{background:#ad8753;box-shadow:0 0 0 2px #ad87531a;}
.modal,.modal-head{background:#f1f5f8;}
.overlay{background:rgba(27,42,55,.32);}
.toast{background:#243441;color:#fffdf7;}
.progress{background:#d7e1e8;}
.product-detail-hero .product-photo-control{color:#243441!important;background:rgba(255,255,255,.7)!important;}
::selection{background:#d7ba8d;color:#302317;}
