:root {
  --bg: #050505;
  --paper: #f4f0e8;
  --muted: rgba(244, 240, 232, 0.62);
  --accent: #fe2c55;
  --soft: #25f4ee;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: "Source Sans 3", system-ui, sans-serif;
  overflow: hidden;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(254, 44, 85, 0.35), transparent 55%),
    radial-gradient(ellipse 70% 40% at 90% 30%, rgba(37, 244, 238, 0.18), transparent 50%),
    #050505;
}

.gate .brand {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gate h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(2.2rem, 10vw, 3rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

.gate .lead {
  color: var(--muted);
  line-height: 1.45;
  max-width: 28ch;
  margin-bottom: 1.25rem;
}

.gate .lead strong { color: var(--paper); }

.btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 0.95rem 1rem;
  border-radius: 2px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  color: var(--paper);
  background: transparent;
  margin-bottom: 0.55rem;
  cursor: pointer;
  font-family: inherit;
}

.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { border-color: rgba(244, 240, 232, 0.22); }

.micro {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

body.show-feed .gate { display: none; }

.tt-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: calc(0.65rem + env(safe-area-inset-top)) 1rem 0.65rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.75), transparent);
  font-size: 0.9rem;
  font-weight: 700;
}

.tt-bar a { color: var(--paper); text-decoration: none; }
.tt-bar span { color: var(--soft); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }

.feed {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.slide {
  height: 100%;
  min-height: 100dvh;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem 1rem calc(5.5rem + env(safe-area-inset-bottom));
  overflow: hidden;
  background: #070707;
}

.slide-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
  background: var(--slide-bg, #111);
}

.slide[data-kind="short"] .slide-photo {
  object-position: center center;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 28%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.92) 100%);
  z-index: 1;
  pointer-events: none;
}

.slide > *:not(.slide-photo) { position: relative; z-index: 2; }

.badge {
  position: absolute;
  top: calc(3.4rem + env(safe-area-inset-top));
  left: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.overlay-card {
  border-left: 3px solid var(--soft);
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.45);
  margin-bottom: 0.85rem;
  max-width: 18rem;
  animation: rise 0.55s ease both;
}

.overlay-card .line {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  position: relative;
}

.overlay-card .line-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 0.15rem;
}

.overlay-card .sub {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.tippable {
  position: relative;
  cursor: help;
}

.tippable .tip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  z-index: 8;
  left: 0;
  bottom: calc(100% + 8px);
  min-width: 12rem;
  max-width: min(18rem, 85vw);
  background: #121212;
  color: #f4f0e8;
  border: 1px solid rgba(37, 244, 238, 0.45);
  padding: 0.45rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  font-family: "Source Sans 3", system-ui, sans-serif;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.tippable:hover .tip,
.tippable:focus .tip,
.tippable:focus-within .tip {
  visibility: visible;
  opacity: 1;
}

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

.slide h2 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.2;
  margin-bottom: 0.35rem;
  max-width: 16ch;
  display: inline-block;
}

.slide .us-only {
  color: var(--muted);
  margin-bottom: 0.9rem;
  max-width: 28ch;
  line-height: 1.35;
  font-size: 0.88rem;
}

.slide .en {
  color: var(--muted);
  margin-bottom: 0.9rem;
  max-width: 28ch;
  line-height: 1.35;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.actions a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
  border-radius: 2px;
  color: #fff;
  background: var(--accent);
}

.actions a.ghost {
  background: transparent;
  border: 1px solid rgba(244, 240, 232, 0.28);
  color: var(--paper);
}

.tt-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
  background: rgba(5, 5, 5, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tt-dock a {
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.3rem;
}

.tt-dock .dock-main {
  color: #fff;
  background: var(--accent);
  border-radius: 2px;
}

@media (min-width: 720px) {
  .feed { max-width: 420px; margin: 0 auto; border-left: 1px solid #222; border-right: 1px solid #222; }
  .tt-bar, .tt-dock { max-width: 420px; left: 50%; right: auto; transform: translateX(-50%); width: 100%; }
  .gate { max-width: 420px; left: 50%; right: auto; transform: translateX(-50%); width: 100%; }
}
