/* Quiet controls around one expressive character. Shared app tokens. */
:root {
  --paper:#fffaf3; --ink:#292e2a; --muted:#626d64; --line:#e5e7df;
  --green:#245e4d; --pale-green:#e8f0e8; --coral:#c93d2d;
  --surface:#fff; --canvas:#f1f3ed; --danger:#aa3029;
  --nav-height:76px;
}
* { -webkit-tap-highlight-color:transparent; }
[hidden] { display:none!important; }
html { background:var(--canvas); scroll-behavior:smooth; }
body { margin:0; color:var(--ink); background:var(--canvas); font-size:16px; }
button,input,textarea,select { font:inherit; }
button,a,input,select,textarea,summary { touch-action:manipulation; }
button,a,summary { -webkit-user-select:none; user-select:none; }
button { cursor:pointer; }
button:disabled { cursor:default; opacity:.55; }
button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible { outline:3px solid #176887; outline-offset:3px; }
::selection { color:var(--green); background:#dcebdd; }
input,textarea { caret-color:var(--green); }
input::placeholder,textarea::placeholder { color:#73796e; opacity:1; }
* { scrollbar-width:thin; scrollbar-color:#acb6a6 transparent; }
.icon { flex-shrink:0; }
.app-shell {
  width:min(100%,560px); height:calc(100dvh - var(--nav-height) - env(safe-area-inset-bottom));
  margin:0 auto; padding:20px 24px 12px; border:0; border-radius:0; box-shadow:none;
  background:var(--paper); overflow:hidden;
}
.app-header { margin-bottom:14px; gap:14px; }
.brand-name { font-size:28px; letter-spacing:-.8px; }
.brand-mark { color:var(--coral); }
.brand-caption { color:var(--muted); font-size:9px; letter-spacing:1.2px; }
.header-actions { gap:6px; }
.header-action,.icon-button { min-height:44px; min-width:44px; border-radius:50%; }
.header-action { color:var(--green); background:transparent; }
.header-action:hover { background:var(--pale-green); }
.language-switch { border:0; border-radius:16px; min-height:56px; background:var(--surface); box-shadow:0 2px 12px #293c2605; padding:9px 14px; }
.language-name { font-size:15px; font-weight:600; }
.language-code { font-size:10px; color:#5a4d2d; }
.target-code { color:#81392d; }
.avatar-section,.app-shell[data-has-result="true"] .avatar-section { margin:6px 0; }
.avatar-wrap { max-height:340px; }
.status-copy,.app-shell[data-has-result="true"] .status-copy { margin-bottom:12px; }
.status-copy h1 { font-size:25px; letter-spacing:-.6px; }
.status-copy p { font-size:13px; line-height:1.45; color:var(--muted); }
.talk-button,.app-shell[data-has-result="true"] .talk-button { min-height:58px; font-size:18px; box-shadow:none; background:var(--coral); border-radius:17px; padding:12px 17px; }
.talk-button:hover { background:#b33125; box-shadow:none; transform:none; }
.talk-button:active { transform:scale(.985); box-shadow:none; }
.write-button,.app-shell[data-has-result="true"] .write-button { min-height:44px; font-size:14px; color:#5f685f; margin:3px auto 8px; }
.phrases-button { min-height:62px; background:var(--surface); border:0; padding:11px 14px; border-radius:16px; }
.phrases-button strong { font-size:15px; }
.phrases-button small { font-size:12px; color:var(--muted); }
.phrases-icon { color:#80601f; background:#f4e9cd; }
.demo-label { font-size:10px; letter-spacing:.35px; color:var(--muted); margin:10px 0 0; }
.result-card { border:0; background:var(--surface); padding:15px; box-shadow:none; }
.result-source p { font-size:14px; line-height:1.45; color:var(--muted); }
.translated-text { font-size:25px; line-height:1.35; }
.eyebrow { color:var(--muted); font-size:11px; letter-spacing:.5px; }
.result-actions button { min-height:44px; font-size:14px; }
.audio-note { color:var(--muted); font-size:12px; line-height:1.45; }
.small-icon-button { width:44px; height:44px; }
.app-shell .avatar-wrap { animation:none!important; transform:none; }
.translator-actions { display:flex; align-items:center; justify-content:center; gap:8px; min-height:52px; margin:2px 0 5px; }
.translator-actions .write-button { margin:0; padding:8px 10px; }
.result-open { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:44px; border:0; border-radius:11px; padding:8px 10px; background:var(--pale-green); color:var(--green); font-size:14px; }
.result-open .icon { width:17px; height:17px; }
.translation-panel[open] { position:fixed; z-index:650; inset:auto 0 calc(var(--nav-height) + env(safe-area-inset-bottom)); display:flex; flex-direction:column; width:min(100%,560px); max-height:min(350px,36dvh); padding:0; margin:0 auto; border:0; border-radius:22px 22px 0 0; background:var(--surface); color:var(--ink); box-shadow:0 -10px 35px #203d2526; overflow:hidden; }
.translation-panel-header { flex:none; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 18px 6px 22px; border-bottom:1px solid var(--line); }
.translation-panel-header h2 { font:700 19px/1.3 var(--display); margin:0; }
.translation-panel-header button { display:flex; align-items:center; justify-content:center; gap:7px; min-height:44px; border:0; background:var(--pale-green); border-radius:11px; color:var(--green); padding:8px 10px; font-size:13px; font-weight:600; }
.translation-panel-header button .icon { width:17px; height:17px; }
.translation-panel #result { flex:1 1 auto!important; min-height:0; max-height:none!important; overflow-y:auto; overscroll-behavior:contain; padding:12px 22px 10px; margin:0; border-radius:0; animation:none; }
.translation-panel .result-source { margin:6px 0; padding:0; border-bottom:0; border-top:1px solid var(--line); }
.translation-panel .result-source summary { min-height:44px; padding:12px 0; cursor:pointer; color:var(--green); }
.translation-panel .result-source summary .eyebrow { color:var(--green); letter-spacing:0; font-size:13px; font-weight:600; }
.translation-panel .result-source p { margin:4px 0 0; }
.translation-panel .translated-text { margin:1px 0 8px; font-size:23px; line-height:1.4; }
.translation-panel .translation-row { min-height:22px; }
.translation-panel .small-icon-button { width:44px; height:44px; }
.translation-panel-footer { flex:none; padding:7px 18px; border-top:1px solid var(--line); background:var(--surface); }
.translation-panel-footer button { min-height:44px; font-size:14px; }
.translation-panel .audio-note { margin:4px 0 0; }
.motion-help { color:var(--muted); font-size:13px; line-height:1.5; margin:10px 0; clear:both; }
.motion-preview { display:inline-flex; align-items:center; gap:8px; min-height:46px; padding:10px 14px; background:var(--pale-green); color:var(--green); border:0; border-radius:11px; font-size:14px; }
.motion-preview .icon { width:18px; height:18px; }
.ai-connection { padding:22px 0; border-bottom:1px solid var(--line); }
.ai-connection h3 { margin:0 0 10px; font:700 20px/1.3 var(--display); }
.ai-connection p { color:var(--muted); font-size:14px; line-height:1.5; margin:10px 0; }
.ai-connection-actions { display:flex; flex-wrap:wrap; gap:8px; }
.ai-connection-actions button { flex:1; min-height:46px; padding:10px 12px; background:var(--pale-green); color:var(--green); border:0; border-radius:11px; font-size:13px; font-weight:600; }
.ai-connection-actions #ai-check { background:var(--green); color:#fff; }
.ai-connection details { margin-top:13px; }
.ai-connection summary { min-height:44px; padding:12px 0; font-size:14px; color:var(--green); cursor:pointer; }
.write-meta { display:flex; align-items:start; justify-content:space-between; gap:14px; margin:10px 0 14px; }
.write-meta .write-help { margin:0; }
#write-count { flex:none; font-size:12px; line-height:1.6; color:var(--muted); font-variant-numeric:tabular-nums; }
.large-sheet[open] { justify-content:flex-start; overflow-y:auto; }
.large-sheet .large-header { position:sticky; inset:auto; top:0; min-height:52px; flex:none; background:var(--paper); z-index:1; }
.large-sheet .large-text,.large-sheet .large-source,.large-sheet .large-status,.large-sheet .solid-button { flex-shrink:0; }
.bottom-nav {
  position:fixed; z-index:700; bottom:0; left:50%; transform:translateX(-50%);
  width:min(100%,560px); height:calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding:7px 14px max(7px,env(safe-area-inset-bottom)); display:grid; grid-template-columns:repeat(3,1fr); gap:8px;
  background:var(--paper); border-top:1px solid var(--line);
}
.bottom-nav button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-height:58px; border:0; background:transparent; color:var(--muted); border-radius:14px; font-size:12px; font-weight:600; }
.bottom-nav button .icon { width:23px; height:23px; }
.bottom-nav button[aria-current="page"] { background:var(--pale-green); color:var(--green); }
.bottom-nav button:hover { background:#eef1e9; }
.bottom-nav button:active { transform:scale(.97); }
dialog::backdrop { background:#17281f70; backdrop-filter:blur(3px); }
.sheet { width:min(100%,560px); max-height:calc(92dvh - env(safe-area-inset-top)); padding:12px 24px max(24px,env(safe-area-inset-bottom)); border-radius:26px 26px 0 0; background:var(--paper); bottom:0; }
.sheet-header { gap:15px; margin-bottom:14px; }
.sheet-header h2 { font-size:27px; letter-spacing:-.6px; }
.sheet-header .icon-button { background:var(--pale-green); color:var(--green); border:0; height:44px; width:44px; }
.sheet-header .eyebrow { display:none; }
.sheet-handle { margin-bottom:17px; background:#c8cfc3; }
.sheet-intro { font-size:14px; line-height:1.5; }
.sheet textarea { font-size:16px; border-color:#ccd4c8; }
.category-tabs { flex-wrap:nowrap; overflow-x:auto; padding:3px 2px 10px; margin-bottom:10px; }
.category-tabs button { white-space:nowrap; min-height:44px; font-size:13px; padding:10px 15px; }
.phrase-search { min-height:48px; font-size:16px; border-radius:12px; }
.phrase-item { min-height:78px; border:0; background:var(--surface); padding:16px; }
.phrase-item strong { font-size:15px; }
.phrase-item small { font-size:13px; color:var(--muted); }
.phrase-empty,.write-help,.demo-explainer p { font-size:13px; color:var(--muted); }
.suggestions button { min-height:44px; font-size:13px; }
.solid-button { min-height:50px; font-size:15px; }
.setting-row small { font-size:13px; color:var(--muted); }
.segmented span { font-size:13px; min-height:44px; }
.state-previews button { font-size:13px; }
.large-sheet { width:min(100%,560px); background:var(--paper); }
.large-source { color:var(--muted); }
.large-status { font-size:13px; }
.toast { z-index:2000; bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px); font-size:14px; }
.nearby-sheet[open] {
  inset:0 0 calc(var(--nav-height) + env(safe-area-inset-bottom));
  width:min(100%,560px); height:calc(100dvh - var(--nav-height) - env(safe-area-inset-bottom));
  max-height:calc(100dvh - var(--nav-height) - env(safe-area-inset-bottom)); margin:0 auto;
  border-radius:0; box-shadow:none; padding-top:max(16px,env(safe-area-inset-top));
}
.nearby-sheet .sheet-header h2 { font-size:28px; }
.nearby-sheet .sheet-header [data-close] { display:none; }
.trip-view { width:min(100%,560px); margin:0 auto; height:calc(100dvh - var(--nav-height) - env(safe-area-inset-bottom)); overflow-y:auto; overscroll-behavior:contain; background:var(--paper); padding:27px 24px 22px; }
.trip-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:0 0 25px; }
.trip-header h1 { font:750 32px/1.15 var(--display); letter-spacing:-.8px; margin:5px 0 0; }
.trip-header .icon-button { background:var(--pale-green); color:var(--green); border:0; }
.trip-context { font-size:13px; color:var(--muted); margin:0; }
.trip-expense-preview { background:var(--green); border-radius:20px; color:#fff; padding:22px; margin-bottom:22px; }
.trip-preview-label { display:flex; align-items:center; gap:8px; font-size:14px; }
.trip-preview-label .icon { width:19px; height:19px; }
.trip-preview-amount { display:block; font:700 35px/1.25 var(--display); margin-top:17px; font-variant-numeric:tabular-nums; letter-spacing:-1px; }
.trip-expense-preview p { margin:5px 0 20px; color:#e1ebe3; font-size:14px; }
.trip-expense-preview .primary { background:#fffaf3; color:var(--green); width:100%; justify-content:space-between; }
.trip-button { border:0; background:var(--pale-green); color:var(--green); display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:12px; padding:11px 15px; min-height:46px; text-decoration:none; font-size:14px; line-height:1.4; font-weight:600; }
.trip-button .icon { height:18px; width:18px; }
.trip-button:hover { filter:brightness(.97); }
.trip-button:active { transform:scale(.985); }
.trip-button.primary { background:var(--green); color:#fff; }
.trip-expense-preview .trip-button.primary { background:var(--paper); color:var(--green); flex-direction:row-reverse; }
.trip-button.secondary { background:#edf1e8; color:var(--green); }
.trip-button.danger { background:#faeae5; color:var(--danger); }
.full-width { width:100%; }
.trip-menu { background:var(--surface); border-radius:16px; overflow:hidden; }
.trip-row { display:flex; align-items:center; gap:14px; width:100%; min-height:80px; text-align:left; border:0; background:transparent; padding:16px; color:var(--ink); }
.trip-row+.trip-row { border-top:1px solid var(--line); }
.trip-row>.icon:first-child { color:var(--green); width:23px; height:23px; }
.trip-row>.icon:last-child { color:var(--muted); width:16px; height:16px; }
.trip-row-text { flex:1; min-width:0; }
.trip-row-text strong { display:block; font-size:15px; line-height:1.35; font-weight:650; }
.trip-row-text small { display:block; color:var(--muted); font-size:12px; line-height:1.45; margin-top:4px; }
.trip-row-value { font-size:14px; color:var(--muted); font-variant-numeric:tabular-nums; }
.trip-row:hover { background:#f7f9f3; }
.local-notice { color:var(--muted); font-size:12px; line-height:1.6; text-align:center; margin:24px 8px 0; }
.trip-back { display:flex; align-items:center; gap:6px; min-height:44px; padding:0; margin:-12px 0 14px; background:none; color:var(--green); font-size:14px; border:0; }
.trip-back .icon { width:19px; height:19px; }
.trip-current-stay { margin:0 0 22px; padding:0 2px 20px; border-bottom:1px solid var(--line); }
.trip-current-stay small { color:var(--muted); font-size:13px; }
.trip-current-stay h2 { font:700 22px/1.3 var(--display); margin:6px 0; }
.trip-current-stay p { color:var(--muted); font-size:14px; line-height:1.45; }
.expense-overview { margin:6px 0 20px; }
.expense-overview p { color:var(--muted); font-size:14px; margin:5px 0; }
.expense-total { font:700 38px/1.4 var(--display); letter-spacing:-1px; font-variant-numeric:tabular-nums; }
.expense-overview .expense-over-budget { color:var(--danger); }
.trip-toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:14px 0; }
.trip-toolbar>.trip-button { flex:1 0 auto; }
.expense-date { font-size:14px; color:var(--muted); font-weight:600; margin:22px 0 8px; }
.expense-item { display:flex; align-items:center; gap:12px; text-align:left; width:100%; min-height:76px; background:var(--surface); color:var(--ink); border:0; padding:15px 13px; }
.expense-item+.expense-item { border-top:1px solid var(--line); }
.expense-item:first-of-type { border-radius:14px 14px 0 0; }
.expense-item:last-of-type { border-radius:0 0 14px 14px; }
.expense-item>.icon { width:21px; height:21px; color:var(--green); }
.expense-item-copy { flex:1; min-width:0; }
.expense-item-copy strong { display:block; font-size:15px; line-height:1.4; overflow-wrap:anywhere; }
.expense-item small { display:block; color:var(--muted); font-size:12px; line-height:1.4; margin-top:5px; }
.expense-item-amount { text-align:right; flex-shrink:0; max-width:46%; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.expense-item-amount strong { font-size:15px; }
.trip-filter-caption { color:var(--muted); font-size:13px; }
.trip-empty { text-align:center; padding:38px 12px; }
.trip-empty>.icon { color:var(--green); height:35px; width:35px; margin-bottom:14px; }
.trip-empty h3 { font:650 22px/1.25 var(--display); letter-spacing:-.4px; margin:0 0 10px; }
.trip-empty p { color:var(--muted); font-size:14px; line-height:1.6; max-width:32ch; margin:0 auto; }
.trip-panel form { margin-top:20px; }
.trip-form-fields { display:flex; flex-direction:column; gap:17px; }
.trip-person-field { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:end; gap:10px; margin-bottom:14px; }
.trip-person-field .icon-button { border:0; color:var(--danger); background:#faeae5; min-height:49px; }
.trip-field { display:flex; flex-direction:column; gap:7px; min-width:0; font-size:14px; }
.trip-field>span { font-weight:600; }
.trip-field input,.trip-field select,.trip-field textarea { width:100%; min-height:49px; border:1px solid #cdd5c8; background:var(--surface); color:var(--ink); border-radius:11px; padding:12px; font-size:16px; line-height:1.35; }
.trip-field textarea { resize:vertical; min-height:100px; max-height:240px; }
.trip-field input[type=number] { font-variant-numeric:tabular-nums; }
.trip-field-pair { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
.trip-field-pair input[type=date] { min-width:0; max-width:100%; }
.trip-help { color:var(--muted); font-size:12px; line-height:1.6; margin:9px 0 0; }
.trip-more { border-top:1px solid var(--line); padding-top:4px; }
.trip-more>summary { cursor:pointer; font-size:14px; font-weight:600; color:var(--green); padding:12px 0; min-height:46px; }
.trip-more>.trip-field,.trip-more>.trip-field-pair { margin-bottom:16px; }
.trip-form-actions { display:flex; gap:10px; margin-top:22px; }
.trip-form-actions button { flex:1; }
.trip-form .form-error { margin:16px 0 0; font-size:14px; }
.trip-people-checks { border:0; padding:0; margin:0; }
.trip-people-checks legend { font-size:14px; font-weight:600; margin-bottom:6px; }
.trip-people-checks label { display:flex; gap:10px; align-items:center; min-height:44px; font-size:15px; }
.trip-people-checks input { width:20px; height:20px; accent-color:var(--green); }
.trip-panel-intro { font-size:14px; line-height:1.6; color:var(--muted); margin:16px 0; }
.expense-detail-amount { font:700 34px/1.3 var(--display); font-variant-numeric:tabular-nums; margin:22px 0; }
.trip-facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:15px 20px; font-size:14px; margin:20px 0; }
.trip-facts dt { color:var(--muted); }
.trip-facts dd { margin:0; text-align:right; overflow-wrap:anywhere; }
.trip-action-stack { display:flex; flex-direction:column; gap:10px; margin-top:24px; }
.trip-report { margin-top:20px; }
.trip-report-row { display:flex; justify-content:space-between; gap:15px; font-size:14px; padding:14px 0; border-bottom:1px solid var(--line); }
.trip-report-row strong { font-variant-numeric:tabular-nums; }
.trip-subheading { font:700 21px/1.3 var(--display); margin:26px 0 14px; }
.trip-balance { display:flex; flex-direction:column; gap:6px; padding:16px 0; border-bottom:1px solid var(--line); font-size:14px; }
.trip-balance span { color:var(--green); }
.trip-balance small { font-size:12px; color:var(--muted); }
.trip-saved-item,.trip-entry { padding:20px 0 8px; border-bottom:1px solid var(--line); }
.trip-saved-item h2,.trip-entry h2,.trip-essential h2 { font:700 21px/1.35 var(--display); margin:4px 0 10px; letter-spacing:-.3px; overflow-wrap:anywhere; }
.trip-entry p { font-size:14px; line-height:1.6; }
.trip-item-meta { color:var(--muted); font-size:12px!important; margin:0 0 7px; }
.trip-note { white-space:pre-wrap; color:var(--muted); font-size:14px; line-height:1.6; overflow-wrap:anywhere; }
.trip-address-name { font-size:20px; margin:25px 0 12px; }
.trip-address { font-size:30px; line-height:1.5; overflow-wrap:anywhere; margin:14px 0 20px; }
.trip-section-intro { color:var(--muted); font-size:14px; line-height:1.6; }
.trip-essential { padding:18px 0; border-bottom:1px solid var(--line); }
.trip-essential p { white-space:pre-wrap; font-size:15px; line-height:1.7; overflow-wrap:anywhere; }
.trip-essentials { margin-bottom:23px; }
.trip-file-label { display:block; font-size:14px; font-weight:600; margin:22px 0 10px; }
.trip-file-label input { display:block; font-size:14px; width:100%; margin-top:12px; min-height:44px; }
.trip-file-label input::file-selector-button { border:0; background:var(--pale-green); color:var(--green); border-radius:10px; min-height:44px; padding:10px 12px; margin-right:10px; }
@media(min-width:600px) {
  .app-shell,.trip-view,.nearby-sheet[open] { border-left:1px solid var(--line); border-right:1px solid var(--line); }
  .sheet { border-radius:26px 26px 0 0; }
}
@media(max-width:370px) {
  .app-shell,.trip-view { padding-left:18px; padding-right:18px; }
  .brand-name { font-size:25px; }
  .language-switch { padding:9px 11px; }
  .language-name { font-size:14px; }
  .header-action { width:44px; }
  .trip-view { padding-top:22px; }
  .trip-field-pair { gap:9px; }
  .trip-field input,.trip-field select { padding:11px 8px; }
  .trip-toolbar { gap:6px; }
  .trip-toolbar .trip-button { font-size:13px; padding:11px; }
}
@media(max-height:700px) {
  .app-shell { padding-top:12px; }
  .app-header { margin-bottom:8px; }
  .avatar-wrap { max-height:230px; }
  .status-copy p { display:none; }
  .status-copy h1 { font-size:22px; }
  .talk-button { min-height:52px; }
  .phrases-button small { display:none; }
}
@media(max-height:580px) {
  .app-shell { overflow-y:auto; display:block; }
  .app-shell>main { display:flex; }
  .avatar-section,.app-shell[data-has-result="true"] .avatar-section { flex:none; height:150px; }
  .avatar-wrap { height:150px; }
  .result-card { max-height:none!important; flex:none!important; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; animation:none!important; } }
