:root {
  --bg: #070203;
  --ink: #f6f1f2;
  --muted: #c4b4b6;
  --faint: #8a7578;
  --red: #ff1a3c;
  --pink: #ff1a3c;
  --violet: #6d0014;
  --cyan: #ff1a3c;
  --lime: #ff1a3c;
  --red-deep: #6d0014;
  --line: rgba(255, 26, 60, 0.38);
  --card: #100204;
  --font: "Instrument Sans", "Segoe UI", sans-serif;
  --display: "Instrument Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.011em;
  min-height: 100vh;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(720px 420px at -10% -10%, rgba(255, 26, 60, 0.18), transparent 62%);
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; }
h2 { font-size: 1.28rem; margin: 0 0 8px; color: var(--ink); font-weight: 500; }
h3 { font-size: 0.95rem; margin: 18px 0 8px; letter-spacing: -0.02em; color: var(--pink); font-weight: 500; }
p { color: var(--muted); }

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.atmosphere i {
  position: absolute;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.32;
  animation: drift 22s ease-in-out infinite alternate;
}
.atmosphere i:nth-child(1) { width: 340px; height: 340px; background: #ff1a3c; left: -140px; top: -100px; opacity: 0.22; }
.atmosphere i:nth-child(2) { width: 260px; height: 260px; background: #6d0014; right: -80px; top: 18%; animation-duration: 24s; opacity: 0.45; }
.atmosphere i:nth-child(3) { width: 220px; height: 220px; background: #ff1a3c; left: 20%; bottom: -140px; animation-duration: 20s; opacity: 0.16; }
.atmosphere i:nth-child(4),
.atmosphere i:nth-child(5),
.atmosphere b { display: none; }

.skip {
  position: absolute; left: 12px; top: -40px; background: var(--red); color: white; padding: 8px 12px; z-index: 50;
}
.skip:focus { top: 12px; }

.menu-btn {
  display: none;
  position: fixed; top: 14px; right: 14px; z-index: 40;
  width: 40px; height: 40px; border: 1px solid var(--pink); border-radius: 10px; background: #070203; color: white; cursor: pointer;
}

.stage { position: relative; z-index: 1; display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px 18px;
  border-right: 1px solid transparent;
  border-image: linear-gradient(180deg, #ff1a3c, #3a000c) 1;
  background: rgba(7, 2, 3, 0.9);
  overflow: visible;
}
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.brand img {
  width: 36px; height: 36px; object-fit: cover; border: 0; border-radius: 8px;
  animation: ring 6s linear infinite;
}
.brand strong { display: block; font-family: var(--display); font-size: 1.05rem; font-weight: 500; letter-spacing: -0.04em; }
.brand em {
  color: var(--pink);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  animation: kick 10s linear infinite;
}
.nav { display: flex; flex-direction: column; gap: 2px; overflow: visible; }
.nav a {
  display: flex; gap: 10px; align-items: baseline;
  text-decoration: none; padding: 7px 8px;
  border-left: 2px solid transparent;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.nav a small { width: 1.2em; font-variant-numeric: tabular-nums; }
.nav a small { color: var(--red); }
.nav a[aria-current="page"] {
  border-left-color: var(--red);
  background: linear-gradient(90deg, rgba(255, 26, 60, 0.22), transparent);
}
.nav a:hover { background: #ff1a3c; color: white; }
.rail-foot { margin-top: auto; display: grid; gap: 10px; }
.socials { display: flex; gap: 8px; }
.socials a {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line); text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.socials a { border-radius: 8px; }
.socials a:hover { transform: translateY(-1px); color: white; }
.socials a:hover { background: var(--red); }
.rail-foot time { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; font-size: 0.78rem; color: var(--cyan); font-weight: 500; }
.rail-foot p, .colophon p { color: var(--faint); font-size: 0.68rem; letter-spacing: 0.04em; }

.sheet {
  padding: 36px 44px 56px;
  max-width: 1080px;
  background: linear-gradient(180deg, rgba(7, 2, 3, 0.62), rgba(7, 2, 3, 0.88));
}
.mast h1 {
  margin: 6px 0 0;
  font-size: clamp(2.7rem, 6.4vw, 4.6rem);
  font-weight: 500;
  text-transform: lowercase;
  color: #fff;
  animation: chromo 5.5s ease-in-out infinite;
}
.mast h1::after {
  content: "";
  display: block;
  width: min(148px, 36%);
  height: 3px;
  margin-top: 12px;
  border-radius: 99px;
  background: var(--red);
}
.kicker {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 500;
  animation: kick 10s linear infinite;
}
.lede { max-width: 62ch; font-size: 0.98rem; line-height: 1.6; }
.cashtag {
  display: inline-flex; margin: 2px 0 14px; padding: 7px 12px;
  color: #fff; text-decoration: none; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid var(--line); border-radius: 999px;
}
.cashtag:hover { background: var(--red); color: #fff; }

.panel, .card, .tile, .vcard, .codeview, .qr, .snippet-list button:not(.star) {
  border-radius: 12px;
  border: 1px solid rgba(255, 26, 60, 0.32);
  background: var(--card);
}
.panel { padding: 16px; margin: 14px 0; border-radius: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature img, .frame, .yt { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #000; border: 0; }
.frame { position: relative; display: block; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: var(--red);
  color: white; width: 64px; height: 44px; display: grid; place-items: center; font-size: 1.3rem;
  animation: pulse 1.6s ease-in-out infinite;
}
.poster { margin-top: 22px; border: 1px solid var(--line); border-radius: 12px; }

.field, .area {
  width: 100%;
  background: #070203;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: var(--radius);
}
.field:focus, .area:focus { outline: 2px solid var(--pink); outline-offset: 2px; }
.area { resize: vertical; }
.status { display: grid; gap: 6px; margin: 14px 0; }
.status span, .goal span, .count { color: var(--cyan); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.grow { flex: 1; min-width: 180px; }

.toolbar, .actions, .chips, .pills { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar { margin: 12px 0 18px; }
.btn, .chip, .pill, .skill {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 500;
}
.btn.hot {
  color: white;
  border-color: var(--red);
  background: var(--red);
}
.chip.on, .skill.on, .snippet-list button.on:not(.star) { background: #ff1a3c; color: white; border-color: #ff1a3c; }
.tile.on, .vcard.on {
  background: #1a0508;
  border-color: var(--red);
  color: white;
}
.chip, .pill { border-radius: 999px; }
.pill { display: inline-flex; gap: 8px; align-items: center; }
.pill button { border: 0; background: transparent; color: inherit; cursor: pointer; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.64rem; font-weight: 500; }
.jump { margin-bottom: 8px; }
.btn:hover, .chip:hover, .skill:hover { transform: translateY(-1px); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 26, 60, 0.16); }
.card img { aspect-ratio: 16/10; object-fit: cover; }
.card > div { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h2 { font-size: 1.12rem; }
.card .sub, .ipa .sub, .fine { color: var(--pink); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.66rem; font-weight: 500; }
.card.flash { outline: 2px solid var(--cyan); outline-offset: 3px; }
.cards.hide-img img { display: none; }
.cards.list-view { grid-template-columns: 1fr; }
.cards.list-view .card { display: grid; grid-template-columns: 160px 1fr; }
.cards.list-view.hide-img .card { grid-template-columns: 1fr; }
.repo { color: var(--faint); font-size: 0.75rem; overflow-wrap: anywhere; }
.note-preview { white-space: pre-wrap; }

.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 12px; }
.skill { text-align: left; padding: 14px; }

.results { list-style: none; padding: 0; margin: 8px 0 0; }
.results a { display: flex; gap: 10px; text-decoration: none; padding: 8px 0; border-bottom: 1px solid rgba(255, 79, 216, 0.28); }
.results small, .keys kbd { color: var(--pink); }
.keys { display: flex; flex-wrap: wrap; gap: 10px 16px; list-style: none; padding: 0; color: var(--faint); }
.keys kbd { border: 1px solid var(--line); padding: 0 6px; margin-right: 6px; }
.pulled a { color: white; }

.reader { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.snippet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.snippet-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.snippet-list button { text-align: left; padding: 10px; cursor: pointer; color: inherit; }
.snippet-list strong { display: block; }
.snippet-list small { color: var(--faint); }
.snippet-list .star { width: 42px; padding: 0; text-align: center; font-size: 1.1rem; background: #120406; border: 1px solid var(--line); color: var(--faint); cursor: pointer; }
.star.on { color: var(--pink); border-color: var(--pink); text-shadow: 0 0 10px var(--pink); }
.read { min-width: 0; }
.prose h4 { font-family: var(--display); margin: 0 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose code, .prose strong { color: var(--ink); }
.prose code { color: var(--cyan); font-family: var(--mono); font-size: 0.92em; }
.codehead { display: flex; gap: 8px; align-items: center; padding: 8px 10px; background: #1a060a; }
.codehead span { margin-right: auto; color: var(--lime); font-size: 0.78rem; }
.codehead button { background: transparent; border: 1px solid var(--line); color: white; cursor: pointer; padding: 4px 8px; }
pre {
  margin: 0; padding: 12px 14px; overflow: auto; background: #050102;
  font-family: var(--mono); line-height: 1.55;
  color: #f6f1f2;
  font-size: 0.86rem;
}
pre.wrap { white-space: pre-wrap; }
.code-line { display: block; }
.code-line i { display: inline-block; width: 2.4em; color: var(--red); font-style: normal; }

.player iframe, .yt { width: 100%; border: 1px solid var(--line); background: #000; }
.yt { aspect-ratio: 16/9; height: auto; }
.player.tall iframe { min-height: 520px; }
html.is-listen .rail { width: 76px; padding-inline: 10px; }
html.is-listen .brand span, html.is-listen .nav a, html.is-listen .rail-foot p, html.is-listen .rail-foot time { display: none; }
html.is-listen .nav { display: none; }
html.is-listen .stage { grid-template-columns: 76px minmax(0, 1fr); }

.subline {
  display: inline-flex; gap: 10px; align-items: center; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; margin: 8px 0 14px;
  background: rgba(18, 4, 6, 0.8);
}
.subline i { color: #ff1a3c; }
.subline strong { color: var(--lime); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.goal { display: grid; gap: 6px; margin-bottom: 12px; position: relative; }
.goal i {
  display: block; height: 6px; width: 0;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 79, 216, 0.7);
}
.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.video-grid.dense { grid-template-columns: 1fr; }
.vcard { padding: 0; text-align: left; cursor: pointer; color: inherit; border-radius: 14px; overflow: hidden; }
.vcard img { aspect-ratio: 16/9; object-fit: cover; }
.vcard span, .vcard small { display: block; padding: 8px 10px 0; }
.vcard small { color: var(--lime); padding-bottom: 10px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { padding: 16px; border-radius: 14px; }
.tile a { display: grid; gap: 4px; text-decoration: none; font-size: 1.15rem; font-weight: 500; letter-spacing: -0.03em; }
.tile i { color: var(--pink); }
.tile small { color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; }
.online { letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); font-size: 0.78rem; }
.online.off { color: var(--faint); }
.qr { margin: 0; padding: 14px; justify-self: start; border-radius: 14px; }
.qr img { width: 220px; height: 220px; background: #fff4f8; }
.qr figcaption { letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); margin-top: 8px; }

.ad-mount { display: flex; justify-content: center; margin: 18px 0; }
.ad-slot { width: min(100%, 760px); }
.ad-slot iframe, .ad-slot img { max-width: 100%; border: 0; display: block; margin: 0 auto; background: #070203; }
#ad-park { display: flex; flex-direction: column; align-items: center; }
.empty { color: var(--faint); }

.ipa-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.ipa-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 280px);
  gap: 12px; overflow-x: auto; padding-bottom: 8px;
}
.ipa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ipa-grid.list-view { grid-template-columns: 1fr; }
.ipa {
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
  border: 1px solid rgba(255, 26, 60, 0.32); background: var(--card); border-radius: 14px; padding: 14px;
}
.ipa-grid.list-view .ipa { flex-direction: row; align-items: center; }
.ipa-top { display: flex; gap: 12px; min-width: 0; flex: 1; }
.ipa img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; background: #070203; flex: none; }
.ipa-grid.list-view .ipa img { width: 44px; height: 44px; border-radius: 12px; }
.ipa .meta { min-width: 0; flex: 1; }
.ipa .name { font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipa .file { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ipa .actions { flex-wrap: nowrap; }
.ipa-grid.list-view .ipa .actions { margin-left: auto; flex: none; }
.ipa .btn.disabled, .ipa .btn:disabled { opacity: 0.45; pointer-events: none; }
.modal-back {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.55);
  display: grid; align-items: start; justify-items: center; padding: 12vh 16px 16px;
}
.modal-card {
  width: min(440px, 100%); background: #100204; border: 1px solid rgba(255, 26, 60, 0.32);
  border-radius: 16px; padding: 22px; display: grid; gap: 12px;
}
.modal-card h2 { margin: 0; font-size: 1.4rem; }
.sign-bar { height: 8px; background: #1a060a; border-radius: 999px; overflow: hidden; }
.sign-bar i { display: block; height: 100%; width: 0; background: var(--red); }
.file-input { width: 100%; }

.progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 30; pointer-events: none; background: rgba(255, 26, 60, 0.15); }
.progress span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%;
  background: var(--red);
}

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 8px);
  background: #120406; border: 1px solid var(--pink); border-radius: 999px; color: white;
  padding: 8px 14px; opacity: 0; pointer-events: none; z-index: 50;
  font-size: 0.82rem; letter-spacing: -0.01em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(36px, 48px, 0) scale(1.12); }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-26px) rotate(10deg); }
}
@keyframes hueflow { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes borderflow { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }
@keyframes chromo {
  0%, 100% { text-shadow: 0 0 18px rgba(255, 26, 60, 0.28); }
  50% { text-shadow: 0 0 10px rgba(255, 26, 60, 0.12); }
}
@keyframes kick {
  0%, 100% { color: #ff1a3c; }
  50% { color: #ff6a7d; }
}
@keyframes ring {
  0%, 100% { box-shadow: 0 0 0 2px #070203, 0 0 12px rgba(255, 26, 60, 0.7); }
  50% { box-shadow: 0 0 0 2px #070203, 0 0 4px rgba(255, 26, 60, 0.25); }
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

@media (max-width: 860px) {
  .menu-btn { display: grid; place-items: center; }
  .stage { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0; height: auto; z-index: 30;
    transform: translateX(-100%);
    background: #070203;
    overflow: visible;
  }
  .rail.open { transform: none; }
  .sheet { padding: 72px 16px 48px; }
  .split, .reader, .tiles, .video-grid, .cards.list-view .card { grid-template-columns: 1fr; }
  .ipa-grid.list-view .ipa { flex-wrap: wrap; }
  .ipa-grid.list-view .ipa .actions { width: 100%; margin-left: 0; }
  html.is-listen .stage { grid-template-columns: 1fr; }
  html.is-listen .rail { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
