:root {
  color-scheme: light dark;
  --canvas: #f7f1e7;
  --surface: #fffcf7;
  --surface-strong: #ffffff;
  --ink: #24231f;
  --muted-ink: #665f56;
  --terracotta: #8a3f2d;
  --terracotta-pressed: #703224;
  --on-terracotta: #ffffff;
  --moss: #465641;
  --saffron: #d49a43;
  --atlas-water: #e7ece8;
  --atlas-land: #d6cdbc;
  --density-1: #8c6a3f;
  --density-2: #96562f;
  --density-3: #a23f2d;
  --density-4: #862927;
  --density-5: #641c22;
  --border: #cfc4b4;
  --soft-border: #e4dacb;
  --danger: #a52a2a;
  --focus: #2f6287;
  --shadow-phone: 0 26px 70px rgb(51 43 33 / 18%), 0 4px 14px rgb(51 43 33 / 10%);
  --shadow-surface: 0 10px 26px rgb(56 45 33 / 9%);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --duration-fast: 140ms;
  --duration-standard: 190ms;
  --demo-banner-height: calc(48px + env(safe-area-inset-top));
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #171814;
    --surface: #21231d;
    --surface-strong: #292b25;
    --ink: #f3eee5;
    --muted-ink: #c8c0b5;
    --terracotta: #e49a7f;
    --terracotta-pressed: #f0ad94;
    --on-terracotta: #171814;
    --moss: #a8bc98;
    --saffron: #e3b769;
    --atlas-water: #252b28;
    --atlas-land: #42443c;
    --density-1: #a68b59;
    --density-2: #c18a4d;
    --density-3: #df8159;
    --density-4: #f06d54;
    --density-5: #ff8c79;
    --border: #5a574e;
    --soft-border: #3e4038;
    --danger: #ff9b95;
    --focus: #9bc9ee;
    --shadow-phone: 0 26px 70px rgb(0 0 0 / 38%), 0 4px 14px rgb(0 0 0 / 24%);
    --shadow-surface: 0 10px 26px rgb(0 0 0 / 20%);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
  font-family: var(--sans);
  font-size: 16px;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 14%, color-mix(in srgb, var(--saffron) 11%, transparent), transparent 30rem),
    linear-gradient(150deg, var(--canvas), color-mix(in srgb, var(--atlas-water) 50%, var(--canvas)));
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label.file-button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  color: inherit;
}

button:not(:disabled),
label.file-button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
label.file-button:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h2[tabindex="-1"]:focus {
  outline: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

[hidden] {
  display: none !important;
}

.auth-screen {
  min-height: min(844px, 100dvh);
}

.auth-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: max(32px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  text-align: center;
}

.auth-mark {
  align-self: center;
  width: 88px;
  height: 88px;
  margin-bottom: 24px;
  border-radius: 22px;
  box-shadow: var(--shadow-surface);
}

.auth-content h2 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 9vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.auth-content .screen-intro {
  max-width: 30ch;
  margin-inline: auto;
}

.auth-content .button {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
}

.auth-content .button + .button {
  margin-top: 10px;
}

.demo-banner {
  position: absolute;
  inset: 0 0 auto;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--demo-banner-height);
  box-sizing: border-box;
  padding: env(safe-area-inset-top) 16px 0;
  color: var(--ink);
  background: color-mix(in srgb, var(--moss) 13%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--moss) 35%, var(--border));
}

.demo-banner > span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.demo-banner strong { font-size: 0.84rem; }
.demo-banner small { color: var(--muted-ink); font-size: 0.72rem; }
.demo-banner .text-button { min-height: 44px; }

.phone-frame.is-demo .app-screen:not([data-screen="auth"]) {
  inset-block-start: var(--demo-banner-height);
}

.auth-helper {
  margin: 10px 0 0;
  color: var(--muted-ink);
  font-size: 0.88rem;
}

.account-identity {
  display: grid;
  gap: 2px;
  margin: 6px 0 16px;
  overflow-wrap: anywhere;
}

.account-identity #account-email {
  font-size: 1rem;
}

.account-identity #account-access-status {
  color: var(--muted-ink);
  font-size: 0.88rem;
}

.symbol-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--on-terracotta);
  background: var(--terracotta);
  border-radius: var(--radius-sm);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.prototype-layout {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(375px, 430px);
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 6vw, 92px);
  min-height: 100dvh;
  padding: 40px;
}

.prototype-panel {
  max-width: 330px;
}

.prototype-panel h1 {
  max-width: 13ch;
  margin: 8px 0 16px;
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.prototype-panel > p:not(.eyebrow) {
  color: var(--muted-ink);
  font-size: 1.05rem;
}

.scenario-group {
  display: grid;
  gap: 8px;
  margin-top: 32px;
}

.control-label {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.scenario-button {
  min-height: 48px;
  padding: 11px 14px;
  color: var(--muted-ink);
  text-align: left;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast);
}

.scenario-button:hover,
.scenario-button:active {
  background: var(--surface);
}

.scenario-button.is-active {
  color: var(--ink);
  font-weight: 650;
  background: var(--surface);
  border-color: var(--terracotta);
  box-shadow: inset 3px 0 0 var(--terracotta);
}

.prototype-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 0;
}

.prototype-metrics div {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.prototype-metrics dt {
  color: var(--muted-ink);
  font-size: 0.75rem;
}

.prototype-metrics dd {
  margin: 3px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
}

.prototype-note {
  font-size: 0.84rem !important;
}

.phone-frame {
  position: relative;
  width: min(100%, 430px);
  height: min(880px, calc(100dvh - 48px));
  min-height: 620px;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  border-radius: 34px;
  box-shadow: var(--shadow-phone);
  isolation: isolate;
}

.app-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--canvas);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity var(--duration-standard), transform var(--duration-standard);
  pointer-events: none;
}

.app-screen.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.app-bar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(72px, 1fr);
  align-items: end;
  min-height: calc(54px + env(safe-area-inset-top));
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 68%, transparent);
  backdrop-filter: blur(16px);
}

.app-bar-title {
  padding-bottom: 7px;
  font-size: 0.9rem;
  font-weight: 700;
}

.app-bar-spacer {
  min-width: 72px;
}

.text-button,
.icon-text-button,
.inline-button {
  border: 0;
  color: var(--terracotta);
  background: transparent;
  font-weight: 650;
}

.text-button,
.icon-text-button {
  justify-self: start;
  min-width: 56px;
  min-height: 44px;
  padding: 8px 4px;
}

.app-bar > :last-child {
  justify-self: end;
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.icon-text-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.text-button:active,
.icon-text-button:active,
.inline-button:active {
  color: var(--terracotta-pressed);
}

.screen-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 16px calc(32px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.eyebrow {
  margin: 0;
  color: var(--moss);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.screen-scroll h2 {
  max-width: 16ch;
  margin: 4px 0 6px;
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 2.35rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.screen-intro {
  max-width: 37ch;
  margin: 0 0 22px;
  color: var(--muted-ink);
}

.photo-picker,
.confirm-photo,
.success-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--atlas-land);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.photo-picker {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  box-shadow: var(--shadow-surface);
}

.photo-picker img,
.confirm-photo img,
.success-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: var(--muted-ink);
  text-align: center;
}

.photo-empty strong {
  color: var(--ink);
}

.photo-empty span {
  font-size: 0.82rem;
}

.empty-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast), opacity var(--duration-fast);
}

.button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-secondary {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 93%, transparent);
  border-color: color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: 0 4px 14px rgb(25 20 15 / 12%);
  backdrop-filter: blur(12px);
}

.button-secondary:active {
  background: var(--surface-strong);
  border-color: var(--terracotta);
}

.button-danger {
  color: var(--surface-strong);
  background: var(--danger);
  border-color: var(--danger);
}

@media (prefers-color-scheme: dark) {
  .button-danger {
    color: var(--canvas);
  }
}

.button-danger:not(:disabled):active {
  filter: brightness(0.9);
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.photo-picker[data-ready="true"] .button-secondary {
  color: #24231f;
  background: rgb(255 252 247 / 90%);
  border-color: rgb(255 255 255 / 70%);
}

#sample-photo {
  display: block;
  min-height: 44px;
  margin: 5px auto 12px;
  padding: 8px 10px;
}

.voice-card,
.match-group {
  min-width: 0;
  margin: 0 0 18px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.voice-card legend,
.match-group legend {
  padding: 0 6px;
  font-weight: 750;
}

.voice-card legend span,
.field-group label span {
  color: var(--muted-ink);
  font-size: 0.77rem;
  font-weight: 500;
}

.voice-card > p {
  margin: 0 0 12px;
  color: var(--muted-ink);
  font-size: 0.9rem;
}

.voice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mic-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--on-terracotta);
  background: var(--terracotta);
  border: 1px solid var(--terracotta);
  border-radius: 12px;
  font-weight: 750;
}

.mic-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mic-button[aria-pressed="true"] {
  color: var(--ink);
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  border-color: var(--danger);
}

.mic-button:active {
  background: var(--terracotta-pressed);
}

.recording-status {
  min-width: 64px;
  color: var(--muted-ink);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.live-transcript {
  margin: -2px 0 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--saffron) 10%, var(--surface));
  border-left: 3px solid var(--saffron);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.live-transcript span {
  display: block;
  color: var(--muted-ink);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.live-transcript p {
  margin: 2px 0 0;
}

.assist-progress,
.assist-recovery {
  margin-top: 10px;
  padding: 10px 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--moss) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 34%, var(--soft-border));
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.45;
}

.assist-progress {
  display: flex;
  align-items: center;
  gap: 9px;
}

.assist-progress-dot {
  width: 9px;
  height: 9px;
  flex: none;
  background: var(--moss);
  border-radius: 50%;
  animation: assist-pulse 1.1s ease-in-out infinite alternate;
}

.assist-recovery p {
  margin: 0;
}

.assist-recovery .inline-button {
  min-height: 44px;
  margin: 4px 0 -8px;
}

@keyframes assist-pulse {
  from { opacity: 0.35; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .assist-progress-dot { animation: none; }
}

.voice-card > label,
.field-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 720;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

input,
select {
  min-height: 48px;
  padding: 10px 12px;
}

select {
  appearance: auto;
}

textarea {
  min-height: 72px;
  padding: 11px 12px;
  line-height: 1.45;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted-ink) 75%, transparent);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger);
}

.voice-card .inline-button {
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 4px;
}

.field-group {
  margin-bottom: 17px;
}

.field-error,
.form-error {
  color: var(--danger);
  font-size: 0.84rem;
}

.field-error {
  margin: 6px 0 0;
}

.form-error {
  margin: 0 0 12px;
  padding: 11px 12px;
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--border));
  border-radius: var(--radius-sm);
}

.disclosure-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  margin-bottom: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: left;
}

.disclosure-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--duration-standard);
}

.disclosure-button[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

.optional-fields {
  padding-top: 2px;
}

.rating-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rating-input input {
  width: 74px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.rating-input span {
  color: var(--muted-ink);
  font-size: 0.9rem;
}

.primary-action {
  width: 100%;
}

.button-primary {
  color: var(--on-terracotta);
  background: var(--terracotta);
  border-color: var(--terracotta);
}

.button-primary:not(:disabled):hover,
.button-primary:not(:disabled):active {
  background: var(--terracotta-pressed);
  border-color: var(--terracotta-pressed);
}

.button[aria-busy="true"]::after {
  width: 16px;
  height: 16px;
  content: "";
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.confirm-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.confirm-photo {
  aspect-ratio: 4 / 3;
  margin-bottom: 20px;
}

.confirm-photo figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  color: #24231f;
  background: rgb(255 252 247 / 90%);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.assist-warning {
  display: grid;
  gap: 2px;
  margin-bottom: 16px;
  padding: 12px 13px;
  color: var(--ink);
  background: color-mix(in srgb, var(--saffron) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--saffron) 55%, var(--border));
  border-radius: var(--radius-sm);
}

.assist-warning span {
  color: var(--muted-ink);
  font-size: 0.86rem;
}

.assist-warning .inline-button {
  min-height: 44px;
  margin: 5px 0 -7px;
}

.match-group {
  display: grid;
  gap: 8px;
}

.radio-card {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  background: var(--surface-strong);
  border: 1px solid var(--soft-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: var(--terracotta);
  box-shadow: inset 3px 0 0 var(--terracotta);
}

.radio-card input {
  width: 20px;
  min-height: auto;
  height: 20px;
  margin: 0;
  accent-color: var(--terracotta);
}

.radio-copy {
  display: grid;
  line-height: 1.3;
}

.radio-copy span {
  color: var(--muted-ink);
  font-size: 0.8rem;
}

.suggestion-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading-row h3,
.section-heading-row .section-label {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.suggestion-label {
  flex: none;
  color: var(--moss);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field-helper {
  margin: 7px 0 0;
  color: var(--muted-ink);
  font-size: 0.8rem;
}

.country-suggestion-action {
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 12px;
  color: var(--terracotta);
  background: color-mix(in srgb, var(--terracotta) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--terracotta) 35%, var(--border));
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
}

.country-suggestion-action:active {
  background: color-mix(in srgb, var(--terracotta) 16%, var(--surface));
}

.country-combobox {
  position: relative;
}

.country-combobox-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: min(264px, 42vh);
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 18%, transparent);
  list-style: none;
}

.country-combobox-list li {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: calc(var(--radius-sm) - 4px);
  cursor: pointer;
}

.country-combobox-list li:hover,
.country-combobox-list li.is-active {
  background: color-mix(in srgb, var(--terracotta) 12%, var(--surface-strong));
}

.country-combobox-error {
  margin-top: 7px;
}

.dish-recognition {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--moss) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 36%, var(--border));
  border-radius: var(--radius-sm);
}

.dish-recognition[hidden] {
  display: none;
}

.dish-recognition p {
  flex: 1 1 180px;
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.4;
}

.dish-recognition > div {
  display: flex;
  flex: none;
  gap: 4px;
}

.dish-recognition .inline-button {
  min-width: 44px;
  min-height: 44px;
}

.sticky-action-bar {
  position: relative;
  z-index: 8;
  flex: none;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  backdrop-filter: blur(16px);
}

.success-screen {
  background:
    radial-gradient(circle at 50% 16%, color-mix(in srgb, var(--saffron) 17%, transparent), transparent 18rem),
    var(--canvas);
}

.success-content {
  padding-top: max(42px, calc(22px + env(safe-area-inset-top)));
  text-align: center;
}

.success-mark {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  color: var(--on-terracotta);
  background: var(--terracotta);
  border-radius: 50%;
  place-items: center;
}

.success-mark svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.success-content h2 {
  max-width: 13ch;
  margin: 7px auto;
}

.success-time {
  margin: 0 0 20px;
  color: var(--muted-ink);
  font-variant-numeric: tabular-nums;
}

.success-photo {
  aspect-ratio: 16 / 10;
  margin-bottom: 16px;
}

.history-preview {
  margin-bottom: 18px;
  padding: 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.history-preview h3 {
  margin: 3px 0 12px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.history-preview > p:last-child {
  margin: 14px 0 0;
  color: var(--muted-ink);
  font-size: 0.88rem;
}

.rating-progression {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rating-progression li {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 9px 4px;
  text-align: center;
  background: color-mix(in srgb, var(--atlas-water) 72%, var(--surface));
  border: 1px solid var(--soft-border);
  border-radius: 9px;
}

.rating-progression li.current {
  border-color: var(--terracotta);
}

.rating-progression span {
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rating-progression small {
  color: var(--muted-ink);
  font-size: 0.67rem;
}

.success-content > .inline-button {
  min-height: 44px;
  margin-top: 6px;
}

.journal-content h2,
.entry-content h2 {
  max-width: none;
}

.journal-empty {
  padding: 28px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.journal-empty h3,
.journal-empty p {
  margin: 0;
}

.journal-empty h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
}

.journal-empty p {
  margin: 6px auto 18px;
  color: var(--muted-ink);
}

.journal-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journal-recap-row {
  align-items: center;
  margin: -8px 0 18px;
  padding-block: 8px;
  border-block: 1px solid var(--soft-border);
}

.journal-recap-row p,
.journal-filter-row p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.84rem;
}

.journal-tools {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.journal-tools > label,
.recap-year-control label {
  font-size: 0.86rem;
  font-weight: 750;
}

.journal-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journal-filter-row .button {
  min-width: 112px;
  min-height: 44px;
  padding-block: 7px;
}

.active-filter-shell {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.active-filter-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 12px;
  color: var(--ink);
  background: color-mix(in srgb, var(--moss) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 45%, var(--border));
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.filter-chip-remove {
  margin-left: 7px;
  color: var(--muted-ink);
  font-size: 1.1rem;
  line-height: 1;
}

.active-filter-shell > .text-button {
  min-height: 44px;
  padding-inline: 4px;
  white-space: nowrap;
}

.journal-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 96px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-surface);
}

.journal-card img {
  width: 112px;
  height: 96px;
  object-fit: cover;
}

.journal-card-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
}

.journal-card-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 1.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-card-copy span {
  color: var(--muted-ink);
  font-size: 0.84rem;
}

.recap-preview-card {
  display: grid;
  width: 100%;
  min-height: 148px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-surface);
}

.recap-preview-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 92px;
  background: var(--atlas-land);
}

.recap-preview-images img {
  width: 100%;
  height: 92px;
  object-fit: cover;
}

.recap-preview-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.recap-preview-copy strong {
  font-family: var(--serif);
  font-size: 1.15rem;
}

.recap-preview-copy small {
  color: var(--muted-ink);
  text-align: right;
}

.recap-year-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  align-items: center;
  gap: 16px;
  margin: 20px 0 10px;
}

.recap-groups {
  display: grid;
  gap: 28px;
}

.recap-month h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.recap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.recap-tile {
  position: relative;
  display: block;
  width: 100%;
  min-height: 166px;
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  color: #fffaf2;
  text-align: left;
  background: var(--atlas-land);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.recap-tile::after {
  position: absolute;
  inset: 42% 0 0;
  content: "";
  background: linear-gradient(transparent, rgb(17 18 15 / 86%));
}

.recap-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recap-tile-copy {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 9px;
  left: 10px;
  display: grid;
  text-shadow: 0 1px 7px rgb(0 0 0 / 65%);
}

.recap-tile-copy strong {
  overflow-wrap: anywhere;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.1;
}

.recap-tile-copy small {
  font-size: 0.73rem;
}

.journal-filter-dialog {
  width: min(100%, 430px);
  max-height: min(82dvh, 720px);
  margin: auto auto 0;
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgb(15 18 14 / 32%);
}

.journal-filter-dialog::backdrop {
  background: rgb(15 18 14 / 62%);
  backdrop-filter: blur(3px);
}

.journal-filter-dialog form {
  padding: 8px 16px max(24px, env(safe-area-inset-bottom));
}

.account-dialog > div {
  padding: 8px 16px max(24px, env(safe-area-inset-bottom));
}

.account-dialog #account-dialog-description {
  margin: 0;
  color: var(--muted-ink);
}

.account-dialog #sign-out-status {
  margin: 16px 0 0;
}

.journal-filter-dialog .country-sheet-header h2 {
  max-width: none;
  margin: 3px 0 2px;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1.08;
}

.journal-date-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.journal-filter-actions {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: var(--surface);
}

.entry-photo-shell {
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--atlas-land);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.entry-photo-shell img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-credit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 10px;
  min-height: 44px;
  margin: 0;
  padding: 5px 12px;
  color: var(--muted-ink);
  font-size: 0.76rem;
  line-height: 1.35;
}

.photo-credit-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.photo-credit[hidden] {
  display: none;
}

.photo-credit a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--terracotta);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.idea-detail-photo + .photo-credit {
  margin: -2px 0 8px;
  padding-inline: 2px;
}

.entry-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0;
}

.entry-facts div,
.entry-section {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.entry-facts dt {
  color: var(--muted-ink);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.entry-facts dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.entry-section {
  margin-top: 12px;
}

.entry-section h3,
.entry-section p {
  margin: 0;
}

.entry-section h3 {
  margin-bottom: 7px;
  font-size: 0.92rem;
}

.entry-section p {
  color: var(--muted-ink);
  white-space: pre-wrap;
}

.edit-content {
  padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 20px));
}

.edit-photo-shell {
  aspect-ratio: 4 / 3;
  margin: 22px 0 12px;
  overflow: hidden;
  background: var(--atlas-land);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.edit-photo-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.edit-photo-actions .button-secondary {
  background: var(--surface);
}

.edit-photo-message,
.save-status {
  margin: 10px 0 0;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--moss) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 50%, var(--border));
  border-radius: var(--radius-sm);
}

.edit-photo-message.is-error {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--danger) 55%, var(--border));
}

.save-status {
  margin: 0 0 12px;
}

.shared-dish-note {
  display: grid;
  gap: 4px;
  margin: 24px 0 18px;
  padding: 14px 16px;
  color: var(--ink);
  background: color-mix(in srgb, var(--moss) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 45%, var(--border));
  border-radius: var(--radius-md);
}

.shared-dish-note span {
  color: var(--muted-ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.compact-number-field > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-number-field input {
  width: 92px;
}

.compact-number-field div span {
  color: var(--muted-ink);
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px max(12px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.ideas-content,
.idea-form-content,
.idea-results-content,
.idea-review-content,
.idea-detail-content {
  padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 20px));
}

.ideas-tools {
  display: grid;
  gap: 8px;
  margin: 22px 0 18px;
}

.ideas-tools > label,
.idea-path-panel > label {
  font-size: 0.86rem;
  font-weight: 750;
}

.filter-tabs,
.idea-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: color-mix(in srgb, var(--atlas-land) 54%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.idea-paths {
  grid-template-columns: 1fr 1fr;
  margin: 22px 0 18px;
}

.filter-tabs button,
.idea-paths button {
  min-height: 44px;
  padding: 7px 10px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 750;
}

.filter-tabs button[aria-pressed="true"],
.idea-paths button[aria-selected="true"] {
  color: var(--terracotta);
  background: var(--surface);
  box-shadow: 0 2px 8px rgb(50 42 32 / 10%);
}

.ideas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.idea-card,
.idea-result-card {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-surface);
}

.idea-card {
  min-height: 226px;
}

.idea-card-photo,
.idea-result-photo,
.idea-review-image,
.idea-detail-photo {
  display: grid;
  overflow: hidden;
  place-items: center;
  color: var(--muted-ink);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--moss) 22%, var(--surface)), color-mix(in srgb, var(--saffron) 24%, var(--canvas)));
}

.idea-card-photo {
  aspect-ratio: 4 / 3;
}

.idea-card-photo img,
.idea-result-photo img,
.idea-review-image img,
.idea-detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.idea-photo-placeholder {
  padding: 12px;
  font-family: var(--serif);
  text-align: center;
}

.idea-card-copy {
  display: grid;
  gap: 3px;
  padding: 11px;
}

.idea-card-copy strong,
.idea-result-copy strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.idea-card-copy span,
.idea-result-copy span {
  color: var(--muted-ink);
  font-size: 0.78rem;
}

.idea-made-label {
  color: var(--moss) !important;
  font-weight: 750;
}

.idea-path-panel {
  display: grid;
  gap: 9px;
}

.idea-form-content > .inline-button {
  min-height: 44px;
  margin-top: 14px;
}

.empty-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.idea-results-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.idea-result-card {
  grid-template-columns: 104px minmax(0, 1fr);
  min-height: 112px;
}

.idea-result-photo {
  min-height: 112px;
}

.idea-result-copy {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding: 12px;
}

.idea-result-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted-ink);
  font-size: 0.8rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.idea-review-image,
.idea-detail-photo {
  aspect-ratio: 4 / 3;
  margin: 18px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.idea-photo-button {
  width: 100%;
  min-height: 44px;
}

.idea-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.idea-time-grid .field-group input {
  min-width: 0;
}

.idea-source-review,
.idea-source-detail {
  display: grid;
  gap: 3px;
  margin-top: 18px;
  padding: 14px;
  background: color-mix(in srgb, var(--atlas-water) 52%, var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.idea-source-review span,
.idea-source-detail span {
  color: var(--muted-ink);
  font-size: 0.84rem;
}

.idea-source-review a,
.idea-source-detail a {
  min-height: 44px;
  padding-top: 10px;
  color: var(--terracotta);
  font-weight: 750;
}

.idea-detail-photo {
  margin-top: 0;
}

.idea-detail-content .entry-section ul,
.idea-detail-content .entry-section ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.idea-detail-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.destructive-text {
  min-height: 44px;
  color: var(--danger);
}

@media (max-width: 390px) {
  .idea-time-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.bottom-nav button {
  display: grid;
  min-height: 52px;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px 8px;
  color: var(--muted-ink);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
}

.bottom-nav button[aria-current="page"] {
  color: var(--terracotta);
  background: color-mix(in srgb, var(--terracotta) 10%, transparent);
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.year-content h2,
.map-content h2 {
  max-width: none;
}

.year-hero {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0 0 14px;
  overflow: hidden;
  background: var(--atlas-land);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-surface);
}

.year-hero::after {
  position: absolute;
  inset: 42% 0 0;
  content: "";
  background: linear-gradient(transparent, rgb(17 18 15 / 84%));
}

.year-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.year-hero figcaption {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: grid;
  color: #fffaf2;
  text-shadow: 0 1px 8px rgb(0 0 0 / 52%);
}

.year-hero figcaption span,
.year-hero figcaption small {
  font-size: 0.75rem;
}

.year-hero figcaption strong {
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.1;
}

.year-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 28px;
  padding: 13px 0;
  border-block: 1px solid var(--border);
}

.year-stats div {
  text-align: center;
}

.year-stats div + div {
  border-left: 1px solid var(--border);
}

.year-stats dt {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.year-stats dd {
  margin: 5px 0 0;
  color: var(--muted-ink);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.dashboard-section {
  margin: 0 0 28px;
}

.demo-welcome-card {
  margin: 0 0 22px;
  padding: 18px;
  background: color-mix(in srgb, var(--terracotta) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--terracotta) 32%, var(--border));
  border-radius: var(--radius-md);
}

.demo-welcome-card h3 {
  margin: 4px 0 7px;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.12;
}

.demo-welcome-card p:last-child {
  margin: 0;
  color: var(--muted-ink);
}

.archive-safety-card {
  margin: 8px 0 24px;
  padding: 18px;
  background: color-mix(in srgb, var(--moss) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--moss) 48%, var(--border));
  border-radius: var(--radius-md);
}

.archive-safety-card h3,
.backup-section h3 {
  margin: 4px 0 7px;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.12;
}

.archive-safety-card > p:not(.eyebrow),
.backup-section > p:not(.eyebrow, .restore-blocker) {
  margin: 0 0 14px;
  color: var(--muted-ink);
}

.archive-safety-card .button,
.backup-section > .button,
.backup-section > .file-button,
.restore-preview > .button {
  width: 100%;
}

.backup-content {
  scroll-padding-bottom: calc(40px + env(safe-area-inset-bottom));
}

.backup-section {
  margin: 0 0 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.backup-section:last-child {
  border-bottom: 0;
}

.backup-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 16px;
  padding: 14px 0;
  border-block: 1px solid var(--border);
}

.backup-counts div {
  min-width: 0;
  padding-inline: 5px;
  text-align: center;
}

.backup-counts div + div {
  border-left: 1px solid var(--border);
}

.backup-counts dt {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.backup-counts dd {
  margin: 5px 0 0;
  color: var(--muted-ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.storage-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.storage-status-row div {
  display: grid;
  gap: 2px;
}

.storage-status-row span,
.backup-section .field-helper {
  color: var(--muted-ink);
  font-size: 0.84rem;
}

.storage-status-row .text-button {
  min-width: 96px;
}

.backup-section .field-helper {
  margin: 10px 0 0;
}

.restore-preview {
  margin-top: 14px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.restore-preview-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.restore-preview-heading h4 {
  margin: 3px 0 0;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.restore-details {
  display: grid;
  gap: 0;
  margin: 14px 0;
}

.restore-details div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--soft-border);
}

.restore-details dt {
  color: var(--muted-ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.restore-details dd {
  margin: 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.restore-blocker,
.erase-warning {
  margin: 0 0 14px;
  padding: 11px 12px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 50%, var(--border));
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 650;
}

.danger-zone {
  margin-bottom: 0;
  padding: 18px;
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 42%, var(--border));
  border-radius: var(--radius-md);
}

.danger-zone .eyebrow,
.danger-zone h3 {
  color: var(--danger);
}

.erase-dialog {
  width: min(calc(100% - 32px), 398px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgb(15 18 14 / 38%);
}

.erase-dialog::backdrop {
  background: rgb(15 18 14 / 68%);
  backdrop-filter: blur(3px);
}

.erase-dialog form {
  padding: 22px;
}

.erase-dialog > div {
  padding: 22px;
}

.demo-invitation-dialog .dialog-actions {
  grid-template-columns: 1fr;
}

.erase-dialog h2 {
  margin: 5px 0 9px;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.08;
}

.erase-dialog label {
  display: block;
  margin: 16px 0 6px;
  font-size: 0.88rem;
  font-weight: 700;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.migration-actions {
  grid-template-columns: 1fr;
}

@media (max-width: 374px) {
  .backup-counts {
    grid-template-columns: repeat(2, 1fr);
  }

  .backup-counts div:nth-child(3) {
    border-left: 0;
  }

  .backup-counts div:nth-child(n + 3) {
    padding-top: 12px;
    border-top: 1px solid var(--soft-border);
  }

  .dialog-actions {
    grid-template-columns: 1fr;
  }
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 11px;
}

.section-heading-row h3,
.map-selection h3 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.1;
}

.section-action {
  min-height: 44px;
  padding-inline: 6px;
}

.atlas-preview,
.atlas-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--atlas-water);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.atlas-preview {
  display: block;
  aspect-ratio: 16 / 9;
  padding: 0;
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-surface);
}

.atlas-stage {
  aspect-ratio: 1.55 / 1;
  margin-bottom: 14px;
}

.map-mode-control,
.map-photo-picker,
.map-location-editor {
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.map-mode-control legend,
.map-photo-picker legend,
.map-location-editor legend {
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 750;
}

.map-mode-control .segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.map-mode-control .segmented-control button { min-height: 44px; }

.map-density-legend {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  margin: -4px 0 12px;
  color: var(--muted-ink);
  font-size: 0.72rem;
}

.map-density-legend-title {
  font-weight: 750;
  white-space: nowrap;
}

.map-density-legend ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-density-legend li {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.map-density-legend i {
  display: block;
  height: 9px;
  background: var(--density-color);
  border-block: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
}

[data-density-band="1"] { --density-color: var(--density-1); }
[data-density-band="2"] { --density-color: var(--density-2); }
[data-density-band="3"] { --density-color: var(--density-3); }
[data-density-band="4"] { --density-color: var(--density-4); }
[data-density-band="5"] { --density-color: var(--density-5); }

.culinary-peak {
  position: absolute;
  top: var(--map-y);
  left: var(--map-x);
  width: 28px;
  height: calc(var(--peak-height) + 16px);
  transform: translate(-50%, calc(-100% + 9px)) scale(var(--map-counter-scale));
  transform-origin: bottom center;
  pointer-events: none;
}

.culinary-peak::after {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 24px;
  height: 8px;
  background: color-mix(in srgb, var(--density-color) 38%, transparent);
  border-radius: 50%;
  box-shadow: 7px 5px 10px color-mix(in srgb, var(--ink) 26%, transparent);
  content: "";
  transform: translateX(-50%) rotate(-12deg);
}

.culinary-peak-column {
  position: absolute;
  bottom: 7px;
  left: 50%;
  width: 9px;
  height: var(--peak-height);
  background: linear-gradient(90deg, color-mix(in srgb, var(--density-color) 72%, var(--ink)), var(--density-color) 48%, color-mix(in srgb, var(--density-color) 80%, white));
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  border-radius: 5px 5px 2px 2px;
  box-shadow: 4px 5px 9px color-mix(in srgb, var(--ink) 26%, transparent);
  transform: translateX(-50%) skewY(-4deg);
  transform-origin: bottom;
}

.culinary-peak-count {
  position: absolute;
  top: -1px;
  left: 50%;
  display: grid;
  min-width: 19px;
  height: 19px;
  padding-inline: 4px;
  place-items: center;
  color: var(--ink);
  background: var(--surface-strong);
  border: 2px solid var(--density-color);
  border-radius: 10px;
  box-shadow: 0 2px 5px color-mix(in srgb, var(--ink) 22%, transparent);
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 850;
  transform: translateX(-50%);
}

.atlas-map-layer {
  --map-scale: 1;
  --map-tx: 0%;
  --map-ty: 0%;
  --map-peak-shift: 0%;
  --map-counter-scale: 1;
  position: absolute;
  inset: 0;
  transform: translate(var(--map-tx), calc(var(--map-ty) + var(--map-peak-shift))) scale(var(--map-scale));
  transform-origin: 0 0;
  transition: transform 220ms cubic-bezier(0.22, 0.75, 0.25, 1);
  will-change: transform;
}

#full-map[data-level="world"][data-map-mode="peaks"] .atlas-map-layer {
  --map-peak-shift: 12%;
}

.world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.world-country {
  fill: var(--atlas-land);
  stroke: color-mix(in srgb, var(--border) 82%, transparent);
  stroke-width: 0.7;
  transition: fill 180ms ease, stroke 180ms ease;
}

#full-map .world-country.is-selected {
  fill: color-mix(in srgb, var(--terracotta) 28%, var(--atlas-land));
  stroke: var(--terracotta);
  stroke-width: 1.5;
}

#full-map .world-country {
  cursor: pointer;
  pointer-events: auto;
}

#full-map[data-level="region"] .world-country:not(.is-in-region) {
  opacity: 0.26;
}

#full-map[data-level="region"] .world-country.is-in-region {
  fill: color-mix(in srgb, var(--moss) 15%, var(--atlas-land));
  stroke: color-mix(in srgb, var(--moss) 68%, var(--border));
}

#full-map[data-level="region"] .world-country.is-selected {
  fill: color-mix(in srgb, var(--terracotta) 28%, var(--atlas-land));
  stroke: var(--terracotta);
}

#full-map[data-map-mode="density"] .world-country.has-density {
  fill: var(--density-color);
  stroke: color-mix(in srgb, var(--density-color) 60%, var(--ink));
  stroke-width: 0.9;
}

#full-map[data-map-mode="peaks"] .world-country.has-density {
  fill: color-mix(in srgb, var(--density-color) 22%, var(--atlas-land));
  stroke: color-mix(in srgb, var(--density-color) 52%, var(--border));
}

#full-map .world-country.is-selected {
  stroke: var(--terracotta);
  stroke-width: 1.5;
}

.map-cells {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  aspect-ratio: 2 / 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.map-photo-cell {
  position: absolute;
  top: var(--map-y);
  left: var(--map-x);
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: visible;
  place-items: center;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 2px solid var(--surface-strong);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(15 18 14 / 30%);
  pointer-events: auto;
}

.atlas-preview .map-photo-cell {
  width: 34px;
  height: 34px;
  border-width: 1px;
  border-radius: 9px;
}

.map-photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.map-photo-cell[aria-pressed="true"] {
  outline: 3px solid var(--terracotta);
  outline-offset: 2px;
}

.region-map-cluster,
.country-map-cluster {
  position: absolute;
  top: var(--map-y);
  left: var(--map-x);
  display: grid;
  width: 72px;
  min-width: 72px;
  height: 72px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  transform: translate(-50%, -50%) scale(var(--map-counter-scale));
  transform-origin: center;
  pointer-events: auto;
}

.country-map-cluster {
  width: 58px;
  min-width: 58px;
  height: 58px;
}

.cluster-photos {
  position: relative;
  width: 50px;
  height: 48px;
}

.cluster-photos img {
  position: absolute;
  top: 3px;
  left: 6px;
  width: 40px;
  height: 40px;
  object-fit: cover;
  background: var(--surface);
  border: 2px solid var(--surface-strong);
  border-radius: 11px;
  box-shadow: 0 4px 12px rgb(15 18 14 / 30%);
}

.cluster-photos img:nth-child(2) {
  transform: translate(-8px, 5px) rotate(-7deg);
}

.cluster-photos img:nth-child(3) {
  transform: translate(8px, 5px) rotate(7deg);
}

.cluster-photos img:first-child {
  z-index: 2;
}

.country-map-cluster .cluster-photos img {
  left: 5px;
  width: 44px;
  height: 44px;
}

.cluster-label {
  position: absolute;
  top: 51px;
  left: 50%;
  max-width: 128px;
  padding: 3px 6px;
  overflow: hidden;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  border: 1px solid var(--border);
  border-radius: 7px;
  box-shadow: 0 2px 7px rgb(15 18 14 / 14%);
  font-size: 0.65rem;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

.country-map-cluster .cluster-label {
  display: none;
}

.cluster-overflow,
.country-cluster-count {
  position: absolute;
  z-index: 3;
  right: 3px;
  bottom: 13px;
  display: grid;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  color: var(--on-terracotta);
  background: var(--terracotta);
  border: 2px solid var(--canvas);
  border-radius: 11px;
  font-size: 0.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.country-cluster-count {
  right: 0;
  bottom: 3px;
}

.region-map-cluster:active .cluster-photos,
.country-map-cluster:active .cluster-photos,
.country-card:active,
.country-dish-card:active {
  opacity: 0.72;
}

.map-cell-count {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  color: var(--on-terracotta);
  background: var(--terracotta);
  border: 2px solid var(--canvas);
  border-radius: 10px;
  font-size: 0.66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.atlas-preview-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 7px 9px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  border-radius: 9px;
  font-size: 0.75rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.map-helper,
.map-selection p,
.dashboard-empty {
  color: var(--muted-ink);
  font-size: 0.84rem;
}

.map-helper {
  margin: 8px 2px 0;
}

.map-status {
  min-height: 1.4em;
  margin-bottom: 20px;
}

.country-shelf {
  display: grid;
  grid-auto-columns: 156px;
  grid-auto-flow: column;
  gap: 12px;
  margin: 0 -16px;
  padding: 0 16px 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  list-style: none;
  scroll-padding-inline: 16px;
  scroll-snap-type: inline proximity;
}

.country-card {
  display: grid;
  width: 100%;
  min-height: 196px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  scroll-snap-align: start;
  transition: opacity var(--duration-fast), border-color var(--duration-fast);
}

.country-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.country-card-copy {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
  padding: 10px;
}

.country-card-copy strong,
.country-card-copy span {
  overflow-wrap: anywhere;
}

.country-card-copy span {
  color: var(--muted-ink);
  font-size: 0.78rem;
}

.country-sheet-layer {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: flex;
  align-items: end;
}

.country-sheet-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  background: rgb(15 18 14 / 58%);
  border: 0;
}

.country-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(76%, 680px);
  padding: 8px 16px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -18px 50px rgb(15 18 14 / 26%);
  animation: sheet-enter var(--duration-standard) ease-out;
}

.sheet-handle {
  width: 38px;
  height: 5px;
  margin: 2px auto 10px;
  background: var(--border);
  border-radius: 3px;
}

.country-sheet-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.country-sheet-header h3 {
  margin: 3px 0 2px;
  font-family: var(--serif);
  font-size: 1.8rem;
  line-height: 1.08;
}

.country-sheet-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.86rem;
}

.map-customize-dialog { width: min(100%, 560px); }

.map-photo-options {
  display: grid;
  grid-auto-columns: 112px;
  grid-auto-flow: column;
  gap: 10px;
  max-width: 100%;
  padding-bottom: 6px;
  overflow-x: auto;
}

.map-photo-option {
  display: grid;
  min-height: 132px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--canvas);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
}

.map-photo-option[aria-pressed="true"] { border-color: var(--terracotta); }
.map-photo-option img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.map-photo-option span { padding: 7px; font-size: 0.76rem; font-weight: 750; }

.map-location-stage {
  --editor-aspect: 1.55;
  position: relative;
  width: 100%;
  aspect-ratio: var(--editor-aspect);
  min-height: 190px;
  max-height: 330px;
  overflow: hidden;
  touch-action: none;
  background: var(--atlas-water);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.editor-country-shape {
  fill: color-mix(in srgb, var(--moss) 18%, var(--atlas-land));
  stroke: var(--moss);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.map-editor-marker {
  position: absolute;
  top: var(--editor-y);
  left: var(--editor-x);
  width: 52px;
  min-width: 52px;
  height: 52px;
  padding: 3px;
  overflow: hidden;
  background: var(--surface);
  border: 3px solid var(--terracotta);
  border-radius: 14px;
  box-shadow: 0 5px 14px rgb(15 18 14 / 32%);
  transform: translate(-50%, -50%);
  cursor: grab;
}

.map-editor-marker:active { cursor: grabbing; }
.map-editor-marker img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }

.map-nudge-controls {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
}

.map-nudge-controls button {
  min-width: 48px;
  min-height: 44px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
}

.sheet-close {
  min-width: 56px;
}

.country-dish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.country-dish-card {
  display: grid;
  width: 100%;
  min-height: 188px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: opacity var(--duration-fast), border-color var(--duration-fast);
}

.country-dish-card[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.62;
}

.country-dish-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.country-dish-card span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px;
}

.country-dish-card strong,
.country-dish-card small {
  overflow-wrap: anywhere;
}

.country-dish-card small {
  color: var(--muted-ink);
}

@keyframes sheet-enter {
  from { transform: translateY(18px); opacity: 0; }
}

.dish-history-list {
  display: grid;
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.dish-history-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-surface);
}

.dish-history-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.dish-history-card-copy {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.dish-history-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: space-between;
}

.dish-history-card-header time {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 700;
}

.dish-history-card-header span,
.dish-history-field span {
  color: var(--muted-ink);
  font-size: 0.78rem;
}

.dish-history-field {
  display: grid;
  gap: 2px;
}

.dish-history-field p {
  margin: 0;
  overflow-wrap: anywhere;
}

.dish-strip {
  display: grid;
  grid-auto-columns: 148px;
  grid-auto-flow: column;
  gap: 10px;
  margin: 0 -16px;
  padding: 0 16px 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  list-style: none;
  scroll-snap-type: inline proximity;
}

.dish-strip-card {
  display: grid;
  width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  scroll-snap-align: start;
}

.dish-strip-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.dish-strip-card span,
.repeat-card span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
}

.dish-strip-card strong,
.repeat-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dish-strip-card small,
.repeat-card small {
  color: var(--muted-ink);
  line-height: 1.35;
}

.repeat-list,
.geographic-list,
.needs-location-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.repeat-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 72px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.repeat-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.dashboard-empty {
  padding: 14px;
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.map-selection {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  margin-bottom: 26px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.map-selection img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.map-selection p {
  margin: 4px 0 0;
}

.map-selection .inline-button {
  min-height: 44px;
  padding: 8px 0;
}

.geographic-list button {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.needs-location-list li {
  padding: 10px 12px;
  color: var(--muted-ink);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  border-radius: var(--radius-sm);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 900px) {
  body {
    background: var(--canvas);
  }

  .prototype-layout {
    display: block;
    min-height: 100dvh;
    padding: 0;
  }

  .prototype-panel {
    display: none;
  }

  .phone-frame {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 374px) {
  .photo-actions {
    grid-template-columns: 1fr;
  }

  .photo-picker {
    aspect-ratio: 1 / 1;
  }

}

@media (orientation: landscape) and (max-height: 600px) and (max-width: 950px) {
  .phone-frame {
    height: 100dvh;
    max-width: none;
  }

  .screen-scroll {
    padding-right: max(24px, env(safe-area-inset-right));
    padding-left: max(24px, env(safe-area-inset-left));
  }

  .photo-picker,
  .confirm-photo {
    max-width: 520px;
    aspect-ratio: 16 / 9;
    margin-right: auto;
    margin-left: auto;
  }
}

.additional-dishes-section,
.occasion-gallery,
.occasion-dishes {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--soft-border);
}

.additional-dish-card,
.occasion-dish-card {
  position: relative;
  min-width: 0;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.additional-dish-card legend,
.occasion-dish-card h3 {
  padding: 0 6px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.additional-match-group {
  margin-top: 16px;
}

.additional-match-group legend {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 750;
}

.additional-dish-remove {
  position: absolute;
  top: 6px;
  right: 8px;
}

.danger-text { color: var(--danger); }

.occasion-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.occasion-photo-tile {
  position: relative;
  min-width: 44px;
  min-height: 88px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--atlas-land);
  cursor: pointer;
}

.occasion-photo-tile img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.occasion-photo-tile span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  padding: 3px 5px;
  border-radius: 6px;
  color: #fff;
  background: rgb(0 0 0 / 68%);
  font-size: .72rem;
  overflow-wrap: anywhere;
}

.occasion-dish-card p { margin: 6px 0; }
.occasion-dish-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.compact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.photo-actions-preview {
  display: block;
  width: 100%;
  max-height: 32dvh;
  margin: 12px 0 16px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: var(--canvas);
}

.photo-actions-dialog .button { width: 100%; margin-top: 8px; }

@media (min-width: 700px) {
  .occasion-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
