:root {
  --bg: #0b0d10;
  --panel: rgba(255,255,255,.055);
  --panel-strong: rgba(255,255,255,.085);
  --panel-2: rgba(255,255,255,.035);
  --text: #f3f5f7;
  --muted: #9ba3ad;
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.22);
  --accent: #b8ff69;
  --accent-ink: #10150a;
  --danger: #ff887d;
  --shadow: 0 20px 60px rgba(0,0,0,.28);
  --radius: 22px;
  --radius-sm: 14px;
  --shell: 1120px;
}

html[data-theme="light"] {
  --bg: #f4f5f2;
  --panel: rgba(20,26,24,.055);
  --panel-strong: rgba(20,26,24,.09);
  --panel-2: rgba(20,26,24,.035);
  --text: #111512;
  --muted: #667069;
  --line: rgba(20,26,24,.13);
  --line-strong: rgba(20,26,24,.24);
  --accent: #5bd027;
  --accent-ink: #081004;
  --danger: #bb2f28;
  --shadow: 0 20px 60px rgba(25,35,29,.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(124,255,83,.08), transparent 30rem),
    radial-gradient(circle at 85% 6%, rgba(100,150,255,.07), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: .04;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}
.shell { width: min(calc(100% - 32px), var(--shell)); margin-inline: auto; }
.site-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -.03em;
  font-size: 18px;
}
.brand img { width: 28px; height: 28px; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-button, .ghost-button, .footer-links button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  transition: .18s ease;
}
.icon-button { width: 40px; height: 40px; display:grid; place-items:center; }
.ghost-button { padding: 9px 14px; }
.icon-button:hover, .ghost-button:hover, .footer-links button:hover { color: var(--text); border-color: var(--line-strong); background: var(--panel); }
.main-shell { padding-top: 84px; padding-bottom: 110px; }
.hero { max-width: 860px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.eyebrow.small { font-size: 10px; margin-bottom: 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 14px; font-size: clamp(52px, 8vw, 104px); line-height: .92; letter-spacing: -.065em; font-weight: 790; }
h2 { margin-bottom: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1; letter-spacing: -.045em; }
.hero-copy { color: var(--muted); font-size: clamp(17px, 2vw, 21px); margin-bottom: 34px; }

.earthbar { width: 100%; }
.input-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  min-height: 72px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: rgba(0,0,0,.12);
  box-shadow: 0 10px 50px rgba(0,0,0,.12);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
html[data-theme="light"] .input-wrap { background: rgba(255,255,255,.52); }
.input-wrap:focus-within { border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 11%, transparent), var(--shadow); transform: translateY(-1px); }
.prompt-mark { padding-left: 12px; font-size: 30px; color: var(--accent); line-height: 1; }
#earthInput { width: 100%; height: 54px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: clamp(18px, 2.4vw, 25px); letter-spacing: -.02em; }
#earthInput::placeholder { color: color-mix(in srgb, var(--muted) 65%, transparent); }
.ask-button { height: 48px; padding: 0 19px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; }
.ask-button:hover { filter: brightness(1.04); }
.clear-button { border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; padding: 6px 8px; }
.earthbar-meta { min-height: 34px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 10px 4px 0; color: var(--muted); font-size: 12px; }
.example-chip { border: 0; padding: 0; background: transparent; color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.example-chip:hover { color: var(--text); }

.answer-section { margin-top: 34px; }
.answer-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel-strong), var(--panel));
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 42px);
  animation: rise .28s ease both;
}
.answer-shell::after { content:""; position:absolute; right:-120px; top:-130px; width:320px; height:320px; border-radius:50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%); pointer-events:none; }
.answer-kicker { color: var(--muted); font-size: 12px; font-weight: 760; letter-spacing: .13em; margin-bottom: 13px; }
.answer-title { position: relative; z-index: 1; font-size: clamp(40px, 8vw, 86px); letter-spacing: -.06em; line-height: .95; margin: 0; font-weight: 790; }
.answer-title.compact { font-size: clamp(34px, 6vw, 64px); }
.answer-subtitle { position: relative; z-index:1; margin-top: 12px; color: var(--muted); font-size: clamp(15px, 2vw, 19px); }
.answer-grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 12px; margin-top: 26px; }
.answer-cell { border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: rgba(0,0,0,.07); }
html[data-theme="light"] .answer-cell { background: rgba(255,255,255,.35); }
.answer-cell .city-name { font-weight: 760; letter-spacing: -.02em; }
.answer-cell .city-time { font-size: 30px; font-weight: 760; letter-spacing: -.04em; margin-top: 4px; }
.answer-cell .city-date { color: var(--muted); font-size: 13px; }
.answer-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:26px; }
.action-button { border:1px solid var(--line); background:transparent; color:var(--muted); padding:9px 13px; border-radius:999px; cursor:pointer; }
.action-button:hover { color:var(--text); border-color:var(--line-strong); }
.answer-note { margin-top: 18px; color: var(--muted); font-size: 13px; }
.error-title { color: var(--danger); font-size: clamp(28px,4vw,42px); letter-spacing:-.04em; }
.suggestion-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; }

.dashboard { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 74px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.clock-card { padding: clamp(24px,4vw,38px); }
.card-label, .mini-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .15em; }
.big-clock { display: block; margin-top: 8px; font-size: clamp(48px,8vw,82px); line-height:1; font-variant-numeric: tabular-nums; letter-spacing:-.055em; font-weight:760; }
.clock-subline { margin-top:12px; font-size: 16px; }
.clock-zone { color:var(--muted); font-size:13px; margin-top:4px; }
.facts-panel { display:grid; grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; }
.mini-stat { min-height: 115px; display:flex; flex-direction:column; justify-content:space-between; padding:16px; border:1px solid var(--line); border-radius:16px; }
.mini-stat strong { font-size:36px; line-height:1; letter-spacing:-.05em; }
.progress-stat { grid-column: 1 / -1; min-height: 105px; }
.progress-track { width:100%; height:6px; border-radius:999px; background:var(--line); overflow:hidden; }
.progress-fill { height:100%; width:0; background:var(--accent); border-radius:inherit; transition:width .5s ease; }

.saved-section, .syntax-section { margin-top: 92px; }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.saved-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.world-card { position:relative; border:1px solid var(--line); border-radius:18px; background:var(--panel); padding:18px; min-height:155px; }
.world-card .place { font-weight:760; }
.world-card .time { font-size:34px; font-weight:760; letter-spacing:-.045em; font-variant-numeric:tabular-nums; margin-top:14px; }
.world-card .date { color:var(--muted); font-size:12px; }
.remove-place { position:absolute; right:11px; top:10px; border:0; background:transparent; color:var(--muted); cursor:pointer; font-size:20px; opacity:.55; }
.remove-place:hover { opacity:1; color:var(--text); }
.syntax-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.syntax-card { display:flex; justify-content:space-between; align-items:center; gap:20px; min-height:74px; padding:17px 18px; text-align:left; border:1px solid var(--line); border-radius:16px; background:var(--panel); cursor:pointer; }
.syntax-card:hover { border-color:var(--line-strong); background:var(--panel-strong); }
.syntax-card code { color:var(--text); font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size:14px; }
.syntax-card span { color:var(--muted); font-size:12px; white-space:nowrap; }

.site-footer { min-height:110px; display:flex; justify-content:space-between; gap:20px; align-items:center; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.site-footer strong { color:var(--text); }
.footer-links { display:flex; align-items:center; gap:14px; }
.footer-links a { text-decoration:none; }
.footer-links a:hover { color:var(--text); }
.footer-links button { padding:7px 11px; }

.dialog { width:min(560px, calc(100% - 24px)); color:var(--text); background:color-mix(in srgb, var(--bg) 94%, transparent); border:1px solid var(--line-strong); border-radius:22px; padding:0; box-shadow:var(--shadow); backdrop-filter: blur(18px); }
.dialog::backdrop { background:rgba(0,0,0,.56); backdrop-filter:blur(5px); }
.dialog form { padding:28px; position:relative; }
.dialog h2 { margin-bottom:18px; }
.dialog p:not(.eyebrow) { color:var(--muted); }
.dialog-close { position:absolute; right:14px; top:12px; width:38px; height:38px; border-radius:999px; border:1px solid var(--line); background:transparent; color:var(--muted); font-size:22px; cursor:pointer; }
.dialog-input { width:100%; height:52px; border-radius:14px; border:1px solid var(--line-strong); background:var(--panel); color:var(--text); padding:0 15px; outline:none; }
.dialog-input:focus { border-color:var(--accent); }
.city-results { margin-top:10px; max-height:340px; overflow:auto; display:grid; gap:5px; }
.city-result { display:flex; justify-content:space-between; gap:14px; border:0; border-radius:12px; background:transparent; color:var(--text); padding:12px; text-align:left; cursor:pointer; }
.city-result:hover { background:var(--panel-strong); }
.city-result span:last-child { color:var(--muted); font-size:12px; }
kbd { border:1px solid var(--line); background:var(--panel); border-radius:6px; padding:2px 6px; color:var(--text); }
.muted { color:var(--muted); }
.sr-only { position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[hidden] { display:none !important; }
@keyframes rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }

@media (max-width: 860px) {
  .main-shell { padding-top: 54px; }
  .dashboard { grid-template-columns: 1fr; margin-top:56px; }
  .saved-grid { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 620px) {
  .shell { width:min(calc(100% - 22px), var(--shell)); }
  .site-header { height:66px; }
  .main-shell { padding-top:42px; padding-bottom:80px; }
  .hero-copy { margin-bottom:24px; }
  .input-wrap { grid-template-columns:auto 1fr auto; min-height:64px; }
  .ask-button { display:none; }
  #earthInput { font-size:17px; height:48px; }
  .earthbar-meta { overflow:hidden; flex-wrap:nowrap; white-space:nowrap; mask-image:linear-gradient(to right,#000 88%,transparent); }
  .answer-shell { padding:21px; border-radius:18px; }
  .saved-section, .syntax-section { margin-top:64px; }
  .saved-grid, .syntax-grid { grid-template-columns:1fr; }
  .syntax-card { min-height:64px; }
  .section-heading { align-items:center; }
  .site-footer { align-items:flex-start; flex-direction:column; justify-content:center; }
}

/* Version 2 — command history, favorites and denser result utilities */
.command-tools { display:flex; align-items:center; gap:8px; min-height:34px; margin-top:4px; }
.history-strip { display:flex; gap:7px; overflow-x:auto; scrollbar-width:none; flex:1; padding:2px 0; }
.history-strip::-webkit-scrollbar { display:none; }
.history-chip, .tiny-button { border:1px solid var(--line); background:transparent; color:var(--muted); border-radius:999px; cursor:pointer; font:inherit; }
.history-chip { flex:0 0 auto; max-width:250px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 10px; font-size:11px; }
.history-chip:hover, .tiny-button:hover { color:var(--text); border-color:var(--line-strong); }
.tiny-button { padding:6px 10px; font-size:10px; white-space:nowrap; }
.favorites-section { margin-top:34px; }
.compact-heading { margin-bottom:12px; }
.favorites-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.favorite-card { position:relative; border:1px solid var(--line); border-radius:15px; background:var(--panel); overflow:hidden; min-height:68px; }
.favorite-run { width:100%; height:100%; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:4px; border:0; background:transparent; color:var(--text); padding:13px 42px 13px 14px; cursor:pointer; text-align:left; }
.favorite-run span { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.favorite-run small { color:var(--muted); font-size:10px; }
.favorite-card:hover { border-color:var(--line-strong); background:var(--panel-strong); }
.favorite-remove { position:absolute; right:8px; top:50%; transform:translateY(-50%); width:30px; height:30px; border:0; border-radius:50%; background:transparent; color:var(--muted); cursor:pointer; font-size:18px; }
.favorite-remove:hover { color:var(--text); background:var(--panel-strong); }
.detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:24px; }
.detail-grid > div { border:1px solid var(--line); border-radius:14px; padding:13px; min-width:0; }
.detail-grid span { display:block; color:var(--muted); font-size:10px; letter-spacing:.08em; text-transform:uppercase; margin-bottom:5px; }
.detail-grid strong { display:block; font-size:13px; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; overflow-wrap:anywhere; }
.primary-action { color:var(--text); border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); background:color-mix(in srgb,var(--accent) 8%,transparent); }
.link-button { display:inline-flex; align-items:center; text-decoration:none; }
.world-card-main { display:block; width:100%; border:0; background:transparent; color:inherit; padding:0; text-align:left; cursor:pointer; }
.world-card-main:hover .place { color:var(--accent); }
.universal-answer .answer-title { font-variant-numeric:tabular-nums; }
@media (max-width:860px){.favorites-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:620px){.command-tools{margin-top:2px}.history-strip{mask-image:linear-gradient(to right,#000 88%,transparent)}.tiny-button{display:none}.favorites-grid,.detail-grid{grid-template-columns:1fr}.favorites-section{margin-top:26px}}
.lap-list { display:grid; gap:6px; margin-top:18px; max-width:420px; }
.lap-row { display:flex; justify-content:space-between; gap:20px; border-top:1px solid var(--line); padding:8px 2px; color:var(--muted); font-size:12px; }
.lap-row strong { color:var(--text); font-variant-numeric:tabular-nums; }

/* ---------- Autocomplete, pinned answers, transforms ---------- */
.autocomplete-box {
  margin-top: 8px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(18px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.autocomplete-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.autocomplete-item:last-child { border-bottom: 0; }
.autocomplete-item:hover, .autocomplete-item[aria-selected="true"] { background: var(--panel-strong); }
.autocomplete-item small { color: var(--muted); white-space: nowrap; }

.pinned-answers-section { margin-top: 58px; }
.pinned-answers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}
.pinned-answer-card {
  position: relative;
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.pinned-answer-card::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  right: -55px;
  top: -55px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  pointer-events: none;
}
.pin-card-main {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}
.pin-query {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pin-value {
  display: block;
  font-size: clamp(28px,4vw,44px);
  line-height: .98;
  letter-spacing: -.04em;
  font-weight: 780;
}
.pin-detail { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }
.pin-remove {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}
.pin-remove:hover { color: var(--text); border-color: var(--line-strong); }

.result-code {
  margin: 18px 0;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  max-height: 360px;
  overflow: auto;
}
html[data-theme="light"] .result-code { background: rgba(255,255,255,.55); }
.color-swatch {
  width: 100%;
  height: 116px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  margin: 18px 0;
}
.utility-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 12px;
}
.utility-badge::before { content: '●'; color: var(--accent); font-size: 8px; }

@media (max-width: 860px) {
  .pinned-answers-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .pinned-answers-grid { grid-template-columns: 1fr; }
  .autocomplete-item { align-items: flex-start; }
  .autocomplete-item small { white-space: normal; text-align: right; }
}

/* V5 human-language help */
.help-groups{display:grid;gap:18px;margin-top:26px}.help-group{padding-top:16px;border-top:1px solid var(--line)}.help-group:first-child{border-top:0;padding-top:0}.help-group>strong{display:block;margin-bottom:10px;font-size:.82rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* V6 — World Translator */
.world-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
.localize-button{border:1px solid color-mix(in srgb,var(--accent) 62%,var(--line));background:color-mix(in srgb,var(--accent) 14%,var(--panel));color:var(--text);border-radius:999px;padding:10px 15px;font-weight:800;cursor:pointer}
.localize-button:hover{transform:translateY(-1px);border-color:var(--accent)}
.world-translator{margin:14px 0 32px;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px}
.world-translator h2{margin:.15rem 0 .45rem;font-size:clamp(22px,3vw,34px);letter-spacing:-.035em}.world-translator p{margin:0;max-width:760px;color:var(--muted);line-height:1.6}
.world-dialog{width:min(760px,calc(100vw - 28px))}.world-textarea{width:100%;min-height:190px;resize:vertical;background:var(--panel-2);border:1px solid var(--line);border-radius:16px;color:var(--text);padding:16px;font:500 16px/1.55 system-ui,sans-serif;outline:none}.world-textarea:focus{border-color:color-mix(in srgb,var(--accent) 62%,var(--line));box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 10%,transparent)}
.dialog-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}.profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.profile-grid label{display:grid;gap:7px;color:var(--muted);font-size:13px;font-weight:700}.profile-grid .dialog-input{margin:0;width:100%}
.world-answer .answer-title{margin-bottom:4px}.world-output{margin:20px 0;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:18px;background:color-mix(in srgb,var(--accent) 5%,var(--panel-2));overflow:hidden}.world-output-label{padding:10px 14px;border-bottom:1px solid var(--line);font-size:11px;font-weight:900;letter-spacing:.12em;color:var(--accent)}.world-output-text{padding:18px;font-size:clamp(17px,2vw,22px);line-height:1.65;white-space:normal}.world-changes{display:grid;gap:8px;margin:18px 0}.world-change-head{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:13px}.world-change{padding:12px 14px;border:1px solid var(--line);background:var(--panel-2);border-radius:14px}.world-change>div{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.world-change>div span{color:var(--accent);font-weight:900}.world-change small{display:block;color:var(--muted);margin-top:5px}.world-confidence{margin:10px 0 2px}.confidence-badge{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.confidence-badge.exact{color:var(--accent)}.confidence-badge.approximate{color:#ffd17a}.confidence-badge.context{color:#8ac7ff}
@media(max-width:700px){.world-translator{align-items:flex-start;flex-direction:column}.profile-grid{grid-template-columns:1fr}.world-actions{align-items:stretch}.world-actions>*{flex:1 1 auto}.world-change-head{flex-direction:column;gap:3px}}

/* ==========================================================================\n   V7 — Mobile-first UX + discoverable categories\n   ========================================================================== */
.categories-section { margin-top: 62px; }
.categories-heading { align-items: end; gap: 24px; }
.categories-intro { margin: 0; max-width: 420px; color: var(--muted); font-size: 13px; }
.category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.category-card { min-width: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); overflow: clip; transition: border-color .18s, background .18s, transform .18s; }
.category-card:hover { border-color: var(--line-strong); background: var(--panel-strong); transform: translateY(-1px); }
.category-card[open] { grid-column: span 2; border-color: color-mix(in srgb,var(--accent) 35%,var(--line)); }
.category-card.category-featured { border-color: color-mix(in srgb,var(--accent) 38%,var(--line)); background: color-mix(in srgb,var(--accent) 6%,var(--panel)); }
.category-card summary { list-style: none; cursor: pointer; min-height: 82px; padding: 16px; display: flex; align-items: center; gap: 12px; user-select: none; }
.category-card summary::-webkit-details-marker { display:none; }
.category-card summary::after { content: '+'; margin-left: auto; color: var(--muted); font-size: 20px; font-weight: 400; }
.category-card[open] summary::after { content: '−'; }
.category-card summary > span:last-of-type { min-width:0; display:grid; gap:3px; }
.category-card summary strong { font-size: 14px; letter-spacing: -.015em; }
.category-card summary small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-icon { flex: 0 0 38px; width:38px; height:38px; display:grid; place-items:center; border-radius:12px; background: color-mix(in srgb,var(--accent) 9%,var(--panel)); color: var(--accent); }
.category-icon svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.category-examples { border-top: 1px solid var(--line); padding: 10px; display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:7px; }
.category-examples button { min-height: 44px; border:1px solid var(--line); border-radius:12px; background:transparent; color:var(--text); padding:10px 11px; text-align:left; cursor:pointer; font-size:12px; line-height:1.25; }
.category-examples button:hover { border-color:var(--line-strong); background:var(--panel-strong); }

.mobile-command-dock { display:none; }

@media (max-width: 860px) {
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-card[open] { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  html { scroll-padding-top: 66px; }
  body { min-height: 100dvh; overscroll-behavior-y: contain; }
  .noise { opacity: .025; }
  .shell { width: min(calc(100% - 20px), var(--shell)); }

  .site-header {
    position: sticky; top: 0; z-index: 50; height: 58px;
    width: 100%; padding: 0 10px;
    background: color-mix(in srgb,var(--bg) 88%,transparent);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid color-mix(in srgb,var(--line) 65%,transparent);
  }
  .brand { gap:8px; font-size:16px; }
  .brand img { width:24px; height:24px; }
  .header-actions { gap:6px; }
  .header-actions #aboutButton { display:none; }
  .header-actions .ghost-button { padding:8px 10px; font-size:12px; }
  .header-actions .icon-button { width:36px; height:36px; }

  .main-shell { padding-top: 20px; padding-bottom: 86px; }
  .hero { max-width:none; }
  .hero > .eyebrow { margin-bottom:8px; font-size:9px; letter-spacing:.14em; }
  h1 { font-size: clamp(42px,13vw,58px); line-height:.94; margin-bottom:10px; }
  .hero-copy { font-size:15px; line-height:1.5; margin-bottom:18px; max-width:34rem; }

  .earthbar { position:relative; }
  .input-wrap {
    grid-template-columns: auto minmax(0,1fr) auto auto;
    gap:4px; padding:6px; min-height:58px; border-radius:17px;
  }
  .prompt-mark { padding-left:7px; font-size:26px; }
  #earthInput { height:46px; min-width:0; font-size:16px; }
  .clear-button { font-size:24px; padding:4px 5px; }
  .input-wrap .ask-button { display:inline-flex; align-items:center; justify-content:center; height:44px; min-width:46px; padding:0 12px; border-radius:12px; font-size:13px; }
  .earthbar-meta { padding-top:9px; gap:7px; overflow-x:auto; flex-wrap:nowrap; white-space:nowrap; mask-image:none; scrollbar-width:none; }
  .earthbar-meta::-webkit-scrollbar { display:none; }
  .earthbar-meta > span { flex:0 0 auto; border:1px solid var(--line); border-radius:999px; padding:6px 9px; font-size:10px; }
  .example-chip { text-decoration:none; }
  .command-tools { min-height:31px; margin-top:5px; }
  .history-chip { min-height:32px; display:flex; align-items:center; max-width:190px; }
  .world-actions { margin-top:8px; display:grid; grid-template-columns:1fr 1fr; gap:7px; }
  .world-actions > * { min-width:0; width:100%; min-height:42px; padding:8px 10px; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

  .world-translator { margin:12px 0 20px; padding:16px; gap:13px; border-radius:17px; }
  .world-translator h2 { font-size:22px; }
  .world-translator p { font-size:13px; line-height:1.5; }
  .world-translator .ask-button { display:inline-flex; width:100%; min-height:44px; align-items:center; justify-content:center; }

  .answer-section { margin-top:16px; scroll-margin-top:68px; }
  .answer-shell { padding:18px; border-radius:17px; box-shadow:0 14px 36px rgba(0,0,0,.22); }
  .answer-kicker { font-size:10px; margin-bottom:9px; }
  .answer-title, .answer-title.compact { font-size: clamp(34px,11vw,50px); line-height:.98; overflow-wrap:anywhere; }
  .answer-subtitle { margin-top:8px; font-size:14px; line-height:1.45; }
  .answer-grid { grid-template-columns:1fr; gap:8px; margin-top:17px; }
  .answer-cell { padding:13px; border-radius:13px; }
  .answer-actions { flex-wrap:nowrap; overflow-x:auto; margin:18px -4px 0; padding:0 4px 3px; scrollbar-width:none; scroll-snap-type:x proximity; }
  .answer-actions::-webkit-scrollbar { display:none; }
  .action-button { flex:0 0 auto; min-height:42px; padding:8px 11px; font-size:11px; scroll-snap-align:start; }
  .suggestion-list { display:grid; grid-template-columns:1fr; gap:7px; }
  .suggestion-list .action-button { width:100%; white-space:normal; text-align:left; }
  .detail-grid { margin-top:16px; gap:7px; }
  .result-code { max-height:42dvh; font-size:12px; padding:13px; }

  .autocomplete-box {
    position:absolute; left:0; right:0; top:60px; z-index:80; margin-top:4px;
    max-height:min(45dvh,320px); overflow:auto; border-radius:14px;
  }
  .autocomplete-item { min-height:48px; padding:10px 12px; }
  .autocomplete-item span { font-size:12px; overflow-wrap:anywhere; }
  .autocomplete-item small { font-size:10px; max-width:38%; }

  .categories-section { margin-top:36px; }
  .categories-heading { display:block; margin-bottom:13px; }
  .categories-heading h2 { font-size:28px; }
  .categories-intro { margin-top:8px; font-size:12px; }
  .category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap:8px; }
  .category-card { border-radius:15px; }
  .category-card[open] { grid-column:1 / -1; }
  .category-card:hover { transform:none; }
  .category-card summary { min-height:78px; padding:12px; gap:9px; align-items:flex-start; }
  .category-card summary::after { font-size:17px; margin-top:5px; }
  .category-icon { width:32px; height:32px; flex-basis:32px; border-radius:10px; }
  .category-icon svg { width:19px; height:19px; }
  .category-card summary strong { font-size:12px; line-height:1.15; }
  .category-card summary small { margin-top:3px; font-size:9px; white-space:normal; line-height:1.25; }
  .category-examples { grid-template-columns:1fr; padding:8px; gap:6px; }
  .category-examples button { min-height:44px; font-size:12px; }

  /* On phones the category explorer replaces the enormous showcase grids. */
  .syntax-section { display:none; }
  .favorites-section, .pinned-answers-section, .saved-section { margin-top:38px; }
  .dashboard { margin-top:38px; gap:9px; }
  .panel { border-radius:17px; }
  .clock-card, .facts-panel { padding:17px; }
  .saved-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .world-card { min-height:120px; padding:13px; border-radius:15px; }
  .world-card .time { font-size:27px; margin-top:10px; }
  .world-card .date { font-size:10px; }
  .remove-place { right:7px; top:6px; }
  .pinned-answer-card { min-height:135px; padding:16px; border-radius:16px; }
  .pin-value { font-size:34px; }

  .site-footer { min-height:90px; padding-bottom:12px; font-size:11px; }

  /* Dialogs become touch-friendly bottom sheets instead of desktop modals. */
  .dialog, .world-dialog {
    width:100%; max-width:none; max-height:calc(100dvh - 8px); margin:auto 0 0;
    border-radius:22px 22px 0 0; border-left:0; border-right:0; border-bottom:0;
    overflow:auto; overscroll-behavior:contain;
  }
  .dialog form { padding:20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .dialog h2 { font-size:28px; padding-right:36px; }
  .dialog-close { position:sticky; float:right; top:0; z-index:3; background:var(--bg); }
  .dialog-input { min-height:48px; font-size:16px; }
  .world-textarea { min-height:36dvh; max-height:55dvh; font-size:16px; }
  .dialog-actions { position:sticky; bottom:0; z-index:2; padding-top:10px; padding-bottom:env(safe-area-inset-bottom); background:linear-gradient(transparent,var(--bg) 22%); }
  .dialog-actions .ask-button, .dialog-actions .ghost-button { display:inline-flex; min-height:46px; align-items:center; justify-content:center; flex:1; }
  .city-results { max-height:55dvh; }
  .city-result { min-height:52px; }

  /* Persistent quick command after a result. */
  .mobile-command-dock {
    position:fixed; left:8px; right:8px; bottom:calc(8px + env(safe-area-inset-bottom)); z-index:90;
    display:none; grid-template-columns:40px minmax(0,1fr) 48px; gap:5px; align-items:center;
    padding:6px; border:1px solid var(--line-strong); border-radius:18px;
    background:color-mix(in srgb,var(--bg) 91%,transparent); box-shadow:0 16px 48px rgba(0,0,0,.42);
    backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
  }
  body.has-answer .mobile-command-dock { display:grid; }
  body.has-answer { padding-bottom:calc(76px + env(safe-area-inset-bottom)); }
  .mobile-command-dock input {
    width:100%; min-width:0; height:44px; border:0; outline:0; background:transparent; color:var(--text);
    font-size:16px; padding:0 5px;
  }
  .mobile-command-dock input::placeholder { color:var(--muted); }
  .mobile-dock-go, .mobile-dock-top {
    height:42px; border:1px solid var(--line); border-radius:12px; cursor:pointer;
  }
  .mobile-dock-go { border:0; background:var(--accent); color:var(--accent-ink); font-weight:850; font-size:12px; }
  .mobile-dock-top { background:transparent; color:var(--muted); font-size:19px; }

  /* Once an answer exists, keep the top useful but visually quieter. */
  body.has-answer .world-translator, body.has-answer .hero .world-actions { display:none; }
}

@media (max-width: 380px) {
  .shell { width:min(calc(100% - 14px),var(--shell)); }
  h1 { font-size:40px; }
  .header-actions #worldButton { max-width:92px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .category-grid { grid-template-columns:1fr; }
  .category-card[open] { grid-column:auto; }
  .saved-grid { grid-template-columns:1fr; }
  .world-actions { grid-template-columns:1fr; }
}
@media (max-width:620px){.answer-section{scroll-margin-top:4px}}

/* ==========================================================================\n   V8 — travel-first mobile UX + Restaurant/Airport modes\n   ========================================================================== */
.mobile-primary-actions,.mobile-category-strip{display:none}
.mode-heading{display:flex;gap:18px;align-items:flex-end;justify-content:space-between}.mode-heading h2{margin-bottom:0}.compact-select-label{display:grid;gap:6px;color:var(--muted);font-size:11px;min-width:150px}.compact-select{min-height:42px!important}

.category-dialog-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:20px}.category-dialog-action{min-height:58px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);padding:12px;text-align:left;font-weight:700;cursor:pointer}.category-dialog-action:hover{border-color:var(--line-strong);background:var(--panel-strong)}

.restaurant-dialog{width:min(900px,calc(100% - 24px))}.restaurant-dialog form{padding:28px}.restaurant-intro{margin:8px 0 18px}.restaurant-summary{border:1px solid color-mix(in srgb,var(--accent) 32%,var(--line));background:color-mix(in srgb,var(--accent) 6%,var(--panel));border-radius:18px;padding:16px;margin:0 0 14px}.restaurant-summary-lines{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.restaurant-summary-lines>div,.restaurant-converted>div{display:flex;justify-content:space-between;gap:12px;color:var(--muted);font-size:12px}.restaurant-summary-lines strong,.restaurant-converted strong{color:var(--text)}.restaurant-total-row,.restaurant-each-row{display:flex;justify-content:space-between;align-items:baseline;gap:15px}.restaurant-total-row{border-top:1px solid var(--line);margin-top:12px;padding-top:12px}.restaurant-total-row span,.restaurant-each-row span{font-weight:700}.restaurant-total-row strong{font-size:34px;letter-spacing:-.04em}.restaurant-each-row{margin-top:4px}.restaurant-each-row strong{font-size:20px}.restaurant-converted{border-top:1px dashed var(--line);margin-top:12px;padding-top:10px;display:grid;gap:5px}.restaurant-converted small{color:var(--muted);font-size:10px}
.restaurant-entry-panel{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(100px,.65fr) 70px auto;gap:8px;align-items:end;border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--panel)}.restaurant-entry-panel label{display:block;color:var(--muted);font-size:10px;margin:0 0 5px 2px}.restaurant-entry-panel .dialog-input{min-height:46px}.restaurant-add{min-height:46px;display:inline-flex;align-items:center;justify-content:center}
.restaurant-items{display:grid;gap:7px;margin:10px 0 14px}.restaurant-empty{border:1px dashed var(--line);border-radius:13px;color:var(--muted);font-size:12px;padding:12px;text-align:center}.restaurant-item{display:grid;grid-template-columns:minmax(0,1fr) 54px 90px 38px;gap:6px;align-items:center}.restaurant-item input{width:100%;min-width:0;height:42px;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:11px;padding:0 9px;font-size:14px;outline:none}.restaurant-item-qty,.restaurant-item-price{text-align:right}.restaurant-item-remove{height:38px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--muted);font-size:20px;cursor:pointer}
.restaurant-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.restaurant-option-card{border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:13px}.restaurant-option-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}.restaurant-option-head strong{font-size:13px}.restaurant-option-head small{color:var(--muted);font-size:10px;text-align:right}.segmented-control{display:flex;gap:5px;flex-wrap:wrap}.segmented-control button,.tip-choice{border:1px solid var(--line);background:transparent;color:var(--text);border-radius:10px;min-height:38px;padding:7px 10px;cursor:pointer;font-size:11px;font-weight:700}.segmented-control button.active,.tip-choice.active{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--panel));color:var(--accent)}.segmented-control.small button{min-height:32px;padding:5px 8px;font-size:10px}.restaurant-inline-input{display:flex;align-items:center;gap:6px;margin-top:9px}.restaurant-inline-input .dialog-input{min-height:40px}.tip-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.tip-choice.us-tip::after{content:'US';display:block;color:var(--muted);font-size:7px;font-weight:800;letter-spacing:.1em;margin-top:1px}.custom-tip{display:flex;align-items:center;border:1px solid var(--line);border-radius:10px;min-height:38px;padding:0 7px}.custom-tip input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--text);font-size:12px}.custom-tip span{font-size:10px;color:var(--muted)}.tip-base-row{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;color:var(--muted);font-size:10px}.split-control{display:grid;grid-template-columns:42px minmax(0,1fr) 42px;gap:6px}.split-control button,.split-control input{height:42px;border:1px solid var(--line);border-radius:11px;background:transparent;color:var(--text);text-align:center;font-size:16px}.split-control button{cursor:pointer}.split-control input{background:var(--bg)}.restaurant-footer-actions{display:flex;gap:8px;margin-top:12px}.restaurant-footer-actions>*{flex:1}.danger-soft{color:#d97878}

.travel-dialog{width:min(760px,calc(100% - 24px))}.travel-live-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.travel-live-card{border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:13px;display:grid;gap:8px}.travel-live-card>label{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.1em}.travel-live-card>strong{font-size:22px;letter-spacing:-.03em}.travel-field{display:grid;grid-template-columns:minmax(0,1fr) 78px;gap:6px}.travel-field input,.travel-field select,.travel-money-fields input,.travel-money-fields select{width:100%;height:42px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);padding:0 9px;font-size:14px;outline:0}.travel-money-card{grid-column:1/-1}.travel-money-fields{display:grid;grid-template-columns:minmax(0,1fr) 90px 20px 90px;gap:6px;align-items:center}.travel-money-fields span{text-align:center;color:var(--muted)}.travel-fast-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.travel-fast-actions button{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:14px;padding:12px;text-align:left;cursor:pointer;min-height:70px}.travel-fast-actions strong{display:block;font-size:13px}.travel-fast-actions small{display:block;color:var(--muted);font-size:9px;margin-top:3px}.travel-note{color:var(--muted);font-size:10px;margin-top:12px}

@media(max-width:700px){
  html{scroll-padding-top:126px}
  .shell{width:min(calc(100% - 16px),var(--shell))}
  .site-header{height:52px;min-height:52px;padding:0 8px}
  .brand{font-size:15px}.brand img{width:22px;height:22px}.header-actions #worldButton{font-size:10px;padding:7px 8px}.header-actions .icon-button{width:34px;height:34px}
  .main-shell{padding-top:8px;padding-bottom:24px}
  .hero{max-width:none}.hero>.eyebrow{font-size:8px;margin:2px 0 5px}.hero h1{font-size:30px;line-height:1;margin-bottom:5px}.hero-copy{font-size:12px;line-height:1.35;margin-bottom:9px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .input-wrap{min-height:54px;padding:5px;border-radius:15px}.input-wrap .ask-button{height:42px;min-width:45px}.prompt-mark{font-size:23px}#earthInput{height:42px}
  .earthbar-meta{padding-top:6px}.earthbar-meta>span{padding:5px 8px;font-size:9px}.command-tools{display:none}.world-actions{display:none}
  .mobile-primary-actions{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-top:7px}.mobile-primary-action{min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);min-height:58px;padding:6px 3px;display:grid;place-items:center;align-content:center;gap:1px;cursor:pointer}.mobile-primary-action .quick-icon{font-size:18px;line-height:1;color:var(--accent)}.mobile-primary-action strong{font-size:9px;line-height:1.1}.mobile-primary-action small{font-size:7px;color:var(--muted);line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}
  .mobile-category-strip{display:flex;gap:5px;overflow-x:auto;margin:6px 0 0;padding-bottom:2px;scrollbar-width:none}.mobile-category-strip::-webkit-scrollbar{display:none}.mobile-category-strip button{flex:0 0 auto;border:1px solid var(--line);background:transparent;color:var(--muted);border-radius:999px;min-height:30px;padding:5px 9px;font-size:9px;cursor:pointer}
  .world-translator{display:none}.categories-section{display:none}.syntax-section{display:none}.dashboard,.saved-section,.favorites-section,.pinned-answers-section{margin-top:24px}.site-footer{margin-top:18px}
  .answer-section{margin-top:8px;scroll-margin-top:122px}.answer-shell{padding:14px;border-radius:15px}.answer-title,.answer-title.compact{font-size:clamp(30px,10vw,44px)}.answer-subtitle{font-size:12px}.answer-grid{margin-top:12px}.answer-cell{padding:11px}.answer-actions{margin-top:13px}

  /* Result mode: remove everything between the sticky command controls and the answer. */
  body.has-answer .hero>.eyebrow,body.has-answer .hero>h1,body.has-answer .hero>.hero-copy,body.has-answer .earthbar-meta,body.has-answer #homeDashboard,body.has-answer #savedSection,body.has-answer #favoritesSection,body.has-answer #pinnedAnswersSection,body.has-answer .categories-section,body.has-answer .syntax-section,body.has-answer .site-footer{display:none!important}
  body.has-answer .main-shell{padding-top:0;padding-bottom:18px}
  body.has-answer .hero{position:sticky;top:52px;z-index:45;margin:0 -8px;padding:6px 8px 6px;background:color-mix(in srgb,var(--bg) 94%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid color-mix(in srgb,var(--line) 60%,transparent)}
  body.has-answer .mobile-primary-actions{margin-top:5px;gap:4px}.has-answer .mobile-primary-action{min-height:42px;border-radius:10px;padding:3px}.has-answer .mobile-primary-action .quick-icon{font-size:14px}.has-answer .mobile-primary-action strong{font-size:8px}.has-answer .mobile-primary-action small{display:none}.has-answer .mobile-category-strip{display:none}
  body.has-answer .answer-section{margin-top:6px;scroll-margin-top:115px}
  .mobile-command-dock{display:none!important}
  body.has-answer{padding-bottom:0}

  .category-dialog-examples{grid-template-columns:1fr;gap:7px}.category-dialog-action{min-height:52px}
  .restaurant-dialog,.travel-dialog,.category-dialog{width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;overflow:auto}.restaurant-dialog form,.travel-dialog form,.category-dialog form{padding:14px 12px calc(18px + env(safe-area-inset-bottom))}.restaurant-dialog .dialog-close,.travel-dialog .dialog-close,.category-dialog .dialog-close{position:sticky;top:0;float:right;z-index:8;background:var(--bg)}
  .mode-heading{align-items:flex-start;gap:8px}.mode-heading h2,.travel-dialog h2,.category-dialog h2{font-size:25px}.compact-select-label{min-width:112px;font-size:9px}.compact-select{min-height:38px!important;padding:7px!important;font-size:12px!important}.restaurant-intro{font-size:11px;line-height:1.35;margin:5px 0 9px}
  .restaurant-summary{position:sticky;top:0;z-index:7;margin:0 0 8px;padding:10px 11px;border-radius:14px;box-shadow:0 9px 28px rgba(0,0,0,.24);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}.restaurant-summary-lines{grid-template-columns:repeat(3,1fr);gap:5px}.restaurant-summary-lines>div{display:grid;gap:1px;font-size:9px}.restaurant-summary-lines strong{font-size:11px}.restaurant-total-row{margin-top:7px;padding-top:7px}.restaurant-total-row strong{font-size:27px}.restaurant-each-row strong{font-size:16px}.restaurant-converted{margin-top:7px;padding-top:7px}.restaurant-converted>div{font-size:10px}
  .restaurant-entry-panel{grid-template-columns:minmax(0,1fr) 86px 52px;gap:5px;padding:8px;border-radius:13px}.restaurant-entry-name{grid-column:1/-1}.restaurant-entry-panel label{font-size:8px;margin-bottom:3px}.restaurant-entry-panel .dialog-input{min-height:42px;font-size:16px}.restaurant-add{grid-column:3;grid-row:2;min-height:42px;padding:6px}.restaurant-entry-price{grid-column:1}.restaurant-entry-qty{grid-column:2}
  .restaurant-items{margin:7px 0}.restaurant-item{grid-template-columns:minmax(0,1fr) 48px 78px 34px;gap:4px}.restaurant-item input{height:39px;font-size:13px;padding:0 7px}.restaurant-item-remove{height:34px}
  .restaurant-options-grid{grid-template-columns:1fr;gap:7px}.restaurant-option-card{padding:10px;border-radius:13px}.restaurant-option-head{margin-bottom:7px}.restaurant-option-head strong{font-size:12px}.restaurant-option-head small{font-size:8px}.segmented-control{flex-wrap:nowrap;overflow-x:auto}.segmented-control button{flex:1;min-width:max-content}.tip-grid{grid-template-columns:repeat(4,1fr);gap:5px}.tip-choice,.custom-tip{min-height:42px}.tip-base-row{align-items:flex-start;flex-direction:column}.tip-base-row .segmented-control{width:100%}.tip-base-row .segmented-control button{flex:1}.split-control{max-width:210px}.restaurant-footer-actions{padding-bottom:4px}
  .travel-dialog p.muted{font-size:11px;line-height:1.35}.travel-live-grid{grid-template-columns:1fr 1fr;gap:6px;margin:10px 0}.travel-live-card{padding:9px;border-radius:13px;gap:5px}.travel-live-card>strong{font-size:18px}.travel-field{grid-template-columns:minmax(0,1fr) 65px;gap:4px}.travel-field input,.travel-field select,.travel-money-fields input,.travel-money-fields select{height:40px;font-size:16px;padding:0 6px}.travel-money-fields{grid-template-columns:minmax(0,1fr) 72px 14px 72px;gap:4px}.travel-fast-actions{grid-template-columns:repeat(2,1fr);gap:6px}.travel-fast-actions button{min-height:60px;padding:9px}.travel-fast-actions strong{font-size:12px}.travel-fast-actions small{font-size:8px}
}

@media(max-width:360px){
  .mobile-primary-action strong{font-size:8px}.mobile-primary-action small{display:none}.mobile-primary-action{min-height:49px}.mobile-category-strip button{padding:5px 8px}
  .restaurant-summary-lines{display:none}.restaurant-total-row{border-top:0;margin-top:0;padding-top:0}.restaurant-summary{display:grid;grid-template-columns:1fr auto;column-gap:12px}.restaurant-total-row,.restaurant-each-row{display:contents}.restaurant-total-row span,.restaurant-each-row span{font-size:10px}.restaurant-total-row strong{font-size:22px}.restaurant-each-row strong{font-size:15px}.restaurant-converted{grid-column:1/-1}
  .tip-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.tip-choice{padding:5px;font-size:10px}
  .travel-live-grid{grid-template-columns:1fr}.travel-money-card{grid-column:auto}
}
@media(max-width:700px){
  /* Keep the phone homepage intentionally short. Saved dashboards remain available on larger screens; phone users use the quick modes/command bar. */
  #homeDashboard,#savedSection,#favoritesSection,#pinnedAnswersSection{display:none!important}
  .site-footer{min-height:auto;padding:16px 0 12px;font-size:9px}
}
.mobile-primary-action .quick-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:700px){.hero>.eyebrow{display:none}.hero h1{font-size:28px;margin-top:2px}.hero-copy{-webkit-line-clamp:1;margin-bottom:7px}.mobile-primary-action .quick-icon svg{width:17px;height:17px}.has-answer .mobile-primary-action .quick-icon svg{width:14px;height:14px}}
@media(max-width:700px){
  body.has-answer .answer-section{scroll-margin-top:168px}
  body.mobile-keyboard-open .mobile-primary-actions,body.mobile-keyboard-open .mobile-category-strip{display:none!important}
  body.mobile-keyboard-open.has-answer .answer-section{scroll-margin-top:112px}
}
.category-dialog-action strong{display:block;font-size:13px}.category-dialog-action small{display:block;margin-top:3px;color:var(--muted);font-size:9px}

/* ==========================================================================\n   V9 — everyday assistant: Kitchen, Shop, Friends + clearer restaurant tax\n   ========================================================================== */
.kitchen-dialog,.shop-dialog,.friends-dialog{width:min(920px,calc(100% - 24px))}.kitchen-dialog form,.shop-dialog form,.friends-dialog form{padding:28px}
.kitchen-status{position:sticky;top:0;z-index:2;background:var(--panel);border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:18px;padding:13px;margin:12px 0;box-shadow:0 12px 30px rgba(0,0,0,.08)}.kitchen-status>div:first-child{display:flex;justify-content:space-between;align-items:baseline}.kitchen-status small{color:var(--muted);text-transform:uppercase;letter-spacing:.08em;font-size:9px}.kitchen-status strong{font-size:25px}.kitchen-live-runs{display:grid;gap:7px;margin-top:10px}.kitchen-live-card{display:flex;justify-content:space-between;gap:14px;align-items:center;border-top:1px solid var(--line);padding-top:8px}.kitchen-live-card>div{display:grid;gap:2px}.kitchen-live-card small{font-size:10px;text-transform:none;letter-spacing:0}.kitchen-live-card b{font-size:12px;text-align:right}.kitchen-live-card.done b{color:var(--accent)}
.kitchen-appliance{margin:12px 0}.kitchen-add-card,.kitchen-plan,.shop-subtool,.friends-owes{border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:14px;margin:12px 0}.kitchen-add-card{display:grid;gap:10px}.kitchen-add-card label,.shop-subtool label,.friends-dialog label{display:grid;gap:5px;color:var(--muted);font-size:10px}.kitchen-input-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}.kitchen-safety{color:var(--muted);font-size:9px;line-height:1.4}.kitchen-dishes{display:grid;gap:8px}.kitchen-dish{border:1px solid var(--line);border-radius:14px;padding:11px;display:flex;justify-content:space-between;gap:10px;align-items:center;background:var(--panel)}.kitchen-dish-main{display:grid;gap:3px;min-width:0}.kitchen-dish-main strong{font-size:13px}.kitchen-dish-main small{font-size:10px;color:var(--muted)}.kitchen-dish-main em{font-size:9px;color:var(--muted);font-style:normal;line-height:1.35}.kitchen-dish-actions{display:flex;gap:4px}.kitchen-dish-actions button{border:1px solid var(--line);background:transparent;color:var(--text);border-radius:8px;width:31px;height:31px}.kitchen-empty,.shop-empty{color:var(--muted);font-size:11px;padding:14px;text-align:center;border:1px dashed var(--line);border-radius:12px}.kitchen-plan p{margin:5px 0 0;color:var(--muted);font-size:11px;line-height:1.5}.kitchen-controls,.shop-actions,.friends-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}
.shop-budget-hero{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line));border-radius:18px;background:color-mix(in srgb,var(--accent) 6%,var(--panel));padding:14px;margin:12px 0}.shop-budget-hero label{display:grid;gap:6px;color:var(--muted);font-size:10px}.shop-budget-field{display:grid;grid-template-columns:1fr 90px;gap:6px}.shop-budget-field input,.shop-budget-field select{min-height:47px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--text);padding:0 10px;font-size:17px}.shop-budget-hero>div:last-child{display:grid;align-content:center;justify-items:end}.shop-budget-hero small{font-size:9px;color:var(--muted);text-transform:uppercase}.shop-budget-hero strong{font-size:34px;letter-spacing:-.04em}.shop-budget-hero strong.negative,.shop-preview.negative,.friends-hero .negative{color:#d64545}.shop-budget-hero span{font-size:10px;color:var(--muted)}
.shop-quick-add{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(90px,.7fr) 65px 70px;gap:6px}.shop-preview{font-size:11px;color:var(--muted);padding:8px 2px}.shop-tax-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:5px 0 10px;font-size:10px}.shop-items,.friends-items{display:grid;gap:7px}.shop-item,.friends-item{display:grid;grid-template-columns:minmax(0,1fr) auto 32px;gap:9px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:9px;background:var(--panel)}.shop-item>div,.friends-item>div{display:grid;gap:2px}.shop-item small,.friends-item small{color:var(--muted);font-size:9px}.shop-item b,.friends-item b{font-size:11px}.shop-item button,.friends-item button,.shop-need button,.friend-chip button{border:0;background:transparent;color:var(--muted);font-size:16px}.shop-subtool h3,.friends-owes h3{font-size:13px;margin:0 0 10px}.shop-need-add,.friends-people-add{display:grid;grid-template-columns:1fr auto;gap:7px}.shop-needs{display:grid;gap:5px;margin-top:9px}.shop-need{display:grid!important;grid-template-columns:24px 1fr 30px;align-items:center;gap:7px;border-top:1px solid var(--line);padding-top:6px;font-size:12px!important;color:var(--text)!important}.shop-need.done span{text-decoration:line-through;color:var(--muted)}.shop-compare-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.shop-compare-out{font-size:11px;color:var(--muted);line-height:1.45}.shop-compare-out strong,.shop-compare-out b{color:var(--text)}
.friends-hero{display:grid;grid-template-columns:1fr 110px 1fr 1fr;gap:8px;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:16px;padding:12px;margin:12px 0}.friends-hero>div{display:grid;align-content:center}.friends-hero small{font-size:9px;text-transform:uppercase;color:var(--muted)}.friends-hero strong{font-size:22px}.friends-hero span{font-size:9px;color:var(--muted)}.friends-people{display:flex;gap:6px;overflow-x:auto;margin:8px 0}.friend-chip{display:inline-flex;gap:5px;align-items:center;border:1px solid var(--line);border-radius:999px;padding:5px 8px;font-size:10px;white-space:nowrap}.friends-add-item{display:grid;grid-template-columns:minmax(0,1.4fr) 90px 60px 130px 65px;gap:6px;margin:10px 0}.friends-fast-options{display:grid;grid-template-columns:100px 100px 1fr;gap:8px;margin:8px 0}.friends-fast-options>div{display:grid;gap:5px;font-size:10px;color:var(--muted)}.friends-owes>div{display:grid;gap:5px}.friends-owes>div>div{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:7px;font-size:12px}
.restaurant-tax-note,.restaurant-tip-basis{display:block;color:var(--muted);font-size:9px;line-height:1.4;margin-top:7px}.tip-base-choice small{display:block;font-size:8px;opacity:.75;margin-top:2px}.tip-base-choice.active small{opacity:1}

@media(max-width:700px){
  .kitchen-dialog,.shop-dialog,.friends-dialog{width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;overflow:auto}.kitchen-dialog form,.shop-dialog form,.friends-dialog form{padding:15px 12px calc(25px + env(safe-area-inset-bottom))}.v9-situations{grid-template-columns:repeat(5,minmax(0,1fr))}.v9-situations .mobile-primary-action strong{font-size:8.5px}.v9-situations .mobile-primary-action small{font-size:6.5px}
  .kitchen-status{top:0;border-radius:14px}.kitchen-input-row{grid-template-columns:1fr 1fr}.kitchen-dish{align-items:flex-start}.kitchen-dish-actions{flex-direction:column}.kitchen-controls{display:grid;grid-template-columns:1fr 1fr}.kitchen-controls .ask-button{grid-column:1/-1}.shop-budget-hero{position:sticky;top:0;z-index:3;grid-template-columns:1fr 1fr;padding:10px;border-radius:14px}.shop-budget-hero strong{font-size:27px}.shop-quick-add{grid-template-columns:minmax(0,1fr) 90px 52px}.shop-quick-add #shopQuickName{grid-column:1/-1}.shop-quick-add .ask-button{grid-column:1/-1}.shop-compare-grid{grid-template-columns:1fr 1fr}.shop-compare-grid label:last-child{grid-column:1/-1}.friends-hero{position:sticky;top:0;z-index:3;grid-template-columns:1fr 90px}.friends-hero>div{border-top:1px solid var(--line);padding-top:7px}.friends-add-item{grid-template-columns:1fr 90px 55px}.friends-add-item #friendsItemName{grid-column:1/-1}.friends-add-item #friendsWho{grid-column:1/3}.friends-fast-options{grid-template-columns:1fr 1fr}.friends-fast-options>div{grid-column:1/-1}.restaurant-dialog .tip-base-row{align-items:flex-start;flex-direction:column}.restaurant-dialog .tip-base-row .segmented-control{width:100%}.restaurant-dialog .tip-base-choice{min-height:47px}
}

/* V9.1 reliability/clarity */
.tip-base-choice:disabled{opacity:.42;cursor:not-allowed;filter:saturate(.4)}

/* V9.1 mobile dialog close controls */
@media (max-width: 700px) {
  .kitchen-dialog .dialog-close,
  .shop-dialog .dialog-close,
  .friends-dialog .dialog-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 12;
    background: var(--bg);
  }
}
