#phone-order-badge { position: absolute; top: -8px; right: -3px; padding: 2px 5px; border: 1px solid #ffd075; border-radius: 7px; background: #382919; color: #ffe3a5; font: bold 10px/1 Arial,sans-serif; pointer-events: none; }
#phone-app:has(#phone-taxi:not([hidden])) { padding: 0; overflow: hidden; background: #101819; }
#phone-app:has(#phone-taxi:not([hidden])) header { flex: none; padding-right: 8px; }
#city-phone #tx-profile { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; min-height: 44px; margin-left: auto; padding: 2px 3px; text-align: right; }
#tx-profile span { display: grid; min-width: 0; gap: 1px; }
#tx-nick { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
#tx-wallet { color: #f3d589; font-size: 11px; font-variant-numeric: tabular-nums; }
#tx-initial, #tx-profile-initial { display: grid; place-items: center; flex: none; border-radius: 50%; font-weight: 750; font-style: normal; }
#tx-initial { width: 30px; height: 30px; background: #584c31; border: 1px solid #70623e; color: #ffe6ae; font-size: 13px; }
#tx-profile[aria-expanded="true"] #tx-initial { box-shadow: 0 0 0 2px #ffe4a5; }
#phone-taxi { --tx-dim: #a7b7af; --tx-fare: #ffcf63; --tx-pad: 12px; flex: 1; min-height: 0; display: flex; flex-direction: column; background: #101819; color: #f7f3e9; }
#tx-dispatch { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #182320; }
#tx-map-frame { position: relative; flex: 1; min-height: 25px; overflow: hidden; border-block: 1px solid #425049; background: #202d2a; }
#tx-map { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
#tx-pointer { position: absolute; left: 50%; top: 55%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #b6974e88; border-radius: 50%; background: #232920; pointer-events: none; }
#tx-map-frame.tx-navigating #tx-pointer { top: 66%; }
#tx-pointer::before, #tx-pointer::after { content: ''; position: absolute; inset: 1px; background: #fff0cb; clip-path: polygon(50% 0, 88% 88%, 50% 74%, 12% 88%); }
#tx-pointer::after { inset: 3px; background: var(--tx-fare); }
#tx-map-tag { position: absolute; top: 9px; left: 9px; display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #516259; border-radius: 30px; color: #d9eadb; background: #13221efa; font: 680 11px/1.2 Arial,sans-serif; }
#tx-map-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #a4afa8; }
#tx-map-tag.tx-live::before { background: #a6dfac; }
#tx-guide { display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 3px 7px; align-items: center; padding: 10px var(--tx-pad) 4px; background: linear-gradient(#202d29,#182320); }
#tx-leg { grid-column: 1 / -1; font-weight: 650; font-size: 11px; color: var(--tx-dim); }
#tx-leg:empty, #tx-address:empty { display: none; }
#city-phone #tx-guide svg { grid-column: 1; width: 24px; height: 24px; color: var(--tx-fare); }
#city-phone #tx-guide.tx-warning svg { color: #ffb393; }
#tx-direction { grid-column: 2; font: 700 18px/1.14 -apple-system,Arial,sans-serif; letter-spacing: -.035em; overflow-wrap: anywhere; }
#tx-address { grid-column: 1 / -1; }
#tx-address, .tx-client small, .tx-stops small, #tx-stats p, #tx-history-note { font-size: 12px; line-height: 1.35; color: var(--tx-dim); }
.tx-kicker { display: block; font: 650 11px/1.25 Arial,sans-serif; color: var(--tx-dim); }
#tx-offer .tx-kicker::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #a6dfac; }
.tx-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 7px var(--tx-pad) 5px; scrollbar-width: thin; }
.tx-scroll h3 { margin: 4px 0 10px; overflow-wrap: anywhere; font: 740 24px/1.06 -apple-system,Arial,sans-serif; letter-spacing: -.045em; }
.tx-fare { position: relative; isolation: isolate; overflow: hidden; padding: 11px 13px; border-radius: 14px; color: #312612; background: linear-gradient(112deg,#ffe7a2,#ffcf63 72%,#edb64e); }
#tx-offer .tx-fare::after { content: ''; position: absolute; z-index: -1; right: -12px; bottom: -5px; height: 50px; width: 80px; opacity: .2; transform: skewX(-16deg) rotate(-12deg); background: repeating-conic-gradient(#745319 0% 25%,transparent 0% 50%) 0 0 / 24px 24px; mask-image: linear-gradient(110deg,transparent,#000 75%); }
.tx-fare small, .tx-fare strong, .tx-client strong, .tx-client small, .tx-stops b, .tx-stops small { display: block; }
.tx-fare small { font-size: 11px; font-weight: 650; }
.tx-fare strong { margin-top: 3px; font: 750 31px/1.05 -apple-system,Arial,sans-serif; letter-spacing: -.045em; }
.tx-client,.tx-identity { display: flex; align-items: center; gap: 9px; }
.tx-client { padding: 11px 0; }
.tx-client strong { font-size: 15px; }
.tx-avatar { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #324b45; color: #c7e7d7; font-weight: 750; }
.tx-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tx-avatar:has(img:not([hidden])) b { visibility: hidden; }
.tx-stops { margin: 0; padding: 9px 10px 8px 26px; border: 1px solid #33403b; border-radius: 13px; background: #1b2828; }
.tx-stops dt { position: relative; margin: 0 0 2px; font-size: 11px; color: var(--tx-dim); }
.tx-stops dt::before { content: ''; position: absolute; left: -15px; top: 4px; width: 7px; height: 7px; box-sizing: border-box; border-radius: 50%; background: var(--tx-fare); }
.tx-stops dt:not(:first-child)::before { border-radius: 2px; border: 2px solid #b9cab3; background: none; }
.tx-stops dd { position: relative; margin: 0; }
.tx-stops dd:first-of-type { padding-bottom: 8px; }
.tx-stops dd:first-of-type::before { content: ''; position: absolute; left: -12px; border-left: 1px dashed #78836e; top: -2px; bottom: 0; }
.tx-stops b { font-size: 14px; overflow-wrap: anywhere; }
.tx-identity { margin: 3px 0 12px; }
.tx-identity h3 { margin: 2px 0 0; }
#tx-profile-initial { width: 40px; height: 40px; color: #c7e7d7; background: #324b45; font-size: 19px; }
#tx-stats .tx-fare { color: #f8e6ad; background: linear-gradient(120deg,#414032,#302b20); border: 1px solid #685d3f; }
#tx-stats .tx-fare::after { position: absolute; z-index: -1; right: 10px; bottom: 4px; content: '☆'; font: 39px/1 Arial,sans-serif; color: #bda35e99; }
#tx-stats .tx-fare strong { font-size: 24px; }
.tx-totals { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); align-items: center; margin: 10px 0; padding: 0 9px; border: 1px solid #34423d; border-radius: 13px; background: #1b2828; }
.tx-totals dt,.tx-totals dd { padding: 9px 0; font-size: 12px; }
.tx-totals dd { margin: 0; text-align: right; font-weight: 650; }
.tx-totals :nth-child(n+3) { align-self: stretch; border-top: 1px solid #35443d; }
#tx-stats p { margin: 8px 0; }
#tx-actions { display: flex; flex: none; gap: 6px; padding: 6px var(--tx-pad) 3px; }
#phone-taxi:has(#tx-dispatch:not([hidden])) #tx-actions { background: #182320; }
#city-phone #tx-actions button { flex: 1; min-width: 0; min-height: 44px; padding: 3px 5px; border: 1px solid #ffe197; border-radius: 12px; color: #29210d; background: var(--tx-fare); font: 700 13px/1.15 -apple-system,Arial,sans-serif; }
#city-phone #tx-actions :is(#tx-decline,.tx-end) { background: #2a3530; border-color: #43514b; color: #e7ece3; }
#city-phone #tx-actions .tx-warn { background: #47302b; border-color: #79534a; color: #ffbca4; }
#city-phone #tx-actions button:disabled { background: #303b35; border-color: #3f4b43; color: #bbc4bb; cursor: default; }
@media (max-height: 520px), (max-width: 600px) {
  #city-phone:has(#phone-taxi:not([hidden])) .phone-status, #phone-app:has(#phone-taxi:not([hidden])) #phone-app-name { display: none; }
  #phone-taxi { --tx-pad: 6px; }
  #phone-app:has(#phone-taxi:not([hidden])) header { padding: 0 4px; }
  #tx-profile { max-width: calc(100% - 48px); }
  #tx-initial { width: 18px; height: 18px; font-size: 10px; }
  #tx-nick { font-size: 11px; }
  #tx-wallet { font-size: 10px; }
  #tx-map-tag { top: 3px; left: 3px; padding: 2px 5px; font-size: 9px; }
  #tx-guide { padding: 3px var(--tx-pad) 0; grid-template-columns: 15px 1fr; gap: 1px 3px; }
  #city-phone #tx-guide svg { width: 15px; height: 15px; }
  #tx-guide #tx-address { line-height: 1.15; }
  #tx-guide strong { margin: 1px 0; font-size: 12px; }
  #tx-address, .tx-client small, .tx-stops small, #tx-stats p { font-size: 10px; }
  #tx-guide small, .tx-kicker { font-size: 9px; letter-spacing: 0; }
  .tx-scroll { padding-top: 3px; }
  .tx-scroll h3 { font-size: 16px; margin: 3px 0 5px; }
  .tx-fare { padding: 5px 7px; border-radius: 7px; }
  .tx-fare small { font-size: 9px; }
  .tx-fare strong { font-size: 19px; }
  .tx-avatar { width: 26px; height: 28px; border-radius: 6px; }
  .tx-client { gap: 4px; padding: 5px 0; }
  .tx-client strong, .tx-stops b { font-size: 12px; }
  .tx-stops { margin-top: 4px; padding: 3px 2px 3px 11px; }
  .tx-stops dd:first-of-type::before { display: none; }
  #tx-offer .tx-stops dd:first-of-type { padding-bottom: 0; }
  .tx-stops dt::before { left: -10px; }
  #tx-offer:not([hidden]) { display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: 'title title' 'client fare' 'stops stops'; align-content: start; align-items: center; gap: 3px; }
  #tx-offer h3 { grid-area: title; margin: 0; font-size: 13px; }
  #tx-offer .tx-kicker, #tx-offer .tx-fare small, #tx-offer .tx-client small { display: none; }
  #tx-offer .tx-client { grid-area: client; gap: 3px; min-width: 0; padding: 0; border: 0; }
  #tx-offer .tx-client > span:last-child { min-width: 0; }
  #tx-offer .tx-client strong { overflow-wrap: anywhere; font-size: 11px; line-height: 1.05; }
  #tx-offer .tx-avatar { width: 20px; height: 23px; }
  #tx-offer .tx-fare { grid-area: fare; padding: 5px 3px; border-radius: 5px; }
  #tx-offer .tx-fare strong { margin: 0; font-size: 12px; white-space: nowrap; }
  #tx-offer .tx-stops { grid-area: stops; margin: 3px 0 0 3px; }
  #tx-offer .tx-stops dt { margin: 0; font-size: 9px; line-height: 1.1; }
  #tx-offer .tx-stops dd { margin-bottom: 4px; }
  #tx-offer .tx-stops b { font-size: 11px; line-height: 1.15; }
  #tx-offer .tx-stops small { font-size: 9px; line-height: 1.15; }
  #tx-actions { padding: 3px 3px 0; gap: 3px; }
  #city-phone #tx-actions button { padding: 2px; font-size: 11px; }
}
@media (orientation: landscape) and (max-width: 760px) {
  #tx-offer:not([hidden]) { grid-template-areas: 'client fare' 'stops stops'; padding-inline: 3px; }
  #tx-offer h3, #tx-offer .tx-stops dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(100%); }
  #tx-offer .tx-stops { display: grid; gap: 3px; margin-left: 0; padding: 1px 2px; border: 0; border-radius: 4px; }
  #tx-offer .tx-stops dd { display: contents; }
  #tx-from { grid-row: 1; }
  #tx-to { grid-row: 2; }
  #tx-from::before, #tx-to::before { color: #e1c782; font-weight: 500; }
  #tx-from::before { content: 'От '; }
  #tx-to::before { content: 'До '; }
  #tx-from-km::before { content: 'Подача · '; }
  #tx-to-km::before { content: 'Поездка · '; }
  #city-phone #tx-actions #tx-decline { flex: 1.2; }
}
