:root {
  --app-bar-height: 76px;
  --app-shadow: 0 24px 70px color-mix(in oklch, var(--sage-deep) 12%, transparent);
}

.experience-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: var(--app-bar-height);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px max(20px, calc((100% - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(18px);
}

.experience-bar__brand,
.experience-bar__action {
  color: var(--ink);
  text-decoration: none;
}

.experience-bar__brand {
  font-size: 1.1rem;
  font-weight: 500;
}

.experience-bar__brand span {
  color: var(--sage-deep);
  font-weight: 400;
}

.experience-bar__action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.78rem;
}

.experience-intro {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 12vw, 132px) 0 clamp(54px, 9vw, 94px);
  text-align: center;
}

.experience-kicker,
.experience-status,
.experience-card__state,
.participant-form label,
.letter-status,
.upload-label {
  color: var(--sage-deep);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.experience-intro h1 {
  max-width: 820px;
  margin: 18px auto 0;
  font-size: clamp(4rem, 11vw, 8.4rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.experience-intro > p:not(.experience-kicker) {
  max-width: 54ch;
  margin: 30px auto 0;
  color: var(--muted-ink);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.experience-status {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 28px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sage-50);
}

.experience-list {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto clamp(100px, 14vw, 170px);
  border-top: 1px solid var(--line);
}

.experience-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
  padding: clamp(38px, 7vw, 72px) 0;
  border-bottom: 1px solid var(--line);
}

.experience-card__number {
  color: var(--sage-deep);
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 1;
}

.experience-card h2 {
  margin: 8px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.experience-card p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted-ink);
}

.experience-card__link,
.primary-action,
.secondary-action,
.quiet-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sage-deep);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.experience-card__link,
.primary-action {
  padding: 11px 20px;
  background: var(--sage-deep);
  color: var(--paper);
}

.secondary-action {
  padding: 11px 20px;
  background: var(--paper);
  color: var(--sage-deep);
}

.quiet-action {
  min-height: 40px;
  padding: 8px 14px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted-ink);
}

.primary-action[disabled],
.secondary-action[disabled],
.quiet-action[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
}

.participant-summary {
  display: flex;
  width: min(820px, calc(100% - 40px));
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: clamp(44px, 8vw, 80px) auto 0;
  padding: 22px 26px;
  border-block: 1px solid var(--line);
  background: var(--sage-50);
}

.participant-summary p {
  margin: 0;
}

.participant-summary strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 400;
}

.participant-summary span {
  color: var(--muted-ink);
  font-size: 0.8rem;
}

.participant-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--app-shadow);
  color: var(--ink);
}

.participant-dialog::backdrop {
  background: color-mix(in oklch, var(--ink) 38%, transparent);
  backdrop-filter: blur(8px);
}

.participant-form {
  padding: clamp(30px, 7vw, 52px);
}

.participant-form h2 {
  margin: 10px 0 12px;
  font-size: clamp(2.3rem, 7vw, 3.7rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.participant-form > p {
  margin: 0 0 28px;
  color: var(--muted-ink);
}

.participant-form input[type="text"],
.letter-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--sage-deep);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
}

.participant-form input[type="text"] {
  min-height: 58px;
  padding: 8px 0;
  font-size: 1.4rem;
}

.participant-form__consent {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  margin-top: 24px;
  color: var(--muted-ink);
  font-size: 0.82rem;
  line-height: 1.55;
}

.participant-form__consent input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--sage-deep);
}

.participant-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 30px;
}

.feedback {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--sage-deep);
  font-size: 0.8rem;
}

.feedback[data-tone="error"] {
  color: oklch(45% 0.15 28);
}

.photo-progress {
  position: sticky;
  z-index: 10;
  top: calc(var(--app-bar-height) + 14px);
  display: grid;
  width: min(820px, calc(100% - 40px));
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 auto 50px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  box-shadow: 0 14px 44px color-mix(in oklch, var(--sage-deep) 10%, transparent);
  backdrop-filter: blur(16px);
}

.photo-progress p {
  margin: 0;
}

.photo-progress strong {
  display: block;
  font-weight: 500;
}

.photo-progress span {
  color: var(--muted-ink);
  font-size: 0.78rem;
}

.photo-progress__track {
  overflow: hidden;
  width: min(180px, 24vw);
  height: 4px;
  border-radius: 999px;
  background: var(--sage-100);
}

.photo-progress__track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--sage-deep);
  transition: width 400ms var(--ease-out);
}

.photo-prompts {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-reset: photo-prompts;
}

.photo-prompt {
  display: grid;
  min-height: 220px;
  grid-template-columns: 52px minmax(0, 1fr) minmax(160px, 230px);
  gap: clamp(18px, 4vw, 42px);
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: photo-prompts;
}

.photo-prompt::before {
  align-self: start;
  padding-top: 8px;
  color: var(--sage-deep);
  content: counter(photo-prompts, decimal-leading-zero);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.photo-prompt h3 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.photo-prompt p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted-ink);
  line-height: 1.6;
}

.photo-prompt__media {
  position: relative;
  display: grid;
  min-height: 150px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--sage-50);
}

.photo-prompt__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-prompt__media input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photo-prompt__actions {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.photo-prompt__actions .quiet-action {
  min-height: 36px;
  border-color: color-mix(in oklch, var(--paper) 55%, transparent);
  background: color-mix(in oklch, var(--ink) 76%, transparent);
  color: var(--paper);
}

.upload-label {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--sage-deep);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
}

.upload-label[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.46;
}

.upload-state {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 20px;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  color: var(--sage-deep);
  font-size: 0.8rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.voting-stage,
.winner-stage {
  width: min(1000px, calc(100% - 40px));
  margin: 0 auto clamp(100px, 14vw, 170px);
}

.collection-list {
  display: grid;
  gap: clamp(70px, 12vw, 130px);
  margin-top: 60px;
}

.collection {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.collection__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.collection__header h3 {
  margin: 6px 0 0;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.collection__photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.collection__photos button {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--sage-50);
  cursor: zoom-in;
}

.collection__photos button:first-child:nth-last-child(odd) {
  grid-column: 1 / -1;
  min-height: 420px;
}

.collection__photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.collection__report {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted-ink);
  font-family: var(--font);
  font-size: 0.72rem;
  cursor: pointer;
}

.collection[data-voted="true"] {
  padding: 30px;
  border: 1px solid var(--sage-deep);
  border-radius: 24px;
  background: var(--sage-50);
}

.letter-workspace {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto clamp(100px, 14vw, 170px);
}

.letter-progress {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-bottom: 42px;
}

.letter-progress span {
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: var(--sage-100);
}

.letter-progress span[data-active="true"],
.letter-progress span[data-complete="true"] {
  background: var(--sage-deep);
}

.letter-sheet {
  position: relative;
  min-height: 570px;
  padding: clamp(36px, 8vw, 76px);
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--paper), var(--paper)),
    repeating-linear-gradient(
      transparent,
      transparent 43px,
      color-mix(in oklch, var(--sage-deep) 12%, transparent) 44px
    );
  box-shadow: var(--app-shadow);
}

.letter-sheet::before {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.letter-field h2 {
  max-width: 620px;
  margin: 12px 0 20px;
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
  text-align: left;
}

.letter-field > p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted-ink);
}

.letter-field textarea {
  min-height: 180px;
  margin-top: 34px;
  padding: 16px 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.7;
  resize: vertical;
}

.letter-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.letter-actions__right {
  display: flex;
  gap: 10px;
}

.sealed-letter {
  display: grid;
  min-height: 520px;
  place-content: center;
  padding: 40px;
  border: 1px solid var(--line);
  background: var(--sage-50);
  text-align: center;
}

.sealed-letter h2 {
  margin: 16px 0;
  font-size: clamp(3.3rem, 9vw, 6.6rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.sealed-letter p {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--muted-ink);
}

.shoe-stage {
  display: grid;
  min-height: calc(100dvh - var(--app-bar-height));
  place-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(circle at 80% 0%, var(--sage-100), transparent 36%),
    var(--paper);
  text-align: center;
}

.shoe-stage__inner {
  width: min(1000px, 100%);
}

.shoe-stage h1 {
  max-width: 980px;
  margin: 26px auto 48px;
  font-size: clamp(3.4rem, 9vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.shoe-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.shoe-stage__counter {
  color: var(--sage-deep);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.winner-stage {
  text-align: center;
}

.winner-stage h2 {
  margin: 20px auto;
  font-size: clamp(4rem, 11vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.88;
}

.winner-stage > p {
  max-width: 50ch;
  margin-inline: auto;
  color: var(--muted-ink);
}

.winner-stage .collection {
  margin-top: 60px;
  text-align: left;
}

.image-viewer {
  width: min(960px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--ink);
}

.image-viewer::backdrop {
  background: color-mix(in oklch, var(--ink) 84%, transparent);
}

.image-viewer img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 100px);
  object-fit: contain;
}

.image-viewer button {
  display: block;
  min-height: 48px;
  margin: 10px auto;
  padding: 8px 18px;
  border: 1px solid color-mix(in oklch, var(--paper) 50%, transparent);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-family: var(--font);
  cursor: pointer;
}

.empty-state {
  padding: clamp(42px, 8vw, 72px);
  border-block: 1px solid var(--line);
  background: var(--sage-50);
  color: var(--muted-ink);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 400;
}

@media (hover: hover) and (pointer: fine) {
  .experience-card__link:hover,
  .primary-action:hover {
    background: var(--ink);
    border-color: var(--ink);
  }

  .secondary-action:hover,
  .quiet-action:hover,
  .experience-bar__action:hover {
    border-color: var(--ink);
    color: var(--ink);
  }

  .collection__photos button:hover img {
    transform: scale(1.015);
  }

  .collection__photos img {
    transition: transform 350ms var(--ease-out);
  }
}

@media (max-width: 700px) {
  :root {
    --app-bar-height: 66px;
  }

  .experience-bar {
    padding: 10px 16px;
  }

  .experience-bar__brand span {
    display: none;
  }

  .experience-list {
    width: calc(100% - 32px);
  }

  .experience-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }

  .experience-card__number {
    align-self: start;
    padding-top: 4px;
    font-size: 2rem;
  }

  .experience-card__link {
    grid-column: 2;
    justify-self: start;
  }

  .participant-summary {
    width: calc(100% - 32px);
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-progress {
    top: calc(var(--app-bar-height) + 8px);
    width: calc(100% - 24px);
  }

  .photo-progress__track {
    width: 80px;
  }

  .photo-prompt {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .photo-prompt__media {
    grid-column: 2;
    min-height: 240px;
  }

  .collection__header,
  .collection__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .collection__photos {
    grid-template-columns: 1fr;
  }

  .collection__photos button,
  .collection__photos button:first-child:nth-last-child(odd) {
    grid-column: auto;
    min-height: 360px;
  }

  .letter-sheet {
    min-height: 610px;
    padding: 34px 24px;
  }

  .letter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .letter-actions__right {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .letter-actions > .quiet-action {
    align-self: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-progress__track i,
  .collection__photos img {
    transition: none;
  }
}

