.real-money { display: grid; grid-template-columns: minmax(0, 1fr) 126px; align-items: start; gap: 14px; }
.real-money-actions { display: grid; gap: 7px; }
.real-money-actions button { width: 100%; min-width: 0; min-height: 42px; height: auto; margin: 0; padding: 7px 9px; }
.real-money-summary { min-width: 0; }
.real-money-total { display: grid; gap: 2px; margin-top: 12px !important; padding-top: 10px; border-top: 1px solid var(--line); }
.real-money-total b { color: var(--ink); font-size: 15px; }
.real-money-total span { display: block; }
.wallet-money { margin-bottom: 10px; }
.wallet-stats { margin-bottom: 16px; }
.tabbar button { justify-content: center; }
.tabbar button span { font-size: 11px; font-weight: 800; }
.tabbar button b { display: none; }
.phone-frame { --tc-tabbar-height: 65px; }
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 30; min-height: var(--tc-tabbar-height); padding-bottom: max(8px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.content { padding-bottom: calc(var(--tc-tabbar-height) + env(safe-area-inset-bottom)); }
.tc-install-pwa { top: auto !important; bottom: 90px !important; }
.app-shell ~ .tc-install-pwa { display: none !important; }
.date, .page-heading > p:last-child { font-size: 15px; }
.eyebrow { font-size: 12px; }
.real-family { font-size: 14px; }
.real-now p, .real-money p { font-size: 13px; line-height: 1.45; }
.tool-card b, .more-tools button, .real-row b, .real-row strong { font-size: 14px; }
.tool-card span, .real-row small, .stats span, .stats small, .sync-queue { font-size: 11px; line-height: 1.45; }
.readiness div { font-size: 12px; }
.tc-form label { font-size: 11px; }
.tc-form input, .tc-form select, .tc-form textarea { font-size: 15px; }
.action-btn, .tc-form button { font-size: 13px; }
.sos-live button { background: #fff !important; color: #181510 !important; border: 1px solid #fff !important; opacity: 1 !important; font-weight: 850; }
.sos-live button:hover, .sos-live button:focus { background: #f7f4ec !important; color: #181510 !important; }
.settings-install-pwa { width: 100%; background: #168354 !important; color: #fff !important; margin-bottom: 4px; }
.brand > span { flex: 0 0 34px; }
.brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex: 0 0 42px; width: 42px; height: 42px; }
.connection { flex: 0 0 auto; }
.home-events { display: grid; gap: 8px; }
.home-event { min-height: 82px; border: 1px solid var(--line); border-radius: 18px; padding: 14px 15px; display: flex; align-items: center; gap: 12px; background: #fff; }
.home-event > div { flex: 1; min-width: 0; }
.home-event > .home-event-actions { flex: none; display: grid; gap: 6px; }
.home-event h2 { margin: 5px 0 3px; font-size: 17px; line-height: 1.2; }
.home-event p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.home-event a, .home-event > button { flex: none; min-height: 42px; display: inline-flex; align-items: center; padding: 0 12px; border: 0; border-radius: 12px; color: inherit; background: var(--bg); text-decoration: none; font-size: 12px; font-weight: 800; }
.home-event-actions a, .home-event-actions button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 0; border-radius: 10px; background: var(--bg); color: var(--ink); font-size: 11px; font-weight: 800; text-decoration: none; }
.home-event.primary { background: var(--dark); color: #fff; border-color: var(--dark); }
.home-event.primary p:last-child { color: #b8b2a6; }
.home-event.primary a, .home-event.primary > button { background: #fff; color: var(--ink); }
.home-event.primary .home-event-actions a, .home-event.primary .home-event-actions button { background: #fff; color: var(--ink); }
.compact-empty { padding: 24px 16px; }
.home-tools .tool-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.family-rooms { border: 1px solid var(--line); border-radius: 18px; padding: 15px; display: grid; gap: 4px; }
.family-rooms header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.family-rooms h2 { font-size: 18px; margin: 4px 0 0; }
.family-rooms header button { min-height: 42px; border: 0; border-radius: 11px; background: var(--bg); padding: 0 12px; font-size: 12px; font-weight: 800; }
.family-room-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.family-room-row span { display: flex; flex-direction: column; min-width: 0; }
.family-room-row b, .family-room-row strong { font-size: 13px; }
.family-room-row small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.family-room-row strong { flex: none; }
.rooms-empty { width: 100%; min-height: 46px; border: 1px dashed #cfc8bb; border-radius: 12px; background: var(--bg); font-weight: 800; }
.form-error { display: block; margin: 0; padding: 10px 12px; border-radius: 11px; color: #8f261e; background: #fde8e5; font-size: 12px; line-height: 1.4; }
.form-error[hidden] { display: none; }
.flight-row { align-items: flex-start; flex-wrap: wrap; }
.flight-row .action-btn { margin-top: 0; }
.tomorrow-plans { display: grid; gap: 10px; margin-top: 24px; }
.tomorrow-plans .section-title { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 0; }
.tomorrow-plans .section-title h2 { margin: 3px 0 0; font-size: 20px; }
.tomorrow-plans .section-title > span { color: var(--muted); font-size: 12px; }
.today-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 8px; margin-top: 16px; }
.today-actions .action-btn { width: 100%; height: 48px; margin: 0; }
.today-actions .secondary { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.form-hint { margin: -2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.plan-row-actions { flex: none !important; display: grid; justify-items: end; gap: 5px; }
.plan-row-actions button { min-height: 30px; border: 0; border-radius: 9px; padding: 0 8px; background: var(--bg); color: var(--ink); font-size: 10px; font-weight: 800; }
.reference-hint { margin: 0; padding: 10px 12px; border-radius: 11px; background: var(--bg); color: var(--muted); font-size: 11px; line-height: 1.4; }
.timezone-badge { display: inline-flex; align-items: center; margin-left: 5px; padding: 3px 7px; border-radius: 99px; background: var(--bg); color: var(--ink); font-size: .8em; font-weight: 850; white-space: nowrap; }
.timezone-inline { display: inline-block; white-space: nowrap; font-weight: 800; }
.home-event.primary .timezone-inline { color: #fff; }
.plan-row > time { flex: 0 0 88px; display: grid; gap: 3px; align-self: flex-start; }
.plan-row > time b { font-size: 14px; }
.plan-row > time span { color: var(--muted); font-size: 9px; font-weight: 750; line-height: 1.25; }
.plan-timezone-hint { margin: -2px 0 0; padding: 9px 11px; border-radius: 10px; background: var(--greenbg); color: var(--green); font-size: 12px; font-weight: 800; line-height: 1.35; }

.tc-modal[data-kind="route-point"] .tc-modal-card { max-height: min(94dvh, 920px); overscroll-behavior: contain; overflow-anchor: none; scrollbar-gutter: stable; }
.route-point-sub { margin-top: -10px; }
.route-point-form { gap: 12px; }
.route-directory-meta { margin: -6px 0 0; color: var(--muted); font-size: 11px; }
.route-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.route-search input { min-width: 0; }
.route-search a { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; padding: 0 12px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 800; text-decoration: none; }
.route-results { display: none; height: min(156px, 22dvh); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 13px; background: #fff; scrollbar-width: thin; }
.route-results.has-results { display: block; }
.tc-form .route-results button { width: 100%; min-height: 49px; height: auto; display: grid; gap: 2px; padding: 9px 11px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); text-align: left; }
.tc-form .route-results button:last-child { border-bottom: 0; }
.route-results button b { font-size: 13px; }
.route-results button span, .route-results > p { color: var(--muted); font-size: 11px; line-height: 1.35; }
.route-results > p { margin: 0; padding: 14px; }
.route-map-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #e4ece4; }
.route-map-wrap svg { display: block; width: 100%; height: auto; max-height: 220px; cursor: crosshair; touch-action: manipulation; }
.route-coordinates { min-height: 34px; display: flex; align-items: center; margin: 0; padding: 7px 11px; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11px; }
.route-fieldset { display: grid; gap: 6px; }
.route-fieldset > span { font-size: 11px; font-weight: 800; }
.route-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tc-form .route-chips button, .tc-form .route-segments button { width: auto; min-width: max-content; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--ink); font-size: 11px; }
.tc-form .route-chips button[aria-pressed="true"], .tc-form .route-segments button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.route-segments { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.tc-form .route-segments button { width: 100%; min-width: 0; }
.route-time-row { align-items: end; }

@media (min-width: 390px) and (max-width: 600px) {
  .content { padding-left: 0; padding-right: 0; }
  .loading-state, .empty-box { font-size: 14px; }
  .empty-box b { font-size: 19px; }
  .date, .eyebrow, .real-now p, .real-money p, .stats span, .stats small { font-size: 14px; }
  .intro-row h1, .section-head h1, .page-heading h1 { font-size: 28px; }
  .real-family, .real-money button, .tool-card b, .more-tools button { font-size: 15px; }
  .tool-card span, .real-row small, .sync-queue { font-size: 13px; line-height: 1.45; }
  .real-row b, .real-row strong, .phrase-card b { font-size: 16px; }
  .status-pill { font-size: 11px; }
  .readiness div { font-size: 14px; }
  .tc-modal h2 { font-size: 25px; }
  .tc-form label { font-size: 13px; }
  .tc-form input, .tc-form select, .tc-form textarea { font-size: 16px; min-height: 48px; }
  .tc-form button, .action-btn, .sos-live button { font-size: 15px; }
  .phone-frame { --tc-tabbar-height: 76px; }
  .tabbar { height: calc(var(--tc-tabbar-height) + env(safe-area-inset-bottom)); }
  .tabbar button span { font-size: 14px; }
  .real-money { grid-template-columns: minmax(0, 1fr) 142px; }
  .real-money-actions button { min-height: 48px; }
  .real-money-total b { font-size: 17px; }
  .route-search a, .route-results button b { font-size: 14px; }
  .route-results button span, .route-coordinates, .route-fieldset > span, .tc-form .route-chips button, .tc-form .route-segments button { font-size: 13px; }
  .plan-row > time { flex-basis: 104px; }
  .plan-row > time b { font-size: 16px; }
  .plan-row > time span { font-size: 11px; }
  .plan-timezone-hint { font-size: 14px; }
}

@media (max-width: 600px) {
  html, body { width: 100%; height: 100%; min-height: 100%; overflow: hidden; overscroll-behavior: none; }
  .app-shell { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100dvh; min-height: 0; padding: 0; overflow: hidden; display: block; }
  .phone-frame { width: 100%; height: 100vh; height: 100dvh; max-height: 100dvh; min-height: 0; border-radius: 0; overflow: hidden; box-shadow: none; }
  .topbar { position: relative; z-index: 31; flex: 0 0 auto; width: 100%; background: #fff; }
  .content { min-height: 0; height: auto; flex: 1 1 auto; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; padding-bottom: calc(var(--tc-tabbar-height) + env(safe-area-inset-bottom) + 12px); }
  .screen { min-height: auto; padding: 20px 16px 24px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; height: calc(var(--tc-tabbar-height) + env(safe-area-inset-bottom)); min-height: var(--tc-tabbar-height); transform: translateZ(0); }
  .tc-install-pwa { position: fixed !important; }
  .tc-modal[data-kind="route-point"] .tc-modal-card { max-height: 96dvh; }
}

.world-clock { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; margin: 7px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.world-clock span { min-width: 0; display: inline-flex; gap: 5px; white-space: nowrap; }
.world-clock b { max-width: 128px; overflow: hidden; color: var(--ink); font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.world-clock time { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 800; }
.world-clock i { color: var(--line); font-style: normal; }
.world-clock small { margin-left: auto; color: var(--muted); font-size: 9px; }

.family-rate-summary { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--greenbg); color: var(--green); text-align: left; }
.family-rate-summary span { font-size: 12px; font-weight: 750; }
.family-rate-summary b { margin-left: auto; font-size: 13px; white-space: nowrap; }
.family-rate-summary small { font-size: 10px; white-space: nowrap; }
.operation-rate-preview { margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--greenbg); color: var(--green); font-size: 12px; font-weight: 750; line-height: 1.4; }
.transaction-row { align-items: flex-start; }
.transaction-amount { flex: none; display: grid; justify-items: end; gap: 6px; }
.transaction-amount button { min-height: 30px; padding: 0 8px; border: 0; border-radius: 9px; background: var(--bg); font-size: 10px; font-weight: 800; }

.tc-busy-bar { position: fixed; z-index: 20020; top: 0; left: 0; right: 0; height: 4px; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity .2s; }
.tc-busy-bar.active { opacity: 1; }
.tc-busy-bar i { position: absolute; inset-block: 0; width: 38%; border-radius: 0 4px 4px 0; background: var(--ink); animation: tc-busy-slide 1.05s ease-in-out infinite; }
@keyframes tc-busy-slide { from { left: -38%; } to { left: 100%; } }
.tc-busy-overlay { position: fixed; z-index: 20000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(24,21,16,.28); }
.tc-busy-overlay[hidden] { display: none; }
.tc-busy-card { width: min(100%, 280px); display: grid; justify-items: center; gap: 11px; padding: 22px 20px; border-radius: 20px; background: #fff; box-shadow: 0 18px 45px rgba(24,21,16,.25); text-align: center; }
.tc-busy-card strong { font-size: 14px; line-height: 1.35; }
.tc-busy-card small { color: var(--muted); font-size: 11px; }
.tc-busy-spinner { width: 38px; height: 38px; border: 4px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: tc-spin .8s linear infinite; }
@keyframes tc-spin { to { transform: rotate(1turn); } }
.tc-busy-card progress { width: 100%; height: 7px; accent-color: var(--ink); }
.tc-busy-card progress[hidden] { display: none; }

.tc-error-banner { position: fixed; z-index: 20010; top: max(12px, env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 24px), 500px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--red); color: #fff; box-shadow: 0 15px 36px rgba(150,34,24,.34); }
.tc-error-banner[hidden] { display: none; }
.tc-error-banner > b { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.2); }
.tc-error-banner > span { flex: 1; min-width: 0; }
.tc-error-banner strong, .tc-error-banner small { display: block; overflow-wrap: anywhere; }
.tc-error-banner strong { font-size: 14px; }
.tc-error-banner small { margin-top: 2px; font-size: 11px; line-height: 1.35; }
.tc-error-banner button { flex: none; min-height: 36px; padding: 0 11px; border: 0; border-radius: 20px; background: #fff; color: var(--red); font-size: 11px; font-weight: 850; }
.tc-error-banner #tc-error-close { width: 34px; padding: 0; background: rgba(255,255,255,.17); color: #fff; font-size: 19px; }

#tc-real-app .tc-page, #tc-real-app .tc-modal-card, #tc-real-app .home-event > div, #tc-real-app .real-row > div, #tc-real-app .tool-card, #tc-real-app .family-room-row span { min-width: 0; }
#tc-real-app p, #tc-real-app small, #tc-real-app a, #tc-real-app h1, #tc-real-app h2, #tc-real-app h3, #tc-real-app b, #tc-real-app strong { overflow-wrap: anywhere; word-break: break-word; }
#tc-real-app input, #tc-real-app textarea, #tc-real-app select { min-width: 0; max-width: 100%; }

@media (min-width: 390px) and (max-width: 600px) {
  .world-clock { font-size: 13px; }
  .world-clock small { font-size: 11px; }
  .family-rate-summary span, .family-rate-summary b { font-size: 14px; }
  .operation-rate-preview { font-size: 14px; }
}

@media (max-width: 430px) {
  .family-rate-summary { align-items: flex-start; flex-wrap: wrap; }
  .family-rate-summary b { margin-left: 0; }
  .family-rate-summary small { margin-left: auto; }
}

@media (max-width: 360px) {
  .real-money { grid-template-columns: minmax(0, 1fr) 116px; gap: 10px; padding: 13px; }
  .real-money-actions button { font-size: 12px; }
  .today-actions { grid-template-columns: 1fr; }
}

@media (display-mode: standalone) and (max-width: 600px) {
  .app-shell, .phone-frame { height: 100dvh; max-height: 100dvh; }
  .tabbar { bottom: 0; }
}

/* Compact app header and first screen */
.app-shell { display: flex; align-items: center; justify-content: center; }
.home-topline { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.real-family.compact { width: auto; max-width: calc(100% - 54px); height: 32px; flex: 0 1 auto; padding: 0 11px; border-radius: 999px; font-size: 12px; }
.real-family.compact b, .real-family.compact span { white-space: nowrap; }
.real-family.compact span:last-child { margin-left: 2px; }
.page-avatar { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 14px; font-weight: 900; }
.page-avatar.small { flex-basis: 38px; width: 38px; height: 38px; font-size: 12px; }
.page-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.home-sync { min-height: 22px; display: flex; align-items: center; gap: 7px; margin: 1px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.sync-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.sync-dot.offline { background: #c28b1b; }
.compact-title { margin-bottom: 10px; }
.compact-title h1 { margin-top: 0; }
.page-head-actions { display: flex; align-items: center; gap: 8px; }
.section-head > .page-avatar, .section-head > .page-head-actions, .page-heading-avatar > .page-avatar { flex: none; }
.page-heading-avatar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

/* Full-label money actions */
.real-money.home-money { padding: 16px; }
.real-money-actions button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; line-height: 1.25; }
.real-money-actions button svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.real-money-actions .expense-action { background: var(--ink); color: #fff; }
.real-money-actions .topup-action { background: var(--bg); color: var(--ink); }
.money-today { margin-top: 11px !important; }
.money-history { grid-column: 1 / -1; width: 100%; min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 0; border-radius: 13px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 850; text-align: left; }
.money-history svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.money-history span { flex: 1; }
.money-history b { font-size: 18px; color: var(--muted); }
.sos-launch { display: flex; align-items: center; justify-content: center; gap: 12px; }
.sos-launch strong { font-size: 19px; letter-spacing: .08em; }
.sos-launch span { font-size: 12px; font-weight: 750; }

/* Places directory */
.places-heading { margin-bottom: 12px; }
.places-search { min-height: 49px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border-radius: 14px; background: var(--bg); }
.places-search > span { color: var(--muted); font-size: 24px; transform: rotate(-15deg); }
.places-search input { flex: 1; height: 45px; border: 0; outline: 0; background: transparent; font-size: 14px; font-weight: 700; }
.places-chips { display: flex; gap: 7px; overflow-x: auto; margin: 10px -16px 0; padding: 0 16px 5px; scrollbar-width: none; }
.places-chips::-webkit-scrollbar { display: none; }
.places-chips button { flex: none; min-height: 39px; padding: 0 13px; border: 1px solid transparent; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 800; }
.places-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.places-count { margin: 4px 0 3px; color: var(--muted); font-size: 11px; font-weight: 750; }
.places-list { margin: 0 -16px; }
.place-card { padding: 15px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.place-open { width: 100%; display: block; padding: 0; border: 0; background: transparent; text-align: left; }
.place-title-row { display: flex; align-items: flex-start; gap: 10px; }
.place-title-row > span:first-child { flex: 1; min-width: 0; display: grid; gap: 3px; }
.place-title-row b { font-size: 16px; line-height: 1.25; }
.place-title-row small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.place-rating { flex: none; min-height: 27px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 8px; background: var(--greenbg); color: var(--green); font-size: 11px; font-weight: 900; white-space: nowrap; }
.place-open > p { margin: 8px 0 0; color: #4b473c; font-size: 12px; font-weight: 650; line-height: 1.45; }
.place-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.place-tags i { display: inline-flex; min-height: 23px; align-items: center; padding: 0 8px; border-radius: 7px; background: var(--bg); color: var(--muted); font-size: 10px; font-style: normal; font-weight: 750; }
.place-photo-strip { display: flex; gap: 7px; overflow-x: auto; margin-top: 10px; }
.place-photo-strip img, .place-photo-strip > span { flex: 0 0 82px; width: 82px; height: 82px; border-radius: 13px; object-fit: cover; background: var(--bg); }
.place-photo-strip > span { display: grid; place-items: center; color: var(--muted); font-weight: 900; }
.place-no-photo { margin-top: 10px; padding: 11px 12px; border: 1px dashed #cec7ba; border-radius: 11px; color: var(--muted); font-size: 10px; font-weight: 700; }
.place-no-photo.detail { margin: 12px 0; font-size: 12px; line-height: 1.45; }
.place-detail-head { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.place-detail-summary { color: #4b473c; font-size: 13px; font-weight: 650; line-height: 1.55; }
.place-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0; }
.place-gallery img { width: 100%; aspect-ratio: 1; border-radius: 13px; object-fit: cover; }
.real-map { width: 100%; height: 245px; display: block; border: 0; border-radius: 16px; background: #e2e8e2; }
.place-map-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.place-map-actions a, .sos-map-link { min-height: 42px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 11px; background: var(--ink); color: #fff; text-decoration: none; text-align: center; font-size: 11px; font-weight: 850; }
.place-facts { display: grid; gap: 1px; overflow: hidden; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--line); }
.place-facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; background: #fff; font-size: 11px; }
.place-facts span { flex: 0 0 84px; color: var(--muted); }
.place-facts b { text-align: right; }
.place-photo-sources { display: grid; gap: 6px; margin-top: 14px; }
.place-photo-sources b { font-size: 12px; }
.place-photo-sources a { color: var(--ink); font-size: 11px; font-weight: 750; }

/* Live SOS map */
.tc-modal[data-kind="sos"] .tc-modal-card { background: #191713; color: #f4f0e7; }
.tc-modal[data-kind="sos"] .tc-modal-close { background: #2d2922; color: #fff; }
.tc-modal[data-kind="sos"] .sub { color: #a29b8e; }
.sos-screen-head h2 { display: flex; align-items: center; gap: 8px; margin-right: 0; }
.sos-live-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; letter-spacing: .08em; }
.sos-live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: sos-blink 1s ease-in-out infinite; }
@keyframes sos-blink { 50% { opacity: .25; } }
.sos-real-map { height: 250px; margin: 8px 0 10px; }
.sos-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border-radius: 14px; background: #39342b; }
.sos-metrics > div { min-height: 70px; display: grid; align-content: center; gap: 4px; padding: 11px 12px; background: #24211b; }
.sos-metrics span { color: #8f897d; font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.sos-metrics b { color: #f4f0e7; font-size: 12px; }
.tc-modal[data-kind="sos"] .sos-live { margin-top: 10px; }
.tc-modal[data-kind="sos"] .sos-live button { width: 100%; min-height: 45px; margin-top: 7px; border-radius: 12px; }
.sos-map-link { margin: 10px 0; background: #fff; color: var(--ink); }
.sos-quick-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 12px 0; }
.sos-quick-contacts a { min-height: 76px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 8px; border: 1px solid #39342b; border-radius: 13px; color: #fff; text-decoration: none; text-align: center; }
.sos-quick-contacts b { color: #ff7669; font-size: 18px; }
.sos-quick-contacts span { color: #aaa397; font-size: 9px; }

@media (min-width: 390px) and (max-width: 600px) {
  .real-family.compact { font-size: 13px; }
  .home-sync, .places-search input { font-size: 14px; }
  .money-history, .real-money-actions button, .place-open > p { font-size: 13px; }
  .place-title-row b { font-size: 18px; }
  .place-title-row small, .place-rating, .places-count { font-size: 12px; }
}

@media (max-width: 360px) {
  .real-family.compact span:last-child { display: none; }
  .real-money.home-money, .wallet-money { grid-template-columns: 1fr; }
  .real-money-actions { grid-template-columns: 1fr; }
  .place-map-actions { grid-template-columns: 1fr; }
}

/* Ticket offer providers */
.ticket-search { margin-bottom: 22px; padding: 15px; border-radius: 17px; background: var(--bg); }
.ticket-search-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.ticket-search-head b { font-size: 12px; }
.ticket-search .tc-form input, .ticket-search .tc-form select { background: #fff; }
.ticket-result-meta { margin: 13px 0 7px; color: var(--muted); font-size: 10px; font-weight: 750; }
.ticket-offers { display: grid; gap: 7px; }
.ticket-offers article { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.ticket-offers article > div { min-width: 0; display: grid; gap: 2px; }
.ticket-offers article b { font-size: 13px; }
.ticket-offers article span, .ticket-offers article small { color: var(--muted); font-size: 10px; }
.ticket-offers article > strong { align-self: center; font-size: 14px; white-space: nowrap; }
.ticket-offers article > a, .ticket-offers article > em { grid-column: 1 / -1; min-height: 37px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none; font-size: 10px; font-style: normal; font-weight: 850; }
.ticket-offers article > em { background: var(--greenbg); color: var(--green); }

/* Prototype-faithful home and bottom navigation */
#page-home { padding: 0 !important; }
.prototype-home { padding: 14px 20px 28px; }
.proto-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }
.proto-top-row { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 6px; }
.proto-family { min-width: 0; height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--greenbg); color: var(--green); font-size: 12px; font-weight: 800; white-space: nowrap; }
.proto-family.alert { background: var(--red); color: #fff; }
.proto-dot { flex: none; width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--green); }
.proto-family.alert .proto-dot { background: #fff; }
.proto-dot.offline { background: #d9a400; }
.prototype-home .page-avatar { flex-basis: 40px; width: 40px; height: 40px; font-size: 16px; }
.proto-sync { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.prototype-home .world-clock { align-items: baseline; gap: 7px; margin: 0 0 12px; font-size: 12px; font-weight: 700; }
.prototype-home .world-clock b, .prototype-home .world-clock time { font-weight: 800; }
.prototype-home .world-clock i { color: var(--line); }
.prototype-home .world-clock small { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 700; }
.proto-home-title { margin: 2px 0 10px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.12; }
.proto-home-title span { color: var(--muted); font-weight: 650; }
.proto-now-card { margin-top: 18px; padding: 20px; border-radius: 24px; background: var(--bg); }
.proto-event + .proto-event { margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.proto-event h2 { margin: 6px 0 2px; font-size: 29px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.proto-event.next h2 { font-size: 24px; }
.proto-event > p:not(.proto-label) { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.45; }
.proto-event-actions { display: flex; gap: 8px; margin-top: 13px; }
.proto-event-actions button, .proto-event-actions a, .proto-primary { min-height: 46px; display: inline-flex; flex: 1; align-items: center; justify-content: center; padding: 0 13px; border: 0; border-radius: 13px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.proto-event-actions a, .proto-primary { background: var(--ink); color: #fff; }
.proto-empty-event { text-align: left; }
.proto-empty-event h2 { margin: 7px 0 3px; font-size: 25px; }
.proto-empty-event > p:not(.proto-label) { margin: 0; color: var(--muted); font-size: 14px; }
.proto-empty-event .proto-primary { width: 100%; margin-top: 14px; }
.proto-sos-live { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 12px 14px; border-radius: 15px; background: var(--red); color: #fff; }
.proto-sos-live b { font-size: 13px; }
.proto-sos-live span { flex: 1; font-size: 11px; }
.proto-sos-live button { height: 36px; padding: 0 11px; border: 0; border-radius: 10px; background: #fff; font-size: 11px; font-weight: 800; }
.proto-money { padding: 20px 0 4px; }
.proto-money-split { display: grid; grid-template-columns: minmax(0, 1fr) 156px; gap: 14px; align-items: start; }
.proto-money-summary { min-width: 0; }
.proto-money-summary h2 { margin: 4px 0 0; font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.proto-money-summary > p:not(.proto-label) { margin: 4px 0 0; color: var(--muted); font-size: 15px; font-weight: 600; line-height: 1.4; }
.proto-money-summary .proto-money-today { margin-top: 8px; font-size: 13px; }
.proto-money-summary .proto-money-total { margin-top: 3px; font-size: 12px; font-weight: 700; }
.proto-money-actions { display: grid; gap: 8px; }
.proto-money-actions button { min-height: 48px; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 0; border-radius: 13px; font-size: 13px; font-weight: 800; line-height: 1.2; text-align: left; }
.proto-money-actions button.expense { background: var(--ink); color: #fff; }
.proto-money-actions button.topup { background: var(--bg); color: var(--ink); }
.proto-money-actions svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.proto-history { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--bg); color: var(--ink2, #4b473c); font-size: 14px; font-weight: 800; text-align: left; }
.proto-history svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .7; }
.proto-history span { flex: 1; }
.proto-history b { color: #b9b3a5; font-size: 18px; }
.proto-section-label { margin-top: 26px; }
.proto-tools { display: grid; grid-template-columns: 1fr 1fr; margin-top: 18px; border-top: 1px solid var(--line); }
.proto-tools button { min-height: 84px; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: #fff; text-align: left; }
.proto-tools button:nth-child(odd) { border-right: 1px solid var(--line); }
.proto-tools b { font-size: 17px; font-weight: 800; }
.proto-tools span { color: var(--muted); font-size: 12px; font-weight: 600; }
.proto-home-card { margin-top: 16px; padding: 16px 18px; border-radius: 20px; background: var(--bg); }
.proto-home-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.proto-home-card header button { border: 0; background: transparent; font-size: 12px; font-weight: 800; }
.proto-flag-row { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; color: #4b473c; font-size: 14px; font-weight: 600; line-height: 1.45; }
.proto-flag-row i { flex: none; width: 24px; height: 16px; margin-top: 3px; border-radius: 3px; }
.proto-flag-row i.red { background: var(--red); }
.proto-flag-row i.yellow { background: #e0a400; }
.proto-flag-row i.green { background: var(--green); }
.proto-rooms { padding: 16px 8px; }
.proto-rooms > .proto-label { padding: 0 10px 4px; }
.proto-num-row { width: 100%; min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.proto-num-row:last-child { border-bottom: 0; }
.proto-num-init { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #fff; font-size: 15px; font-weight: 800; }
.proto-num-row > span:nth-child(2) { flex: 1; min-width: 0; }
.proto-num-row b { display: block; font-size: 15px; }
.proto-num-row small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 700; }
.proto-num-row strong { min-height: 30px; display: flex; align-items: center; padding: 0 10px; border-radius: 999px; background: #fff; font-size: 12px; }
.proto-rooms-empty { width: calc(100% - 20px); min-height: 46px; margin: 8px 10px 0; border: 1px dashed #cfc8ba; border-radius: 12px; background: #fff; font-size: 12px; font-weight: 750; }
.proto-quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.proto-quick-links button { height: 42px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--bg); color: #4b473c; font-size: 13px; font-weight: 700; }
.proto-sos { width: 100%; min-height: 68px; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; border: 0; border-radius: 18px; background: var(--red); color: #fff; }
.proto-sos strong { font-size: 26px; font-weight: 800; letter-spacing: .06em; }
.proto-sos span { opacity: .85; font-size: 12px; font-weight: 600; line-height: 1.35; text-align: left; }

.tabbar.hidden { display: none !important; }
.tabbar { height: auto !important; min-height: 72px; display: flex; gap: 6px; padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
.tabbar button { flex: 1; height: 48px; display: flex; align-items: center; justify-content: center; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; }
.tabbar button span { font-size: inherit; font-weight: inherit; }
.tabbar button.active { background: var(--ink); color: #fff; }
.phone-frame { --tc-tabbar-height: 72px; }

/* Spending details and statistics */
#page-wallet { padding: 0 !important; }
.proto-wallet { min-height: 100%; background: #fff; }
.proto-wallet-head { min-height: 52px; display: flex; align-items: center; gap: 8px; padding: 12px 20px 6px; }
.proto-wallet-head > button:first-child { flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: flex-start; margin-left: -12px; border: 0; background: transparent; font-size: 28px; line-height: 1; }
.proto-wallet-head > b { font-size: 17px; font-weight: 800; }
.proto-wallet-head .stats-link { min-height: 44px; margin-left: auto; padding: 0 14px; border: 0; border-radius: 12px; background: var(--bg); font-size: 14px; font-weight: 750; }
.proto-wallet-hero { padding: 6px 20px 10px; }
.proto-wallet-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 20px 12px; scrollbar-width: none; }
.proto-wallet-chips::-webkit-scrollbar { display: none; }
.proto-wallet-chips button { flex: none; height: 42px; padding: 0 16px; border: 1px solid transparent; border-radius: 999px; background: var(--bg); color: #4b473c; font-size: 14px; font-weight: 700; }
.proto-wallet-chips button.active { background: var(--ink); color: #fff; }
.proto-wallet-pad { padding: 14px 20px 28px; }
.proto-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.proto-stat-grid article { min-width: 0; padding: 14px 16px; border-radius: 16px; background: var(--bg); }
.proto-stat-grid article .proto-label { font-size: 10px; }
.proto-stat-grid article > b { display: block; margin-top: 4px; font-size: 20px; font-weight: 800; }
.proto-stat-grid article > b.forecast { color: var(--green); font-size: 18px; }
.proto-stat-grid article > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 600; }
.proto-wallet-label { margin-top: 26px; }
.proto-bars { margin-top: 12px; }
.proto-bar-row { margin-bottom: 13px; }
.proto-bar-row > div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; }
.proto-bar-row > i { height: 6px; display: block; overflow: hidden; margin-top: 8px; border-radius: 3px; background: var(--bg); }
.proto-bar-row > i > span { height: 100%; display: block; border-radius: inherit; }
.proto-ops-label { padding: 8px 20px 4px; }
.proto-operations { border-top: 1px solid transparent; }
.proto-op { min-height: 65px; display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid var(--line); }
.proto-op > i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.proto-op > span { flex: 1; min-width: 0; }
.proto-op > span b { display: block; font-size: 15px; font-weight: 700; }
.proto-op > span small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
.proto-op > strong { flex: none; font-size: 15px; font-weight: 800; }
.proto-op > strong.positive { color: var(--green); }
.proto-op > button { flex: none; width: 32px; height: 32px; border: 0; border-radius: 9px; background: var(--bg); font-size: 11px; font-weight: 900; }
.proto-empty-list { margin: 10px 20px 20px; padding: 22px 14px; border: 1px dashed #d4cdbf; border-radius: 14px; color: var(--muted); font-size: 13px; font-weight: 700; text-align: center; }
.proto-stat-sum { margin: 5px 0 0; font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.proto-stat-rub { margin: 4px 0 0; color: #4b473c; font-size: 15px; font-weight: 600; }
.proto-day-bars { height: 150px; display: flex; gap: 6px; margin-top: 12px; }
.proto-day-bars button { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; }
.proto-day-bars button > span { flex: 1; min-height: 0; display: flex; align-items: flex-end; }
.proto-day-bars button i { width: 100%; display: block; border-radius: 5px 5px 2px 2px; background: var(--ink); }
.proto-day-bars button.current i { background: var(--red); }
.proto-day-bars button small { margin-top: 6px; color: var(--muted); font-size: 10px; font-weight: 700; text-align: center; }
.proto-top-expenses { overflow: hidden; margin-top: 10px; border-radius: 16px; }
.proto-top-expenses > div { min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.proto-top-expenses > div:last-child { border-bottom: 0; }
.proto-top-expenses i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.proto-top-expenses span { flex: 1; min-width: 0; }
.proto-top-expenses b, .proto-top-expenses small { display: block; }
.proto-top-expenses b { font-size: 14px; }
.proto-top-expenses small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.proto-top-expenses strong { flex: none; font-size: 14px; }

@media (max-width: 600px) {
  .content { padding-bottom: calc(72px + env(safe-area-inset-bottom) + 12px); }
  .tabbar { height: calc(72px + env(safe-area-inset-bottom)) !important; min-height: 72px; }
}

@media (max-width: 370px) {
  .prototype-home, .proto-wallet-pad { padding-left: 16px; padding-right: 16px; }
  .proto-money-split { grid-template-columns: minmax(0, 1fr) 146px; gap: 10px; }
  .proto-money-actions button { padding-left: 8px; padding-right: 8px; font-size: 12px; }
  .proto-home-title { font-size: 27px; }
  .proto-history { font-size: 12px; }
  .proto-wallet-hero { padding-left: 16px; padding-right: 16px; }
}
