/* CueDive account surfaces share the native porcelain and obsidian palettes. */
html:not([data-account-admitted]) body > :is(.workspace, .skip, dialog:not(.cue-prefs-sheet), .toast) { display: none !important; }
#destination-header[hidden], #access-gate[hidden], #access-gate [hidden] { display: none !important; }

#access-gate {
  --access-bg: light-dark(#fffcf8, #111315);
  --access-surface: light-dark(#fffefd, #202326);
  --access-ink: light-dark(#302b27, #f1f3f4);
  --access-dim: light-dark(#72695e, #afb4bb);
  --access-line: light-dark(#eae3d9, #383d42);
  --access-accent: light-dark(#746657, #e0e5e8);
  --access-selected: light-dark(#f8f3ec, #343a40);
  --access-provider-bg: light-dark(white, black);
  --access-provider-line: light-dark(#d1d1d1, #525252);
  --access-provider-ink: light-dark(black, white);
  color-scheme: light dark;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background: var(--access-bg);
  color: var(--access-ink);
  font: 400 1rem/1.47 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
#access-gate[data-appearance="light"] { color-scheme: light; }
#access-gate[data-appearance="dark"] { color-scheme: dark; }
#access-gate *, #access-gate *::before, #access-gate *::after { box-sizing: border-box; }
#access-gate > p, #access-gate > noscript { align-self: center; margin: auto; color: var(--access-dim); }
#access-gate :is(button,select,input) { font: inherit; }
#access-gate :is(button,select) { cursor: pointer; }
#access-gate :focus-visible { outline: 2px solid var(--access-accent); outline-offset: 3px; }
#access-gate :disabled { opacity: .52; cursor: default; }

.access-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
  padding: 4px clamp(16px, 3.4vw, 56px);
}
.access-home {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
}
.access-mark { display: block; width: 52px; height: 52px; object-fit: contain; }
#access-gate .access-language {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 44px;
  padding: 0 8px;
  color: var(--access-accent);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-size: .875rem;
}
.access-language::before {
  content: "";
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18'/%3E%3C/svg%3E") center/contain no-repeat;
}
#access-gate .access-language:hover { background: var(--access-selected); }
.access-layout {
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
  padding: clamp(20px, 8vh, 92px) max(24px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
.access-pane { width: min(100%, 420px); min-width: 0; margin: 0; }
.access-title-row, .access-field-row, .access-field-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.access-title-row { min-height: 44px; }
.access-title {
  margin: 0;
  color: var(--access-ink);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.033em;
  line-height: 1.25;
  text-wrap: balance;
}
.access-help { margin: 10px 0 18px; color: var(--access-dim); font-size: .9375rem; }
.access-body { display: grid; gap: 14px; min-width: 0; }
.access-title-row + .access-body, .access-title + .access-body { margin-top: 16px; }
.access-form { display: grid; gap: 12px; }
.access-field { display: grid; gap: 6px; min-width: 0; }
.access-field-row, .access-field-caption { flex-wrap: wrap; gap: 0 12px; }
.access-label, .access-field > label, .access-field-caption > label, .access-field-row > label {
  color: var(--access-ink);
  font-size: .8125rem;
  font-weight: 550;
}
#access-gate :is(.access-switch,.access-link,.access-back,.access-guest) {
  min-height: 44px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--access-accent);
  font-size: .875rem;
  font-weight: 550;
  line-height: 1.35;
  text-align: start;
  text-decoration: none;
}
#access-gate .access-switch { flex-shrink: 0; }
#access-gate .access-link { font-size: .8125rem; }
#access-gate .access-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--access-line);
  border-radius: 10px;
  background: var(--access-surface);
  color: var(--access-ink);
  font-size: 1rem;
  line-height: 1.4;
}
#access-gate .access-input::placeholder { color: var(--access-dim); opacity: 1; }
#access-gate .access-input:focus-visible {
  outline: 1px solid var(--access-accent);
  outline-offset: -1px;
  border-color: var(--access-accent);
}
.access-password-wrap { position: relative; display: flex; align-items: center; }
.access-password-wrap .access-input { padding-inline-end: 6.5rem; }
#access-gate .access-password-toggle {
  position: absolute;
  inset-inline-end: 5px;
  height: 42px;
  padding: 0 7px;
  background: transparent;
  color: var(--access-accent);
  border: 0;
  font-size: .75rem;
}
#access-gate :is(.access-primary,.access-secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
#access-gate .access-primary {
  color: var(--access-surface);
  background: var(--access-ink);
  border: 1px solid var(--access-ink);
}
#access-gate .access-secondary { background: var(--access-surface); color: var(--access-ink); border: 1px solid var(--access-line); }
.access-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.access-feedback, .access-created { margin: 0; color: var(--access-dim); font-size: .8125rem; overflow-wrap: anywhere; }
.access-feedback:empty, .access-help:empty { display: none; }
.access-account { margin: 0; color: var(--access-ink); overflow-wrap: anywhere; }
.access-divider { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; color: var(--access-dim); font-size: .75rem; text-align: center; }
.access-divider::before, .access-divider::after { content: ""; flex: 1; height: 1px; background: var(--access-line); }
.access-providers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; gap: 12px; }
#access-gate .access-provider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 0;
  min-width: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--access-dim);
  font-size: .8125rem;
  line-height: 1.4;
  text-align: center;
}
.access-provider-icon {
  display: inline-grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--access-provider-line);
  background-color: var(--access-provider-bg);
  background-position: center;
  background-repeat: no-repeat;
  color: var(--access-provider-ink);
}
.access-provider[data-provider="apple"] .access-provider-icon {
  background-image: var(--access-apple-logo);
  background-size: contain;
}
.access-provider[data-provider="google"] .access-provider-icon {
  background-image: url('./auth/google.png');
  background-size: 20px 20px;
}
.access-provider[data-provider="phone"] .access-provider-icon::before {
  content: "";
  width: 21px;
  height: 21px;
  background-color: currentColor;
  mask: url('./auth/phone.svg') center / contain no-repeat;
}
#access-gate { --access-apple-logo: url('./auth/apple-light.png'); }
#access-gate[data-appearance="dark"] { --access-apple-logo: url('./auth/apple-dark.png'); }
@media (prefers-color-scheme: dark) {
  #access-gate:not([data-appearance="light"]) { --access-apple-logo: url('./auth/apple-dark.png'); }
}
#access-gate .access-guest { justify-self: center; text-align: center; }
.access-captcha { min-width: 0; max-width: 100%; overflow-x: auto; }
#access-gate button[aria-busy="true"]:not(.access-provider)::after,
#access-gate .access-provider[aria-busy="true"] .access-provider-icon::after {
  content: "";
  display: inline-block;
  box-sizing: border-box;
  width: 1em;
  height: 1em;
  border: 1.5px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  vertical-align: -.12em;
  animation: access-spin .8s linear infinite;
}
#access-gate button[aria-busy="true"]:not(.access-provider)::after { margin-inline-start: .5em; }
#access-gate .access-provider[aria-busy="true"] .access-provider-icon { background-image: none; }
@keyframes access-spin { to { transform: rotate(1turn); } }
@media (hover: hover) {
  #access-gate :is(.access-back,.access-switch,.access-link,.access-guest):hover { text-decoration: underline; text-underline-offset: 3px; }
  #access-gate .access-provider:not(:disabled):hover .access-provider-icon { outline: 2px solid var(--access-accent); outline-offset: 2px; }
  #access-gate .access-primary:not(:disabled):hover { opacity: .88; }
}
@media (max-width: 600px), (max-height: 680px) {
  .access-top { min-height: 52px; }
  .access-layout { padding-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  #access-gate button[aria-busy="true"]:not(.access-provider)::after,
  #access-gate .access-provider[aria-busy="true"] .access-provider-icon::after { animation: none; }
}

/* The same two brand artworks appear in the website's appearance switcher. */
#access-gate { --access-mark: url('/assets/v8/brand-light.webp'); --access-mark-blend: multiply; }
#access-gate[data-appearance="dark"] { --access-mark: url('/assets/v8/brand-mark.webp'); --access-mark-blend: normal; }
@media (prefers-color-scheme: dark) {
  #access-gate:not([data-appearance="light"]) { --access-mark: url('/assets/v8/brand-mark.webp'); --access-mark-blend: normal; }
}
.access-mark { content: var(--access-mark); mix-blend-mode: var(--access-mark-blend); }

.guest-picks { margin-top: 16px; padding-top: 18px; border-top: 1px solid var(--access-line); }
.guest-picks :is(h2,h3) { margin: 0; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.guest-picks h2 { font-size: 1.2rem; }
.guest-picks h3 { font-size: 1.0625rem; margin-block: 8px; }
.guest-platforms { display: flex; gap: 6px; margin-block: 12px; }
#access-gate .guest-picks button, .guest-catalog-body > a {
  color: var(--access-accent);
  background: transparent;
  border: 0;
  padding: 7px 10px;
  min-height: 44px;
  border-radius: 8px;
  font-size: .875rem;
  line-height: 1.4;
}
#access-gate .guest-platforms button[aria-pressed="true"] { background: var(--access-selected); color: var(--access-ink); font-weight: 600; }
.guest-catalog-body p, .guest-captions small { margin: 10px 0; font-size: .875rem; color: var(--access-dim); }
.guest-catalog-body :is(ul,ol) { list-style: none; margin: 8px 0; padding: 0; }
.guest-catalog-body li { border-top: 1px solid var(--access-line); overflow-wrap: anywhere; }
.guest-catalog-body ul > li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  padding-block: 12px;
}
.guest-catalog-body ul h3 { flex: 1 1 100%; margin: 0; }
#access-gate .guest-catalog-body ul button { color: var(--access-ink); background: var(--access-selected); }
.guest-catalog-body ul a { display: inline-flex; align-items: center; min-height: 44px; color: var(--access-ink); font-size: .875rem; }
.guest-catalog-body > a { display: inline-flex; align-items: center; padding-inline: 0; }
.guest-captions li { display: grid; grid-template-columns: minmax(46px,auto) 1fr; gap: 4px 14px; padding-block: 10px; }
.guest-captions :is(time,a) { color: var(--access-accent); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.guest-captions a { display: inline-flex; align-items: center; align-self: start; min-height: 44px; }
.guest-captions small { grid-column: 2; margin: 0; }
.access-title-row .access-title{min-width:0;overflow-wrap:anywhere}
