/* My Garage — profile hub, tabs, and shared dark gallery patterns (aligned with car page) */

body.garage-viewer-open,
body.garage-insights-modal-open {
  overflow: hidden;
}

.garage-profile {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}

.garage-profile-header {
  margin-bottom: 1.5rem;
}

/* Shell: profile card + taste strip + tab strip */
.garage-profile-shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Visual taste rails sit between identity and tabs — full width inside shell */
.garage-profile-shell .garage-profile-taste--lead {
  margin: 0.15rem 0 0.1rem;
  padding: 0;
  max-width: none;
}

.garage-profile-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
}

.garage-profile-tab-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  gap: 0.5rem;
  min-height: 0;
}

.garage-profile-tab-toolbar .garage-cars-toolbar {
  margin: 0;
  min-height: 0;
}

.garage-profile-tab-toolbar .garage-cars-toolbar[hidden] {
  display: none !important;
}

/* Collapse toolbar strip when contextual controls are hidden (avoids empty gap next to tabs) */
#garage-profile-tab-toolbar:has(#garage-cars-toolbar[hidden]) {
  display: none;
}

/* Profile hero card */
.garage-profile-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.35rem 1.5rem;
  padding: 1.5rem 1.35rem 1.45rem;
  margin-bottom: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(155deg, rgba(22, 28, 38, 0.98) 0%, rgba(12, 14, 18, 0.94) 55%, rgba(8, 10, 14, 0.92) 100%);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.22),
    0 20px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background 0.28s ease;
}

.garage-profile-card,
.garage-profile-nav .garage-profile-tabs {
  transition: border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.garage-profile-card--editing {
  border-color: rgba(110, 176, 255, 0.32);
  background: linear-gradient(
    155deg,
    rgba(26, 34, 48, 0.99) 0%,
    rgba(14, 18, 26, 0.96) 55%,
    rgba(10, 14, 22, 0.94) 100%
  );
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.22),
    0 20px 48px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(110, 176, 255, 0.12),
    0 0 28px rgba(110, 176, 255, 0.08);
}

.garage-profile-editing-label {
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(150, 200, 255, 0.82);
  white-space: nowrap;
  user-select: none;
  padding: 0.35rem 0.55rem;
  margin-right: 0.15rem;
  border-radius: 999px;
  border: 1px solid rgba(110, 176, 255, 0.22);
  background: rgba(110, 176, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.garage-profile-editing-label[hidden] {
  display: none !important;
}

.garage-profile-avatar-wrap {
  flex-shrink: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 100%;
}

.garage-profile-avatar-error {
  margin: 0;
  padding: 0;
  max-width: 12rem;
  font-size: 0.68rem;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(255, 160, 150, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.garage-profile-avatar-error--info {
  color: rgba(139, 150, 168, 0.95);
  font-weight: 500;
  text-shadow: none;
}

.garage-profile-avatar-error[hidden] {
  display: none !important;
}

.garage-profile-avatar-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.garage-profile-avatar {
  position: relative;
  width: 5.75rem;
  height: 5.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(circle at 35% 30%, rgba(110, 176, 255, 0.18) 0%, rgba(14, 18, 26, 0.95) 55%, rgba(6, 8, 12, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 28px rgba(0, 0, 0, 0.35);
  color: rgba(190, 210, 245, 0.88);
  transition:
    box-shadow 0.24s ease,
    border-color 0.24s ease,
    transform 0.15s ease;
}

.garage-profile-avatar--editable {
  cursor: pointer;
  border-color: rgba(110, 176, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 10px 28px rgba(0, 0, 0, 0.35),
    0 0 0 2px rgba(110, 176, 255, 0.22),
    0 0 20px rgba(110, 176, 255, 0.06);
}

.garage-profile-avatar--editable:hover {
  border-color: rgba(130, 190, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(110, 176, 255, 0.32),
    0 0 24px rgba(110, 176, 255, 0.1);
}

.garage-profile-avatar--editable:focus-visible {
  outline: none;
  border-color: rgba(130, 190, 255, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.38),
    0 0 0 2px rgba(110, 176, 255, 0.45),
    0 0 28px rgba(110, 176, 255, 0.14);
}

.garage-profile-avatar--editable:active {
  transform: scale(0.98);
}

.garage-profile-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 3;
}

.garage-profile-avatar-placeholder {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* When a photo is shown, ensure the default icon layer never paints above or beside the image */
.garage-profile-avatar--has-image .garage-profile-avatar-placeholder {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.garage-profile-avatar-placeholder[hidden] {
  display: none !important;
}

.garage-profile-avatar-img[hidden] {
  display: none !important;
}

/* Edit mode: subtle scrim + camera icon (shown with .garage-profile-avatar--editable on parent) */
.garage-profile-avatar-edit-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 50% 42%,
    rgba(6, 10, 18, 0.18) 0%,
    rgba(4, 8, 16, 0.48) 62%,
    rgba(2, 4, 10, 0.58) 100%
  );
  color: rgba(210, 228, 255, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    visibility 0.24s ease;
}

.garage-profile-avatar--editable .garage-profile-avatar-edit-overlay {
  opacity: 1;
  visibility: visible;
}

.garage-profile-avatar--editable:hover .garage-profile-avatar-edit-overlay {
  background: radial-gradient(
    circle at 50% 42%,
    rgba(8, 14, 24, 0.22) 0%,
    rgba(6, 12, 22, 0.52) 62%,
    rgba(4, 8, 16, 0.62) 100%
  );
  color: rgba(230, 240, 255, 0.98);
}

.garage-profile-avatar-edit-icon {
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
  opacity: 0.88;
}

.garage-profile-avatar--editable:hover .garage-profile-avatar-edit-icon {
  opacity: 1;
}

.garage-profile-avatar-placeholder svg {
  width: 3.15rem;
  height: 3.15rem;
}

/* Profile picture lightbox — reuses .user-gallery-viewer; minimal chrome */
.garage-profile-photo-viewer .garage-profile-photo-viewer-inner {
  width: min(100%, 520px);
  padding: 3.5rem 1.25rem 2rem;
  pointer-events: none;
}

.garage-profile-photo-viewer .garage-profile-photo-viewer-inner > * {
  pointer-events: auto;
}

.garage-profile-photo-viewer .user-gallery-viewer-stage {
  margin-bottom: 0;
}

.garage-profile-photo-viewer .user-gallery-viewer-img {
  max-width: min(92vw, 520px);
  max-height: min(72vh, 560px);
  width: auto;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 14px;
}

.garage-profile-photo-viewer-caption {
  margin: 1rem 0 0;
  padding: 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(160, 188, 228, 0.72);
}

/* Normal mode + photo: hint that the avatar opens a larger view */
.garage-profile-avatar--has-image:not(.garage-profile-avatar--editable) {
  cursor: zoom-in;
}

.garage-profile-avatar--has-image:not(.garage-profile-avatar--editable):hover {
  border-color: rgba(120, 178, 245, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 14px 36px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(110, 176, 255, 0.24),
    0 0 32px rgba(110, 176, 255, 0.1);
}

.garage-profile-avatar--has-image:not(.garage-profile-avatar--editable):active {
  transform: scale(0.985);
}

.garage-profile-avatar--has-image:not(.garage-profile-avatar--editable):focus-visible {
  outline: none;
  border-color: rgba(130, 190, 255, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 12px 32px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(110, 176, 255, 0.38),
    0 0 30px rgba(110, 176, 255, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  .garage-profile-avatar--has-image:not(.garage-profile-avatar--editable):active {
    transform: none;
  }
}

.garage-profile-info {
  flex: 1;
  min-width: min(100%, 16rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Name + bio (view or edit fields) */
.garage-profile-identity {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  min-width: 0;
}

/* Stats row: premium metric grid + actions */
.garage-profile-stats-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  flex-wrap: wrap;
  width: 100%;
}

.garage-profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 26rem;
}

.garage-profile-stat {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.32rem 0.4rem;
  white-space: nowrap;
  min-width: 0;
  padding: 0.38rem 0.5rem 0.42rem;
  border-radius: 10px;
  background: rgba(6, 8, 12, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.045);
  box-shadow: none;
}

.garage-profile-stat-label {
  font-size: 0.72rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(195, 206, 224, 0.9);
  line-height: 1.2;
}

.garage-profile-stat-value {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: rgba(230, 236, 248, 0.95);
  line-height: 1.15;
}

.garage-profile-stats-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.garage-profile-stats-row .garage-profile-header-btn {
  flex-shrink: 0;
}

.saved-tab-intro {
  margin-bottom: 0.85rem;
}

.saved-tab-intro .detail-gallery-subheading {
  margin-bottom: 0.25rem;
}

.saved-tab-lede {
  margin: 0.15rem 0 0;
  max-width: 36rem;
  font-size: 0.84rem;
  font-weight: 450;
  line-height: 1.45;
  color: rgba(145, 158, 182, 0.92);
}

.garage-coolwall-cta {
  margin: 0.35rem 0 0.85rem;
  padding: 0 0.05rem;
}

.garage-coolwall-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(150, 198, 255, 0.96);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.garage-coolwall-link:hover {
  text-decoration: underline;
  color: rgba(175, 215, 255, 1);
}

.detail-gallery-photo-item--saved {
  position: relative;
}

.saved-tab-badge {
  position: absolute;
  bottom: 7px;
  left: 7px;
  z-index: 2;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 7px;
  background: rgba(6, 8, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(228, 236, 252, 0.95);
  pointer-events: none;
}

.garage-profile-header-btn {
  margin: 0;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.48rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 228, 240, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.garage-profile-header-btn:hover {
  border-color: rgba(110, 176, 255, 0.32);
  background: rgba(110, 176, 255, 0.08);
  color: rgba(248, 250, 252, 0.98);
}

.garage-profile-header-btn:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.garage-profile-header-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.garage-profile-header-btn--done {
  border-color: rgba(130, 188, 255, 0.45);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.22) 0%, rgba(18, 22, 30, 0.95) 100%);
  color: rgba(248, 252, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 2px 12px rgba(0, 0, 0, 0.22);
}

.garage-profile-header-btn--done:hover {
  border-color: rgba(150, 200, 255, 0.55);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.3) 0%, rgba(20, 26, 36, 0.96) 100%);
}

/* Name: view (`p`) vs edit (`input`) — only one visible at a time */
.garage-profile-name-field {
  width: 100%;
  min-width: 0;
}

.garage-profile-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.garage-profile-verified-mount {
  display: inline-flex;
  flex-shrink: 0;
  line-height: 0;
}

.garage-profile-verified-mount[hidden] {
  display: none !important;
}

.garage-profile-name-view {
  margin: 0;
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  font-family: var(--font, system-ui, sans-serif);
  font-size: clamp(1.45rem, 3.8vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: rgba(248, 250, 252, 0.98);
}

.garage-profile-name-view.garage-profile-text-placeholder {
  font-weight: 650;
}

/* Bio: two separate elements — .garage-profile-bio-view (read-only) vs textarea.garage-profile-bio-edit; only one is visible. */
.garage-profile-bio-host {
  width: 100%;
  min-width: 0;
}

.garage-profile-bio-view {
  margin: 0;
  width: 100%;
  max-width: none;
  min-height: 2.75rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.94rem;
  font-weight: 450;
  line-height: 1.5;
  color: rgba(218, 224, 236, 0.94);
  white-space: pre-wrap;
  word-break: break-word;
}

.garage-profile-text-placeholder {
  color: rgba(130, 142, 162, 0.62) !important;
  font-weight: 450;
}

.garage-profile-bio-view.garage-profile-text-placeholder {
  font-style: italic;
  letter-spacing: 0.01em;
}

input.garage-profile-name-edit {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  padding: 0.5rem 0.7rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: clamp(1.2rem, 3.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: rgba(248, 250, 252, 0.98);
  background: rgba(6, 8, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input.garage-profile-name-edit::placeholder {
  color: rgba(130, 142, 162, 0.55);
  font-weight: 600;
}

input.garage-profile-name-edit:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

input.garage-profile-name-edit:focus {
  outline: none;
  border-color: rgba(110, 176, 255, 0.38);
  box-shadow: 0 0 0 2px rgba(110, 176, 255, 0.1);
  background: rgba(8, 10, 14, 0.55);
}

textarea.garage-profile-bio-edit {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 5.5rem;
  margin: 0;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.92rem;
  font-weight: 450;
  line-height: 1.45;
  color: rgba(220, 226, 238, 0.95);
  background: rgba(6, 8, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  resize: vertical;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

textarea.garage-profile-bio-edit::placeholder {
  color: rgba(130, 142, 162, 0.58);
}

textarea.garage-profile-bio-edit:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

textarea.garage-profile-bio-edit:focus {
  outline: none;
  border-color: rgba(110, 176, 255, 0.38);
  box-shadow: 0 0 0 2px rgba(110, 176, 255, 0.1);
  background: rgba(8, 10, 14, 0.55);
}

@media (max-width: 520px) {
  .garage-profile-stats-row {
    flex-direction: column;
    align-items: stretch;
  }

  .garage-profile-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .garage-profile-stats-actions {
    align-self: flex-end;
  }

  .garage-profile-stats-row .garage-profile-header-btn {
    align-self: flex-end;
  }
}

/* Icon tabs */
.garage-profile-tabs {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0.35rem;
  gap: 0.35rem;
  border-radius: 16px;
  background: rgba(8, 10, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.garage-profile-tab.garage-tab {
  flex: 1;
  margin: 0;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.75rem 0.65rem 0.65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(150, 162, 182, 0.88);
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.15s ease;
}

.garage-profile-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(170, 186, 208, 0.88);
  transition: color 0.2s ease;
}

.garage-profile-tab-icon .garage-profile-tab-logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.82;
  transition:
    opacity 0.2s ease,
    filter 0.2s ease;
}

.garage-profile-tab-label {
  line-height: 1.15;
}

.garage-profile-tab.garage-tab:hover {
  color: rgba(210, 220, 240, 0.95);
}

.garage-profile-tab.garage-tab:hover .garage-profile-tab-icon {
  color: rgba(200, 218, 248, 0.95);
}

.garage-profile-tab.garage-tab:hover .garage-profile-tab-icon .garage-profile-tab-logo {
  opacity: 0.95;
}

.garage-profile-tab.garage-tab[aria-selected="true"] {
  color: rgba(240, 246, 255, 0.98);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.14) 0%, rgba(18, 22, 30, 0.92) 100%);
  border: 1px solid rgba(110, 176, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 18px rgba(0, 0, 0, 0.25);
}

/* Keep the active My RevScore tab background consistent with the tab set. */
#tab-my-revscore.garage-profile-tab.garage-tab[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.14) 0%, rgba(18, 22, 30, 0.92) 100%);
}

.garage-profile-tab.garage-tab[aria-selected="true"] .garage-profile-tab-icon {
  color: rgba(160, 200, 255, 0.98);
}

.garage-profile-tab.garage-tab[aria-selected="true"] .garage-profile-tab-icon .garage-profile-tab-logo {
  opacity: 1;
  filter: brightness(1.12) saturate(1.06);
}

.garage-profile-tab.garage-tab:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.garage-profile-tab.garage-tab:active:not([aria-selected="true"]) {
  transform: scale(0.98);
}

.garage-tab-panel {
  margin-top: 0.65rem;
  animation: garage-panel-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.garage-tab-panel[hidden] {
  display: none !important;
}

@keyframes garage-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Detail gallery (matches car.html) —— */
.garage-gallery-tag-hint {
  margin: 0 0 0.85rem;
  font-size: 0.86rem;
  font-weight: 450;
  line-height: 1.5;
  color: rgba(150, 162, 182, 0.92);
  max-width: 40rem;
}

.detail-gallery-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 100%;
}

.detail-gallery-photos-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.15rem;
}

.detail-gallery-subheading {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(139, 150, 168, 0.88);
}

.detail-gallery-user-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-detail-gallery-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(230, 236, 248, 0.95);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(14, 16, 20, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.18s ease,
    transform 0.15s ease;
}

.btn-detail-gallery-upload:hover {
  border-color: rgba(110, 176, 255, 0.4);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.12) 0%, rgba(14, 18, 26, 0.95) 100%);
}

.btn-detail-gallery-upload:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.btn-detail-gallery-upload:active {
  transform: scale(0.98);
}

.detail-gallery-upload-hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  color: rgba(139, 150, 168, 0.95);
}

.detail-gallery-upload-hint--error {
  color: #ff9a9a;
}

.detail-gallery-upload-hint--success {
  color: #8ee9c8;
}

.detail-gallery-upload-hint--processing {
  color: rgba(160, 175, 195, 0.95);
}

.detail-gallery-upload-hint[hidden] {
  display: none !important;
}

.detail-gallery-photo-remove {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 4;
  width: 1.65rem;
  height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1;
  color: rgba(248, 250, 252, 0.95);
  background: rgba(8, 10, 14, 0.82);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.detail-gallery-photo-remove:hover {
  background: rgba(180, 60, 60, 0.88);
  border-color: rgba(255, 160, 160, 0.35);
}

.detail-gallery-photo-remove:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.detail-gallery-photos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.detail-gallery-photo-item {
  margin: 0;
}

.detail-gallery-photo-item--user {
  min-width: 0;
}

@media (min-width: 520px) {
  .detail-gallery-photo-item--user {
    grid-column: span 2;
  }
}

.detail-gallery-photo-user {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.detail-gallery-photo-user .detail-gallery-photo-thumb {
  min-height: 148px;
}

.garage-photo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.55rem 0.6rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: rgba(248, 250, 252, 0.96);
  background: linear-gradient(180deg, transparent 0%, rgba(4, 6, 10, 0.1) 35%, rgba(4, 6, 10, 0.88) 100%);
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.garage-photo-likes {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(200, 210, 228, 0.78);
  font-variant-numeric: tabular-nums;
}

.detail-gallery-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  font-size: 0.84rem;
  font-weight: 450;
  line-height: 1.45;
  color: rgba(139, 150, 168, 0.82);
  text-align: center;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.detail-gallery-empty a {
  color: var(--accent, #6eb0ff);
  font-weight: 550;
  text-decoration: none;
}

.detail-gallery-empty a:hover {
  text-decoration: underline;
}

.detail-gallery-photo-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 24px rgba(0, 0, 0, 0.35);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.2s ease;
}

button.detail-gallery-photo-link.detail-gallery-photo-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.detail-gallery-photo-trigger .detail-gallery-photo-thumb {
  pointer-events: none;
}

.detail-gallery-photo-link:hover {
  border-color: rgba(110, 176, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 8px 28px rgba(0, 0, 0, 0.4);
}

.detail-gallery-photo-link:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 3px;
}

.detail-gallery-photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(12, 14, 18, 0.9);
}

/* Lightbox (same visual language as car page user-gallery-viewer) */
.user-gallery-viewer {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) max(1.5rem, env(safe-area-inset-bottom, 0))
    env(safe-area-inset-left, 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 102, 124, 0.38) transparent;
}

.user-gallery-viewer:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.user-gallery-viewer::-webkit-scrollbar {
  width: 5px;
}

.user-gallery-viewer::-webkit-scrollbar-track {
  background: transparent;
}

.user-gallery-viewer::-webkit-scrollbar-thumb {
  background: rgba(92, 102, 124, 0.42);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.user-gallery-viewer-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 6, 10, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: zoom-out;
}

.user-gallery-viewer-close {
  position: absolute;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  right: max(0.85rem, env(safe-area-inset-right, 0px));
  z-index: 4;
  width: 2.65rem;
  height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(18, 22, 30, 0.82);
  color: rgba(240, 243, 247, 0.95);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.user-gallery-viewer-close:hover {
  background: rgba(32, 38, 52, 0.95);
  border-color: rgba(110, 176, 255, 0.38);
}

.user-gallery-viewer-close:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.user-gallery-viewer-nav {
  position: absolute;
  top: 42%;
  z-index: 4;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(14, 17, 22, 0.88);
  color: rgba(230, 235, 245, 0.95);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.user-gallery-viewer-nav:hover {
  background: rgba(26, 32, 44, 0.95);
  border-color: rgba(110, 176, 255, 0.35);
}

.user-gallery-viewer-nav:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.user-gallery-viewer-nav[hidden] {
  display: none;
}

.user-gallery-viewer-prev {
  left: max(0.55rem, env(safe-area-inset-left, 0px));
}

.user-gallery-viewer-next {
  right: max(0.55rem, env(safe-area-inset-right, 0px));
}

.user-gallery-viewer-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 3.25rem 1.25rem 1.5rem;
  box-sizing: border-box;
  pointer-events: none;
}

.user-gallery-viewer-inner > * {
  pointer-events: auto;
}

.user-gallery-viewer-stage {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.user-gallery-viewer-img {
  max-width: 100%;
  max-height: min(48vh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.35),
    0 24px 48px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: scale(0.99);
  transition:
    opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-gallery-viewer:not([hidden]) .user-gallery-viewer-img.is-ready {
  opacity: 1;
  transform: scale(1);
}

.user-gallery-viewer-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-gallery-viewer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.5rem 0 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.user-gallery-viewer-badge {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(130, 200, 255, 0.75);
}

.user-gallery-viewer-counter {
  font-size: 0.78rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(160, 172, 192, 0.9);
}

.garage-gl-car-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: rgba(236, 242, 255, 0.96);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.14) 0%, rgba(14, 18, 26, 0.92) 100%);
  border: 1px solid rgba(110, 176, 255, 0.35);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.garage-gl-car-link:hover {
  border-color: rgba(130, 200, 255, 0.55);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.22) 0%, rgba(16, 20, 30, 0.95) 100%);
}

.garage-gl-car-link:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

.garage-gl-car-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: rgba(240, 244, 252, 0.96);
}

.garage-gl-tagged-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.garage-gl-tagged-wrap[hidden] {
  display: none !important;
}

.garage-gl-tagged-label {
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(130, 200, 255, 0.65);
}

.garage-gl-tagged-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

a.garage-gl-tag-link {
  font-size: 0.82rem;
  font-weight: 550;
  color: rgba(180, 210, 255, 0.95);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(110, 176, 255, 0.22);
  background: rgba(110, 176, 255, 0.06);
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

a.garage-gl-tag-link:hover {
  border-color: rgba(130, 200, 255, 0.45);
  background: rgba(110, 176, 255, 0.12);
}

.garage-photo-tag-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.35rem;
}

.garage-photo-tag-pill {
  display: inline-block;
  max-width: 100%;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
  color: rgba(200, 220, 248, 0.92);
  background: rgba(110, 176, 255, 0.1);
  border: 1px solid rgba(110, 176, 255, 0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.garage-photo-tag-more {
  font-size: 0.58rem;
  font-weight: 650;
  color: rgba(160, 176, 200, 0.85);
  align-self: center;
}

body.garage-tag-modal-open {
  overflow: hidden;
}

.garage-tag-modal {
  position: fixed;
  inset: 0;
  z-index: 10070;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  color-scheme: dark;
}

.garage-tag-modal[hidden] {
  display: none !important;
}

.garage-tag-modal-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(4, 6, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.garage-tag-modal-status {
  width: min(100%, 520px);
  margin: 0 auto 0.65rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 550;
  line-height: 1.35;
  border-radius: 10px;
  border: 1px solid rgba(255, 180, 140, 0.35);
  background: rgba(120, 40, 30, 0.35);
  color: rgba(255, 220, 210, 0.98);
}

.garage-tag-modal-status[hidden] {
  display: none !important;
}

.garage-tag-modal-status--ok {
  border-color: rgba(110, 200, 140, 0.4);
  background: rgba(30, 80, 50, 0.35);
  color: rgba(210, 245, 220, 0.98);
}

.garage-tag-modal-dialog {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: min(100%, 520px);
  margin-top: 0.5rem;
  margin-bottom: 2rem;
  padding: 1.35rem 1.35rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, #181e27 0%, #12161c 100%);
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.35),
    0 28px 56px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.garage-tag-modal-head {
  margin-bottom: 1.1rem;
}

.garage-tag-modal-title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(244, 248, 252, 0.98);
}

.garage-tag-modal-lede {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 450;
  line-height: 1.45;
  color: rgba(150, 162, 182, 0.92);
}

.garage-tag-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 0.25rem;
  margin-bottom: 1.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 102, 124, 0.45) transparent;
}

.garage-tag-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0.85rem;
  align-items: start;
}

@media (max-width: 480px) {
  .garage-tag-row {
    grid-template-columns: 1fr;
  }
}

.garage-tag-row-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.garage-tag-row-thumb {
  display: block;
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: cover;
}

.garage-tag-row-hint {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(170, 182, 200, 0.9);
}

.garage-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  min-height: 0;
}

.garage-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.22rem 0.28rem 0.22rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(230, 238, 248, 0.95);
  background: rgba(110, 176, 255, 0.1);
  border: 1px solid rgba(110, 176, 255, 0.28);
  border-radius: 999px;
}

.garage-tag-chip-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 12rem;
}

.garage-tag-chip-remove {
  flex-shrink: 0;
  margin: 0;
  padding: 0 0.2rem;
  border: none;
  background: transparent;
  color: rgba(220, 200, 200, 0.85);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.garage-tag-chip-remove:hover {
  color: #ffb4b4;
}

.garage-tag-chip--locked {
  border-style: dashed;
}

.garage-tag-chip-lock {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(200, 220, 255, 0.75);
}

.garage-tag-search-wrap {
  position: relative;
}

.garage-tag-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.5rem 0.6rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.84rem;
  color: rgba(240, 244, 252, 0.96);
  background: rgba(6, 8, 12, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.garage-tag-search:focus {
  outline: none;
  border-color: rgba(110, 176, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(110, 176, 255, 0.12);
}

.garage-tag-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 16, 22, 0.98);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.garage-tag-suggest[hidden] {
  display: none !important;
}

.garage-tag-suggest-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.65rem;
  font-family: inherit;
  font-size: 0.8rem;
  text-align: left;
  color: rgba(230, 236, 246, 0.95);
  background: transparent;
  border: none;
  cursor: pointer;
}

.garage-tag-suggest-item:hover {
  background: rgba(110, 176, 255, 0.12);
}

.garage-tag-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-top: 0.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.garage-tag-modal-btn {
  margin: 0;
  padding: 0.55rem 1.1rem;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  border-radius: 10px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.18s ease;
}

.garage-tag-modal-btn--ghost {
  color: rgba(180, 192, 210, 0.92);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.garage-tag-modal-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.garage-tag-modal-btn--primary {
  color: rgba(248, 252, 255, 0.98);
  background: linear-gradient(180deg, rgba(110, 176, 255, 0.22) 0%, rgba(18, 22, 30, 0.95) 100%);
  border: 1px solid rgba(110, 176, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.garage-tag-modal-btn--primary:hover {
  border-color: rgba(130, 200, 255, 0.55);
}

.garage-tag-modal-btn:focus-visible {
  outline: 2px solid var(--accent, #6eb0ff);
  outline-offset: 2px;
}

/* Garage tab — edit-mode display settings (RevScore + visible lists) */
#garage-public-sections-edit.garage-garage-settings-card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(165deg, rgba(18, 22, 30, 0.92) 0%, rgba(10, 12, 16, 0.88) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.28);
}

.garage-garage-settings-card-title {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(154, 198, 242, 0.88);
}

.garage-garage-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}

.garage-garage-settings-row-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.garage-garage-settings-label-strong {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(228, 234, 246, 0.96);
}

.garage-garage-settings-hint {
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(150, 162, 184, 0.88);
}

.garage-garage-settings-check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 8, 12, 0.65);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.garage-garage-settings-check:hover {
  border-color: rgba(110, 176, 255, 0.35);
}

.garage-garage-settings-check input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  accent-color: var(--accent, #6eb0ff);
  cursor: pointer;
}

.garage-garage-settings-divider {
  height: 1px;
  margin: 0.35rem 0 0.75rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 12%, rgba(255, 255, 255, 0.08) 88%, transparent);
  border: none;
}

.garage-garage-settings-divider[hidden] {
  display: none !important;
}

.garage-garage-settings-section-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  font-weight: 650;
  color: rgba(210, 220, 235, 0.95);
}

.garage-garage-settings-section-lede {
  margin: 0 0 0.75rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: rgba(150, 162, 184, 0.9);
}

.garage-garage-settings-section-lede strong {
  font-weight: 650;
  color: rgba(200, 210, 228, 0.95);
}

#garage-toggle-ratings-wrap[hidden] {
  display: none !important;
}

/* Taste insights modal (owner profile) */
.garage-insights-modal {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.garage-insights-modal[hidden] {
  display: none !important;
}

.garage-insights-modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.garage-insights-modal__dialog {
  position: relative;
  width: min(100%, 26rem);
  max-height: min(88vh, 34rem);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(22, 28, 38, 0.98) 0%, rgba(12, 14, 18, 0.96) 100%);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.garage-insights-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.65rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.garage-insights-modal__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: rgba(240, 244, 250, 0.98);
}

.garage-insights-modal__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(180, 192, 210, 0.95);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.garage-insights-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(248, 252, 255, 0.98);
}

.garage-insights-modal__body {
  padding: 0.85rem 1.1rem 1.15rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.garage-insights-modal__lede {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(150, 162, 184, 0.92);
}

.garage-profile-taste-scroll--modal {
  flex-direction: column;
  gap: 0.65rem;
  max-height: none;
  overflow-x: visible;
  overflow-y: visible;
  padding: 0;
  scroll-snap-type: none;
  mask-image: none;
}

.garage-insights-modal .garage-profile-taste-card {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  scroll-snap-align: none;
}
