/* ---------------------------------------------------------- gate shell */

.screen {
  min-height: 100vh;          /* fallback for iOS < 15.4 */
  min-height: 100svh;
  padding: calc(var(--safe-t) + .5rem) var(--gut) calc(var(--safe-b) + var(--brand-h) + 1rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.screen--gate { background:
  radial-gradient(120% 80% at 50% 10%, var(--panel-hi), var(--panel) 55%, var(--panel-lo) 100%); }

.chassis {
  width: 100%; max-width: 24rem; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  transform: rotate(-.35deg);
}

.mast__title {
  font-family: var(--f-display); font-size: var(--step-4); line-height: .84;
  letter-spacing: .005em; text-transform: uppercase; text-align: center;
  text-shadow: 3px 3px 0 var(--yellow);
  transition: opacity .4s, filter .4s;
}
.screen--gate:not(.is-live) .mast__title { opacity: .2; filter: grayscale(1); }
.mast__kicker {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .22em;
  color: var(--ink-soft); text-transform: uppercase;
}

.screen--gate.is-warming { animation: warmup .9s steps(1) 1; }
@keyframes warmup {
  0%,100% { filter: none; }
  14% { filter: brightness(1.5); }
  30% { filter: brightness(.74); }
  54% { filter: brightness(1.26); }
  70% { filter: brightness(.88); }
}

/* the switch */
.disc { margin-top: .5rem; }
.disc__body {
  position: relative; width: 108px; height: 184px; border-radius: 5px;
  background: linear-gradient(#43423D, #2C2B27);
  box-shadow: 0 2px 0 rgba(255,255,255,.14) inset, 0 -3px 0 rgba(0,0,0,.5) inset, var(--shadow-plate);
}
.disc__handle {
  position: absolute; left: 13px; bottom: 10px; width: 82px; height: 84px;
  border-radius: 6px;
  background: linear-gradient(#E04A3A, var(--red) 45%, var(--red-lo));
  box-shadow: 0 2px 0 rgba(255,255,255,.3) inset, 0 -3px 0 rgba(0,0,0,.35) inset, 0 4px 10px rgba(0,0,0,.4);
  transition: transform .17s cubic-bezier(.2,.9,.25,1.55), background .2s;
  touch-action: none;
}
.disc.is-on .disc__handle {
  transform: translateY(-80px);
  background: linear-gradient(#5FA168, var(--green) 45%, #2C5A31);
}
.disc__grip { position: absolute; inset: 14px 16px; border-radius: 3px;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 3px, transparent 3px 8px); }

.go__hint {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .2em;
  color: var(--ink-faint); text-transform: uppercase;
  animation: blink 1.8s steps(1) infinite;
}
@keyframes blink { 0%,62% { opacity: 1; } 63%,100% { opacity: .3; } }
.go { width: 100%; max-width: 20rem; }
.go.is-in { animation: risein .35s cubic-bezier(.2,.7,.3,1) both; }
@keyframes risein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* stickers */
.stickers { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .5rem; }
.sticker {
  font-family: var(--f-mono); text-align: center; padding: .3rem .5rem; border-radius: 2px;
  border: 2px solid currentColor; background: rgba(255,255,255,.35); line-height: 1.1; opacity: .8;
}
.sticker b { display: block; font-size: 9px; letter-spacing: .1em; font-weight: 700; }
.sticker i { display: block; font-size: 8px; font-style: normal; opacity: .7; }
.sticker--green { color: var(--green); } .sticker--red { color: var(--red); }
.sticker--yellow { color: var(--yellow-lo); } .sticker--ink { color: var(--ink-soft); }
.sticker--r0 { transform: rotate(-2.5deg); } .sticker--r1 { transform: rotate(1.5deg); }
.sticker--r2 { transform: rotate(-.8deg); }

.colophon {
  position: absolute; bottom: calc(var(--safe-b) + var(--brand-h) + .4rem); left: 0; right: 0;
  text-align: center; color: var(--ink-faint); opacity: .55;
}

/* --------------------------------------------------------------- fatal */

.fatal { max-width: 30rem; margin: auto; padding: 2rem var(--gut); text-align: center; }
.fatal__h { font-family: var(--f-display); font-size: var(--step-2); color: var(--red); }
.fatal__b { font-family: var(--f-mono); font-size: var(--step--1); line-height: 1.6; margin: .8rem 0 1.5rem; }

/* =============================================================== SUCCESS */

.screen--grant { background: radial-gradient(110% 70% at 50% 25%, #F3EFE2, var(--panel) 70%); justify-content: center; }
.screen--grant.is-pity { background: radial-gradient(110% 70% at 50% 25%, #DCD8CC, var(--panel-lo) 70%); }
.grant__wrap { width: 100%; max-width: 24rem; margin: 0 auto; text-align: center; }
.grant__head {
  font-family: var(--f-display); font-size: var(--step-4); line-height: .84;
  text-transform: uppercase; text-shadow: 3px 3px 0 var(--yellow);
  animation: slam .35s cubic-bezier(.15,1.4,.4,1) both;
}
.screen--grant.is-pity .grant__head { font-size: var(--step-3); text-shadow: 2px 2px 0 var(--panel-edge); }
@keyframes slam { from { transform: scale(1.6); opacity: 0; } to { transform: none; opacity: 1; } }
.grant__line { font-family: var(--f-mono); font-size: var(--step-0); color: var(--ink-soft); margin-top: .9rem; }
.grant__badge {
  display: inline-block; margin-top: 1.2rem;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: var(--paper); background: var(--red); padding: .45rem .7rem;
  transform: rotate(-1.5deg);
}
