* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  background: #F4F6F1;
  overflow-y: auto;
  font-family: "Poppins", sans-serif;
  color: #000;
}

.passport-page {
  width: 100%;
  max-width: 432px;
  min-height: 100vh;
  min-height: 100dvh;
  background: #F4F6F1;
  padding: 0;
  overflow: visible;

  display: flex;
  flex-direction: column;
}

body {
  display: flex;
  justify-content: center;
  min-height: 100dvh;
  /* Arrow over text instead of the I-beam (text stays selectable) */
  cursor: default;
}

/* DETAILS, CARE and Show more already set cursor: pointer in their own rules */
.logo-link,
.quest-button {
  cursor: pointer;
}

/* Elements hidden by script.js stay hidden even when their rule sets display */
[hidden] {
  display: none !important;
}

/* No blue tap flash or double-tap text selection on phones; focus ring only for keyboard focus */
.learn-more-link,
.logo-container,
.logo-link,
.show-more,
.quest-button {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

.learn-more-link:focus:not(:focus-visible),
.logo-container:focus:not(:focus-visible),
.logo-link:focus:not(:focus-visible),
.show-more:focus:not(:focus-visible),
.quest-button:focus:not(:focus-visible) {
  outline: none;
}

.learn-more-link:focus-visible,
.logo-container:focus-visible,
.logo-link:focus-visible,
.show-more:focus-visible,
.quest-button:focus-visible {
  outline: 1px solid #1A1A1A;
  outline-offset: 4px;
}

html {
  -webkit-tap-highlight-color: transparent;
}

.learn-more-link,
.logo-container {
  -webkit-user-select: none;
  user-select: none;
}

/* =============================== HEADER =============================== */

.passport-header {
  background: transparent;
  height: 64px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  position: relative;
  z-index: 3;
}

/* LEARN MORE */

.learn-more-container {
  position: static;
}

.learn-more-buttons {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 44px tap area; the text sits where it did in the old 6px-bottom-padded box */
.learn-more-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0 6px;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  position: relative;
}

/* Underline sits under the text, not at the bottom of the 44px box: the 21px line
   is centered in the 38px above the padding, so its bottom is 14.5px from the
   button's bottom; the 1px line ends 6px below it (same as before) at 8.5px */
.learn-more-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8.5px;
  height: 1px;
  background: transparent;
  transition: background 180ms ease;
}

.learn-more-link[aria-expanded="true"]::after {
  background: currentColor;
}

/* Panel over the page: from the top of the screen to the middle of the video,
   or lower if the open menu needs it. --menu-panel-height is set in script.js */
.menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 0;
  height: var(--menu-panel-height, auto);
  display: flex;
  flex-direction: column;
  padding-top: 64px;
  background: #F4F6F1;
  border-bottom: 1px solid rgb(0 0 0 / 15%);
  outline: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.learn-more-container:has(.learn-more-link[aria-expanded="true"]) .menu-panel {
  opacity: 1;
  visibility: visible;
}

/* Logo + DETAILS / CARE stay on top of the panel */
.logo-container,
.learn-more-buttons {
  position: relative;
  z-index: 1;
}

.menu-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.learn-more-menu {
  display: none;
  flex-direction: column;
  padding: 12px 24px 12px;
}

.learn-more-container:has(#detailsButton[aria-expanded="true"]) #detailsMenu,
.learn-more-container:has(#careButton[aria-expanded="true"]) #careMenu {
  display: flex;
}

.details-menu {
  gap: 18px;
}

.details-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  column-gap: 24px;
  align-items: stretch;
}

/* Every DETAILS section: label on top, then content */
.details-row > section,
.desc-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.learn-more-menu h2 {
  font-family: "Poppins", sans-serif;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7F807F;
  text-align: left;
}

.care-menu h2 {
  margin-bottom: 6px;
}

@media (prefers-reduced-motion: reduce) {

  .learn-more-link::after,
  .menu-panel {
    transition: none;
  }
}

.metarials-list ul {
  list-style: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  color: #1A1A1A;
}

.metarials-list li {
  white-space: nowrap;
}

/* Swatch + name: both left-aligned with the COLOR label, name under the swatch */
.color-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* Fill the column so the name lines up with the last MATERIALS line,
   with the swatch centered between the COLOR label and the name */
.details-row > .color-list {
  gap: 0;
  align-items: center;
  justify-self: start;
}

/* Cancel the letter-spacing after the last letter so "COLOR" centers optically */
.details-row > .color-list h2 {
  margin-right: -0.14em;
}

.color-list .color-chip {
  flex: 1;
  gap: 0;
  align-items: center;
}

.color-list .color-swatch {
  margin-block: auto;
}

.color-swatch {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgb(0 0 0 / 15%);
}

.color-swatch--sandstone {
  background-color: #87817B;
}

.color-swatch--moonless-night {
  background-color: #141414;
}

.color-swatch--icy-pearl {
  background-color: #F1F7FF;
}

.color-list .color-name {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  white-space: nowrap;
  color: #1A1A1A;
}

/* FEATURES: all five icons in one row, label centered under each */
.features-grid {
  list-style: none;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.features-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.features-grid img {
  display: block;
  width: 26px;
  height: 26px;
}

.features-grid span {
  font-family: "Source Sans 3", sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: #1A1A1A;
  /* Each label as wide as its longest word: two-word labels always break onto 2 lines */
  width: min-content;
}

.care-instructions {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.care-instructions li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

/* Symbol box height = text line-height, so every symbol sits on the first text line */
.care-icon-cell {
  flex: 0 0 24px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.care-instruction-icon {
  display: block;
  width: 20px;
  max-width: 20px;
  height: auto;
}

.care-instructions p {
  max-width: 560px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  color: #000000;
}

.care-instructions strong {
  font-weight: 700;
  color: #000000;
}

/* LOGO */

.logo-container img {
  width: 24px;
  height: auto;
  position: relative;
  top: 5px;
}

/* Logo link to the brand site: no visual change; the 10px side padding is cancelled by the
   negative margin, so the tap area is 44px wide (the box is already ~47px tall) */
.logo-link {
  display: block;
  padding: 0 10px;
  margin: 0 -10px;
  color: inherit;
  text-decoration: none;
}

.model-section {
  width: 100%;
  aspect-ratio: 390 / 400;
  max-height: 400px;

  display: flex;
  justify-content: center;
  align-items: center;
}

.model-placeholder {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #F4F6F1;

  display: flex;
  justify-content: center;
  align-items: center;
}

.product-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #F4F6F1;
  /* Video bg renders slightly lighter than #F4F6F1; darken lets the page color win */
  mix-blend-mode: darken;

  /* --video-scale is set per model in script.js; the box itself keeps its size */
  transform: translateZ(0) scale(var(--video-scale, 1));
  transform-origin: center center;
  backface-visibility: hidden;
}

/* No video for this model / color: name + note, centered in the unchanged video box */
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  text-align: center;
}

.video-placeholder-text {
  font-family: "Source Sans 3", sans-serif;
  font-size: 13px;
  line-height: 1.3;
  color: #7F807F;
}

/* ?demo= only */
.demo-notice {
  margin-bottom: 12px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 11px;
  line-height: 1.3;
  color: #7F807F;
}

/* API failure / passport not found */
.load-error {
  margin: auto 0;
  padding: 0 24px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  color: var(--Crow-black, #1A1A1A);
}

/* PRODUCT */
.product-section {
  padding: 28px 24px 20px;
}

.owner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.owner-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.owner-name {
  /* One line's height even while empty, so the coat name doesn't move when it fills in */
  min-height: 1.2em;
  color: #7F807F;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* A very long single-word name wraps instead of running under the emblem */
  overflow-wrap: anywhere;
}

/* Keeps its 52x52 space while loading so the owner row doesn't shift; script.js shows it */
.owner-avatar {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  visibility: hidden;
}

.owner-avatar.is-visible {
  visibility: visible;
}

.product-section h1 {
  color: var(--Crow-black, #1A1A1A);
  font-family: "Poppins", sans-serif;
  font-size: 26px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin: 0;
}

.description {
  margin-top: 14px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--Crow-black, #1A1A1A);
}

/* Collapsed description: max 2 lines, "Show more" expands it */
.description.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.show-more {
  margin-top: 4px;
  padding: 0;
  background: none;
  border: none;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--Crow-black, #1A1A1A);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.show-more[hidden] {
  display: none;
}

/* SPECS */
.specs {
  margin-top: 22px;
  border-top: 1px solid rgb(0 0 0 / 15%);
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  border-bottom: 1px solid rgb(0 0 0 / 15%);
}

.spec-label {
  flex-shrink: 0;
  font-family: "Poppins", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7F807F;
}

.spec-value {
  min-width: 0;
  text-align: right;
  overflow-wrap: anywhere;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: var(--Crow-black, #1A1A1A);
}

.spec-value--mono {
  font-family: "Fira Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* CTA */
.cta-bar {
  padding: 16px 24px calc(28px + env(safe-area-inset-bottom));
}

/* Phones: push the CTA to the bottom of the screen when content is short,
   but keep it in normal flow (not fixed/sticky). */
@media (max-width: 768px) {
  .cta-bar {
    margin-top: auto;
    padding-top: 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* Lift the CTA up to 64px more off the bottom edge, but only using spare
   screen space: the spacer grows before margin-top:auto and is 0 when content
   already overflows */
@media (max-width: 768px) {
  .passport-page::after {
    content: "";
    flex-grow: 1;
    max-height: 64px;
  }
}

.quest-button {
  display: flex;
  height: 48px;
  padding: 0 16px;
  justify-content: center;
  align-items: center;
  gap: 15px;
  background: #1A1A1A;
  border: none;
  opacity: 1;
  flex-direction: column;
  pointer-events: none;
  margin: 0 auto;
  width: 240px;
  max-width: 100%;
}

.quest-button span {
  font-family: "Quicksand", sans-serif;
  color: #F1F2F1;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-align: center;
}

/* Narrow phones: "LIGHTWEIGHT" doesn't fit its column at 10px even with 0.02em spacing */
@media (max-width: 370px) {
  .features-grid span {
    font-size: 9.5px;
  }
}