/* TVC Curator Lounge — editorial agreement gate */
.lounge-terms-gate {
  --terms-ink: #141414;
  --terms-copy: #525252;
  --terms-muted: #77736f;
  --terms-line: #deddda;
  --terms-paper: #fff;
  --terms-red: #a72c22;
  --terms-red-deep: #8f241c;

  position: fixed;
  z-index: 3000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--terms-ink);
  background: rgb(22 21 20 / 54%);
  font-family: "DM Sans", "Avenir Next", Avenir, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.lounge-terms-gate[hidden] {
  display: none !important;
}

.lounge-terms-card,
.lounge-terms-head,
.lounge-terms-scroll,
.lounge-terms-confirm,
.lounge-terms-section,
.lounge-terms-section-summary,
.lounge-terms-section-content,
.lounge-terms-actions,
.lounge-terms-decline,
.lounge-terms-accept {
  box-sizing: border-box;
}

.lounge-terms-card {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  height: min(900px, calc(100dvh - 48px));
  min-height: 420px;
  overflow: hidden;
  background: var(--terms-paper);
  border: 1px solid rgb(20 20 20 / 8%);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 22%);
}

.lounge-terms-grabber {
  display: none;
}

.lounge-terms-head {
  flex: 0 0 auto;
  padding: 34px 42px 22px;
}

.lounge-terms-brand {
  margin: 0 0 17px;
  color: var(--terms-red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1.25;
  text-transform: uppercase;
}

.lounge-terms-title {
  max-width: 620px;
  margin: 0 0 12px;
  color: var(--terms-ink);
  font-size: clamp(30px, 4.8vw, 42px);
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1.05;
}

.lounge-terms-intro {
  max-width: 580px;
  margin: 0;
  color: var(--terms-copy);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.52;
}

.lounge-terms-rule {
  width: 52px;
  height: 4px;
  margin: 22px 0 0;
  border: 0;
  border-radius: 99px;
  background: var(--terms-red);
}

.lounge-terms-instruction {
  margin: 18px 0 8px;
  color: var(--terms-ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.lounge-terms-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 42px 18px;
  overscroll-behavior: contain;
  scrollbar-color: #b9b6b2 transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.lounge-terms-scroll:focus {
  outline: none;
}

.lounge-terms-section {
  margin: 0;
  border-bottom: 1px solid var(--terms-line);
}

.lounge-terms-section-summary {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  padding: 14px 3px 14px 0;
  color: var(--terms-ink);
  list-style: none;
  cursor: pointer;
  outline: none;
}

.lounge-terms-section-summary::-webkit-details-marker {
  display: none;
}

.lounge-terms-section-summary::after {
  width: 10px;
  height: 10px;
  justify-self: center;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform 180ms ease;
}

.lounge-terms-section[open] > .lounge-terms-section-summary::after {
  transform: translateY(3px) rotate(225deg);
}

.lounge-terms-section-summary:focus-visible {
  outline: 2px solid var(--terms-red);
  outline-offset: 3px;
  border-radius: 2px;
}

.lounge-terms-section-number {
  align-self: start;
  padding-top: 1px;
  color: var(--terms-ink);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
  line-height: 1.22;
}

.lounge-terms-section-title {
  display: block;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.25;
}

.lounge-terms-section-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--terms-copy);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
}

.lounge-terms-section-content {
  padding: 0 32px 18px 52px;
  color: var(--terms-copy);
  font-size: 14px;
  line-height: 1.62;
}

.lounge-terms-section-content h3 {
  margin: 14px 0 5px;
  color: var(--terms-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.lounge-terms-section-content h3:first-child { margin-top: 0; }
.lounge-terms-section-content p { margin: 0 0 8px; }
.lounge-terms-section-content a { color: var(--terms-red-deep); font-weight: 700; text-underline-offset: 2px; }

.lounge-terms-confirm {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin: 0;
  padding: 19px 42px 24px;
  border-top: 1px solid var(--terms-line);
  background: var(--terms-paper);
  box-shadow: 0 -10px 22px rgb(255 255 255 / 75%);
}

.lounge-terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  max-width: 580px;
  color: var(--terms-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}

.lounge-terms-checkbox input {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin: 2px 0 0;
  accent-color: var(--terms-red);
  cursor: pointer;
}

.lounge-terms-checkbox input:focus-visible {
  outline: 2px solid var(--terms-red);
  outline-offset: 3px;
}

.lounge-terms-status {
  min-height: 0;
  margin: 5px 0 0;
  color: var(--terms-red-deep);
  font-size: 12px;
  line-height: 1.4;
}

.lounge-terms-status:empty {
  display: none;
}

.lounge-terms-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.lounge-terms-decline,
.lounge-terms-accept {
  display: inline-flex;
  min-width: 0;
  min-height: 52px;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid #d2d0cd;
  border-radius: 9px;
  background: var(--terms-paper);
  color: var(--terms-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.lounge-terms-decline:hover:not(:disabled) {
  border-color: #88837e;
  background: #f7f6f4;
}

.lounge-terms-accept {
  border-color: var(--terms-red);
  background: var(--terms-red);
  color: #fff;
}

.lounge-terms-accept:hover:not(:disabled) {
  border-color: var(--terms-red-deep);
  background: var(--terms-red-deep);
}

.lounge-terms-decline:active:not(:disabled),
.lounge-terms-accept:active:not(:disabled) {
  transform: translateY(1px);
}

.lounge-terms-decline:focus-visible,
.lounge-terms-accept:focus-visible {
  outline: 3px solid rgb(167 44 34 / 38%);
  outline-offset: 3px;
}

.lounge-terms-decline:disabled,
.lounge-terms-accept:disabled {
  opacity: .48;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .lounge-terms-gate {
    align-items: flex-end;
    padding: 0;
    background: rgb(22 21 20 / 48%);
  }

  .lounge-terms-card {
    width: 100%;
    height: calc(100dvh - max(42px, env(safe-area-inset-top)));
    min-height: 0;
    border: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgb(0 0 0 / 14%);
  }

  .lounge-terms-grabber {
    display: block;
    position: relative;
    flex: 0 0 22px;
    background: var(--terms-paper);
  }

  .lounge-terms-grabber::before {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 46px;
    height: 4px;
    border-radius: 99px;
    background: #d8d7d5;
    content: "";
    transform: translateX(-50%);
  }

  .lounge-terms-head {
    padding: 14px 24px 18px;
  }

  .lounge-terms-brand {
    margin-bottom: 13px;
    font-size: 11px;
  }

  .lounge-terms-title {
    margin-bottom: 9px;
    font-size: clamp(29px, 8vw, 36px);
    line-height: 1.04;
  }

  .lounge-terms-intro {
    font-size: 15px;
    line-height: 1.45;
  }

  .lounge-terms-rule {
    width: 48px;
    height: 4px;
    margin-top: 17px;
  }

  .lounge-terms-scroll {
    padding: 0 24px 14px;
  }

  .lounge-terms-section-summary {
    grid-template-columns: 43px minmax(0, 1fr) 19px;
    gap: 9px;
    min-height: 76px;
    padding: 12px 0;
  }

  .lounge-terms-section-number {
    font-size: 19px;
  }

  .lounge-terms-section-title {
    font-size: 19px;
  }

  .lounge-terms-section-subtitle {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.35;
  }

  .lounge-terms-section-content {
    padding: 0 20px 16px 52px;
    font-size: 13px;
  }

  .lounge-terms-confirm {
    padding: 17px 24px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 20px rgb(255 255 255 / 88%);
  }

  .lounge-terms-checkbox {
    gap: 12px;
    font-size: 15px;
  }

  .lounge-terms-actions {
    gap: 10px;
    margin-top: 16px;
  }

  .lounge-terms-decline,
  .lounge-terms-accept {
    min-height: 54px;
    padding: 12px 10px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .lounge-terms-head {
    padding-right: 19px;
    padding-left: 19px;
  }

  .lounge-terms-scroll {
    padding-right: 19px;
    padding-left: 19px;
  }

  .lounge-terms-confirm {
    padding-right: 19px;
    padding-left: 19px;
  }

  .lounge-terms-title {
    font-size: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lounge-terms-section-summary::after,
  .lounge-terms-decline,
  .lounge-terms-accept {
    transition: none;
  }
}
