/*
 * Reversible visual direction: private club / editorial garage.
 * Remove this file and its link in public/index.html to return to the prior skin.
 */
:root {
  --refresh-ink: #07090a;
  --refresh-panel: rgba(17, 20, 21, 0.88);
  --refresh-panel-soft: rgba(22, 24, 24, 0.72);
  --refresh-line: rgba(226, 190, 102, 0.26);
  --refresh-line-strong: rgba(226, 190, 102, 0.58);
  --refresh-red: #f0063f;
  --refresh-red-deep: #91082e;
  --refresh-gold: #e5c878;
  --refresh-mint: #63c9ad;
  --refresh-paper: #f6f0e6;
  --refresh-muted: #aaa49a;
  --refresh-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

html {
  background: var(--refresh-ink);
  scroll-behavior: smooth;
}

body {
  color: var(--refresh-paper);
  background:
    linear-gradient(180deg, #08090a 0%, #0b0d0e 46%, #060707 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent 82%);
}

.site-header .header-account-area {
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, var(--page-gutter));
  z-index: 80;
}

.account-chip.header-account-chip {
  min-height: 46px;
  padding: 6px 14px 6px 7px;
  border: 1px solid var(--refresh-line);
  border-radius: 10px;
  background: rgba(9, 11, 11, 0.84);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px) saturate(120%);
}

.account-chip.header-account-chip:hover,
.account-chip.header-account-chip:focus-visible,
.header-host-tools-button:hover,
.header-host-tools-button:focus-visible {
  border-color: var(--refresh-red);
  box-shadow: 0 0 0 3px rgba(240, 6, 63, 0.12), 0 14px 34px rgba(0, 0, 0, 0.4);
}

.header-account-chip .account-avatar,
.home-guest-profile-shortcut .guest-profile-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.header-account-chip .account-chip-action,
.header-host-tools-button {
  color: var(--refresh-gold);
  letter-spacing: 0.08em;
}

.header-host-tools-button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--refresh-line-strong);
  border-radius: 9px;
  background: rgba(11, 13, 13, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

button,
a.primary-button,
a.secondary-button,
.primary-button,
.secondary-button {
  border-radius: 9px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

button:hover,
a.primary-button:hover,
a.secondary-button:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  border-color: rgba(240, 6, 63, 0.72);
  background: linear-gradient(135deg, var(--refresh-red), var(--refresh-red-deep));
  box-shadow: 0 12px 28px rgba(240, 6, 63, 0.2);
}

.secondary-button {
  border-color: var(--refresh-line);
  background: rgba(14, 16, 16, 0.78);
}

.hero {
  border-bottom: 1px solid rgba(226, 190, 102, 0.16);
}

.hero-copy {
  width: min(100% - 32px, 980px);
  margin-inline: auto;
  padding: clamp(72px, 10vw, 132px) clamp(16px, 4vw, 54px) clamp(54px, 8vw, 100px);
}

.home-hero-kicker {
  color: var(--refresh-gold);
  font-size: clamp(0.9rem, 1.8vw, 1.2rem);
  font-weight: 950;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
}

.home-hero-kicker::before {
  background: linear-gradient(90deg, var(--refresh-red), var(--refresh-gold));
}

.phone-home-logo,
.home-hero-logo {
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.46));
}

.hero h1 {
  max-width: 980px;
  color: var(--refresh-paper);
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.62);
}

.hero-supporting-copy {
  max-width: 680px;
  color: rgba(246, 240, 230, 0.82);
}

.home-access-links {
  gap: 10px;
}

.home-access-links a,
.home-access-links button {
  min-height: 48px;
  border-radius: 10px;
}

.section {
  padding-block: clamp(42px, 7vw, 88px);
}

.section-inner {
  width: min(100% - 32px, 1180px);
}

.section > .section-inner > .eyebrow,
.section .eyebrow {
  color: var(--refresh-gold);
  letter-spacing: 0.16em;
}

.section > .section-inner > h2,
.section .home-members-heading,
.section .home-community-section h2 {
  color: var(--refresh-paper);
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
}

.panel,
.home-public-garage-dropdown,
.home-members-dropdown,
.home-support-panel,
.home-public-story-card,
.auth-panel,
.profile-hero-panel {
  border: 1px solid var(--refresh-line);
  border-radius: 14px;
  background: var(--refresh-panel);
  box-shadow: var(--refresh-shadow);
}

.home-owner-section,
.home-story-section,
.home-community-section {
  border-top: 1px solid rgba(226, 190, 102, 0.14);
}

.home-owner-grid,
.home-story-grid {
  gap: clamp(22px, 5vw, 70px);
}

.home-section-copy p,
.home-community-section p {
  color: var(--refresh-muted);
}

.home-public-carousel-card {
  border-color: rgba(240, 6, 63, 0.42);
  border-radius: 14px;
  box-shadow: var(--refresh-shadow);
}

.home-public-carousel-card:hover,
.home-public-carousel-card:focus-visible {
  border-color: var(--refresh-red);
  box-shadow: 0 0 0 4px rgba(240, 6, 63, 0.12), var(--refresh-shadow);
}

.home-public-carousel-overlay {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.58));
}

.post-card {
  border-color: rgba(226, 190, 102, 0.22);
  border-radius: 12px;
  background: var(--refresh-panel-soft);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}

.post-card:hover,
.post-card:focus-within {
  border-color: rgba(240, 6, 63, 0.54);
}

.post-body {
  background: rgba(8, 10, 10, 0.74);
}

.post-title,
.post-card h3 {
  color: var(--refresh-paper);
}

.post-meta,
.post-description,
.post-card small {
  color: var(--refresh-muted);
}

.profile-avatar {
  border-color: var(--refresh-line-strong);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.toast {
  z-index: 160;
  border-color: var(--refresh-line-strong);
  border-radius: 10px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(201, 168, 90, 0.12), rgba(242, 10, 63, 0.11)),
    #070809;
  box-shadow: var(--refresh-shadow);
  line-height: 1.45;
  overflow-wrap: anywhere;
  isolation: isolate;
  transition: transform 180ms var(--motion-ease-out);
}

.toast.show {
  animation: refreshToastSlideIn 220ms var(--motion-ease-out) both;
}

@keyframes refreshToastSlideIn {
  from {
    transform: translateY(12px);
  }

  to {
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  body::before {
    background-size: 34px 34px;
    opacity: 0.16;
  }

  .site-header .header-account-area {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
  }

  .account-chip.header-account-chip {
    max-width: 58vw;
    min-height: 42px;
  }

  .toast {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    left: max(14px, env(safe-area-inset-left));
    width: auto;
    max-width: none;
  }

  .hero-copy {
    width: min(100% - 20px, 680px);
    padding-top: 58px;
    padding-bottom: 42px;
  }

  .home-access-links {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .home-access-links a,
  .home-access-links button {
    width: 100%;
  }

  .section {
    padding-block: 38px;
  }

  .section-inner {
    width: min(100% - 20px, 680px);
  }
}

/* Cross-device stabilization for compact touch screens. */
@media (max-width: 760px) {
  body[data-route="home"]:not(.is-signed-in) .site-header,
  body[data-route="home"] .site-header {
    display: block !important;
  }

  body[data-route="home"] .site-header .header-account-area {
    inset-inline-start: auto;
    inset-inline-end: max(10px, env(safe-area-inset-right));
    width: auto;
    max-width: min(54vw, 210px);
  }

  body[data-route="home"] .site-header .header-account-chip {
    display: flex !important;
  }

  body[data-route="home"] .site-header .header-account-area > *,
  body[data-route="home"] .home-guest-profile-shortcut {
    width: auto;
    max-width: 100%;
  }

  .auth-media {
    min-height: 380px;
  }

  .auth-logo-orb {
    --orb-size: clamp(96px, 28vw, 118px);
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
  }

  .home-support-footer a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding-inline: 8px;
  }
}

@media (max-width: 420px) {
  body[data-route="home"] .site-header .header-account-area {
    width: 44px;
    max-width: 44px;
  }

  body[data-route="home"] .account-chip.header-account-chip {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 4px;
    border-radius: 50%;
  }

  body[data-route="home"] .header-account-chip .account-chip-text {
    display: none;
  }

  body[data-route="home"] .header-account-chip .account-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  body[data-route="home"] .hero {
    height: auto;
    min-height: calc(100svh - 24px);
  }

  body[data-route="home"] .hero-copy {
    max-height: none;
    padding-top: max(56px, calc(env(safe-area-inset-top) + 48px));
  }

  body[data-route="home"] .hero-supporting-copy {
    -webkit-line-clamp: 3;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  body[data-route="home"] .hero-supporting-copy {
    display: none;
  }
}

@media (max-width: 1024px) {
  .auth-inline-link,
  .header-sign-in-button,
  .home-support-footer a,
  .home-support-link,
  .support-page-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
}
@media (hover: none), (pointer: coarse) {
  button:hover,
  a.primary-button:hover,
  a.secondary-button:hover,
  .primary-button:hover,
  .secondary-button:hover {
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  button,
  a.primary-button,
  a.secondary-button,
  .primary-button,
  .secondary-button {
    transition: none;
  }
}
/* Public photos use a real media frame so the entire source image can be seen. */
.home-public-carousel-card,
.home-public-carousel {
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 9;
}

.home-public-carousel .fade-slide {
  display: grid;
  place-items: center;
}

.home-public-carousel .fade-slide picture {
  display: contents;
}

.home-public-carousel .fade-slide img,
.home-public-carousel .fade-slide video,
.home-public-carousel .fade-slide picture > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center;
}

.home-public-carousel::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 58%, rgba(0, 0, 0, 0.42)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.12), transparent 46%, rgba(0, 0, 0, 0.12));
}

@media (max-width: 760px) {
  .home-public-carousel-card,
  .home-public-carousel {
    aspect-ratio: 4 / 3;
  }
}

/* Mobile-first interaction and reliability layer. */
html,
body,
#app,
.page {
  width: 100%;
  max-width: 100%;
}

body {
  min-width: 0;
  overflow-x: clip;
}

:where(h1, h2, h3, h4, p, label, small, code, .tool-row, .content-detail-heading) {
  max-width: 100%;
  overflow-wrap: anywhere;
}

:where(button, a, input, textarea, select, summary, [role="button"]):focus-visible {
  outline: 3px solid var(--refresh-gold);
  outline-offset: 3px;
}

.panel,
.home-public-garage-dropdown,
.home-members-dropdown,
.home-support-panel,
.home-public-story-card,
.auth-panel,
.profile-hero-panel,
.post-card,
.home-public-carousel-card {
  border-radius: 8px;
}

.home-public-carousel-card {
  display: grid;
  grid-template-rows: auto auto;
  aspect-ratio: auto;
}

.home-public-carousel {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.home-public-carousel-overlay {
  position: static;
  min-height: 52px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 9, 10, 0.96);
}

.home-public-carousel::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), transparent 74%, rgba(0, 0, 0, 0.16));
}

[data-album-frame],
[data-home-public-swipe-frame],
.post-card-stack[data-stack-id] {
  touch-action: pan-y;
  cursor: grab;
}

[data-album-frame].is-album-swiping,
.home-public-viewer-modal.is-home-public-swiping,
.post-card-stack.is-stack-swiping {
  cursor: grabbing;
}

.album-nav-button:disabled,
.home-public-viewer-nav:disabled {
  opacity: 0.24;
  pointer-events: none;
}

.home-public-viewer-dots {
  position: absolute;
  left: 50%;
  bottom: max(66px, calc(env(safe-area-inset-bottom) + 56px));
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  max-width: calc(100% - 32px);
  padding: 7px 10px;
  overflow-x: auto;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
}

.invite-request-receipt {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: clamp(18px, 3vw, 28px);
  border-color: rgba(229, 200, 120, 0.52);
  background:
    linear-gradient(135deg, rgba(229, 200, 120, 0.12), transparent 56%),
    rgba(12, 14, 14, 0.94);
}

.invite-request-receipt > strong {
  color: var(--refresh-paper);
  font-size: 1.18rem;
}

.invite-request-receipt > span:not(.invite-request-status-mark),
.invite-request-receipt > small {
  color: var(--refresh-muted);
  line-height: 1.5;
}

.invite-request-status-mark {
  width: max-content;
  padding: 6px 9px;
  color: #080909;
  border-radius: 5px;
  background: var(--refresh-gold);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dev-health-summary,
.client-error-panel {
  grid-column: 1 / -1;
}

.host-health-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-block: 16px;
}

.host-health-strip > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--refresh-line);
  border-radius: 6px;
  background: rgba(4, 6, 6, 0.5);
  color: var(--refresh-paper);
  text-transform: capitalize;
}

.host-health-strip b {
  color: var(--refresh-muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-error-row {
  align-items: start;
}

.client-error-row code {
  max-width: min(36ch, 100%);
  white-space: normal;
}

body[data-route="gallery"] .garage-feed-stream {
  overscroll-behavior-y: contain;
  scroll-behavior: auto;
  scroll-snap-type: y mandatory;
}

body[data-route="gallery"] .garage-feed-stream .post-card {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

body[data-route="gallery"] .garage-feed-stream.is-garage-touch-dragging .post-card,
body[data-route="gallery"] .garage-feed-stream.is-garage-touch-snapping .post-card {
  transform: none;
  transition: none;
}

.home-public-viewer-modal,
.confirmation-dialog,
.garage-modal,
.auth-panel {
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
}

@media (max-width: 1024px), (pointer: coarse) {
  :where(button, a.primary-button, a.secondary-button, .primary-button, .secondary-button, summary, [role="button"]) {
    min-height: 44px;
  }

  :where(input, textarea, select) {
    min-height: 46px;
    font-size: 16px;
  }

  .home-public-viewer-nav,
  .album-nav-button {
    display: none;
  }
}

@media (max-width: 760px) {
  .home-public-carousel-card {
    aspect-ratio: auto;
  }

  .home-public-carousel {
    aspect-ratio: 4 / 3;
  }

  .home-public-carousel-overlay {
    align-items: center;
    min-height: 58px;
    padding-inline: 12px;
  }

  .home-public-carousel-overlay strong,
  .home-public-carousel-overlay small {
    font-size: 0.72rem;
  }

  .invite-request-grid,
  .home-owner-grid,
  .home-story-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .host-health-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .host-health-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-public-viewer-backdrop {
    padding: 0;
  }

  .home-public-viewer-modal {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .home-public-viewer-dots {
    bottom: max(82px, calc(env(safe-area-inset-bottom) + 72px));
  }

  .home-public-viewer-caption {
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .section-inner {
    width: min(100% - 16px, 680px);
  }

  .host-health-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-public-carousel-overlay {
    display: grid;
    gap: 4px;
  }

  .home-public-carousel-overlay small {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
