/* One home task, a readable map, and a separate shopping-list composer. */
:root {
  --uyali-phone-gutter: 20px;
  --uyali-brand: var(--emerald-700);
  --uyali-brand-text: var(--emerald-700);
  --uyali-brand-soft: var(--emerald-50);
  --uyali-focus: var(--emerald-700);
  --uyali-control-border: var(--zinc-500); /* ≥3:1 non-text contrast (WCAG 1.4.11) */
}
:root[data-theme="dark"] {
  --uyali-brand: var(--emerald-400);
  --uyali-brand-text: var(--emerald-200);
  --uyali-brand-soft: var(--zinc-800);
  --uyali-focus: var(--emerald-400);
  --uyali-control-border: var(--zinc-500);
}
#top-nav { border-bottom-width: 1px; box-shadow: none; }
.nav-logo { background: var(--emerald-700); border-radius: 11px; box-shadow: none; }
.nav-logo-icon { color: #fff; }
.nav-title { letter-spacing: -.04em; }
.nav-btn.active, .mobile-nav-btn.active { color: var(--uyali-brand-text); }
.nav-role-switcher[data-role] .role-switcher-btn { border-color: var(--border-subtle); }
.nav-role-switcher[data-role] .role-switcher-icon { color: var(--uyali-brand-text); }
.home-sidebar { width: 380px; border-inline-end: 1px solid var(--border-subtle); border-right-width: 1px; box-shadow: none; min-width: 0; }
.home-start { display: flex; flex-direction: column; gap: 16px; padding: 32px 24px 24px; }
.home-kicker { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.4; }
#home-start-title { margin: -8px 0 2px; font-size: 30px; line-height: 1.15; letter-spacing: -.045em; font-weight: 750; color: var(--text-primary); }
.home-start #home-start-title.sr-only { margin: 0; }
.home-destination { display: grid; min-width: 0; gap: 0; }
.home-destination-button { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 64px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--bg-input); color: var(--text-primary); font: inherit; text-align: start; cursor: pointer; }
.home-destination-button > svg { width: 21px; height: 21px; flex: none; }
.home-destination-button > svg:last-child { width: 18px; height: 18px; color: var(--text-secondary); }
.home-destination-copy { display: grid; flex: 1; min-width: 0; gap: 4px; }
.home-destination-caption { color: var(--text-secondary); font-size: 11px; line-height: 1.2; }
.home-destination-value { font-size: 15px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.home-location-button { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--uyali-brand-text); font: inherit; font-size: 13px; font-weight: 550; line-height: 1.4; text-align: start; cursor: pointer; }
.home-location-button svg { width: 18px; height: 18px; flex: none; }
.home-location-button:hover { background: var(--bg-input); }
.home-destination :is(button):focus-visible { outline: 3px solid var(--uyali-focus); outline-offset: 3px; }
.home-request-button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 16px 18px; border: 0; border-radius: 14px; background: var(--emerald-700); color: #fff; font-size: 17px; font-weight: 650; text-align: start; cursor: pointer; }
.home-request-button > span { flex: 1; min-width: 0; line-height: 1.35; }
.home-request-button > svg { width: 22px; height: 22px; flex: none; }
.home-request-button > svg:last-child { width: 20px; height: 20px; }
.home-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.home-shortcuts > button { min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 8px; border: 1px solid var(--border-subtle); border-radius: 12px; color: var(--text-primary); background: var(--bg-card); font-size: 13px; font-weight: 550; cursor: pointer; line-height: 1.3; }
.home-shortcuts svg { width: 19px; height: 19px; flex: none; color: var(--text-secondary); }
.home-mode-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-secondary); }
.home-sidebar[data-view="start"] > :is(.sidebar-header,.sidebar-form,.sidebar-footer) { display: none; }
.home-sidebar[data-view="compose"] > .home-start { display: none; }
.profile-language { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px 12px; border-bottom: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-secondary); }
.profile-language select { width: 115px; min-height: 44px; padding: 8px; border: 1px solid var(--border-subtle); border-radius: 10px; background: var(--bg-input); color: var(--text-primary); font: inherit; }
.uyali-language-nav select { background: var(--bg-card); color: var(--text-primary); }
.profile-dropdown { right: auto; inset-inline-end: 0; width: min(260px,calc(100vw - 40px)); }
.role-switcher-dropdown { right: auto; inset-inline-end: 0; }
[dir="rtl"] .home-sidebar { border-right-width: 0; }
.sidebar-header { padding: 24px 20px 0; gap: 12px; align-items: center; justify-content: flex-start; }
.sidebar-header > div { flex: 1; min-width: 0; }
.home-field-hint { margin: 8px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.sidebar-title { font-size: 23px; font-weight: 700; letter-spacing: -.035em; }
.sidebar-subtitle { font-size: 13px; color: var(--text-secondary); line-height: 1.45; margin-top: 6px; }
.home-back-button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--border-subtle); border-radius: 50%; background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.home-back-button svg { width: 21px; height: 21px; }
.sidebar-form { padding: 20px; }
#uyali-list-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 16px; }
#uyali-list-tools .uyali-text-button { min-height: 40px; color: var(--uyali-brand-text); font-size: 13px; }
.home-sidebar .errand-stop { border: 0; padding: 0; margin: 0 0 20px; background: transparent; border-radius: 0; box-shadow: none; }
.home-sidebar .errand-stop:only-child > .stop-header { display: none; }
.home-sidebar .form-group { margin-bottom: 22px; }
.home-sidebar .form-label { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text-primary); font-weight: 600; margin-bottom: 9px; }
.home-sidebar .form-input-wrap { height: auto; min-height: 50px; border: 1px solid var(--border-primary); border-radius: 12px; background: var(--bg-input); box-shadow: none; }
.home-sidebar .form-input-wrap:focus-within { border-color: var(--uyali-brand); box-shadow: 0 0 0 1px var(--uyali-brand); }
.home-sidebar .form-input { min-height: 48px; font-size: 16px; }
.home-sidebar .form-chips { flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.home-sidebar .chip { font-size: 12px; padding: 9px 12px; border-radius: 10px; min-height: 40px; }
.home-sidebar .chip.active { color: var(--uyali-brand-text); background: var(--uyali-brand-soft); border-color: var(--uyali-brand); }
.home-sidebar .item-icon-wrap { display: none; }
.home-sidebar .item-main { gap: 8px; }
.home-sidebar .item-input { font-size: 16px; min-height: 50px; border-radius: 12px; }
.home-sidebar .item-actions { padding-inline-start: 0; }
.home-sidebar .item-row { gap: 8px; }
.home-sidebar .uyali-local-reference { margin-top: 6px; }
.home-sidebar .add-item-btn { min-height: 44px; border-radius: 11px; color: var(--uyali-brand-text); border-color: var(--border-primary); }
.home-sidebar .transport-card { min-height: 96px; padding: 14px 10px; }
.home-sidebar .price-breakdown { padding: 14px 0 0; margin-top: 12px; border-radius: 0; border: 0; border-top: 1px solid var(--border-subtle); background: transparent; }
.home-sidebar .price-row { font-size: 13px; }
.home-sidebar .sidebar-footer { padding: 14px 20px 20px; border-top: 1px solid var(--border-subtle); box-shadow: none; background: var(--bg-card); }
.home-sidebar .checkout-btn { background: var(--emerald-700); color: #fff; min-height: 56px; height: auto; padding: 12px 16px; border-radius: 13px; box-shadow: none; }
.home-sidebar .checkout-btn.disabled { background: var(--bg-input); color: var(--text-secondary); box-shadow: none; }
.home-sidebar .checkout-label { font-size: 15px; opacity: 1; font-weight: 650; }
.home-sidebar .checkout-price { font-size: 12px; font-weight: 500; margin-top: 3px; }
.home-sidebar .checkout-arrow { border-radius: 50%; width: 34px; height: 34px; background: transparent; }
.home-map { min-width: 0; overflow: hidden; }
.mobile-bottom-nav { border-top-width: 1px; }
.mobile-bottom-nav .mobile-nav-btn { font-size: 11px; letter-spacing: 0; font-weight: 550; color: var(--text-secondary); gap: 5px; }
.mobile-bottom-nav .mobile-nav-btn.active { color: var(--uyali-brand-text); }
.mobile-nav-btn.active svg { transform: none; }
[dir="rtl"] :is(.home-request-button,.home-destination-button) > svg:last-child, [dir="rtl"] .home-back-button svg { transform: scaleX(-1); }
[dir="rtl"] :is(#home-start-title,.sidebar-title) { letter-spacing: normal; }
@media (min-width: 769px) {
  .home-start { padding-top: 42px; }
  .home-sidebar[data-view="start"] { justify-content: flex-start; }
}
@media (max-width: 768px) {
  #app { height: var(--uyali-viewport-height,100dvh); }
  #top-nav { height: 64px; min-height: 64px; padding-inline: var(--uyali-phone-gutter); gap: 8px; }
  .nav-brand { gap: 7px; flex: none; }
  .nav-title { display: inline; font-size: 18px; }
  .nav-logo { width: 31px; height: 31px; }
  .nav-right { gap: 4px; min-width: 0; }
  .nav-right .theme-toggle-btn { display: none; }
  #top-nav .uyali-language-nav { display: none; }
  .role-switcher-btn { width: auto; min-height: 44px; padding: 0 10px; gap: 6px; font-size: 12px; }
  .role-switcher-btn .role-switcher-icon { width: 18px; height: 18px; flex: none; }
  .role-switcher-label { display: inline; max-width: 100px; overflow: hidden; text-overflow: ellipsis; text-transform: none; font-weight: 600; letter-spacing: 0; }
  .role-switcher-btn .role-switcher-chevron { display: block; width: 12px; height: 12px; flex: none; }
  .nav-avatar { width: 32px; height: 32px; }
  .nav-profile-btn { width: 44px; height: 44px; padding: 6px; }
  #app:has(#screen-home.active) #top-nav { position: absolute; inset: env(safe-area-inset-top,0px) 0 auto; height: 64px; min-height: 64px; padding-block: 0; z-index: 1600; background: transparent; border: 0; backdrop-filter: none; pointer-events: none; }
  #top-nav .role-switcher-dropdown { position: fixed; inset: calc(64px + env(safe-area-inset-top,0px)) var(--uyali-phone-gutter) auto; inset-inline: var(--uyali-phone-gutter); min-width: 0; width: auto; }
  #app:has(#screen-home.active) #top-nav .nav-brand { padding: 6px 12px 6px 6px; border-radius: 30px; background: var(--bg-card); box-shadow: 0 2px 12px rgb(0 0 0 / .08); pointer-events: auto; }
  #app:has(#screen-home.active) #top-nav .nav-right { pointer-events: auto; gap: 8px; }
  #app:has(#screen-home.active) #top-nav :is(.role-switcher-btn,.nav-profile-btn) { background: var(--bg-card); border-radius: 28px; box-shadow: 0 2px 12px rgb(0 0 0 / .08); }
  #app:has(#screen-home.active .home-sidebar[data-view="compose"]) :is(#top-nav,.mobile-bottom-nav) { display: none; }
  #app:has(#screen-home.active .home-sidebar[data-view="compose"]) #main-content { margin-bottom: 0; }
  #main-content { margin-bottom: calc(68px + env(safe-area-inset-bottom,0px)); }
  #screen-home.active { display: block; position: absolute; inset: 0; overflow: hidden; }
  #screen-home .home-map { position: absolute; inset: 0; height: 100%; min-height: 0; display: block; }
  #screen-home:has(.home-sidebar.expanded) .home-map { display: block; }
  #screen-home .home-sidebar { position: absolute; inset: auto 0 0; width: 100%; height: auto; max-height: min(84%,640px); min-height: 0; border: 0; border-top: 1px solid var(--border-subtle); border-radius: 24px 24px 0 0; box-shadow: 0 -4px 20px rgb(0 0 0 / .07); z-index: 1500; overflow: hidden; }
  #screen-home .home-sidebar[data-view="compose"] { height: 70%; }
  #screen-home .home-sidebar[data-view="compose"].expanded { height: 100%; max-height: 100%; border-radius: 0; }
  .home-sidebar .sheet-drag-handle { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; min-height: 44px; height: 44px; padding: 0; width: 100%; border: 0; background: transparent; touch-action: none; }
  .home-sidebar .sheet-drag-handle:focus-visible { outline: 3px solid var(--uyali-focus); outline-offset: -4px; border-radius: 20px; }
  .home-start { padding: 0 var(--uyali-phone-gutter) 20px; gap: 14px; overflow-y: auto; overscroll-behavior: contain; }
  #home-start-title { font-size: 26px; margin: 0; }
  .home-kicker { font-size: 12px; }
  .home-request-button { min-height: 58px; font-size: 16px; }
  .home-shortcuts > button { min-height: 48px; }
  .home-mode-note { font-size: 12px; }
  .sidebar-header { padding: 0 var(--uyali-phone-gutter) 16px; flex: none; }
  .sidebar-title { font-size: 22px; }
  .sidebar-form { padding: 4px var(--uyali-phone-gutter) 20px; min-height: 0; overflow-y: auto; }
  .home-sidebar .sidebar-footer { padding: 12px var(--uyali-phone-gutter) max(16px,env(safe-area-inset-bottom,0px)); flex: none; }
  .mobile-bottom-nav { height: calc(68px + env(safe-area-inset-bottom,0px)); }
  .uyali-keyboard-open .mobile-bottom-nav { display: none !important; }
  .uyali-keyboard-open #main-content { padding-bottom: 0; margin-bottom: 0; }
}
@media (max-width: 370px) {
  :root { --uyali-phone-gutter: 16px; }
  .nav-title { font-size: 16px; }
  .role-switcher-label { max-width: 76px; }
  #home-start-title { font-size: 25px; }
}
@media (max-width: 768px) and (max-height: 560px) {
  .home-start { gap: 10px; padding-block: 14px; }
  .home-kicker { display: none; }
  #home-start-title { font-size: 22px; margin: 0; }
  .home-request-button { min-height: 48px; padding-block: 12px; }
  .home-shortcuts > button { min-height: 44px; }
  #screen-home .home-sidebar[data-view="compose"] { height: 100%; max-height: 100%; }
  .sidebar-header { padding-block: 8px; }
  .sidebar-subtitle { display: none; }
}
@media (max-width: 768px) and (max-height: 440px) {
  .home-sidebar[data-view="start"] :is(#home-start-title,.home-shortcuts) { display: none; }
  .home-sidebar[data-view="start"] .home-start { padding-block: 0 12px; gap: 8px; }
  #screen-home .home-sidebar[data-view="start"] { max-height: calc(100% - 128px); }
  .home-destination { grid-template-columns: minmax(0,1fr) 88px; gap: 8px; }
  .home-destination-button { padding: 9px 10px; gap: 8px; }
  .home-destination-button > svg:first-child { display: none; }
  .home-destination-value { font-size: 13px; }
  .home-location-button { justify-content: center; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--border-subtle); font-size: 11px; line-height: 1.25; text-align: center; }
}
