/* Settings and comic presentation only; no reward/account state changes. */
html body .garage-arrival-button {
  white-space: nowrap;
  word-break: keep-all;
  width: max-content;
  min-width: 124px;
  max-width: calc(100% - 24px);
  font-size: clamp(12px, 3.2vw, 14px);
}
/* Bound the sheet itself, not just backdrop padding: grid items can otherwise
   overflow their available height on short/tall embedded WebViews. */
html body #feature-panel-backdrop {
  --sheet-top-limit: max(var(--game-sheet-header-top, 80px), env(safe-area-inset-top));
  box-sizing: border-box;
  padding-top: var(--sheet-top-limit) !important;
  padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
}
html body #feature-panel-shell {
  min-height: 0 !important;
  max-height: calc(100dvh - max(var(--game-sheet-header-top, 80px), env(safe-area-inset-top)) - env(safe-area-inset-bottom)) !important;
}
html body :is(#utility-modal, #boost-choice-modal, #ranking-modal, #notices-modal).modal {
  box-sizing: border-box;
  padding-top: max(var(--game-sheet-header-top, 80px), env(safe-area-inset-top)) !important;
}
html body #pc-phone-stage :is(#utility-modal, #boost-choice-modal, #ranking-modal, #notices-modal).modal:not(.hidden) {
  padding-top: max(var(--game-sheet-header-top, 80px), env(safe-area-inset-top)) !important;
}
html body :is(#utility-modal, #boost-choice-modal, #ranking-modal, #notices-modal).modal > .modal-content,
html body #pc-phone-stage :is(#utility-modal, #boost-choice-modal, #ranking-modal, #notices-modal).modal > .modal-content {
  min-height: 0 !important;
  max-height: calc(100dvh - max(var(--game-sheet-header-top, 80px), env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom))) !important;
}
html body #tier-modal #tier-modal-desc {
  position: static; margin: 12px 0; padding: 0 8px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  color: #333d4b; font-size: 16px; font-weight: 800; line-height: 1.5;
  text-align: center; word-break: keep-all; overflow-wrap: anywhere;
}
html body #utility-modal #cloud-save-settings small {
  white-space: pre-line; word-break: keep-all; overflow-wrap: anywhere;
  line-height: 1.5;
}
html body #utility-modal #promotion-settings {
  margin: 0 0 12px; padding: 0; border: 1px solid #e5e8eb;
  border-radius: 14px; overflow: hidden; background: #f9fafb;
}
html body #utility-modal #promotion-settings .utility-action-row {
  margin: 0; padding: 14px 12px 10px; border: 0; background: transparent;
}
html body #utility-modal #promotion-details { padding: 0 14px 14px; }
html body #utility-modal #promotion-conditions {
  margin: 0; font-size: 12px; line-height: 1.65; color: #6b7684;
  word-break: keep-all; overflow-wrap: anywhere;
}
html body #utility-modal #promotion-milestones { margin: 10px 0 0; }
html body #utility-modal #promotion-milestones li {
  padding: 10px 12px; border-radius: 10px; background: #e8f3ff;
  color: #1b64da; font-size: 14px; font-weight: 800; line-height: 1.5;
}

html body #utility-modal #promotion-settings.attendance-mission .utility-action-row > div {
  text-align: left; min-width: 0;
}
html body #utility-modal #promotion-settings.attendance-mission #promotion-conditions {
  white-space: pre-line; text-align: left; line-height: 1.75;
}
html body #utility-modal #promotion-settings.attendance-mission #promotion-milestones {
  display: grid; gap: 8px; padding: 0; list-style: none; text-align: left;
}
html body #utility-modal #promotion-settings.attendance-mission #promotion-milestones li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px; margin: 0; align-items: center;
}
html body #utility-modal #promotion-settings.attendance-mission .promotion-stage {
  min-width: 0; word-break: keep-all; overflow-wrap: anywhere;
}
html body #utility-modal #promotion-settings.attendance-mission .promotion-amount {
  white-space: nowrap; font: inherit; text-align: right;
}
html body #utility-modal #promotion-settings.attendance-mission .promotion-result {
  grid-column: 1 / -1; color: #6b7684; font-size: 12px; font-weight: 500;
  line-height: 1.5; text-align: left;
}

/* Collection thumbnail only: keep the hit target and all driving art unchanged. */
html body #panel-milestones .milestone-card[data-milestone="sportscar"]
  .milestone-preview-button > img.milestone-emoji {
  box-sizing: border-box;
  padding: 2px !important;
  object-fit: contain !important;
  object-position: center;
}
