/* DES-002 r1. Load AFTER styles.css. No scripts, assets, global tokens or flow changes.
   Everything is scoped to the four existing dialog roots. */
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) {
  --panel-blue: var(--blue, #0758f7);
  --panel-ink: var(--ink, #14213a);
  --panel-navy: var(--navy, #102343);
  --panel-muted: #536178;
  --panel-line: #dce3ec;
  --panel-paper: #f6f7f5;
  --panel-tint: #eef4ff;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #e0e6ef;
  border-radius: 24px;
  background: #fff;
  color: var(--panel-ink);
  box-shadow: 0 28px 90px #071a3a30, 0 2px 8px #071a3a0a;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  overflow: auto;
  overscroll-behavior: contain;
  max-width: calc(100% - 40px);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  scrollbar-width: thin;
  scrollbar-color: #bac7da transparent;
  scroll-padding-block: 76px 24px;
}
.cart-dialog { width: min(648px, calc(100% - 40px)); }
.profile-dialog { width: min(728px, calc(100% - 40px)); }
.booking-dialog { width: min(776px, calc(100% - 40px)); }
.product-dialog { width: min(960px, calc(100% - 40px)); }
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog)::backdrop {
  background: #09182dbd;
  backdrop-filter: blur(6px);
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) *,
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) *::before,
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) *::after {
  box-sizing: border-box;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) [hidden] {
  display: none !important;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) > .dialog-close {
  position: sticky;
  top: 16px;
  right: 16px;
  z-index: 8;
  float: right;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin: 16px 16px -60px 0;
  border: 1px solid var(--panel-line);
  border-radius: 14px;
  color: var(--panel-navy);
  background: #fff;
  box-shadow: 0 3px 10px #10234309;
  font: 400 27px/1 system-ui, sans-serif;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog) :is(.cart-shell, .profile-shell, .booking-shell) {
  padding: 38px 36px 28px;
  min-width: 0;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog) h2 {
  margin: 10px 54px 20px 0;
  color: var(--panel-navy);
  font-size: clamp(28px, 3.8vw, 36px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog) .booking-kicker {
  display: block;
  padding-right: 48px;
  color: var(--panel-blue);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .09em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) :is(p, small, b, strong, dd, dt, span) {
  overflow-wrap: anywhere;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) .button {
  min-height: 52px;
  min-width: 44px;
  height: auto;
  padding: 14px 20px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
  transition: transform 180ms ease;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) .button-primary {
  border: 1px solid var(--panel-blue);
  color: #fff;
  background: var(--panel-blue);
  box-shadow: 0 5px 14px #0758f71a;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) .button-ghost {
  border: 1px solid #ccd8ea;
  color: #164caa;
  background: #fff;
  box-shadow: none;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) :is(button, a, input, select, textarea, summary):focus-visible,
:is(.cart-dialog, .profile-dialog, .booking-dialog) .passport-upload:focus-within {
  outline: 3px solid var(--panel-blue);
  outline-offset: 3px;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) :is(button:disabled, input:disabled, select:disabled, [aria-disabled="true"]) {
  color: #536178;
  background: #edf0f4;
  border-color: #d2dae5;
  box-shadow: none;
  opacity: 1;
  transform: none;
  cursor: not-allowed;
}
:is(.cart-dialog, .profile-dialog, .booking-dialog) :is(.booking-lead, .cart-empty p, .profile-empty p) {
  margin: 0 0 24px;
  color: var(--panel-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Cart: readable equipment names, individual terms and one clear total. */
.cart-dialog .cart-list { gap: 12px; }
.cart-dialog .cart-item {
  grid-template-columns: 72px minmax(0, 1fr) 44px;
  align-items: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  background: #fff;
}
.cart-dialog .cart-item img { width: 72px; height: 72px; border-radius: 12px; object-fit: contain; background: var(--panel-paper); }
.cart-dialog .cart-item > div { gap: 6px; min-width: 0; }
.cart-dialog .cart-item b { font-size: 16px; line-height: 1.4; }
.cart-dialog .cart-item span { color: var(--panel-muted); font-size: 14px; }
.cart-dialog .cart-item strong { font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.cart-dialog .cart-item > button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  color: #536178;
  background: #f7f9fc;
  font-size: 24px;
}
.cart-dialog .item-term { margin: 6px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.cart-dialog .item-term select {
  width: auto;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 28px 8px 12px;
  border: 1px solid #b6c5d9;
  border-radius: 10px;
  font: inherit;
  font-size: 16px;
  color: var(--panel-navy);
  background-color: #fff;
}
.cart-dialog .cart-total {
  margin: 22px 0 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  border: 1px solid #d7e4ff;
  border-radius: 16px;
  background: var(--panel-tint);
}
.cart-dialog .cart-total span { color: #354c70; font-size: 16px; }
.cart-dialog .cart-total strong { color: var(--panel-blue); font-size: 30px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.cart-dialog :is(.cart-checkout, .cart-continue) { width: 100%; }
.cart-dialog .cart-continue { min-height: 48px; margin-top: 8px; padding: 12px; border-radius: 12px; font-size: 16px; color: #164caa; }

/* Account: actual status and rentals first; wallet remains a disclosure. */
.profile-dialog .profile-empty { text-align: left; }
.profile-dialog .profile-empty-mark { margin: 6px 0 22px; width: 60px; height: 60px; border-radius: 18px; box-shadow: none; font-size: 20px; }
.profile-dialog .profile-empty h2 { margin-top: 0; }
.profile-dialog .profile-empty p { margin-inline: 0; }
.profile-dialog .profile-identity { margin: 24px 0 20px; grid-template-columns: 60px minmax(0, 1fr); gap: 16px; }
.profile-dialog .profile-avatar { width: 60px; height: 60px; border-radius: 18px; background: var(--panel-navy); font-size: 20px; }
.profile-dialog .profile-identity h2 { margin: 0 42px 5px 0; font-size: 27px; line-height: 1.2; }
.profile-dialog .profile-identity a { color: var(--panel-muted); font-size: 16px; display: inline-flex; min-height: 44px; align-items: center; }
.profile-dialog .profile-verification { padding: 16px 18px; border-color: #b2d8c6; background: #f0f9f4; color: #176140; border-radius: 16px; gap: 5px; }
.profile-dialog .profile-verification.demo { color: #745100; background: #fff7e4; border-color: #e8cb8e; }
.profile-dialog .profile-verification b { font-size: 16px; }
.profile-dialog .profile-verification span { font-size: 14px; line-height: 1.55; }
.profile-dialog .profile-tabs { display: flex; gap: 6px; margin: 24px 0 18px; padding: 5px; border: 1px solid #e1e6ee; border-radius: 16px; background: #f1f4f8; }
.profile-dialog .profile-tabs button { flex: 1; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: #4b5b73; font-size: 16px; font-weight: 700; line-height: 1.4; white-space: normal; }
.profile-dialog .profile-tabs button[aria-selected="true"] { color: #fff; background: var(--panel-blue); border-color: var(--panel-blue); box-shadow: 0 2px 5px #10234312; }
.profile-dialog .profile-history { gap: 14px; }
.profile-dialog .profile-history-item { padding: 20px; border-color: var(--panel-line); border-radius: 18px; background: #fff; }
.profile-dialog .profile-history-head { align-items: start; flex-wrap: wrap; gap: 8px; }
.profile-dialog .profile-history-head b { font-size: 13px; color: var(--panel-muted); letter-spacing: .03em; }
.profile-dialog .profile-history-head span { padding: 5px 9px; border-radius: 8px; color: #176140; background: #edf8f1; font-size: 13px; }
.profile-dialog .profile-history-item p { margin: 16px 0; font-size: 16px; line-height: 1.5; color: var(--panel-navy); }
.profile-dialog .profile-history-item dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.profile-dialog .profile-history-item dt { font-size: 14px; color: var(--panel-muted); }
.profile-dialog .profile-history-item dd { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.profile-dialog :is(.profile-rental-actions, .profile-rental-row) { min-width: 0; }
.profile-dialog .profile-rental-row { gap: 10px; }
.profile-dialog .profile-rent-again { width: 100%; margin-top: 20px; }
.profile-dialog:has(.profile-history-item .button-primary:not(:disabled):not([hidden])) .profile-rent-again:not(:disabled) {
  color: #164caa;
  background: #fff;
  border-color: #ccd8ea;
  box-shadow: none;
}
.profile-dialog .profile-empty-history { padding: 28px 20px; border: 1px dashed #bdcadc; border-radius: 16px; font-size: 16px; background: var(--panel-paper); color: var(--panel-muted); }
.profile-dialog .profile-wallet { margin-top: 24px; padding: 0 18px; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel-paper); }
.profile-dialog .profile-wallet summary { min-height: 56px; padding: 16px 0; color: var(--panel-navy); font-size: 16px; font-weight: 750; }
.profile-dialog .profile-wallet p { font-size: 14px; line-height: 1.55; color: var(--panel-muted); }
.profile-dialog .profile-rates { gap: 8px; }
.profile-dialog .profile-rates span { padding: 14px 6px; background: #fff; font-size: 13px; color: var(--panel-muted); }
.profile-dialog .profile-rates b { font-size: 20px; }
.profile-dialog .profile-review-bonus { grid-template-columns: 1fr; padding: 14px; gap: 12px; background: #fff; }
.profile-dialog .profile-review-bonus span { font-size: 14px; line-height: 1.5; }
.profile-dialog .profile-review-bonus button { min-height: 44px; font-size: 14px; }

/* Checkout and rental steps: readable forms, meaningful status, stable controls. */
:is(.booking-dialog, .profile-dialog) .booking-form { gap: 20px; }
:is(.booking-dialog, .profile-dialog) .booking-fields { gap: 16px; }
:is(.booking-dialog, .profile-dialog) .booking-fields label { min-width: 0; gap: 8px; font-size: 16px; font-weight: 650; color: #35445d; }
:is(.booking-dialog, .profile-dialog) .booking-fields :is(input, select) { min-width: 0; min-height: 54px; height: auto; padding: 14px; font: inherit; font-size: 16px; line-height: 1.4; color: var(--panel-navy); background-color: #fff; border: 1px solid #b6c5d9; border-radius: 12px; }
:is(.booking-dialog, .profile-dialog) .booking-fields input::placeholder { color: #697991; opacity: 1; }
.booking-dialog .booking-progress { max-width: 100%; margin-bottom: 28px; padding-right: 56px; gap: 4px; }
.booking-dialog .booking-progress span { width: 32px; height: 32px; color: #5d6c83; background: #eef2f7; font-size: 14px; box-shadow: none; }
.booking-dialog .booking-progress span.active { color: #fff; background: var(--panel-blue); box-shadow: 0 0 0 4px #0758f712; }
.booking-dialog .booking-progress span.done { color: #fff; background: #19744f; }
.booking-dialog .booking-product { margin: 20px 0; grid-template-columns: 68px minmax(0, 1fr); gap: 14px; padding: 14px; background: var(--panel-paper); border-color: var(--panel-line); border-radius: 16px; }
.booking-dialog .booking-product-image { height: 68px; border-radius: 10px; background: #fff; }
.booking-dialog .booking-product-image img { object-fit: contain; }
.booking-dialog .booking-product b { font-size: 16px; white-space: normal; overflow: visible; }
.booking-dialog .booking-product small { font-size: 14px; }
.booking-dialog .booking-item-term { min-width: 0; border-color: var(--panel-line); border-radius: 16px; background: #fff; }
.booking-dialog .booking-item-term > small { color: var(--panel-muted); font-size: 14px; }
.booking-dialog .booking-estimate { padding: 20px; gap: 6px 16px; grid-template-columns: minmax(0, 1fr) auto; border: 1px solid #d7e4ff; border-radius: 16px; background: var(--panel-tint); }
.booking-dialog .booking-estimate span { font-size: 16px; color: #354c70; }
.booking-dialog .booking-estimate strong { font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.booking-dialog .booking-estimate small { font-size: 14px; line-height: 1.5; color: var(--panel-muted); }
.booking-dialog .booking-summary { margin: 20px 0; border-color: var(--panel-line); }
.booking-dialog .booking-summary > div { padding: 16px 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; border-color: var(--panel-line); }
.booking-dialog .booking-summary dt { font-size: 16px; color: var(--panel-muted); }
.booking-dialog .booking-summary dd { font-size: 16px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.booking-dialog .booking-summary .total dd { font-size: 24px; }
.booking-dialog .booking-back { min-height: 44px; margin: 0 0 16px; padding: 8px 0; font-size: 16px; color: #164caa; }
.booking-dialog :is(.booking-consent, .cashback-spend) { min-height: 44px; align-items: flex-start; gap: 12px; padding-block: 8px; font-size: 16px; color: #44536b; }
.booking-dialog :is(.booking-consent, .cashback-spend) input { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--panel-blue); }
.booking-dialog .legal-link { min-height: 44px; padding: 8px 0; font-size: inherit; line-height: inherit; color: #164caa; }
.booking-dialog :is(.booking-access-warning, .booking-prototype-note) { padding: 18px; gap: 6px; border-radius: 14px; }
.booking-dialog :is(.booking-access-warning, .booking-prototype-note) :is(b, span) { font-size: 16px; line-height: 1.5; }
:is(.booking-dialog, .cart-dialog, .profile-dialog) .booking-inline-status:not(:empty) { margin-block: 12px; min-height: 44px; padding: 14px 16px; border-radius: 12px; font-size: 16px; line-height: 1.5; }
:is(.booking-dialog, .cart-dialog, .profile-dialog) .booking-inline-status.error { color: #922f23; background: #fff1ee; border: 1px solid #efc4bb; }
:is(.booking-dialog, .cart-dialog, .profile-dialog) .booking-inline-status.warning { color: #735000; background: #fff7e6; border: 1px solid #e6d3a1; }
:is(.booking-dialog, .cart-dialog, .profile-dialog) .booking-inline-status.success { color: #176140; background: #eff9f2; border: 1px solid #bddcc8; }
.booking-dialog .booking-ready-actions { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-block: 20px; }
.booking-dialog .booking-ready-actions .button { width: 100%; }
.booking-dialog .order-progress { display: inline-block; padding: 7px 12px; margin: 12px 0 16px; border: 1px solid #d6e3ff; border-radius: 9px; color: #164caa; background: var(--panel-tint); font-size: 14px; }
.booking-dialog .order-cell { margin: 0 0 20px; padding: 14px 18px; border: 1px solid #d6e3ff; border-radius: 14px; background: var(--panel-tint); color: var(--panel-navy); font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.booking-dialog .order-item { min-width: 0; padding: 18px; gap: 14px; border-color: var(--panel-line); border-radius: 16px; background: #fff; }
.booking-dialog .order-item > div { min-width: 0; flex-basis: 180px; }
.booking-dialog .order-item b { font-size: 16px; line-height: 1.5; }
.booking-dialog .order-item small { font-size: 14px; line-height: 1.5; color: var(--panel-muted); }
.booking-dialog .order-return-choice { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.booking-dialog .order-return-choice input { width: 22px; height: 22px; accent-color: var(--panel-blue); }
.booking-dialog .order-flow figure { margin: 20px 0; padding: 8px; background: var(--panel-paper); border: 1px solid var(--panel-line); border-radius: 16px; }
.booking-dialog .order-flow figcaption { margin: 10px 6px; color: var(--panel-muted); font-size: 14px; line-height: 1.5; }
.booking-dialog .return-tool-card { display: flex; flex-direction: column; align-items: stretch; }
.booking-dialog .return-tool-card > div { flex-basis: auto; }
.booking-dialog .return-tool-card b { display: block; font-size: 18px; }
.booking-dialog .return-reference { margin: 12px 0 0; }
.booking-dialog :is(.return-reference, .return-current-frame) img { display: block; width: 100%; max-height: 290px; object-fit: contain; border-radius: 10px; }
.booking-dialog .return-inspection { margin: 18px 0 12px; padding: 18px; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel-paper); }
.booking-dialog .return-inspection h3 { margin: 0 0 10px; font-size: 18px; color: var(--panel-navy); }
.booking-dialog .return-inspection p { margin: 8px 0; line-height: 1.5; }
.booking-dialog .return-inspection-status { display: inline-block; padding: 4px 10px; border-radius: 8px; font-weight: 750; background: #eaf1ff; color: #164caa; }
.booking-dialog .return-inspection-unclear .return-inspection-status { background: #fff1d6; color: #735000; }
.booking-dialog .return-inspection-unavailable .return-inspection-status { background: #fff1ee; color: #922f23; }
.booking-dialog .return-inspection details { margin-top: 12px; }
.booking-dialog .return-inspection summary { cursor: pointer; font-weight: 700; }
.booking-dialog .return-inspection ol { margin: 10px 0 0; padding-left: 24px; line-height: 1.5; }
.booking-dialog .return-declaration-note { margin: 16px 0 0; color: var(--panel-muted); font-size: 14px; line-height: 1.5; }
.booking-dialog .return-help { width: 100%; }
.profile-dialog .profile-pickup-reference { margin: 12px 0 0; padding: 8px; border: 1px solid var(--panel-line); border-radius: 14px; background: var(--panel-paper); }
.profile-dialog .profile-pickup-reference img { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 9px; }
.profile-dialog .profile-pickup-reference figcaption { margin: 8px 6px; color: var(--panel-muted); font-size: 14px; }
.booking-dialog .passport-upload-grid { gap: 12px; }
.booking-dialog .passport-upload { min-height: 186px; padding: 18px 16px; border: 1px dashed #a3b5d0; border-radius: 16px; transition: transform 180ms ease; }
.booking-dialog .passport-upload.has-file { border-color: #73b594; background: #f0f9f4; }
.booking-dialog .passport-upload-icon { width: 36px; height: 36px; margin-bottom: 16px; border-radius: 11px; }
.booking-dialog .passport-upload b { font-size: 16px; line-height: 1.4; }
.booking-dialog .passport-upload small { font-size: 14px; line-height: 1.5; color: var(--panel-muted); }
.booking-dialog .passport-upload em { font-size: 14px; line-height: 1.4; }
.booking-dialog .verification-ticket { padding: 18px; background: var(--panel-paper); border-color: var(--panel-line); border-radius: 16px; }
.booking-dialog .verification-ticket span { font-size: 14px; }
.booking-dialog .verification-ticket b { font-size: 16px; }
.booking-dialog .verification-waiting-icon span { border-color: #9ab9fa; border-top-color: var(--panel-blue); }
.booking-dialog .rental-contract-card { border-radius: 16px; padding: 18px; }
.booking-dialog .rental-contract-card :is(b, small) { font-size: 16px; line-height: 1.5; }

/* Product detail belongs to the same system; no catalogue selectors are touched. */
.product-dialog .dialog-product { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: 0; }
.product-dialog .dialog-image { min-height: 400px; padding: 28px; background: var(--panel-paper); }
.product-dialog .dialog-image img { object-fit: contain; }
.product-dialog .dialog-info { min-width: 0; padding: 48px 32px 30px; }
.product-dialog .dialog-info .product-tag { padding: 6px 10px; color: #164caa; background: var(--panel-tint); border-radius: 8px; font-size: 12px; }
.product-dialog .dialog-info h2 { margin: 16px 0; font-size: 30px; line-height: 1.2; letter-spacing: -.035em; }
.product-dialog .dialog-price { margin: 18px 0; font-size: 34px; line-height: 1.25; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.product-dialog .dialog-price small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--panel-muted); }
.product-dialog .dialog-description { font-size: 16px; line-height: 1.6; color: var(--panel-muted); }
.product-dialog .booking-available { display: inline-flex; padding: 6px 10px; font-size: 14px; border-radius: 8px; }
.product-dialog .spec-list li { padding: 12px 0; font-size: 14px; gap: 16px; }
.product-dialog .spec-list b { text-align: right; }
.product-dialog .dialog-actions { grid-template-columns: minmax(0, 1fr) 52px; gap: 10px; }
.product-dialog .dialog-footnote { font-size: 14px; line-height: 1.5; color: var(--panel-muted); }
.product-dialog .product-page-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: #164caa; }

@media (hover: hover) and (pointer: fine) {
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) .button-primary:not(:disabled):not([aria-disabled="true"]):hover { background: #064dde; transform: translateY(-1px); }
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) .button-ghost:not(:disabled):not([aria-disabled="true"]):hover { background: #f3f7ff; transform: translateY(-1px); }
}
@media (max-width: 600px) {
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) { width: calc(100% - 24px); max-width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 22px; }
  :is(.cart-dialog, .profile-dialog, .booking-dialog) :is(.cart-shell, .profile-shell, .booking-shell) { padding: 28px 20px max(22px, env(safe-area-inset-bottom)); }
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) > .dialog-close { top: 12px; margin: 12px 12px -56px 0; }
  :is(.cart-dialog, .profile-dialog, .booking-dialog) h2 { font-size: 28px; margin-right: 46px; }
  .cart-dialog .cart-item { grid-template-columns: 48px minmax(0, 1fr) 44px; gap: 10px; padding: 14px 12px; }
  .cart-dialog .cart-item img { width: 48px; height: 56px; }
  .cart-dialog .cart-total { padding: 16px; }
  .cart-dialog .cart-total strong { font-size: 28px; }
  .profile-dialog .profile-identity { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; }
  .profile-dialog .profile-avatar { width: 48px; height: 48px; border-radius: 15px; font-size: 18px; }
  .profile-dialog .profile-identity h2 { margin-right: 0; font-size: 24px; }
  .profile-dialog .profile-tabs { margin-top: 20px; }
  .profile-dialog .profile-tabs button { padding-inline: 8px; }
  .profile-dialog .profile-history-item { padding: 16px; }
  :is(.booking-dialog, .profile-dialog) .booking-fields { grid-template-columns: minmax(0, 1fr); }
  .booking-dialog .booking-estimate { padding: 16px; gap: 8px; }
  .booking-dialog .booking-estimate strong { font-size: 26px; }
  .booking-dialog .booking-summary > div { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .booking-dialog .booking-summary dd { text-align: left; }
  .booking-dialog .passport-upload-grid { grid-template-columns: minmax(0, 1fr); }
  .booking-dialog .passport-upload { min-height: 152px; }
  .booking-dialog .passport-upload-icon { margin-bottom: 12px; }
  .booking-dialog .order-cell { font-size: 22px; }
  .product-dialog .dialog-product { grid-template-columns: minmax(0, 1fr); }
  .product-dialog .dialog-image { height: 230px; min-height: 0; padding: 22px; }
  .product-dialog .dialog-image img { max-height: 186px; }
  .product-dialog .dialog-info { padding: 24px 20px; }
  .product-dialog .dialog-info h2 { font-size: 26px; }
}
@media (max-width: 360px) {
  :is(.cart-dialog, .profile-dialog, .booking-dialog) :is(.cart-shell, .profile-shell, .booking-shell) { padding-inline: 16px; }
  .cart-dialog .cart-item { grid-template-columns: minmax(0, 1fr) 44px; }
  .cart-dialog .cart-item img { grid-column: 1; }
  .cart-dialog .cart-item > div { grid-row: 2; grid-column: 1 / -1; }
  .cart-dialog .cart-item > button { grid-row: 1; grid-column: 2; }
  .profile-dialog .profile-rates { grid-template-columns: minmax(0, 1fr); }
  .profile-dialog .profile-history-item dl { grid-template-columns: minmax(0, 1fr); }
  .booking-dialog .booking-estimate { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog)[open] { animation: ph-panel-enter 200ms ease-out both; }
  @keyframes ph-panel-enter { from { opacity: .4; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog),
  :is(.cart-dialog, .profile-dialog, .booking-dialog, .product-dialog) * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
