/* Dank Social Club · the live app layer.
 *
 * screens.css is the approved ten-screen design, drawn for a fixed 390×844 phone.
 * This file turns it into a working app: views scroll, the chrome follows the real
 * device (safe areas on phones, a drawn device frame on wide screens), and the parts
 * that only a running app needs (sheets, toasts, the camera, the desktop intro) get
 * their styles here. Loaded last, so equal-specificity rules here win.
 */

html, body { height: 100%; }
body {
  margin: 0;
  background: #0B0D0B;
  color: #F4F0E6;
  font-family: var(--doa-sans, 'Inter', system-ui, sans-serif);
  -webkit-text-size-adjust: 100%;
}

/* ---------------------------------------------------------------- the app root */
.dsc-app.dsc-live {
  display: block;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--dsc-ground);
  --dsc-top: calc(env(safe-area-inset-top, 0px) + 10px);
  --dsc-bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  --dsc-tabh: calc(env(safe-area-inset-bottom, 0px) + 64px);
}
.dsc-live .dsc-stage { position: absolute; inset: 0; }
.dsc-live .dsc-boot { position: absolute; inset: auto 0 45% 0; text-align: center; color: var(--dsc-mute); font-size: 14px; }

.dsc-live .dsc-view {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: var(--dsc-top);
  padding-bottom: var(--dsc-bottom);
  scrollbar-width: none;
}
.dsc-live .dsc-view::-webkit-scrollbar { display: none; }
/* Content taller than the screen scrolls instead of squashing. */
.dsc-live .dsc-view > * { flex-shrink: 0; }
.dsc-live.has-tabs .dsc-view { padding-bottom: calc(var(--dsc-tabh) + 22px); }
.dsc-live .dsc-form { display: contents; }

.dsc-live .dsc-welcome { padding-top: var(--dsc-top); padding-bottom: calc(var(--dsc-bottom) + 4px); }
.dsc-live .dsc-welcome__eyebrow { margin-top: 30px; }
.dsc-live .dsc-detail { padding-top: 0; padding-bottom: var(--dsc-bottom); }
.dsc-live .dsc-detail__heronav { top: calc(var(--dsc-top) + 2px); }
.dsc-live .dsc-door { padding: var(--dsc-top) 0 0; }
.dsc-live .dsc-door .dsc-sheet { padding-bottom: var(--dsc-bottom); }
.dsc-live .dsc-stamps .dsc-nav { margin-top: 0; }

/* Enter motion between screens. */
@media (prefers-reduced-motion: no-preference) {
  .dsc-live .dsc-view { animation: dsc-live-in .32s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes dsc-live-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Headings take focus on navigation for screen readers; don't draw a ring for that. */
.dsc-live [tabindex="-1"]:focus { outline: none; }

/* ---------------------------------------------------------------- tab bar */
.dsc-live .dsc-tabbar { height: var(--dsc-tabh); padding-bottom: env(safe-area-inset-bottom, 0px); }
.dsc-live .dsc-tabbar[hidden] { display: none; }
.dsc-live .dsc-tab { text-decoration: none; min-height: 48px; }
.dsc-live .dsc-tab:focus-visible { outline: 2px solid var(--dsc-leaf-hi); outline-offset: -2px; border-radius: 12px; }

/* The mockup's status bar, island and home bar only exist inside the drawn device. */
.dsc-live .dsc-status,
.dsc-live .dsc-island,
.dsc-live .dsc-home { display: none; }

/* ---------------------------------------------------------------- small parts the running app adds */
.dsc-live .dsc-sampletag {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 9px;
  border: 1px dashed rgba(164, 159, 143, .55);
  border-radius: 999px;
  font: 500 11px/1.2 var(--dsc-mono);
  font-variation-settings: 'MONO' 1;
  color: var(--dsc-mute);
}
.dsc-live .dsc-welcome__foot { display: grid; justify-items: center; }
.dsc-live .dsc-error { margin-top: 8px; font-size: 13px; line-height: 1.35; color: #F1A59B; }
.dsc-live .dsc-input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #E0483A; }
.dsc-live .dsc-privacy { margin-top: 14px; text-align: left; padding: 0 4px; }
.dsc-live .dsc-founding200 {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(216, 180, 90, .07);
  box-shadow: inset 0 0 0 1px rgba(216, 180, 90, .3);
  font-size: 13px;
  line-height: 1.4;
  color: var(--dsc-mute);
}
.dsc-live .dsc-founding200 b { color: var(--dsc-gold); font-weight: 650; }
.dsc-live .dsc-founding200 .dsc-ic { width: 18px; height: 18px; color: var(--dsc-gold); margin-top: 1px; }
.dsc-live .dsc-tier__tag--opens { background: transparent; color: var(--dsc-gold); box-shadow: inset 0 0 0 1px rgba(216, 180, 90, .5); }

.dsc-live .dsc-tonight__hit,
.dsc-live .dsc-event__hit {
  color: inherit;
  text-decoration: none;
}
.dsc-live .dsc-tonight__hit::after,
.dsc-live .dsc-event__hit::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dsc-live .dsc-tonight { position: relative; }
.dsc-live .dsc-tonight .dsc-btn { position: relative; z-index: 2; }
.dsc-live .dsc-event { position: relative; }
.dsc-live .dsc-event__hit:focus-visible { outline: none; }
.dsc-live .dsc-event:has(.dsc-event__hit:focus-visible) { box-shadow: inset 0 0 0 2px var(--dsc-leaf-hi); border-radius: 12px; }
.dsc-live .dsc-badge--going { color: var(--dsc-ground); background: var(--dsc-leaf); }
.dsc-live .dsc-empty { padding: 34px 8px; text-align: center; color: var(--dsc-mute); font-size: 14px; }
/* Every card that holds a stretched .dsc-card-hit link must be its containing block,
   or the link's overlay covers the whole screen and swallows every tap. */
.dsc-live .dsc-countdown, .dsc-live .dsc-gallery, .dsc-live .dsc-minicard, .dsc-live .dsc-drop { position: relative; }
.dsc-live .dsc-card-hit { color: inherit; text-decoration: none; }
.dsc-live .dsc-minicard { text-decoration: none; }
.dsc-live .dsc-minicard:focus-visible { outline: 2px solid var(--dsc-leaf-hi); outline-offset: 3px; }
.dsc-live .dsc-card-hit::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dsc-live .dsc-card-hit:focus-visible { outline: none; }
.dsc-live .dsc-countdown:has(.dsc-card-hit:focus-visible),
.dsc-live .dsc-gallery:has(.dsc-card-hit:focus-visible) { box-shadow: inset 0 0 0 2px var(--dsc-leaf-hi); }
.dsc-live .dsc-countdown__open { margin-top: 10px; font-family: var(--dsc-display); font-variation-settings: var(--dsc-friendly); font-weight: 560; font-size: 26px; line-height: 1.05; color: var(--dsc-leaf); }

.dsc-live .dsc-demo {
  -webkit-appearance: none;
  appearance: none;
  align-self: center;
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 0;
  background: none;
  color: var(--dsc-mute);
  font: 500 12.5px/1.2 var(--dsc-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.dsc-live .dsc-pass__qr { display: grid; place-items: center; transition: width .25s ease, height .25s ease; }
.dsc-live .dsc-pass__qr svg { fill: initial; }
.dsc-live .dsc-pass.is-bright { background: var(--dsc-ink); }
.dsc-live .dsc-pass.is-bright .dsc-pass__label { color: var(--dsc-ground); }
.dsc-live .dsc-pass.is-bright .dsc-pass__sub { color: #4C5143; }
.dsc-live .dsc-pass.is-bright .dsc-pass__qr { width: 236px; height: 236px; }
.dsc-live .dsc-stamplink {
  flex: none;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--dsc-card);
  box-shadow: inset 0 0 0 1px var(--dsc-line);
  color: var(--dsc-ink);
  text-decoration: none;
  font: 600 14.5px/1.2 var(--dsc-sans);
}
.dsc-live .dsc-stamplink img { width: 34px; height: 34px; opacity: .85; }
.dsc-live .dsc-stamplink span:last-of-type { margin-left: auto; color: var(--dsc-mute); font-weight: 500; }
.dsc-live .dsc-stamplink .dsc-ic { width: 18px; height: 18px; color: var(--dsc-mute); }

.dsc-live .dsc-redeem__opt[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.dsc-live .dsc-redeem__opt[aria-disabled="true"] .dsc-redeem__cost { color: var(--dsc-mute); }
.dsc-live .dsc-redeem__opt:not([aria-disabled="true"]) { box-shadow: inset 0 0 0 1.5px var(--dsc-leaf); }
.dsc-live .dsc-rules { margin-top: 16px; font-size: 12px; line-height: 1.45; color: var(--dsc-mute); }
.dsc-live .dsc-history__n.is-minus { color: var(--dsc-mute); }
.dsc-live .dsc-history__row { grid-template-columns: 96px 1fr auto; }
.dsc-live .dsc-history__date { white-space: nowrap; }

/* Door Mode: the real camera fills the finder. */
.dsc-live .dsc-finder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dsc-live .dsc-finder__idle {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 20px 28px;
  text-align: center;
  color: var(--dsc-mute);
  font-size: 13px;
  line-height: 1.4;
}
.dsc-live .dsc-finder__idle .dsc-btn { height: 44px; }
.dsc-live .dsc-finder__corner--tl, .dsc-live .dsc-finder__corner--bl { left: 22%; }
.dsc-live .dsc-finder__corner--tr, .dsc-live .dsc-finder__corner--br { right: 22%; }
.dsc-live .dsc-finder__corner { z-index: 2; }
.dsc-live .dsc-result--idle .dsc-result__icon { background: var(--dsc-card); box-shadow: inset 0 0 0 1.5px var(--dsc-line); color: var(--dsc-mute); }
.dsc-live .dsc-result--again .dsc-result__icon { background: rgba(216, 180, 90, .12); box-shadow: inset 0 0 0 1.5px var(--dsc-gold); color: var(--dsc-gold); }
.dsc-live .dsc-result--bad .dsc-result__icon { background: rgba(224, 72, 58, .12); box-shadow: inset 0 0 0 1.5px #E0483A; color: #F1A59B; }
.dsc-live .dsc-door__alt { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.dsc-live .dsc-door__alt .dsc-btn { flex: 1 1 auto; height: 42px; font-size: 14px; }

/* Profile */
.dsc-live .dsc-panel {
  flex: none;
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  background: var(--dsc-card);
  box-shadow: inset 0 0 0 1px var(--dsc-line);
}
.dsc-live .dsc-panel__head { font-size: 10.5px; line-height: 1; letter-spacing: .22em; color: var(--dsc-gold); margin-bottom: 12px; }
.dsc-live .dsc-rows { display: grid; }
.dsc-live .dsc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  box-shadow: inset 0 -1px 0 var(--dsc-line);
  font-size: 14.5px;
}
.dsc-live .dsc-row:last-child { box-shadow: none; }
.dsc-live .dsc-row span:first-child { color: var(--dsc-mute); }
.dsc-live .dsc-row b { font-weight: 600; text-align: right; }
.dsc-live .dsc-switch {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 48px;
  height: 28px;
  margin: 0;
  border-radius: 999px;
  background: var(--dsc-line);
  cursor: pointer;
  transition: background-color .18s ease;
}
.dsc-live .dsc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dsc-ink);
  transition: transform .18s ease;
}
.dsc-live .dsc-switch:checked { background: var(--dsc-leaf); }
.dsc-live .dsc-switch:checked::after { transform: translateX(20px); background: var(--dsc-ground); }
.dsc-live .dsc-stack { display: grid; gap: 8px; }
.dsc-live .dsc-stack .dsc-btn { height: 46px; font-size: 15px; }
.dsc-live .dsc-about { display: grid; gap: 8px; font-size: 13.5px; line-height: 1.45; color: var(--dsc-mute); }
.dsc-live .dsc-about b { color: var(--dsc-ink); font-weight: 600; }
.dsc-live .dsc-about a, .dsc-live .dsc-links a { color: var(--dsc-leaf); text-underline-offset: 3px; }
.dsc-live .dsc-links { display: grid; gap: 10px; font-size: 14px; }

/* ---------------------------------------------------------------- sheets and toasts */
.dsc-live .dsc-layer {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: rgba(3, 4, 3, .62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dsc-live .dsc-layer[hidden] { display: none; }
.dsc-live .dsc-modal {
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  padding: 10px 20px var(--dsc-bottom);
  border-radius: 28px 28px 0 0;
  background: var(--dsc-ground-2);
  box-shadow: inset 0 1px 0 var(--dsc-line), 0 -20px 50px rgba(0, 0, 0, .5);
}
@media (prefers-reduced-motion: no-preference) {
  .dsc-live .dsc-modal { animation: dsc-live-sheet .28s cubic-bezier(.2, .8, .2, 1) both; }
}
@keyframes dsc-live-sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.dsc-live .dsc-modal__grab { display: block; width: 40px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: #41463E; }
.dsc-live .dsc-modal__kicker { font-size: 10.5px; letter-spacing: .22em; color: var(--dsc-gold); }
.dsc-live .dsc-modal__title {
  margin-top: 8px;
  font-family: var(--dsc-display);
  font-variation-settings: var(--dsc-friendly);
  font-weight: 560;
  font-size: 27px;
  line-height: 1.08;
}
.dsc-live .dsc-modal__body { margin-top: 10px; display: grid; gap: 10px; font-size: 14.5px; line-height: 1.45; color: var(--dsc-mute); }
.dsc-live .dsc-modal__body b { color: var(--dsc-ink); font-weight: 600; }
.dsc-live .dsc-modal__actions { margin-top: 18px; display: grid; gap: 8px; }
.dsc-live .dsc-modal__seal { display: grid; justify-items: center; margin: 4px 0 6px; }
.dsc-live .dsc-modal__seal doa-mark { --doa-size: 170px; }
.dsc-live .dsc-summary { display: grid; gap: 0; margin-top: 4px; }
.dsc-live .dsc-stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--dsc-card); box-shadow: inset 0 0 0 1px var(--dsc-line); }
.dsc-live .dsc-stepper__ctl { display: flex; align-items: center; gap: 14px; }
.dsc-live .dsc-stepper__ctl output { min-width: 1.5ch; text-align: center; font: 600 20px/1 var(--dsc-mono); font-variation-settings: 'MONO' 1; color: var(--dsc-ink); }

.dsc-live .dsc-toast {
  position: absolute;
  z-index: 70;
  left: 16px;
  right: 16px;
  bottom: calc(var(--dsc-bottom) + 8px);
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--dsc-ink);
  color: var(--dsc-ground);
  font: 600 14px/1.35 var(--dsc-sans);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.dsc-live .dsc-toast.is-on { opacity: 1; transform: none; }
/* Above the tab bar when there is one. */
.dsc-live.has-tabs .dsc-toast { bottom: calc(var(--dsc-tabh) + 12px); }

/* ---------------------------------------------------------------- the face */
.face__intro { color: #F4F0E6; }
.face__eyebrow {
  margin: 0 0 18px;
  font-family: var(--doa-display);
  font-variation-settings: 'opsz' 14, 'SOFT' 0, 'WONK' 0;
  font-weight: 640;
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: #D8B45A;
}
.face__title {
  margin: 0 0 22px;
  font-family: var(--doa-display);
  font-variation-settings: 'opsz' 144, 'SOFT' 0, 'WONK' 1;
  font-weight: 500;
  font-size: clamp(56px, 7vw, 104px);
  line-height: .9;
  letter-spacing: -.025em;
}
.face__title em { font-style: normal; font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1; font-weight: 340; color: #A7CA56; }
.face__lede { max-width: 40ch; margin: 0; font-size: 19px; line-height: 1.5; color: #B0AB98; }
.face__qr { margin-top: 30px; display: flex; align-items: center; gap: 18px; }
.face__qrcode { flex: none; width: 112px; height: 112px; padding: 8px; border-radius: 14px; background: #F4F0E6; }
.face__qrcode svg { display: block; width: 100%; height: 100%; }
.face__qr p { margin: 0; display: grid; gap: 4px; font-size: 14px; color: #B0AB98; }
.face__qr b { color: #F4F0E6; font-weight: 650; font-size: 16px; }
.face__qr span:not(.face__hint) { font: 500 13px/1.3 var(--doa-mono); font-variation-settings: 'MONO' 1; color: #A7CA56; }
.face__hint { max-width: 30ch; }
.face__links { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 0; max-width: 460px; border-top: 1px solid #2B302A; }
.face__links li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #2B302A; font-size: 14px; }
.face__links a { color: #F4F0E6; font-weight: 600; text-decoration: none; }
.face__links a:hover { color: #A7CA56; }
.face__links a:focus-visible { outline: 2px solid #A7CA56; outline-offset: 3px; border-radius: 4px; }
.face__links span { color: #8E8A7B; text-align: right; }
.face__fine { max-width: 52ch; margin: 22px 0 0; font-size: 12.5px; line-height: 1.5; color: #8E8A7B; }

/* Wide screens: intro beside a drawn device. */
@media (min-width: 760px) {
  body { background: radial-gradient(1100px 760px at 76% 45%, #18211A 0%, #0B0D0B 64%) fixed, #0B0D0B; }
  .face {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(36px, 6vw, 104px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px clamp(24px, 5vw, 56px);
    box-sizing: border-box;
  }
  .face__device {
    width: 406px;
    height: 860px;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 56px;
    zoom: var(--fit, 1);
    background: linear-gradient(155deg, #3a4036 0%, #1a1d17 16%, #0b0d0a 46%, #171a14 78%, #3b4137 100%);
    box-shadow: inset 0 0 0 1px rgba(244, 240, 230, .16), inset 0 0 0 2px rgba(0, 0, 0, .5), 0 50px 90px -40px rgba(0, 0, 0, .95);
  }
  .dsc-app.dsc-live {
    width: 390px;
    height: 844px;
    border-radius: 48px;
    box-shadow: 0 0 0 4px #020302;
    --dsc-top: 58px;
    --dsc-bottom: 34px;
    --dsc-tabh: 88px;
  }
  .dsc-live .dsc-status { display: grid; }
  .dsc-live .dsc-island, .dsc-live .dsc-home { display: block; }
  .dsc-live .dsc-tabbar { padding-bottom: 0; }
}
@media (min-width: 760px) and (max-width: 1020px) {
  .face { grid-template-columns: 1fr; justify-items: center; }
  .face__intro { max-width: 560px; }
}

/* Phones: the app is the whole screen. */
@media (max-width: 759px) {
  html, body { overflow: hidden; overscroll-behavior: none; }
  .face__intro { display: none; }
  .face, .face__device { height: 100%; }
  .dsc-app.dsc-live { width: 100%; height: 100%; height: 100dvh; }
}
