* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

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

body {
  font-family: Outfit, Arial, Helvetica, sans-serif;
  color: #f7fbff;
  min-height: 100dvh;
  background: #79b1ec;
}

body:not(.is-in) {
  height: 100%;
  overflow: hidden;
}

.sky { display: none !important; }
body:not(.is-in) .brand-word,
body:not(.is-in) .brand-dot { visibility: hidden; }

#meadow {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 72% 18%, rgba(255, 228, 150, .55) 0%, rgba(255, 228, 150, 0) 58%),
    linear-gradient(180deg, #1d5aa3 0%, #2b7fd4 28%, #4ea6ea 58%, #8ec8f4 82%, #c5e4fa 100%);
}

.sky-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 78%, rgba(255, 255, 255, .18), transparent 42%),
    radial-gradient(circle at 86% 62%, rgba(255, 255, 255, .12), transparent 36%);
}

.sun {
  position: absolute;
  top: 9%;
  right: 18%;
  width: min(14rem, 38vw);
  height: min(14rem, 38vw);
  border-radius: 50%;
  background: radial-gradient(circle at 42% 40%, #fff8d6 0%, #ffe08a 28%, #ffc85a 58%, rgba(255, 180, 70, 0) 72%);
  filter: blur(2px);
  animation: sun-breathe 8s ease-in-out infinite;
}

.sun-halo {
  position: absolute;
  top: 2%;
  right: 8%;
  width: min(28rem, 70vw);
  height: min(28rem, 70vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 140, .35) 0%, rgba(255, 200, 90, .08) 42%, transparent 70%);
  pointer-events: none;
}

.rays {
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg at 78% 22%,
    rgba(255, 255, 255, .045) 0deg 6deg,
    transparent 6deg 18deg
  );
  mask-image: radial-gradient(circle at 78% 22%, #000 0%, transparent 46%);
  opacity: .55;
  animation: rays-spin 90s linear infinite;
}

.cloud-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: visible;
}

.cloud {
  position: absolute;
  height: auto;
  overflow: visible;
  pointer-events: none;
  will-change: transform;
}

.far { z-index: 1; opacity: .55; }
.mid { z-index: 2; opacity: .82; }
.near { z-index: 4; opacity: .96; }

.c-a { width: min(42rem, 78vw); top: 8%; left: -8%; animation: drift-a 72s linear infinite; }
.c-b { width: min(28rem, 52vw); top: 22%; left: 48%; animation: drift-b 88s linear infinite; }
.c-c { width: min(46rem, 86vw); top: 36%; left: -18%; animation: drift-c 58s linear infinite; }
.c-d { width: min(30rem, 58vw); top: 48%; left: 56%; animation: drift-d 64s linear infinite; }
.c-e { width: min(52rem, 96vw); bottom: -4%; left: -12%; animation: drift-e 48s linear infinite; }
.c-f { width: min(36rem, 70vw); bottom: 6%; left: 42%; animation: drift-f 54s linear infinite; }
.c-g { width: min(22rem, 40vw); top: 16%; left: 8%; animation: drift-g 96s linear infinite; }

.plane-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.plane {
  position: absolute;
  top: 31%;
  left: -12%;
  width: min(7.2rem, 22vw);
  animation: fly 26s linear infinite;
  animation-delay: -10s;
}

.plane svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 8px 10px rgba(20, 50, 90, .18));
}

.contrail {
  position: absolute;
  right: 88%;
  top: 52%;
  width: 14rem;
  height: 2px;
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), rgba(255, 255, 255, .55));
  filter: blur(1.2px);
  opacity: .7;
}

.haze {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28%;
  z-index: 5;
  background: linear-gradient(180deg, transparent, rgba(210, 232, 248, .55) 70%, rgba(196, 226, 246, .85));
}

.top {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: calc(.9rem + env(safe-area-inset-top)) 1.15rem 0;
  pointer-events: auto;
}

.brand-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #ffe08a;
  box-shadow: 0 0 10px rgba(255, 224, 138, .8);
}

.brand-word {
  font-size: .95rem;
  letter-spacing: -.02em;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 10px rgba(20, 55, 95, .4);
}

.auth { margin-left: auto; }

.login-btn,
.who-chip,
.out-btn,
.cfg-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .28);
  color: #fff;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 1px 6px rgba(20, 55, 95, .35);
}

.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: .45rem 1.15rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: lowercase;
}

.login-btn:hover,
.out-btn:hover,
.cfg-btn:hover {
  background: rgba(255, 255, 255, .3);
}

.session {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.who-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.35rem;
  padding: .2rem .75rem .2rem .2rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}

.who-chip img,
.who-chip .fallback {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  object-fit: cover;
  background: #d6e8f8;
  display: grid;
  place-items: center;
  color: #1a4d8c;
  font-weight: 800;
  font-size: .75rem;
}

.out-btn,
.cfg-btn {
  min-height: 2.35rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}

.hero {
  position: relative;
  z-index: 6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 10vh 1.4rem 38vh;
}

.hero-copy {
  position: relative;
  max-width: min(52rem, calc(100% - .4rem));
  padding: .15rem .4rem 0;
}

.portrait {
  position: relative;
  width: 158px;
  height: 158px;
  animation: float 6s ease-in-out infinite;
}

.portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  border: 2px solid rgba(103, 214, 208, .6);
  animation: breathe 4.4s ease-in-out infinite;
}

.bigdomain {
  margin-top: 1.35rem;
  font-size: clamp(2.5rem, 9vw, 5.1rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  color: #fff;
  text-shadow:
    0 2px 0 rgba(20, 55, 95, .22),
    0 4px 16px rgba(20, 55, 95, .45),
    0 14px 36px rgba(20, 55, 95, .28);
}

.lede {
  max-width: 42rem;
  margin: 1.15rem auto 0;
  font-size: clamp(1.25rem, 2.7vw, 1.75rem);
  line-height: 1.4;
  color: #fff;
  font-weight: 600;
  text-shadow:
    0 1px 0 rgba(20, 55, 95, .35),
    0 3px 12px rgba(20, 55, 95, .5);
}

.lede b { color: #fff; font-weight: 800; }

.subline {
  margin-top: .7rem;
  font-size: clamp(1rem, 1.9vw, 1.15rem);
  font-weight: 600;
  color: #fff;
  letter-spacing: .03em;
  text-shadow:
    0 1px 0 rgba(20, 55, 95, .35),
    0 3px 12px rgba(20, 55, 95, .48);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 30px rgba(103, 214, 208, .32); transform: scale(1); }
  50% { box-shadow: 0 0 60px rgba(103, 214, 208, .6); transform: scale(1.035); }
}

@keyframes drift-a {
  from { transform: translateX(0); }
  to { transform: translateX(18vw); }
}
@keyframes drift-b {
  from { transform: translateX(0); }
  to { transform: translateX(-22vw); }
}
@keyframes drift-c {
  from { transform: translateX(0); }
  to { transform: translateX(26vw); }
}
@keyframes drift-d {
  from { transform: translateX(0); }
  to { transform: translateX(-20vw); }
}
@keyframes drift-e {
  from { transform: translateX(0); }
  to { transform: translateX(16vw); }
}
@keyframes drift-f {
  from { transform: translateX(0); }
  to { transform: translateX(-18vw); }
}
@keyframes drift-g {
  from { transform: translateX(0); }
  to { transform: translateX(14vw); }
}

@keyframes fly {
  0% { transform: translate(-8vw, 0) rotate(-4deg); opacity: 0; }
  6% { opacity: 1; }
  48% { transform: translate(58vw, -2.4vh) rotate(-2deg); }
  94% { opacity: 1; }
  100% { transform: translate(118vw, 1.2vh) rotate(-5deg); opacity: 0; }
}

@keyframes sun-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: .92; }
}

@keyframes rays-spin {
  to { transform: rotate(360deg); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.in-head {
  display: none;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.in-head-face {
  width: 58px;
  height: 58px;
  flex: none;
}

.in-head-face img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  border: 1.5px solid rgba(103, 214, 208, .6);
  box-shadow: 0 0 18px rgba(103, 214, 208, .48);
}

.in-head-copy {
  min-width: 0;
}

.in-head-name {
  display: block;
  font-size: clamp(1.35rem, 3.1vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(20, 55, 95, .22),
    0 3px 12px rgba(20, 55, 95, .4);
}

.in-head-lede {
  margin-top: .12rem;
  font-size: clamp(.78rem, 1.45vw, .92rem);
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(20, 55, 95, .35),
    0 3px 12px rgba(20, 55, 95, .5);
}

.in-head-lede b { color: #fff; font-weight: 800; }

body.is-in .hero {
  display: none;
}

body.is-in .in-head {
  display: flex;
}

body.is-in .brand-word,
body.is-in .brand-dot {
  display: none;
}

body.is-in .top {
  flex-wrap: wrap;
  row-gap: .3rem;
  padding: calc(.65rem + env(safe-area-inset-top)) 1.15rem .15rem;
}

body.is-in .apps,
body.is-in .settings {
  margin-top: .45rem;
}

body.gate-open .hero,
body.gate-open .brand-word,
body.gate-open .brand-dot,
body.gate-open .in-head,
body.gate-open .auth {
  visibility: hidden;
}

.apps {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: .85rem;
  width: min(64rem, calc(100% - 2.2rem));
  margin: 1.2rem auto 12vh;
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .45rem .45rem .85rem;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .78);
  color: #16324f;
  text-decoration: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(20, 55, 95, .16);
}

.app-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
}

.app-card strong,
.app-card span {
  padding: 0 .55rem;
}

.app-card:hover {
  background: rgba(255, 255, 255, .92);
}

.app-card strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.app-card span {
  font-size: .82rem;
  color: #4a6178;
}

.apps-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #fff;
  font-size: .95rem;
  text-shadow: 0 2px 12px rgba(20, 55, 95, .5);
}

.apps-break {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.8rem 0 .35rem;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(20, 55, 95, .5);
  break-before: page;
}

.apps-break::before,
.apps-break::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .42);
}

.sheet-section {
  margin: 1.15rem 0 .15rem;
  padding-top: .85rem;
  border-top: 1px solid #e6edf5;
  color: #1a4d8c;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sheet-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.app-who-note {
  color: #6a7a90;
  font-size: .78rem;
}

.settings {
  position: relative;
  z-index: 6;
  width: min(64rem, calc(100% - 2.2rem));
  margin: 1.2rem auto 1.4rem;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .96);
  color: #1a2744;
}

.settings-top {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .35rem;
}

.settings h2 {
  font-size: 1.15rem;
  color: #1a4d8c;
  margin: 0;
}

.settings-close {
  margin-left: auto;
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #5b6b88;
  font: 400 1.45rem/1 "Outfit", sans-serif;
  cursor: pointer;
  padding: 0;
}

.settings-close:hover {
  color: #1a4d8c;
  background: #eef3f9;
}

.sheet-lead {
  font-size: .86rem;
  color: #44506a;
  margin-bottom: 1rem;
}

.app-row {
  display: grid;
  gap: .45rem;
  padding: .75rem 0;
  border-top: 1px solid #e6edf5;
}

.app-row-top {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.app-thumb {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  border-radius: 10px;
  background: #e8eef6;
  flex: none;
}

.app-thumb-empty { display: inline-block; }

.app-row-meta {
  display: grid;
  gap: .2rem;
}

.app-row-meta strong {
  color: #1a4d8c;
  font-size: .95rem;
}

.photo-btn {
  justify-self: start;
  border: 0;
  background: none;
  color: #1a4d8c;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.app-who {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
}

.app-who label {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .84rem;
  cursor: pointer;
}

.save-btn {
  width: 100%;
  margin-top: .85rem;
  padding: .85rem;
  border: 0;
  background: #1a6fd4;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sheet-msg {
  min-height: 1.1rem;
  margin-top: .55rem;
  font-size: .8rem;
  color: #0b7a3b;
}

.sheet-msg.err { color: #c62828; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 36, 72, .42);
  pointer-events: auto;
}

.gate-card {
  width: min(26rem, 100%);
  padding: 1.25rem 1.15rem 1.2rem;
  border-radius: 4px;
  background: #fff;
  color: #1a2744;
  border: 1px solid #d5deea;
  font-family: Arial, Helvetica, sans-serif;
}

.gate-card .kicker {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #5b6b88;
  font-weight: 700;
}

.gate-card h1 {
  font-size: 1.45rem;
  color: #1a4d8c;
  margin: .15rem 0 .85rem;
  font-weight: 800;
}

.gate-card h2 {
  font-size: 1.05rem;
  color: #1a4d8c;
  margin: 0 0 .35rem;
}

.gate-card .lead {
  font-size: .86rem;
  color: #44506a;
  margin-bottom: 1rem;
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
}

.who {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  padding: .7rem .35rem .75rem;
  border: 1px solid #d5deea;
  background: #f7f9fc;
  color: #1a2744;
  cursor: pointer;
  font: inherit;
}

.who:hover, .who:focus-visible { border-color: #1a6fd4; background: #eef3fb; }

.who img, .who .fallback, .who-bar img, .who-bar .fallback {
  border-radius: 50%;
  object-fit: cover;
  background: #d9e3f2;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #1a4d8c;
}

.who img, .who .fallback {
  width: 4.6rem;
  height: 4.6rem;
}

.who strong { font-size: .82rem; }

.who-bar {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .85rem;
}

.who-bar img, .who-bar .fallback {
  width: 2.6rem;
  height: 2.6rem;
  font-size: .85rem;
}

.who-bar button {
  margin-left: auto;
  border: 0;
  background: none;
  color: #1a4d8c;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  width: auto;
}

.field {
  width: 100%;
  min-height: 2.55rem;
  padding: .65rem .75rem;
  border: 1px solid #c5d0e0;
  background: #f3f5f8;
  color: #1a2744;
  font: inherit;
  letter-spacing: .28em;
  margin-bottom: .85rem;
}

.field.empty { color: #8a96ab; letter-spacing: 0; }

.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin-bottom: .75rem;
}

.key {
  min-height: 3.35rem;
  border: 1px solid #d5deea;
  background: #fff;
  color: #1a2744;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 0 #d5deea;
}

.key:active { background: #eef3fb; }
.key.back { font-size: 1.15rem; color: #5b6b88; }

.go {
  width: 100%;
  padding: .85rem;
  border: 0;
  background: #1a6fd4;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: lowercase;
  cursor: pointer;
}

.go:disabled, .go.is-off { opacity: .45; cursor: default; }

.gate-err { min-height: 1.15rem; color: #c62828; font-size: .8rem; margin: .15rem 0 .55rem; }
.gate-ok { min-height: 1.15rem; color: #0b7a3b; font-size: .8rem; margin: .15rem 0 .55rem; }
.hint { font-size: .75rem; color: #5b6b88; margin-top: .7rem; }

.forgot {
  display: inline-block;
  margin: .15rem 0 .75rem;
  border: 0;
  background: none;
  color: #1a4d8c;
  font: inherit;
  font-size: .8rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  width: auto;
}

.gate-close {
  margin-left: auto;
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .plane { width: 4.6rem; top: 28%; }
  .contrail { width: 8rem; }
  .hero { padding: 8vh 1rem 34vh; }
  .c-e { bottom: -8%; }
  .portrait { width: 124px; height: 124px; }
  body.is-in .top {
    padding: calc(.55rem + env(safe-area-inset-top)) .9rem .1rem;
  }
  .in-head-face {
    width: 44px;
    height: 44px;
  }
  .in-head-lede {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .plane, .sun, .rays, .portrait, .portrait img {
    animation: none !important;
  }
  .plane { left: 58%; top: 30%; }
}
