:root {
  color-scheme: light; --page:#e8f0f5; --card:#f5fafc; --chip:#d9e6f0; --accent:#7e97a6;
  --accent-deep:#5c7a8c; --text:#37464e; --muted:#7d858a; --divider:rgba(55,70,78,.12);
  --radius:14px; --screen-padding:16px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC",sans-serif;
  background:var(--page); color:var(--text);
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;background:var(--page)}
button,input,textarea,select{font:inherit} button{color:inherit;cursor:pointer} #app{min-height:100dvh}
.sf-icon{display:inline-block;width:1.25em;height:1.25em;flex:0 0 auto;vertical-align:-.2em}.category-symbol{width:1.15em;height:1.15em}
.hidden{visibility:hidden}.danger,.delete-category{color:#e43d49!important}.primary{background:var(--accent-deep)!important;color:#fff!important}
body.busy::after{content:attr(data-busy-message);position:fixed;inset:0;z-index:9999;display:grid;place-items:center;padding:24px;background:rgba(232,240,245,.92);font-weight:700;text-align:center}
.page{width:min(100%,480px);min-height:100dvh;margin:0 auto;padding:max(10px,env(safe-area-inset-top)) var(--screen-padding) calc(36px + env(safe-area-inset-bottom))}
.page.with-tabbar{padding-bottom:calc(92px + env(safe-area-inset-bottom))}.main-title{margin:4px 0 14px;color:var(--text);font-size:28px;line-height:1.2;font-weight:750}
.card,.stat{background:var(--card);border-radius:var(--radius)}

/* Xcode custom tab bar */
.tabbar{position:fixed;z-index:30;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,480px);min-height:calc(58px + env(safe-area-inset-bottom));padding:6px 0 env(safe-area-inset-bottom);display:grid;grid-template-columns:repeat(5,1fr);align-items:start;background:rgba(232,240,245,.96);border-top:1px solid var(--divider);backdrop-filter:blur(18px)}
.tab{min-height:46px;border:0;padding:0;background:transparent;color:#858b90;display:grid;place-items:center;align-content:center;gap:2px;font-size:11px}.tab .sf-icon{width:22px;height:22px}.tab.selected{color:var(--accent-deep);font-weight:650}
.tab.add-tab{place-self:center;width:38px;height:38px;min-height:38px;border-radius:50%;background:var(--accent);color:#fff}.tab.add-tab .sf-icon{width:19px;height:19px;stroke-width:2.4}

/* Navigation */
.page-header{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;min-height:44px;margin-bottom:12px}.page-header h1{margin:0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:650}
.detail-header{display:flex;align-items:center;gap:4px;margin:0 -10px 12px;padding:0 6px}
.nav-text-button,.icon-button{width:44px;height:44px;border:0;padding:0;background:transparent;color:var(--accent-deep)}.nav-text-button .sf-icon{width:24px;height:24px}.back-button{text-align:left}

/* Calendar */
.calendar-title-row{display:flex;align-items:center;justify-content:space-between}.calendar-title-row h1{margin:4px 0;font-size:28px;line-height:1.2;font-weight:750}
.segmented{display:flex;padding:3px;border-radius:999px;background:var(--chip)}.segmented button{border:0;min-width:42px;min-height:32px;padding:5px 10px;border-radius:999px;background:transparent;color:var(--accent-deep);font-size:15px;font-weight:650}.segmented .active{background:var(--accent-deep);color:#fff}
.period-nav{display:grid;grid-template-columns:40px 1fr 40px;align-items:center;margin-top:12px;padding:0 4px}.period-nav h2{text-align:center;margin:0;font-size:20px;font-weight:650}.period-nav button{display:grid;place-items:center;width:40px;height:32px;border:0;padding:0;background:transparent;color:var(--accent)}.period-nav .sf-icon{width:23px;height:23px;stroke-width:2.3}
.period-count{margin:10px 0 12px;text-align:center;color:rgba(55,70,78,.72);font-size:15px}.sticker-box{position:relative;height:210px;overflow:hidden;border:1px solid rgba(126,151,166,.28);border-radius:var(--radius);background:var(--card)}.sticker-empty,.sticker-loading{position:absolute;inset:0;display:grid;place-items:center;color:rgba(55,70,78,.55);font-size:15px}.sticker-loading::before{content:"";width:18px;height:18px;margin:0 auto 34px;border:2px solid rgba(126,151,166,.28);border-top-color:var(--accent-deep);border-radius:50%;animation:stickerLoader .7s linear infinite}
.calendar-grid-wrap{margin-top:12px}.weekday-row,.month-grid{display:grid;grid-template-columns:repeat(7,1fr)}.weekday-row{padding-top:6px;color:var(--muted);text-align:center;font-size:12px;font-weight:500}
.day{min-height:48px;border:0;padding:0;background:transparent;display:grid;place-items:center;align-content:center;gap:2px}.day span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;font-size:15px}.day i{min-height:8px;color:var(--accent-deep);font-size:9px;font-style:normal;letter-spacing:1px}.day.has-record span{color:var(--accent-deep)}.day.today span{background:rgba(126,151,166,.14);font-weight:700}
.year-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.year-grid button{min-height:62px;border:0;border-radius:10px;background:var(--card)}.year-grid b,.year-grid span{display:block}.year-grid b{font-size:16px}.year-grid span{margin-top:5px;color:var(--muted);font-size:11px}

/* Day sheet */
.day-page{overflow:hidden}.day-card{text-align:center}.day-date{display:grid;gap:2px;margin:12px 0}.day-date b{font-size:20px}.day-date span{color:var(--accent);font-size:13px}.day-photo{display:grid;place-items:center;width:min(82vw,340px);aspect-ratio:1;margin:auto;border-radius:14px;object-fit:cover;background:var(--card)}
.day-info{display:block;width:min(82vw,340px);margin:14px auto;padding:16px;border:0;text-align:left}.day-info h2{margin:0 0 7px}.day-info p{margin:5px 0;color:var(--muted)}.icon-line{display:inline-flex;align-items:center;gap:5px}.icon-line .sf-icon{width:17px;height:17px}.dots{display:flex;justify-content:center;gap:6px}.dots i{width:6px;height:6px;border-radius:50%;background:rgba(126,151,166,.35)}.dots .active{background:var(--accent-deep)}

/* Map */
.map-screen{position:fixed;inset:0 0 calc(58px + env(safe-area-inset-bottom));width:min(100%,480px);margin:auto;overflow:hidden}.world-map{position:absolute;inset:0;background:#dce8ee}.world-map .leaflet-control-zoom{margin-bottom:24px}.world-map .leaflet-control-attribution{font-size:8px}.map-library-error{display:grid;height:100%;place-items:center;padding:24px;color:var(--muted);text-align:center}
.map-overlay{position:absolute;z-index:900;left:0;right:0;top:0;padding:max(10px,env(safe-area-inset-top)) 16px 42px;background:linear-gradient(var(--page) 30%,rgba(232,240,245,.68) 72%,transparent);pointer-events:none}.map-overlay h1{margin:4px 0 12px;font-size:28px}.chip-scroll{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;pointer-events:auto}.chip-scroll::-webkit-scrollbar{display:none}.chip{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;border:0;padding:7px 12px;border-radius:999px;background:#fff;color:var(--accent)}.chip.selected{background:var(--accent);color:#000}
.map-place-card{position:absolute;z-index:600;left:16px;right:16px;bottom:26px;min-height:96px;padding:0}.map-place-card>button:first-child{width:100%;min-height:96px;border:0;padding:12px;display:grid;grid-template-columns:72px minmax(0,1fr) 16px;gap:12px;align-items:center;background:transparent;text-align:left}.map-place-card span{min-width:0}.map-place-card b,.map-place-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-place-card small{margin:5px 0;color:var(--muted)}.map-card-close{position:absolute;right:-7px;top:-9px;width:30px;height:30px;border:2px solid #fff;border-radius:50%;background:#6e7d85;color:#fff;font-size:20px;line-height:1}.map-empty{position:absolute;z-index:500;left:50%;bottom:72px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:9px 13px;border-radius:14px;background:rgba(245,250,252,.94);color:var(--text);font-size:12px;line-height:1.45;text-align:center}

/* Places */
.search{height:44px;display:grid;grid-template-columns:25px 1fr 30px;align-items:center;padding:0 11px;border-radius:999px;background:var(--chip);color:var(--muted)}.search .sf-icon{width:18px;height:18px}.search input{min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:14px}.search button{border:0;background:transparent;font-size:20px}
.places-toolbar{display:flex;align-items:center;margin:2px 0 7px}.places-toolbar button{display:grid;place-items:center;width:44px;height:44px;border:0;background:transparent;color:#8e989e;border-radius:14px}.places-toolbar button .sf-icon{width:20px;height:20px}.places-toolbar button.active{background:var(--accent-deep);color:#fff}.places-toolbar span{margin-left:auto;color:var(--muted);font-size:12px}
.filter-panel{padding:10px;margin-bottom:14px}.filter-group{padding:9px;margin-bottom:7px;border-radius:10px;background:#fff}.filter-options{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.mini-chip{border:1px solid transparent;padding:5px 8px;border-radius:999px;background:var(--chip);font-size:13px}.mini-chip.active{border-color:var(--accent);background:rgba(126,151,166,.16)}.filter-actions{display:flex;justify-content:space-between}.filter-actions button{border:0;padding:8px 18px;border-radius:999px;background:var(--chip);color:var(--text)}.filter-actions button.primary{background:var(--accent);color:#000;font-weight:600}
.empty-state{padding:60px 18px 28px;text-align:center;color:var(--muted)}.places-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.place-grid-card{position:relative;aspect-ratio:1;overflow:hidden;border:0;padding:0;border-radius:var(--radius);background:var(--card);text-align:left;box-shadow:0 3px 6px rgba(0,0,0,.08)}.grid-photo{width:100%;height:100%;object-fit:cover}.grid-gradient{position:absolute;inset:42% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.72))}.grid-copy{position:absolute;left:10px;right:10px;bottom:9px;color:#fff}.grid-copy b,.grid-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.grid-copy b{font-size:15px}.grid-copy small{margin-top:3px;font-size:11px}
.country-list details{margin-bottom:15px}.country-list summary{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;padding:10px 4px;background:var(--page);list-style:none}.country-list summary span{display:inline-flex;align-items:center;color:var(--muted);font-size:12px}.country-list summary .sf-icon{width:13px;height:13px}.list-row{width:100%;min-height:96px;padding:6px 12px;border:0;border-bottom:1px solid var(--divider);display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;background:transparent}.list-row:last-child{border-bottom:0}.list-row span{min-width:0}.list-row b,.list-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.list-row small{margin-top:5px;color:var(--muted);font-size:11px}
.place-list{display:grid;gap:12px}.place-row{display:grid;grid-template-columns:72px minmax(0,1fr) 16px;align-items:center;gap:12px;width:100%;min-height:96px;padding:12px;border:0;text-align:left}.place-image{width:72px;aspect-ratio:1;border-radius:10px;object-fit:cover;background:var(--chip)}.photo-placeholder{display:grid;place-items:center;color:var(--muted)}.photo-placeholder .sf-icon{width:30px;height:30px}.place-copy{min-width:0}.place-copy small{display:block;margin:3px 0;color:var(--muted)}.place-meta{color:var(--muted);font-size:13px}.rating{color:#ffc400;letter-spacing:1px;white-space:nowrap}.load-more{display:block;width:100%;min-height:44px;margin:18px 0;border:0;border-radius:999px;background:var(--chip);color:var(--accent-deep);font-weight:650}

/* Profile */
.profile-hero{text-align:center;margin:12px 0 20px}.avatar{position:relative;display:block;width:92px;height:92px;margin:0 auto 10px;padding:0;border:0;background:transparent;color:rgba(126,151,166,.55)}.avatar-media{display:grid;place-items:center;width:92px;height:92px;overflow:hidden;border-radius:50%;background:rgba(126,151,166,.1)}.avatar-media>.sf-icon{width:62px;height:62px;stroke-width:1.65}.avatar-media img{width:100%;height:100%;max-width:none;object-fit:cover}.avatar-edit{position:absolute;right:-1px;bottom:-1px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--accent);color:#fff}.avatar-edit .sf-icon{width:13px;height:13px}.profile-name-row{display:flex;align-items:center;justify-content:center;gap:10px;min-height:34px}.profile-name-row::before{content:"";width:30px;height:30px;flex:0 0 30px}.profile-name-row h1{margin:0;color:#111;font-size:22px}.profile-name-row>a{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border:0;padding:0;background:transparent;color:var(--accent-deep);text-decoration:none}.profile-name-row>a .sf-icon{width:15px;height:15px}.standalone-name-form{margin-top:24px}.standalone-name-form label{display:block;margin:0 0 9px 14px;color:var(--muted);font-size:15px;font-weight:600}.standalone-name-form .card{padding:0 14px;background:#fff}.standalone-name-form input{width:100%;height:50px;border:0;background:transparent;outline:none}.standalone-name-form p{margin:9px 14px 24px;color:var(--muted);font-size:12px}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:20px}.stat{padding:14px 8px;text-align:center}.stat>.sf-icon{width:21px;height:21px;color:var(--accent)}.stat strong{display:block;margin-top:5px;color:#111;font-size:20px}.stat span{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.section{margin-top:20px}.section-title{margin:0 0 12px;color:#111;font-size:17px;font-weight:650}.distribution-card{padding:2px 14px}.distribution-row{display:block;width:100%;padding:12px 0;border:0;border-bottom:1px solid var(--divider);background:transparent;text-align:left}.distribution-row:last-child{border-bottom:0}.distribution-label{display:grid;grid-template-columns:28px minmax(0,1fr) auto 18px;align-items:center;gap:8px;font-size:15px}.distribution-label .sf-icon{width:20px;height:20px}.distribution-label b{color:var(--muted)}.distribution-label i{color:var(--accent);font-size:20px;font-style:normal}.progress-track{display:block;height:6px;margin-top:8px;border-radius:999px;overflow:hidden;background:#dce3e7}.progress-fill{display:block;height:100%;border-radius:inherit;background:var(--accent)}
.country-summary{padding:4px 14px}.country-summary p{display:flex;justify-content:space-between;margin:0;padding:10px 0;border-bottom:1px solid var(--divider)}.country-summary small{color:var(--muted)}.country-summary details summary{display:inline-flex;align-items:center;gap:5px;padding:10px 0;color:var(--accent);font-size:12px;list-style:none}.settings-list{display:grid;gap:12px}.setting-row{width:100%;min-height:58px;border:0;padding:12px 14px;display:flex;align-items:center;justify-content:space-between}.setting-row>span,.setting-row small{display:inline-flex;align-items:center;gap:10px}.setting-row>span .sf-icon{width:22px;height:22px;color:var(--accent)}.setting-row small{color:var(--muted)}.setting-row small .sf-icon{width:13px;height:13px}.setting-row select{max-width:110px;border:0;background:transparent;color:var(--accent-deep)}
.backup-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px}.backup-actions button,.backup-actions label{display:flex;align-items:center;justify-content:center;gap:7px;min-height:44px;border:0;border-radius:10px;background:var(--accent);color:#fff;font-size:14px}.backup-actions .sf-icon{width:17px;height:17px}.backup-note{color:var(--muted);font-size:11px;line-height:1.5}

/* Detail */
.detail-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin:-56px 0 12px;height:44px}.detail-actions button{height:44px;border:0;padding:0 6px;background:transparent;color:var(--accent-deep)}.detail-actions .icon-only{width:38px;padding:0}.detail-actions .sf-icon{width:18px;height:18px}.photo-carousel{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px}.photo-carousel img{flex:0 0 100%;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--radius);scroll-snap-align:center}
.detail-heading{margin-top:18px}.detail-heading h2{margin:0 0 6px;font-size:22px}.detail-heading>div{display:flex;align-items:center;gap:14px;color:var(--muted);font-size:14px}.info-card{display:grid;gap:14px;margin-top:18px;padding:14px}.info-row{display:flex;align-items:flex-start;gap:14px;color:inherit;text-decoration:none}.info-row>.sf-icon{width:18px;height:18px;margin:2px 3px;color:var(--muted)}.info-row span{display:grid;gap:2px;flex:1}.info-row small{color:var(--muted)}.info-row b{font-size:14px;font-weight:400}.address-row>.sf-icon:first-child,.address-row>.sf-icon:last-child{color:var(--accent)}.address-row>.sf-icon:last-child{width:13px;height:13px}
.spending-card{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px;padding:14px}.spending-card>div+div{border-left:1px solid var(--divider);padding-left:14px}.spending-card small,.text-block small{color:var(--muted)}.spending-card p,.text-block p{margin:6px 0 0;white-space:pre-wrap}.text-block{margin-top:18px;padding:14px}.apple-maps-link{display:block;margin-top:14px;color:var(--accent-deep);font-weight:600;text-decoration:none}

/* Native-style add/edit form */
.form-page{padding-top:max(8px,env(safe-area-inset-top))}.form-nav{display:grid;grid-template-columns:84px 1fr 84px;align-items:center;min-height:52px;margin-bottom:16px}.form-nav h1{margin:0;text-align:center;color:#111;font-size:17px}.form-nav button{min-height:42px;border:0;border-radius:999px;background:rgba(245,250,252,.88);color:var(--accent)}.form-nav button:last-child{color:var(--accent-deep)}.form-nav button:disabled{color:rgba(126,151,166,.4)}
.form-page section{margin-bottom:22px}.form-page h2,.category-form h2{margin:0 0 10px;padding-left:16px;color:var(--muted);font-size:16px;font-weight:600}.form-page em{color:#ff3b4b}.photo-picker{display:flex;gap:20px;overflow-x:auto;padding:18px 16px 4px}.photo-tile,.add-photo{position:relative;flex:0 0 116px;width:116px;aspect-ratio:1;border-radius:10px}.photo-tile img{width:100%;height:100%;border-radius:inherit;object-fit:cover}.photo-tile button{position:absolute;z-index:2;right:-16px;top:-16px;width:32px;height:32px;border:0;border-radius:50%;background:#3f474b;color:#fff;font-size:20px}.add-photo{display:grid;place-items:center;align-content:center;gap:5px;border:1px dashed rgba(126,151,166,.45);color:var(--accent);background:var(--chip)}.add-photo .sf-icon{width:26px;height:26px}.add-photo span{font-size:12px}
.category-chips{display:flex;flex-wrap:wrap;gap:8px;padding:14px;border-radius:26px;background:#fff}.category-chips label,.category-chips button{position:relative;display:inline-flex;align-items:center;gap:5px;border:1px solid transparent;border-radius:999px;padding:7px 12px;background:var(--chip)}.category-chips input{position:absolute;opacity:0}.category-chips label:has(input:checked){border-color:var(--accent);color:var(--accent-deep)}
.form-card{padding:0 14px;border-radius:26px;background:#fff}.form-card input,.form-card textarea,.form-card select{width:100%;min-width:0;max-width:100%;border:0;outline:0;padding:13px 0;background:transparent;color:var(--text);resize:vertical}.form-card button{border:0;padding:13px 0;background:transparent;color:#ff3b4b}.form-card a{text-decoration:none}.map-picker-link{display:flex!important;width:100%;max-width:100%;min-width:0;align-items:center;gap:10px;padding:13px 0!important;color:var(--accent-deep)!important;border-bottom:1px solid var(--divider)}.map-picker-link span{flex:1;min-width:0;text-align:left;white-space:normal;overflow-wrap:anywhere;line-height:1.45}.map-picker-link .sf-icon:last-child{width:14px;height:14px}
.form-action-link{display:flex;align-items:center;gap:8px;padding:12px 0;border-top:1px solid var(--divider);color:var(--accent-deep);font-size:14px}.form-action-link .sf-icon{width:17px;height:17px}
.date-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:4px 0}.date-row>span{font-size:16px;font-weight:500}.date-row input[type=date]{flex:0 0 auto;border:0;background:transparent;color:var(--text);font-size:16px;text-align:right;padding:0;min-height:36px}.clear-date{border:0;background:transparent;color:#e43d49;font-size:14px;padding:0;margin-top:6px}
.modal-open{overflow:hidden}.form-dialog-layer{position:fixed;z-index:1000;inset:0;display:grid;place-items:center;padding:16px;background:rgba(35,48,55,.32);backdrop-filter:blur(4px)}.form-dialog-layer[hidden]{display:none}.form-dialog{width:min(100%,448px);max-height:min(78dvh,620px);overflow:auto;border-radius:22px;background:var(--page);color:var(--text);box-shadow:0 18px 60px rgba(34,47,54,.28)}.form-dialog form{padding:0 16px 20px}.form-dialog header{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:72px 1fr 72px;align-items:center;min-height:54px;margin:0 -16px 18px;padding:0 10px;background:rgba(232,240,245,.96);border-bottom:1px solid var(--divider)}.form-dialog header h2{margin:0;padding:0;text-align:center;color:var(--text);font-size:17px}.form-dialog header button{min-height:40px;border:0;background:transparent;color:var(--accent-deep)}.dialog-field{display:grid;gap:8px;margin-bottom:20px}.dialog-field>span,.form-dialog legend{color:var(--muted);font-size:15px;font-weight:600}.dialog-field input{width:100%;height:48px;padding:0 14px;border:0;border-radius:14px;outline:0;background:#fff}.form-dialog fieldset{margin:0;padding:0;border:0}.form-dialog .icon-options{margin-top:10px}.form-dialog .form-message{margin-left:0}
.two-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;border-top:1px solid var(--divider)}.two-cols input+input{border-left:1px solid var(--divider);padding-left:12px}.coordinate-fields input{font-size:13px}.form-hint{margin:0;padding:0 0 12px;color:var(--muted);font-size:11px;line-height:1.4}.form-message{min-height:18px;margin:6px 16px 0;color:var(--muted);font-size:12px}.form-message[data-type="error"]{color:#d03442}.form-message[data-type="success"]{color:#4c7d67}.rating-picker{display:flex;gap:0;align-items:center;justify-content:space-between;padding:8px 14px;background:#fff;border-radius:26px}.rating-picker button{flex:0 0 auto;border:0;background:transparent;padding:0;line-height:1;color:#c4ccd0;font-size:30px}.rating-picker button.on{color:#ffc400}.purchase-row{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(90px,.7fr);gap:8px}.purchase-row>div{border-left:1px solid var(--divider);padding-left:8px}.save-button{width:100%;min-height:48px;border:0;border-radius:999px;background:var(--accent-deep);color:#fff;font-weight:700}.save-button:disabled{opacity:.35}

/* Categories and avatar */
.category-manage{padding:0 14px}.category-manage button{display:flex;justify-content:space-between;width:100%;min-height:58px;align-items:center;border:0;border-bottom:1px solid var(--divider);background:transparent}.category-manage button:last-child{border-bottom:0}.category-manage button>span{display:inline-flex;align-items:center;gap:10px}.category-manage small{color:var(--muted)}.category-form section{margin-bottom:22px}.icon-options{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}.icon-options label{position:relative;display:grid;place-items:center;height:42px;border-radius:10px;background:var(--card)}.icon-options input{position:absolute;opacity:0}.icon-options label:has(input:checked){outline:2px solid var(--accent);background:rgba(126,151,166,.18)}.icon-options .sf-icon{width:20px;height:20px}.category-preview{display:flex;align-items:center;gap:12px;padding:14px}.category-preview small{margin-left:auto;color:var(--muted)}.delete-category{display:flex;align-items:center;justify-content:center;gap:7px;width:100%;margin-top:18px;min-height:48px;border:0;background:transparent}
.avatar-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px;padding:0 20px}.avatar-grid button,.avatar-grid label{display:grid;place-items:center;aspect-ratio:1;overflow:hidden;margin:0;padding:0;border:1px solid rgba(92,122,140,.28);border-radius:50%;background:transparent;color:var(--accent);font-size:38px}.avatar-grid button.selected{border:3px solid var(--accent-deep)}.avatar-grid img{display:block;width:100%;height:100%;max-width:none;object-fit:cover}.custom-avatar-slot{background:var(--chip)!important}.avatar-add-placeholder{display:grid;place-items:center;position:relative;color:var(--accent-deep)}.avatar-add-placeholder .sf-icon{width:34px;height:34px}.avatar-add-placeholder b{position:absolute;right:-10px;bottom:-8px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--accent-deep);color:#fff;font-size:18px;line-height:1}
@media(max-width:360px){.sticker-box{height:190px}.day{min-height:42px}.purchase-row{grid-template-columns:1fr}.purchase-row>div{border-left:0;border-top:1px solid var(--divider);padding-left:0}.form-nav{grid-template-columns:76px 1fr 76px}}
@media(prefers-reduced-motion:no-preference){.uncategorized-row:active,.place-row:active,.place-grid-card:active{transform:scale(.99)}}
@keyframes stickerLoader{to{transform:rotate(360deg)}}

/* Photo carousel dots */
.photo-dots{display:flex;justify-content:center;gap:6px;margin-top:10px}.photo-dots i{width:6px;height:6px;border-radius:50%;background:rgba(126,151,166,.35)}.photo-dots i.active{background:var(--accent-deep)}
.detail-header h1{margin:0 4px;font-size:17px;font-weight:650;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto;min-width:0}.detail-header-buttons{display:flex;align-items:center;gap:6px;flex:0 0 auto}.detail-header-buttons .link-button{color:var(--accent-deep);font-size:15px;padding:0 8px;min-height:32px;background:transparent;border:0}.detail-header-buttons button.icon-only{width:32px;height:32px;display:grid;place-items:center;color:var(--accent-deep);background:transparent;border:0}.detail-header-buttons button.icon-only .sf-icon{width:18px;height:18px}.detail-header-buttons button.icon-only.danger{color:var(--accent)}
.mini-map{height:180px;width:100%;border-radius:var(--radius);overflow:hidden;background:#dce8ee;margin-top:4px}.mini-map .leaflet-control-attribution{font-size:8px}.mini-map-pin-inner{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--accent-deep);color:#fff;font-size:11px;font-weight:600;border:2px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.detail-info-row{display:grid;grid-template-columns:24px 1fr auto;gap:14px;align-items:flex-start;padding:10px 0}.detail-info-row+.detail-info-row{border-top:1px solid var(--divider)}.detail-info-row .sf-icon{width:18px;height:18px;color:var(--accent);margin-top:2px}.detail-info-row>span{display:grid;gap:2px;min-width:0}.detail-info-row small{color:var(--muted);font-size:11px}.detail-info-row b{font-size:15px;font-weight:500;line-height:1.35;overflow-wrap:anywhere}.detail-info-row .open-arrow{width:14px;height:14px;color:var(--accent)}

/* Place search dialog (reuses .form-dialog-layer / .form-dialog) */
.place-search-results,.currency-picker-results{display:flex;flex-direction:column;padding:0 16px}.place-search-result,.currency-option{display:block;width:100%;text-align:left;padding:12px 4px;border:0;background:transparent;color:var(--text);border-bottom:1px solid var(--divider);font-size:16px}.place-search-result b{display:block;font-size:16px;font-weight:500;color:var(--accent-deep)}.place-search-result small{display:block;margin-top:3px;color:var(--muted);font-size:13px}.currency-option b{font-weight:500}.currency-option.active,.place-search-result.active{background:rgba(126,151,166,.1)}.place-search-empty,.currency-picker-empty{padding:30px 16px;text-align:center;color:var(--muted);font-size:13px}
.dialog-bottom-search{display:flex;gap:8px;align-items:center;padding:14px 16px calc(14px + env(safe-area-inset-bottom));background:rgba(232,240,245,.96);border-top:1px solid var(--divider);position:sticky;bottom:0;z-index:3;backdrop-filter:blur(12px)}.dialog-bottom-search .search{flex:1}.dialog-bottom-search .search input{height:42px;border-radius:14px;background:#fff;padding:0 14px;border:0;width:100%;font-size:15px}.dialog-bottom-search .close-btn{width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:14px;background:#fff;color:var(--text);font-size:22px;line-height:1;flex:0 0 42px}
.form-dialog.with-bottom-search{display:flex;flex-direction:column;max-height:min(100dvh,820px)}.form-dialog.with-bottom-search .form-dialog-header{flex:0 0 auto;border-bottom:1px solid var(--divider);position:relative;top:auto;z-index:2;margin:0;background:rgba(232,240,245,.96)}.form-dialog.with-bottom-search .form-dialog-body{flex:1 1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 16px 16px}.form-dialog.with-bottom-search .form-dialog-body .dialog-field{margin-bottom:0;padding:8px 0}
.currency-button{display:inline-flex;align-items:center;gap:5px;border:0;background:transparent;color:var(--accent-deep);font-weight:600;font-size:15px;padding:6px 8px}.currency-button .sf-icon{width:14px;height:14px}

/* Prototype fidelity — matched to the original SwiftUI screens */
:root{--page:#e8f1f7;--card:#f7fbfd;--chip:#dbe8f2;--accent:#86a2b2;--accent-deep:#5f7f91;--text:#374850;--muted:#8a8f93;--divider:rgba(55,72,80,.14);--radius:14px}
html{background:var(--page)}body{min-height:100dvh}.page{padding:max(52px,calc(env(safe-area-inset-top) + 14px)) 16px calc(118px + env(safe-area-inset-bottom))}.page.with-tabbar{padding-bottom:calc(120px + env(safe-area-inset-bottom))}
.main-title{margin:0 0 20px;font-size:34px;line-height:1.1;font-weight:780;letter-spacing:-.5px}

/* Bottom navigation */
.tabbar{min-height:calc(82px + env(safe-area-inset-bottom));padding:8px 0 env(safe-area-inset-bottom);align-items:start;background:rgba(232,241,247,.94);border-top:1px solid rgba(55,72,80,.1);backdrop-filter:blur(22px)}
.tab{min-height:62px;gap:4px;font-size:13px}.tab .sf-icon{width:25px;height:25px}.tab.add-tab{width:52px;height:52px;min-height:52px;margin-top:-2px}.tab.add-tab .sf-icon{width:25px;height:25px}.tab.selected{font-weight:700}

/* Calendar */
.calendar-title-row{min-height:48px}.calendar-title-row h1{margin:0;font-size:32px;line-height:1.1;letter-spacing:-.5px}.segmented{padding:4px}.segmented button{min-width:49px;min-height:38px;padding:6px 14px;font-size:17px}
.period-nav{grid-template-columns:46px 1fr 46px;margin-top:18px;padding:0}.period-nav h2{font-size:24px}.period-nav button{width:46px;height:42px}.period-nav .sf-icon{width:27px;height:27px}
.period-count{margin:10px 0 16px;font-size:17px}.period-count b{font-size:18px}.sticker-box{height:220px;border-color:rgba(126,151,166,.32);background:rgba(248,252,254,.8)}
.calendar-grid-wrap{margin-top:17px}.weekday-row{padding-top:0;font-size:14px}.day{min-height:51px;gap:1px}.day span{width:32px;height:32px;font-size:17px}.day i{min-height:10px;font-size:10px}.year-grid{gap:11px;margin-top:16px}.year-grid button{min-height:76px;border-radius:12px}.year-grid b{font-size:20px}.year-grid span{font-size:13px}

/* Map */
.map-screen{inset:0 0 calc(82px + env(safe-area-inset-bottom))}.map-overlay{padding:max(56px,calc(env(safe-area-inset-top) + 16px)) 16px 58px;background:linear-gradient(var(--page) 35%,rgba(232,241,247,.82) 68%,transparent)}.map-overlay h1{margin:0 0 26px;font-size:34px;line-height:1.1}.chip-scroll{gap:8px}.map-overlay .chip{min-height:44px;padding:9px 16px;font-size:17px;box-shadow:0 1px 3px rgba(40,60,70,.08)}.map-overlay .chip .sf-icon{width:22px;height:22px}.map-overlay .chip.selected{background:var(--accent);color:#111}.place-map-marker-wrap{background:transparent!important;border:0!important}.place-map-marker{display:grid;place-items:center;width:100%;height:100%;border:3px solid #fff;border-radius:50%;background:var(--marker-color);color:#fff;box-shadow:0 2px 7px rgba(20,35,45,.38)}.place-map-marker .sf-icon{width:20px;height:20px;stroke-width:2}.place-marker-label{border:0!important;background:transparent!important;box-shadow:none!important;color:#263239!important;font-weight:750!important;font-size:12px!important;text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff}.place-marker-label::before{display:none}.map-place-card{bottom:20px;border-radius:18px}

/* Places */
.search{height:44px;padding:0 13px;border-radius:999px;background:var(--chip)}.search .sf-icon{width:20px;height:20px}.search input{font-size:15px}.places-toolbar{margin:12px 0 14px;gap:2px}.places-toolbar button{width:44px;height:44px;border-radius:0}.places-toolbar button .sf-icon{width:23px;height:23px}.places-toolbar button.active{background:transparent;color:var(--text)}.places-toolbar button.filter-active{color:#111}.places-toolbar span{font-size:14px}
.filter-panel{padding:12px;margin-bottom:16px;border-radius:18px;background:rgba(248,250,252,.76)}.filter-group{padding:10px 12px;margin-bottom:10px;border-radius:12px}.filter-group-header{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:32px;padding:0;border:0;background:transparent;font-size:16px}.filter-group-header span{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:14px}.filter-group-header .sf-icon{width:16px;height:16px}.filter-options{gap:7px;margin-top:10px}.mini-chip{min-width:66px;padding:7px 12px;font-size:14px}.filter-actions{padding:0}.filter-actions button{min-height:42px;padding:8px 17px;font-size:16px}
.places-grid{gap:14px}.place-grid-card{border-radius:14px;box-shadow:none}.grid-copy{left:11px;right:11px;bottom:10px}.grid-copy b{font-size:17px}.grid-copy small{font-size:13px;line-height:1.2}.grid-meta{display:flex;align-items:flex-end;justify-content:space-between;gap:5px}.grid-meta small{min-width:0;overflow:hidden;text-overflow:ellipsis}.grid-copy .rating{font-size:18px}.grid-gradient{inset:38% 0 0;background:linear-gradient(transparent,rgba(0,0,0,.8))}

/* Profile */
.profile-hero{margin:4px 0 22px}.stats{gap:10px;margin-bottom:24px}.stat{padding:16px 8px;border-radius:14px}.stat strong{font-size:22px}.stat span{font-size:14px}.section{margin-top:24px}.section-title{margin-bottom:14px;font-size:20px}.distribution-card{padding:8px 16px}.distribution-row{padding:10px 0;border-bottom:0}.distribution-label{grid-template-columns:27px minmax(0,1fr) auto;font-size:16px}.distribution-label i{display:none}.distribution-label b{font-size:16px}.progress-track{height:7px;margin-top:8px}.country-summary{padding:2px 16px}.country-summary p{padding:13px 0;font-size:16px}.country-summary small{font-size:14px}.country-expand{display:inline-flex;align-items:center;gap:7px;min-height:42px;margin-top:8px;border:0;background:transparent;color:var(--accent);font-size:15px}.country-expand .sf-icon{width:16px;height:16px}.settings-list{gap:18px}.setting-row{min-height:68px;padding:14px 18px;border-radius:14px;font-size:18px}.setting-row>span .sf-icon{width:24px;height:24px}.setting-row small{font-size:14px}.backup-actions{gap:14px}.backup-actions button,.backup-actions label{min-height:50px;border-radius:999px;font-size:17px}.backup-note{font-size:13px}

/* Add and edit form */
.form-page{padding-top:max(52px,calc(env(safe-area-inset-top) + 14px));padding-bottom:56px}.form-nav{grid-template-columns:72px 1fr 72px;min-height:50px;margin-bottom:42px}.form-nav h1{font-size:18px}.form-nav button{min-height:44px;font-size:17px;background:rgba(250,253,255,.8);box-shadow:0 8px 22px rgba(80,105,120,.08)}
.form-page section{margin-bottom:29px}.form-page .photo-section{margin-bottom:12px}.form-page .photo-section .form-message:empty{display:none}.form-page h2,.category-form h2{margin-bottom:12px;padding-left:17px;font-size:18px}.photo-picker{gap:20px;padding:18px 16px 4px}.photo-tile,.add-photo{flex-basis:116px;width:116px;border-radius:11px}.add-photo{background:rgba(213,228,238,.72);font-size:14px}.add-photo .sf-icon{width:30px;height:30px}.add-photo span{font-size:14px}
.category-chips{gap:9px;padding:18px;border-radius:26px}.category-chips label,.category-chips button{min-height:34px;padding:7px 12px;font-size:15px}.category-chips label:has(input:checked){border-color:transparent;background:var(--chip);color:#111}.category-chips button{border-color:var(--accent);color:var(--accent-deep)}
.form-card{padding:0 18px;border-radius:27px;background:#fff}.form-card input,.form-card textarea{padding:17px 0;font-size:17px}.form-card .form-action-link{gap:12px;padding:16px 0!important;color:var(--accent)!important;font-size:17px}.form-action-link .sf-icon{width:25px;height:25px}.date-row{min-height:59px}.date-row>span{white-space:nowrap;font-size:18px}.form-card .date-row input[type=date]{width:auto;max-width:225px;min-height:42px;padding:0 12px;background:#f1f1f3;border-radius:999px;font-size:17px}.clear-date{width:100%;padding:16px 0!important;margin:0;border-top:1px solid var(--divider)!important;text-align:left;font-size:17px!important}.map-picker-link{min-height:60px;gap:12px;padding:16px 0!important;font-size:17px}.map-picker-link .sf-icon:first-child{width:25px;height:25px}.two-cols input{font-size:17px}.purchase-row{grid-template-columns:minmax(0,1.7fr) minmax(112px,.72fr);min-height:82px}.purchase-row>div{display:flex;flex-direction:column;justify-content:center}.purchase-row textarea{min-height:82px}.purchase-row .currency-button{align-self:flex-end;font-size:16px}
.rating-picker{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;min-height:88px;padding:10px 16px;border-radius:27px}.rating-stars{display:flex;align-items:center;justify-content:space-between}.rating-picker .rating-stars button{display:grid;place-items:center;width:48px;height:56px;padding:0;color:#9b9da0}.rating-picker .rating-stars button .sf-icon{width:35px;height:35px;fill:transparent;stroke-width:1.8;transition:transform .18s ease,color .18s ease,fill .18s ease}.rating-picker .rating-stars button.on{color:#f5b900}.rating-picker .rating-stars button.on .sf-icon{fill:#ffd21c}.rating-value{min-width:46px;color:var(--muted);font-size:13px;text-align:right}.rating-picker input{display:none}@keyframes ratingPop{50%{transform:scale(1.22)}}.rating-picker button.rating-pop .sf-icon{animation:ratingPop .22s ease}

/* Full-height native sheets */
.form-dialog-layer{place-items:end center;padding:0;background:rgba(42,56,63,.32);backdrop-filter:blur(5px)}.form-dialog{width:min(100%,480px);max-height:calc(100dvh - 72px);border-radius:34px 34px 0 0;background:#fff;box-shadow:0 -12px 42px rgba(34,47,54,.13)}.form-dialog.with-bottom-search{height:calc(100dvh - 72px);max-height:none}.form-dialog.with-bottom-search .form-dialog-header,.form-dialog header{grid-template-columns:92px 1fr 92px;min-height:74px;margin:0;padding:0 16px;background:#fff;border:0}.form-dialog header h2{font-size:18px;color:#111}.form-dialog header button{justify-self:start;min-width:66px;min-height:44px;border-radius:999px;background:#fbfdfe;color:var(--accent);font-size:17px;box-shadow:0 10px 28px rgba(63,84,94,.1)}.form-dialog.with-bottom-search .form-dialog-body{padding:0 16px 16px;background:#fff}.place-search-results,.currency-picker-results{padding:0 4px}.place-search-result,.currency-option{padding:14px 8px}.dialog-bottom-search{padding:18px 28px calc(28px + env(safe-area-inset-bottom));background:#fff;border:0}.dialog-bottom-search .search{height:56px;grid-template-columns:28px 1fr;padding:0 18px;background:#fff;box-shadow:0 12px 34px rgba(55,70,78,.13)}.dialog-bottom-search .search input{height:52px;padding:0;background:transparent;font-size:17px}.dialog-bottom-search .close-btn{display:none}

@media(max-width:380px){.page{padding-left:14px;padding-right:14px}.rating-picker{grid-template-columns:1fr}.rating-value{display:none}.rating-picker .rating-stars button{width:44px}.map-overlay .chip{padding:8px 13px}.sticker-box{height:205px}}

/* Final prototype-fit fixes for the add form. */
.purchase-row{grid-template-columns:minmax(0,2.2fr) 100px;gap:0}
.purchase-row .currency-button,.setting-row .currency-button{color:var(--accent-deep)!important}

/* Flow and spacing details from the original iOS recording. */
.country-summary{padding:4px 16px}
.country-row{padding:10px 0}
.country-row+.country-row{border-top:1px solid var(--divider)}
.country-row p{padding:0;border:0}
.country-row .progress-track{display:block;height:6px;margin-top:8px}
.category-manage+.save-button{margin-top:22px}
.clear-filter-inline{width:auto!important;height:auto!important;margin-left:8px!important;padding:4px 0!important;color:var(--accent-deep)!important;font-size:12px!important;white-space:nowrap}

/* Category management: matches the native navigation + editor sheet flow. */
.category-page{padding-top:max(48px,calc(env(safe-area-inset-top) + 10px))}
.category-nav{position:relative;display:grid;grid-template-columns:48px 1fr 48px;align-items:center;min-height:54px;margin:0 0 22px}
.category-nav h1{position:absolute;left:50%;margin:0;transform:translateX(-50%);text-align:center;font-size:18px;color:#111;white-space:nowrap}
.category-nav>button{display:grid;place-items:center;min-width:44px;height:44px;border:0;border-radius:50%;background:rgba(252,253,254,.9);color:var(--accent-deep);box-shadow:0 8px 24px rgba(60,75,84,.08)}
.category-nav>button:first-child{grid-column:1}.category-nav>button:last-child{grid-column:3}.category-nav>button .sf-icon{width:24px;height:24px}.category-nav .category-edit-toggle{position:absolute;left:64px;min-width:64px;border-radius:999px;font-size:16px}.category-nav .category-edit-toggle.editing{min-width:44px;width:44px;background:var(--accent);color:#fff}.category-nav .category-edit-toggle.editing .sf-icon{width:25px;height:25px;stroke-width:2.2}
.category-manage{padding:0 16px;border-radius:22px}.category-manage-row{position:relative}.category-manage-row>button{min-height:62px;padding:0;background:transparent}
.category-manage-row>button>span{font-size:17px}.category-manage-row>button>span .sf-icon{width:21px;height:21px;color:var(--accent)}
.category-manage-row>button small{display:flex;align-items:center;gap:10px;font-size:14px}.category-manage-row>button small .sf-icon{width:14px;height:14px}
.category-manage-row.editing>button:first-child{padding-right:54px;color:var(--accent)}.reorder-handle{position:absolute;z-index:2;right:0;top:9px;display:grid;place-items:center;width:42px!important;min-height:42px!important;border:0!important;background:transparent!important;color:#aab0b4!important;touch-action:none;cursor:grab}.reorder-handle .sf-icon{width:25px;height:25px}.category-manage-row.reordering{z-index:5;background:#fff;box-shadow:0 8px 22px rgba(55,70,78,.2);transform:scale(1.01)}.category-manage-row.reordering .reorder-handle{cursor:grabbing}
.category-help{margin:10px 16px 0;color:var(--muted);font-size:12px;line-height:1.35}
.category-sheet-layer{position:fixed;z-index:1000;inset:0;display:grid;place-items:end center;background:rgba(31,40,45,.28);backdrop-filter:blur(5px)}
.category-sheet{width:min(100%,480px);height:calc(100dvh - 128px);max-height:none;overflow:auto;padding:0 16px calc(34px + env(safe-area-inset-bottom));border-radius:34px 34px 0 0;background:#f5f4f8;box-shadow:0 -15px 44px rgba(35,45,50,.16)}
.category-sheet>header{position:sticky;z-index:3;top:0;display:grid;grid-template-columns:82px 1fr 82px;align-items:center;min-height:72px;margin:0 -16px 18px;padding:0 16px;background:rgba(245,244,248,.96);backdrop-filter:blur(16px)}
.category-sheet>header h1{margin:0;text-align:center;font-size:18px;color:#111}.category-sheet>header button{min-height:44px;border:0;border-radius:999px;background:#fff;color:var(--accent-deep);font-size:16px;box-shadow:0 8px 22px rgba(55,70,78,.08)}.category-sheet>header button:last-child{justify-self:end}
.category-sheet>header button:disabled{opacity:.38;cursor:default}
.category-sheet .form-card{border-radius:24px}.category-sheet section{margin-bottom:25px}.category-sheet h2{margin:0 0 11px;padding-left:16px;color:var(--muted);font-size:16px}
.category-sheet .icon-options{padding:12px;border-radius:22px;background:#fff}.category-sheet .icon-options label{background:#f1f4f7}.category-sheet .category-preview{min-height:58px;border-radius:22px;background:#fff}.category-sheet .delete-category{min-height:52px;margin-top:30px;border-radius:999px;background:#fff!important}

/* Place detail: compact native card rhythm and icon alignment. */
.detail-page{padding-top:max(48px,calc(env(safe-area-inset-top) + 10px));padding-bottom:44px}
.detail-page .detail-header{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:8px;min-height:50px;margin:0 0 16px;padding:0}
.detail-header>button:first-child{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;background:rgba(252,253,254,.9);color:var(--text)}
.detail-header>button:first-child .sf-icon{width:25px;height:25px}.detail-header h1{font-size:17px;color:#111}
.detail-header-buttons{gap:4px}.detail-header-buttons .link-button{min-height:44px;padding:0 13px;border-radius:999px;background:rgba(252,253,254,.9);font-size:16px}.detail-header-buttons button.icon-only{width:44px;height:44px;border-radius:50%;background:rgba(252,253,254,.9)}
.photo-carousel{gap:0;border-radius:14px}.photo-carousel img{aspect-ratio:4/3;border-radius:14px}.photo-dots{margin:9px 0 0}
.detail-heading{margin:18px 0 20px}.detail-heading h2{margin:0 0 7px;font-size:22px;line-height:1.18;color:#111}.detail-heading>div{gap:14px;font-size:14px}.detail-heading .rating{font-size:19px}
.detail-info-card{display:grid;gap:15px;margin:0;padding:17px 16px;border-radius:14px}
.detail-info-row{display:grid;grid-template-columns:24px minmax(0,1fr) 18px;gap:13px;align-items:start;padding:0;color:inherit;text-decoration:none}.detail-info-row+.detail-info-row{border:0}.detail-info-row .sf-icon{width:19px;height:19px;margin-top:2px;color:var(--muted)}.detail-info-row>span{gap:2px}.detail-info-row small{font-size:12px}.detail-info-row b{font-size:15px;font-weight:500;line-height:1.35}.detail-info-row>a{color:inherit}.detail-info-row .sf-icon:last-child{grid-column:3;color:var(--accent)}
.spending-card{gap:16px;margin-top:20px;padding:17px 16px;border-radius:14px}.spending-card>div+div{padding-left:16px}.spending-card small,.text-block small{font-size:13px}.spending-card p,.text-block p{margin-top:7px;font-size:16px;line-height:1.4}
.text-block{margin-top:20px;padding:17px 16px;border-radius:14px}.mini-map{height:160px;margin-top:20px;border-radius:14px}.mini-map-pin-inner{font-size:0}.mini-map-pin-inner::after{content:"";display:block;width:7px;height:7px;border-radius:50%;background:#fff}

/* Keep browser autofill from painting completed fields blue. */
.form-card input,.form-card textarea{background:transparent!important;background-color:transparent!important}.form-card input:-webkit-autofill,.form-card input:-webkit-autofill:hover,.form-card input:-webkit-autofill:focus,.form-card textarea:-webkit-autofill{-webkit-text-fill-color:var(--text)!important;-webkit-box-shadow:0 0 0 1000px #fff inset!important;box-shadow:0 0 0 1000px #fff inset!important;transition:background-color 9999s ease-out 0s}

/* Editing a saved check-in follows the native bottom-sheet flow. */
.edit-sheet-layer{position:fixed;z-index:950;inset:0;display:grid;place-items:end center;background:rgba(31,40,45,.28);backdrop-filter:blur(5px)}
.edit-form-page{width:min(100%,480px);height:calc(100dvh - 64px);min-height:0;overflow:auto;overscroll-behavior:contain;padding-top:0;border-radius:34px 34px 0 0;background:var(--page);box-shadow:0 -15px 44px rgba(35,45,50,.16)}
.edit-form-page .form-nav{position:sticky;z-index:20;top:0;margin:0 -16px 28px;padding:14px 16px 8px;background:rgba(232,240,245,.95);backdrop-filter:blur(18px)}
body:has(.edit-sheet-layer),body.modal-open{overflow:hidden}

/* Native-style destructive confirmation used by details and category management. */
.confirm-layer{position:fixed;z-index:3000;inset:0;display:grid;place-items:center;padding:24px;background:rgba(31,40,45,.28);backdrop-filter:blur(5px)}
.confirm-card{width:min(100%,310px);overflow:hidden;border-radius:22px;background:rgba(250,252,253,.98);text-align:center;box-shadow:0 16px 48px rgba(28,40,47,.22)}
.confirm-card h2{margin:22px 22px 7px;color:#111;font-size:18px}.confirm-card p{margin:0 22px 20px;color:var(--muted);font-size:14px;line-height:1.4;white-space:pre-line}.confirm-card>div{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--divider)}.confirm-card>div.single{grid-template-columns:1fr}
.confirm-card button{min-height:50px;border:0;background:transparent;color:var(--accent-deep);font-size:16px}.confirm-card button+button{border-left:1px solid var(--divider)}.confirm-card .danger{font-weight:650}.confirm-card .accept{font-weight:650;color:var(--accent-deep)}

/* Sticker canvas and controls: physics lives in stickers/scene.js. */
.sticker-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; min-height:0; margin-bottom:6px; }
.sticker-tools:empty { display:none; }
.sticker-tools small { margin-right:auto; color:var(--muted); font-size:12px; }
.sticker-tools button { padding:5px 9px; border:0; border-radius:10px; background:var(--chip); color:var(--accent-deep); font-size:12px; }
.sticker-tools button:disabled { opacity:.65; }
.sticker-box canvas { display:block; width:100%; height:100%; touch-action:none; }
.sticker-static { position:absolute; width:42px; height:42px; padding:0; border:0; background:transparent; transform:translate(-50%,-50%); }
.sticker-static img { width:100%; height:100%; object-fit:contain; border-radius:6px; }
.sticker-accessible-list { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.sticker-accessible-list:focus-within { z-index:2; width:auto; height:auto; max-height:100%; inset:0; padding:8px; overflow:auto; clip-path:none; background:var(--card); }
.sticker-accessible-list button { display:block; margin:4px; padding:6px; }
@media(prefers-reduced-motion:reduce) { .sticker-loading::before { animation:none; } }

/* Phone layout: intrinsic text widths must never stretch a form card. */
.form-card, .form-card > *, .purchase-row > div, .two-cols > * { min-width:0; max-width:100%; }
.form-card .date-row { gap:12px; }
.form-card .date-row input[type=date] { flex:1; min-width:0; width:0; max-width:225px; text-align:right; }
.form-action-link { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.distribution-row.category-stat-row { cursor:default; }
.distribution-row.uncategorized-row .distribution-label { grid-template-columns:27px minmax(0,1fr) auto 20px; }
.category-expand-icon { display:flex; align-items:center; justify-content:center; color:var(--accent-deep); }
.category-expand-icon .sf-icon { width:18px; height:18px; }

.sticker-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 13px; pointer-events: none; }
.place-map-marker{transition:transform .18s ease}.place-map-marker.selected{transform:scale(1.18)}
.search input[type=search]{-webkit-appearance:none;appearance:none}.search input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;display:none}
/* iOS Safari zooms the page when an input under 16px gets focus. */
.search input{font-size:16px}
img[data-photo-id]:not([src]){background:var(--chip)}
/* Add-place categories: four per row, so the 添加 chip sits right after the third default category. */
.category-chips{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:14px}
.category-chips label,.category-chips button{justify-content:center;min-width:0;padding:7px 4px;gap:3px;font-size:14px;white-space:nowrap}
.category-chips label .sf-icon,.category-chips button .sf-icon{flex:0 0 auto;width:15px;height:15px}
.category-chips .chip-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* Map category filters: compact chips so the overlay covers less of the map. */
.map-overlay{padding:max(48px,calc(env(safe-area-inset-top) + 10px)) 16px 28px}
.map-overlay h1{margin:0 0 12px;font-size:28px}
.map-overlay .chip{min-height:32px;padding:5px 11px;gap:4px;font-size:14px;font-weight:500}
.map-overlay .chip .sf-icon{width:16px;height:16px}
.map-overlay .chip-scroll{gap:6px}
