.live-trip { display: grid; gap: 12px; width: min(100%, 900px); margin-inline: auto; }
.live-heading h1 { margin: 0; font-size: clamp(1.4rem, 5vw, 2.45rem); }
.live-trip .live-map { min-height: clamp(225px, 45dvh, 490px); border-radius: 24px; }
.live-map .live-locate { position: absolute; top: 10px; left: 10px; width: 44px; height: 44px; color: var(--accent-dark); }
.live-estimate { position: absolute; z-index: 1; bottom: 13px; left: 12px; display: flex; gap: 12px; padding: 8px 10px;
  background: #fff; border: 1px solid #dbe7f5; border-radius: 14px; box-shadow: 0 4px 12px #163d6a22; pointer-events: none; }
.live-estimate strong { display: block; color: #123f87; font-size: 1.02rem; }
.live-estimate small { color: var(--muted); font-size: .68rem; }
.live-map:has(.live-estimate) .map-status { bottom: 74px; }
.live-arrival { overflow: hidden; padding: 9px 10px; background: #e5f2ff; color: #153c72; border-radius: 14px; font-weight: 780; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .live-arrival { padding-inline: 0; white-space: nowrap; text-align: left; }
  .live-arrival span { display: inline-block; padding-left: 100%; animation: arrival-banner 8s linear infinite; }
  @keyframes arrival-banner { to { transform: translateX(-100%); } }
}
.live-details { display: grid; gap: 10px; padding: 14px; }
.live-person { display: flex; align-items: center; gap: 10px; }
.live-person h2 { font-size: 1.13rem; }
.live-person .live-driver-cancel { flex: 0 0 auto; align-self: flex-start; margin-left: auto; color: #8f2941; background: #fff1f4; padding: 4px 8px; font-size: .76rem; min-height: 37px; }
.live-person > div:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.live-rating { display: inline-flex; align-items: center; gap: 4px; color: #194e96; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.live-person .account-avatar { width: 53px; height: 53px; }
.live-car { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 14px; background: #f4f7fb; }
.live-vehicle { display: block; font-size: clamp(1.15rem, 4vw, 1.45rem); }
.live-car-color, .live-route dt, .live-fare small, .live-feedback, .live-start-code p { color: var(--muted); font-size: .82rem; }
.live-car-plate { padding: 6px 9px; background: #fff; border: 1px solid #ced9ea; border-radius: 8px; font-size: 1.05rem; font-weight: 800; letter-spacing: .05em; }
.live-route { display: grid; gap: 7px; margin: 0; padding-left: 10px; border-left: 2px solid #c3dcff; }
.live-route dd { margin: 0; font-size: .88rem; overflow-wrap: anywhere; }
.live-fare { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; border: 1px solid #d8e7ff; border-radius: 14px; background: #edf5ff; }
.live-fare span { font-size: .84rem; font-weight: 720; }
.live-fare > strong { color: #134994; font-size: clamp(1.16rem, 4vw, 1.45rem); }
.live-start-code { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: #f7f8fb; border: 1px solid #e4eaf3; border-radius: 14px; }
.live-start-code output { color: #174b92; font-size: 1.4rem; font-weight: 790; letter-spacing: .13em; font-variant-numeric: tabular-nums; }
.live-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.live-actions-single { grid-template-columns: 1fr; }
.live-details button { min-height: 44px; border-radius: 13px; font-weight: 750; }
.live-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; border: 1px solid #dceafa; }
.live-actions .live-cancel { color: #8f2941; background: #fff1f4; border-color: #f6dde5; }
.trip-start-form { display: grid; gap: 9px; }
.trip-start-form label { display: grid; gap: 5px; font-size: .86rem; font-weight: 720; }
.trip-start-form input { min-height: 46px; width: 100%; padding: 8px; border: 1px solid #cedcf0; border-radius: 12px; text-align: center; font-size: 1.3rem; letter-spacing: .3em; }
.live-feedback:empty { display: none; }
#trip-chat[open] {
  position: fixed; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; width: min(100%, 575px);
  height: 100dvh; max-height: none; max-width: none; margin: auto; padding: 0; overflow: hidden;
  border: 0; border-radius: 0; background: #f1f5fc;
}
#trip-chat > header { display: flex; justify-content: space-between; align-items: center; padding: max(9px, env(safe-area-inset-top)) 12px 9px; background: #fff; border-bottom: 1px solid var(--line); }
#trip-chat h2 { margin: 0; padding: 0; }
.trip-chat-new { border: 0; background: #e1eeff; color: #164780; min-height: 34px; font-size: .8rem; font-weight: 720; }
.trip-chat-log { grid-row: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; overflow-y: auto; padding: 12px; }
.trip-chat-divider { align-self: center; color: #174983; font-size: .74rem; font-weight: 750; }
.trip-chat-log article { display: grid; gap: 4px; max-width: 85%; padding: 8px 10px; border-radius: 15px 15px 15px 4px; background: #fff; overflow-wrap: anywhere; }
.trip-chat-log article.own { align-self: flex-end; background: #dcecff; border-radius: 15px 15px 4px 15px; }
#trip-chat p { margin: 0; }
.trip-chat-log time { justify-self: end; color: var(--muted); font-size: .68rem; }
.trip-chat-log img { display: block; max-width: 100%; max-height: 260px; object-fit: contain; border-radius: 9px; }
.trip-chat-log audio { width: min(235px, 64vw); height: 43px; }
#trip-chat .trip-chat-feedback { grid-row: 4; padding: 3px 12px; color: var(--muted); font-size: .78rem; }
.trip-chat-feedback:empty { display: none; }
.trip-chat-compose { grid-row: 5; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 5px; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.trip-chat-compose label { position: relative; cursor: pointer; }
.trip-chat-compose label input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.trip-chat-compose label:focus-within { outline: 2px solid var(--accent); }
.trip-chat-compose > input { min-width: 0; min-height: 42px; padding: 6px 9px; font-size: 16px; border: 1px solid #dce6f3; border-radius: 16px; }
.trip-chat-compose .trip-chat-send { color: #fff; background: var(--brand-gradient-horizontal); }
.trip-chat-compose button[aria-pressed="true"] { color: #aa2141; background: #ffedf1; }

dialog[data-variant="trip-rating"] { width: min(100%, 450px); max-height: 90dvh; border-radius: 26px; padding: 20px; }
.trip-rating-form { display: grid; gap: 10px; }
.trip-rating-form p { margin: 0; }
.trip-rating-stars { display: flex; justify-content: center; gap: 4px; margin: 0; padding: 4px 0; border: 0; }
.trip-rating-stars label { display: grid; place-items: center; width: min(16vw, 48px); min-height: 45px; cursor: pointer; border-radius: 11px; color: #926720; }
.trip-rating-stars label:focus-within { outline: 2px solid var(--accent); }
.trip-rating-stars label:has(input:checked), .trip-rating-stars label:has(~ label input:checked) { color: #915b00; }
.trip-rating-stars label:has(input:checked) svg, .trip-rating-stars label:has(~ label input:checked) svg { fill: #ffc75b; }
.trip-rating-form > .primary { min-height: 46px; justify-content: center; }
.trip-rating-form > .text-button { justify-self: center; min-height: 38px; }
.rating-quick { padding: 0; margin: 0; border: 0; min-inline-size: 0; }
.rating-quick legend, .rating-comment { font-size: .82rem; font-weight: 700; }
.rating-quick > div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.rating-quick label { position: relative; }
.rating-quick span { display: grid; place-items: center; min-height: 36px; padding: 5px 9px; border-radius: 999px; background: #eef4fd; color: #17477d; font-size: .75rem; cursor: pointer; }
.rating-quick input:checked + span { color: #fff; background: #20579d; }
.rating-quick input:focus-visible + span { outline: 2px solid var(--accent); }
.rating-comment { display: grid; gap: 5px; }
.rating-comment textarea { max-width: 100%; min-width: 0; padding: 8px; border: 1px solid #dce6f3; border-radius: 11px; font: inherit; font-size: 16px; resize: vertical; }
.rating-credit { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 13px; border-radius: 17px; background: #e9f5ff; }
.rating-credit strong { font-size: 1.15rem; color: #124a8e; }
.rating-credit p { margin: 0; color: var(--muted); font-size: .8rem; }
.rating-wallet-motion { position: relative; flex: 0 0 62px; height: 66px; display: grid; place-items: end center; isolate: isolate; }
.rating-wallet-motion > svg { position: relative; z-index: 1; fill: #e9f5ff; color: #1757ae; }
.rating-wallet-motion span { position: absolute; top: 0; left: 16px; color: #218557; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .rating-wallet-motion span { animation: rating-banknote 1s ease-in both; }
  .rating-wallet-motion span:nth-child(2) { animation-delay: .19s; }
  .rating-wallet-motion span:nth-child(3) { animation-delay: .38s; }
  @keyframes rating-banknote { 0% { opacity: 0; transform: translateY(-14px) rotate(-23deg); } 20%, 55% { opacity: 1; } 100% { opacity: 0; transform: translateY(32px) scale(.55); } }
}
.public-rating-page #main { display: grid; place-items: center; padding: 18px; min-height: 100dvh; }
.trip-public-profile { width: min(100%, 430px); padding: 22px; display: grid; gap: 9px; }
.trip-public-profile img { width: 137px; max-width: 100%; }
.trip-public-profile p { color: var(--muted); }
.trip-public-profile h1 { margin: 0; }
.trip-public-rating { display: flex; align-items: center; gap: 9px; padding: 13px; background: #edf5ff; border-radius: 13px; color: #184a88; }
.trip-public-rating h2 { font-size: .94rem; margin-bottom: 5px; }
.public-reviews { display: grid; gap: 8px; }
.public-reviews h2 { font-size: 1rem; }
.public-reviews article { padding: 8px 10px; border: 1px solid #e4ebf5; border-radius: 12px; overflow-wrap: anywhere; }
.public-reviews p { margin: 3px 0 0; font-size: .81rem; }
