:root {
  color-scheme: light;
  --text: #111;
  --muted: #858585;
  --line: rgba(0, 0, 0, 0.12);
  --glass: rgba(255, 255, 255, 0.88);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
  --focus: 3px solid #315efb;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: #fff;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #111;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Large, unavoidable test warning until the visitor dismisses it. */
.test-site-notice {
  position: fixed;
  z-index: 50;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  width: min(1180px, calc(100% - 24px));
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 16px 16px 22px;
  border: 5px solid #ff3b30;
  border-radius: 20px;
  background: #111;
  color: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.test-site-notice.is-hiding {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-14px);
}

.test-site-notice__content {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.test-site-notice__badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 9px;
  background: #ff3b30;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.test-site-notice strong {
  font-size: clamp(1rem, 1.55vw, 1.48rem);
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.test-site-notice__dismiss {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  transition: background 0.15s ease, transform 0.15s ease;
}

.test-site-notice__dismiss:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: scale(1.04);
}

/* Main composition */
.site-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 54px clamp(12px, 3vw, 44px) 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-composition {
  width: min(1500px, 100%);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.billboard-stage {
  position: relative;
  width: min(100%, 1350px);
  margin-inline: auto;
  flex: 0 0 auto;
  isolation: isolate;
}

.billboard-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.billboard-copy {
  position: absolute;
  top: 18.6%;
  left: 20.2%;
  width: 60.8%;
  height: 36.8%;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 34px);
  overflow: hidden;
  text-align: center;
}

.billboard-text-block {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  overflow: hidden;
}

#current-message {
  width: 100%;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: 880;
  line-height: 0.94;
  letter-spacing: -0.06em;
  text-wrap: balance;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.current-display-name {
  max-width: 92%;
  margin: 0;
  overflow: hidden;
  color: #939393;
  font-size: clamp(10px, 0.78vw, 14px);
  font-weight: 520;
  line-height: 1.1;
  letter-spacing: 0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#current-message.is-changing,
.current-display-name.is-changing {
  opacity: 0;
  transform: translateY(7px) scale(0.988);
}

.concept {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 84px;
  text-align: center;
  font-size: clamp(1.1rem, 2.05vw, 1.9rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.current-overbid-price {
  margin: 0 auto;
  color: #969696;
  text-align: center;
  font-size: clamp(0.72rem, 1vw, 0.88rem);
  font-weight: 480;
  line-height: 1.3;
}

.current-overbid-price strong {
  color: #777;
  font-weight: 650;
}

/* Floating icon navigation */
.floating-nav {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
}

.icon-button {
  position: relative;
  width: 50px;
  height: 50px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.icon-button:hover {
  background: #f4f4f4;
  transform: translateY(-2px);
}

.icon-button img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 10px);
  padding: 7px 10px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 0.76rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.tooltip:hover::after,
.tooltip:focus-visible::after {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

/* Dialogs */
.glass-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: min(92dvh, 920px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: var(--glass);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(135%);
}

.glass-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.glass-dialog--wide {
  width: min(900px, calc(100% - 28px));
}

.glass-dialog::backdrop {
  background: rgba(12, 12, 12, 0.36);
  backdrop-filter: blur(7px);
}

.dialog-header {
  min-height: 72px;
  padding: 16px 18px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.close-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.07);
  cursor: pointer;
  font-size: 1.55rem;
}

.dialog-body,
.purchase-form {
  min-height: 0;
  max-height: none;
  padding: 24px 24px max(48px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-padding-bottom: 48px;
}

.legal-copy > :last-child {
  margin-bottom: 0;
}

.legal-copy h3 {
  margin: 34px 0 10px;
  font-size: 1.4rem;
}

.legal-copy h3:first-of-type {
  margin-top: 24px;
}

.legal-copy h4 {
  margin: 21px 0 6px;
  font-size: 1rem;
}

.legal-copy p {
  margin: 0 0 10px;
  color: #4e4e4a;
  line-height: 1.6;
}

.legal-copy a {
  color: #111;
  font-weight: 720;
}

.notice-box {
  padding: 14px 16px;
  border: 1px solid #dfc477;
  border-radius: 14px;
  background: #fff8df;
  line-height: 1.48;
}

.notice-box--test {
  border-color: #ef9b95;
  background: #fff0ef;
}


.artists-credit {
  margin: 0;
}

.artists-credit h3 {
  margin-top: 0;
}

.artists-credit p {
  margin-bottom: 0;
}

.credit-role {
  display: inline-block;
  min-width: 142px;
  margin-right: 10px;
  color: #777;
  font-weight: 650;
}

.legal-divider {
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: var(--line);
}

/* History */
.timeline {
  position: relative;
  margin: 0;
  padding: 2px 0 2px 28px;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 8px;
  width: 2px;
  background: #d9d9d9;
}

.timeline-item {
  position: relative;
  padding: 0 0 26px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 4px;
  left: -26px;
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 1px #aaa;
}

.timeline-card {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.timeline-message {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.timeline-name {
  margin: 7px 0 10px;
  color: #777;
  font-size: 0.88rem;
  font-weight: 540;
  overflow-wrap: anywhere;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-size: 0.83rem;
}

/* Purchase form */
.purchase-form {
  display: grid;
  gap: 21px;
}

.field {
  display: grid;
  gap: 9px;
}

.field label {
  font-weight: 720;
}

textarea,
.text-input,
.money-input,
.field input[type="text"] {
  width: 100%;
  border: 1px solid #c8c8c4;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

textarea {
  min-height: 120px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.45;
}

.text-input,
.field input[type="text"] {
  display: block;
  padding: 13px 15px;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}

.optional-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 550;
}

.money-input {
  display: flex;
  align-items: center;
  padding-left: 15px;
  overflow: hidden;
}

.money-input span {
  color: var(--muted);
}

.money-input input {
  width: 100%;
  padding: 13px 15px 13px 7px;
  border: 0;
  outline: 0;
  background: transparent;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.field-note,
.secure-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: start;
  color: #4d4d49;
  font-size: 0.9rem;
  line-height: 1.46;
}

.consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.form-message {
  padding: 12px 14px;
  border: 1px solid #b8d7b8;
  border-radius: 12px;
  background: #f0fff0;
  color: #245d24;
  font-size: 0.9rem;
}

.form-message.error {
  border-color: #e1b4b4;
  background: #fff1f1;
  color: #7c2020;
}

.purchase-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.purchase-button,
.secondary-button {
  min-height: 52px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 750;
}

.purchase-button {
  border: 0;
  background: #111;
  color: #fff;
}

.purchase-button:hover {
  background: #2b2b2b;
}

.secondary-button {
  border: 1px solid #bdbdb8;
  background: rgba(255, 255, 255, 0.82);
}

.purchase-button:disabled,
.secondary-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.icon-button:focus-visible,
.close-button:focus-visible,
.purchase-button:focus-visible,
.secondary-button:focus-visible,
.test-site-notice__dismiss:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}

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

/* Desktop: everything fits inside exactly one viewport. */
@media (min-width: 761px) {
  body {
    height: 100dvh;
    overflow: hidden;
  }

  .site-shell {
    --billboard-reserve: 138px;
    width: 100%;
    height: 100dvh;
    min-height: 0;
    padding: clamp(14px, 1.8vh, 22px) clamp(34px, 4vw, 72px)
      clamp(14px, 1.8vh, 22px);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.has-test-notice .site-shell {
    --billboard-reserve: 238px;
    padding-top: clamp(112px, 12.5vh, 132px);
  }

  .page-composition {
    width: min(1500px, 100%);
    height: 100%;
    min-height: 0;
    margin-inline: auto;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    align-items: center;
    justify-items: center;
    gap: clamp(5px, 1.05vh, 11px);
  }

  .hero {
    width: 100%;
    min-height: 0;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .billboard-stage {
    width: min(
      calc(100vw - 112px),
      calc((100dvh - var(--billboard-reserve)) * 1.5),
      1500px
    );
    margin-inline: auto;
  }

  .concept {
    width: min(1080px, calc(100vw - 190px));
    max-width: 100%;
    margin-inline: auto;
    padding: 0;
    text-align: center;
    font-size: clamp(1rem, 2.05vh, 1.7rem);
  }

  .current-overbid-price {
    width: 100%;
    margin-inline: auto;
    text-align: center;
    font-size: clamp(0.72rem, 1.3vh, 0.86rem);
  }
}

/* Mobile can scroll when the dialog/banner needs more room. */
@media (max-width: 760px) {
  .test-site-notice {
    top: max(8px, env(safe-area-inset-top));
    min-height: 116px;
    align-items: flex-start;
    padding: 13px 10px 13px 14px;
    border-width: 4px;
    border-radius: 16px;
  }

  .test-site-notice__content {
    align-items: flex-start;
    gap: 9px;
  }

  .test-site-notice__badge {
    margin-top: 2px;
    padding: 6px 7px;
    font-size: 0.61rem;
  }

  .test-site-notice strong {
    font-size: clamp(0.95rem, 4.1vw, 1.16rem);
    line-height: 1.13;
  }

  .test-site-notice__dismiss {
    width: 36px;
    height: 36px;
    font-size: 1.35rem;
  }

  .site-shell {
    min-height: 100svh;
    padding: 52px 12px 106px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.has-test-notice .site-shell {
    padding-top: 142px;
  }

  .page-composition {
    width: 100%;
    margin-inline: auto;
    gap: 14px;
  }

  .hero {
    width: 100%;
    margin: 2vh auto 0;
    display: flex;
    justify-content: center;
  }

  .billboard-stage {
    width: 108%;
    left: 50%;
    margin-inline: 0;
    transform: translateX(-50%);
  }

  .billboard-copy {
    top: 18.3%;
    left: 20.1%;
    width: 60.9%;
    height: 37%;
  }

  .current-display-name {
    font-size: clamp(9px, 2.4vw, 12px);
  }

  .concept {
    width: min(92%, 620px);
    margin-inline: auto;
    padding: 0;
    text-align: center;
    font-size: clamp(1.12rem, 5.1vw, 1.58rem);
  }

  .current-overbid-price {
    width: min(92%, 620px);
    margin-inline: auto;
    padding: 0;
    text-align: center;
  }

  .floating-nav {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }

  .icon-button {
    width: 45px;
    height: 45px;
  }

  .dialog-body,
  .purchase-form {
    padding: 20px;
  }

  .purchase-actions {
    grid-template-columns: 1fr;
  }

  .credit-role {
    display: block;
    min-width: 0;
    margin: 10px 0 1px;
  }

  .artists-credit p {
    line-height: 1.5;
  }
}

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


.legal-copy h3:last-of-type {
  scroll-margin-bottom: 48px;
}
