/* Phone screens share an app bar, compact surfaces and a thumb-friendly tab dock. */
.app-mobile-header,.app-copy-mobile { display:none; }

@media (max-width:700px) {
  html { scroll-padding-top:88px; }
  body { background:#160922;overscroll-behavior-y:none; }
  .workspace { min-height:100dvh; }
  .topbar {
    position:sticky;top:0;z-index:35;
    height:calc(66px + env(safe-area-inset-top,0px));
    padding:env(safe-area-inset-top,0px) 17px 0;
    background:#211033ed;border-bottom:1px solid #d4adf21a;
    backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);
  }
  .topbar>.mobile-brand { display:none; }
  .app-mobile-header { display:flex;align-items:center;gap:10px;min-width:0;flex:1; }
  .app-mobile-mark { width:35px;height:35px;flex:none;border-radius:12px;box-shadow:0 4px 14px #9c48db30; }
  .app-mobile-copy { min-width:0; }
  .app-mobile-copy strong { display:block;color:#fff;font-size:1.1875rem;line-height:1.25;font-weight:750;letter-spacing:-.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  .app-mobile-copy small { display:block;margin-top:3px;color:#c0a6d4;font-size:.75rem;line-height:1.3; }
  .app-mobile-back { display:grid;place-items:center;width:36px;height:40px;flex:none;border:1px solid #d8aef529;background:#b97ced12;border-radius:12px;padding:0;color:#eee0fa; }
  .app-mobile-back>.ico { transform:rotate(180deg);width:20px;height:20px; }
  .top-actions { gap:7px;flex:none;margin-left:8px; }
  .language-btn { min-height:40px;padding:7px 5px;font-size:.8125rem; }
  .language-btn>.ico:first-child { display:none; }
  .notification-btn { width:37px;height:37px;border-radius:13px; }
  .content { padding:16px 16px calc(118px + env(safe-area-inset-bottom,0px));max-width:540px; }
  .content.app-screen-enter { animation:app-screen-in .2s ease-out; }
  .footer-note { display:none; }
  .app-copy-desktop { display:none; }
  .app-copy-mobile { display:inline; }

  /* A small destination card leaves the first screen to the journey finder. */
  .hero { height:138px;min-height:138px;align-items:center;padding:19px 20px;border-radius:23px;box-shadow:0 8px 24px #05010b26; }
  .hero-art { object-position:80% 45%; }
  .hero:after { background:linear-gradient(90deg,#241037ed,#251039b0 58%,#25103918),linear-gradient(0deg,#1a0a2c6b,transparent); }
  .hero-copy { max-width:94%; }
  .hero .eyebrow { font-size:.75rem;letter-spacing:.7px;margin-bottom:8px; }
  .hero h1 { font-size:1.6rem;line-height:1.2;letter-spacing:-.65px; }
  .hero p { font-size:1rem;line-height:1.45;margin-top:7px;max-width:250px; }
  .hero p .app-copy-desktop { display:none; }

  .search-panel {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:"origin origin" "destination destination" "date seats" "submit submit";
    gap:0;padding:4px 12px 12px;margin:12px 0 22px;
    background:linear-gradient(145deg,#432754d9,#2b173ef2);border-radius:23px;border-color:#d6a8f02e;
    box-shadow:0 10px 28px #07020c25,inset 0 1px #f6dcff09;
  }
  .search-field { min-height:59px;gap:11px;padding:9px 9px; }
  .search-field:first-child { grid-area:origin;padding-right:51px; }
  .search-field.destination { grid-area:destination;border-left:0;border-top:1px solid #dbb8f21b;padding:9px 51px 9px 9px; }
  .search-field.bordered:not(.seats) { grid-area:date;border-left:0;border-top:1px solid #dbb8f21b; }
  .search-field.seats { grid-area:seats;border-left:1px solid #dbb8f21b;border-top:1px solid #dbb8f21b;padding-left:15px; }
  .search-field>.ico { width:20px;height:20px;color:#d7b0f1; }
  .search-field label { font-size:.75rem;letter-spacing:.35px;line-height:1.3;margin-bottom:3px; }
  .search-field input,.search-field .ac-trigger { font-size:1rem;min-height:25px; }
  .search-field .ac-trigger { gap:4px; }
  .search-field .ac-control-date .ac-trigger { font-size:1rem; }
  .swap-btn { left:auto;right:19px;top:44px;width:35px;height:35px;background:#4a2b60;border-color:#d7acf338;box-shadow:0 3px 12px #15051d40; }
  .swap-btn>.ico { width:17px;height:17px;transform:rotate(90deg); }
  .search-submit { grid-area:submit;min-height:48px;height:48px;margin:5px 0 0;font-size:1rem;border-radius:15px; }
  .map-entry-banner { display:none; }
  .results-head { align-items:center;gap:10px;margin-bottom:14px; }
  .results-head h2 { font-size:1.1875rem;letter-spacing:-.4px; }
  .results-meta { margin-top:4px;font-size:.75rem; }
  .head-tools { flex:none; }
  .head-tools>.view-toggle { display:none; }
  .head-tools>.icon-btn { width:42px;height:42px;border-radius:14px;background:#b47ae719;border:1px solid #cea3eb2e; }
  .filters { gap:7px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-bottom:16px;padding-bottom:2px; }
  .filters::-webkit-scrollbar { display:none; }
  .filter-chip { flex:none;min-height:38px;padding:8px 13px;font-size:.875rem; }
  .trip-list { gap:13px; }
  .trip-card { padding:16px 17px 0;border-radius:22px;background:linear-gradient(145deg,#3b2451d9,#28163bed); }
  .card-top .avatar { width:37px;height:37px;font-size:.8125rem; }
  .host-name { font-size:.875rem; }
  .host-meta { font-size:.75rem; }
  .save-btn { width:42px;height:42px; }
  .route-price { margin:16px 0 10px;gap:12px; }
  .route-city { font-size:1.1875rem; }
  .route-time { font-size:.875rem; }
  .route-price .price { padding-top:10px; }
  .price strong { font-size:1.4rem; }
  .card-bottom { min-height:52px;gap:9px; }
  .card-bottom .text-btn { min-height:46px;font-size:.875rem; }
  .results-bottom { font-size:.8125rem;padding:17px 8px; }

  .page-heading { margin:3px 0 18px; }
  .page-heading>.eyebrow { display:none; }
  .page-heading h1 { font-size:1.65rem;line-height:1.25;letter-spacing:-.7px; }
  .page-heading p { font-size:1rem;line-height:1.5;margin-top:7px; }
  .tabs { gap:3px;border:1px solid #c89bea28;border-radius:16px;padding:4px;background:#10061b40;overflow-x:auto;scrollbar-width:none; }
  .tabs .tab { flex:1;white-space:nowrap;min-height:43px;padding:10px 9px;border:0;border-radius:12px;font-size:.875rem; }
  .tabs .tab.active { color:#fff;background:#b17bdd36; }
  .tabs .tab.active:after { display:none; }
  .empty-state { padding:30px 22px;border-radius:23px; }
  .empty-state h3 { font-size:1.1875rem; }
  .empty-state p { font-size:1rem;line-height:1.6; }
  .empty-state .btn { min-height:46px;font-size:.9375rem; }

  /* Form screens keep a reachable action and room above the tab dock. */
  body[data-page="post"] .content { padding-bottom:calc(205px + env(safe-area-inset-bottom,0px)); }
  .form-layout { gap:16px; }
  .form-layout .panel { padding:20px 17px;border-radius:22px; }
  .section-title { margin-bottom:18px;font-size:1rem; }
  .form-field label { font-size:.875rem; }
  .form-field input,.form-field textarea,.form-field .ac-trigger { min-height:48px;font-size:1rem;border-radius:14px; }
  .form-field textarea { min-height:96px; }
  .checkbox-row { font-size:1rem;line-height:1.5; }
  .post-submit { display:flex;flex-direction:row;align-items:center;justify-content:space-between;position:fixed;bottom:calc(87px + env(safe-area-inset-bottom,0px));left:12px;right:12px;z-index:32;padding:10px;gap:10px;border:1px solid #d6a8ed38;border-radius:20px;background:#2e183ff2;box-shadow:0 6px 30px #05010c60;backdrop-filter:blur(22px); }
  .post-submit>.text-btn { min-height:47px;padding:5px 6px;font-size:.8125rem;max-width:95px;line-height:1.4; }
  .post-submit>.btn { flex:1;width:auto;min-width:0;min-height:47px;padding:11px 12px;font-size:.9375rem;border-radius:13px;white-space:normal; }
  body[data-page="post"] #pooltaxi-chat { --pc-bottom:calc(164px + env(safe-area-inset-bottom,0px)); }

  .profile-grid { display:flex;flex-direction:column;gap:16px; }
  .profile-person { display:grid;grid-template-columns:60px minmax(0,1fr);gap:5px 14px;text-align:left;padding:22px 19px; }
  .profile-person>.avatar { grid-column:1;grid-row:1/3;width:60px;height:60px;font-size:1.15rem;align-self:center;margin:0; }
  .profile-person>h2 { grid-column:2;font-size:1.3rem;align-self:end; }
  .profile-person>p { grid-column:2;font-size:.875rem;line-height:1.5;margin:0; }
  .profile-person>.pill { grid-column:1/-1;justify-self:start;margin:9px 0 0; }
  .profile-person>.profile-stats,.profile-person>.btn { grid-column:1/-1;width:100%; }
  .profile-stats { margin:18px 0; }
  .profile-stats span { font-size:.75rem; }
  .settings-row { gap:12px;padding:18px 0; }
  .settings-row strong { font-size:1rem; }
  .settings-row p { font-size:.8125rem;line-height:1.5; }

  /* A map screen starts directly with its map controls and location surface. */
  .map-page-heading { display:none; }
  .map-toolbar { display:grid;grid-template-columns:minmax(0,1fr) 115px;align-items:center;gap:8px;margin:0 0 13px; }
  .map-view-tabs { min-width:0;padding:4px;gap:3px; }
  .map-view-tabs button { min-width:0;min-height:43px;padding:8px 6px;font-size:.8125rem;gap:5px; }
  .map-view-tabs button>.ico { display:none; }
  .map-city-select { min-width:0;max-width:115px;min-height:51px;padding:0 10px;gap:5px; }
  .map-city-select>.ico { display:none; }
  .map-city-select .ac-control { min-width:0;width:100%; }
  .map-city-select .ac-trigger { font-size:.8125rem;gap:4px;min-height:49px; }
  .map-layout { gap:13px; }
  .map-board { height:clamp(330px,52dvh,440px);min-height:330px;border-radius:24px; }
  .journey-panel { border-radius:23px;padding:21px 19px; }
  .tracking-heading h2 { font-size:1.2rem; }
  .arrival-estimate { margin-top:17px; }
  .map-disclosure { padding-bottom:8px; }

  /* Native-style sheets preserve the existing dialogs, forms and custom pickers. */
  dialog,dialog.small-dialog { width:100%;max-width:540px;max-height:calc(100dvh - env(safe-area-inset-top,0px) - 12px);margin:auto auto 0;border-radius:27px 27px 0 0; }
  .dialog-head { position:relative;padding:26px 20px 17px; }
  .dialog-head::before { content:"";position:absolute;top:9px;left:calc(50% - 18px);height:4px;width:36px;border-radius:4px;background:#d7b5eb66; }
  .dialog-head h2 { font-size:1.1875rem; }
  .dialog-head .icon-btn { min-width:40px;height:40px;border-radius:50%;background:#d3a7ee10; }
  .dialog-body { padding:21px 19px; }
  .dialog-footer { padding:14px 18px calc(17px + env(safe-area-inset-bottom,0px)); }
  .dialog-footer .btn { min-height:48px;font-size:.875rem;border-radius:14px; }
  .dialog-message p,.privacy-list { font-size:1rem;line-height:1.65; }
  .ac-option { min-height:48px;font-size:1rem; }
  .af-header h1 { font-size:1.6rem; }
  .af-answer { font-size:1rem; }
  .af-tools { gap:10px; }

  .mobile-nav { bottom:calc(11px + env(safe-area-inset-bottom,0px));border-color:#e7caff45;background:linear-gradient(130deg,#705087e8,#35203eec);box-shadow:0 10px 32px #05010c7a,inset 0 1px #ffeaff14; }
  .mobile-nav button { min-height:48px; }
  .toast { bottom:calc(92px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 32px); }
  .pc-panel { max-height:calc(var(--pc-view-height,100dvh) - var(--pc-bottom) - 92px); }
  @keyframes app-screen-in { from { opacity:.3;translate:0 7px; } to { opacity:1;translate:0 0; } }
}

@media (max-width:370px) {
  .content { padding-left:13px;padding-right:13px; }
  .topbar { padding-left:14px;padding-right:14px; }
  .hero { padding:17px 18px; }
  .hero h1 { font-size:1.45rem; }
  .hero p { font-size:.9375rem; }
  .map-toolbar { grid-template-columns:minmax(0,1fr) 105px;gap:6px; }
  .map-view-tabs button { font-size:.75rem;padding-left:3px;padding-right:3px; }
  .map-city-select { max-width:105px; }
}
@media (prefers-reduced-motion:reduce) { .content.app-screen-enter { animation:none; } }
