:root {
  --bg: #0e1016;
  --bg-2: #161a24;
  --panel: #1b2130;
  --line: #2c3448;
  --ink: #e8ecf4;
  --muted: #9aa3b8;
  --red: #e21837;
  --red-hot: #ff3b55;
  --plastic: #c5ccd8;
  --cyan: #4ef0d5;
  --amber: #ffb84d;
  --stage: #050608;
  --radius: 10px;
  --font: "Chakra Petch", "Noto Sans SC", "Noto Sans JP", system-ui, sans-serif;
  --display: "Pixelify Sans", "Chakra Petch", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--bg-2);
}

html::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track {
  background: var(--bg-2);
}

html::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--red-hot), var(--red));
  border-radius: 8px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(226, 24, 55, 0.18), transparent 55%),
    radial-gradient(900px 500px at 0% 100%, rgba(78, 240, 213, 0.08), transparent 50%),
    linear-gradient(180deg, #12151e 0%, var(--bg) 40%, #0a0c12 100%);
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1280px, calc(100% - 28px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(14, 16, 22, 0.84);
  border-bottom: 1px solid rgba(44, 52, 72, 0.9);
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, #2a3144, #12151d),
    var(--panel);
  border: 2px solid var(--plastic);
  box-shadow: inset 0 -6px 0 rgba(226, 24, 55, 0.9);
  position: relative;
  flex: 0 0 auto;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  right: 5px;
  top: 5px;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: led-pulse 1.8s ease-in-out infinite;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink);
}

.captcha-field {
  flex: 1;
  margin: 0;
  min-width: 160px;
}

.auth-link {
  margin-top: 16px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  min-width: 0;
}

.nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--red);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lang button {
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 700;
}

.lang button[aria-pressed="true"] {
  color: #fff;
  background: var(--red);
  border-color: var(--red-hot);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-red {
  background: linear-gradient(180deg, var(--red-hot), var(--red));
  color: #fff;
  box-shadow: 0 8px 24px rgba(226, 24, 55, 0.28);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.hall {
  padding: 18px 0 40px;
}

.hall-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.stage-block {
  min-width: 0;
}

.stage {
  position: relative;
  background: var(--stage);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  isolation: isolate;
}

.stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  animation: stage-breathe 7s ease-in-out infinite;
}

.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 3px
    );
  mix-blend-mode: soft-light;
  opacity: 0.55;
  animation: scan-drift 4.5s linear infinite;
}

.stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: end;
  margin-top: 14px;
}

.stage-title {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.stage-sub {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.45;
}

.play-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(27, 33, 48, 0.9);
  border: 1px solid var(--line);
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.85rem;
}

.play-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: led-pulse 1.2s ease-in-out infinite;
}

.feed-rail {
  min-width: 0;
  background: rgba(27, 33, 48, 0.55);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  max-height: min(72vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan) var(--bg-2);
}

.feed-rail.scroll-styled::-webkit-scrollbar {
  width: 8px;
}

.feed-rail.scroll-styled::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-radius: 8px;
}

.feed-rail.scroll-styled::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan), #1aa892);
  border-radius: 8px;
}

.feed-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.feed-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.feed-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.feed {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tile {
  appearance: none;
  border: 1px solid transparent;
  background: var(--bg-2);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  color: inherit;
  min-width: 0;
  opacity: 0;
  transform: translateY(10px);
  animation: tile-in 0.55s ease forwards;
}

.tile:nth-child(1) { animation-delay: 0.04s; }
.tile:nth-child(2) { animation-delay: 0.08s; }
.tile:nth-child(3) { animation-delay: 0.12s; }
.tile:nth-child(4) { animation-delay: 0.16s; }
.tile:nth-child(5) { animation-delay: 0.2s; }
.tile:nth-child(6) { animation-delay: 0.24s; }
.tile:nth-child(7) { animation-delay: 0.28s; }
.tile:nth-child(8) { animation-delay: 0.32s; }
.tile:nth-child(9) { animation-delay: 0.36s; }
.tile:nth-child(10) { animation-delay: 0.4s; }
.tile:nth-child(11) { animation-delay: 0.44s; }
.tile:nth-child(12) { animation-delay: 0.48s; }
.tile:nth-child(13) { animation-delay: 0.52s; }
.tile:nth-child(14) { animation-delay: 0.56s; }
.tile:nth-child(15) { animation-delay: 0.6s; }

.tile:hover,
.tile[aria-pressed="true"] {
  border-color: rgba(78, 240, 213, 0.55);
  box-shadow: 0 0 0 1px rgba(78, 240, 213, 0.2);
}

.tile:hover img,
.tile[aria-pressed="true"] img {
  transform: scale(1.06);
}

.tile-media {
  aspect-ratio: 1;
  overflow: hidden;
  background: #0a0c12;
}

.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.tile-cap {
  padding: 8px 9px 10px;
}

.tile-cap strong {
  display: block;
  font-size: 0.82rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-cap span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
}

.band {
  margin-top: 28px;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(226, 24, 55, 0.12), transparent 40%),
    rgba(27, 33, 48, 0.65);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 16px;
  align-items: center;
}

.band h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.band p {
  margin: 0;
  color: var(--muted);
  max-width: 55ch;
  line-height: 1.5;
}

.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page {
  padding: 28px 0 56px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 28px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 48ch;
}

.page-hero figure {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--stage);
}

.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(27, 33, 48, 0.55);
  min-width: 0;
}

.step b {
  display: block;
  color: var(--cyan);
  font-size: 0.8rem;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.step h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(27, 33, 48, 0.6);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan.featured {
  border-color: rgba(226, 24, 55, 0.65);
  background:
    linear-gradient(180deg, rgba(226, 24, 55, 0.16), transparent 45%),
    rgba(27, 33, 48, 0.75);
}

.plan h2 {
  margin: 0;
  font-size: 1.2rem;
}

.plan p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}

.price {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
}

.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.auth-side {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--stage);
  min-height: 280px;
}

.auth-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.auth-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(27, 33, 48, 0.72);
  padding: 22px;
  min-width: 0;
}

.auth-panel h1 {
  margin: 0 0 8px;
  font-size: 1.7rem;
}

.auth-panel .lead {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.session-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(78, 240, 213, 0.12);
  overflow: hidden;
  margin: 8px 0 0;
}

.session-bar span {
  display: block;
  height: 100%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff3b55, #4ef0d5);
  animation: sessionPulse 1.4s ease-in-out infinite;
}

@keyframes sessionPulse {
  0%, 100% { transform: translateX(0); opacity: 0.55; }
  50% { transform: translateX(120%); opacity: 1; }
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(78, 240, 213, 0.15);
}

.captcha-box {
  margin: 14px 0 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: rgba(14, 16, 22, 0.65);
}

.captcha-box canvas {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 8px;
  display: block;
  background: #111;
}

.captcha-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.note {
  min-height: 1.3em;
  margin: 8px 0 0;
  color: var(--amber);
  font-size: 0.9rem;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  color: var(--muted);
  font-size: 0.88rem;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  align-items: center;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.foot a:hover {
  color: var(--ink);
}

.err-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 0;
}

.err-page h1 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  color: var(--red-hot);
}

.err-page p {
  margin: 0 0 18px;
  color: var(--muted);
}

.reg-layout .auth-panel {
  order: -1;
}

@keyframes led-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

@keyframes stage-breathe {
  0%, 100% { transform: scale(1.02); filter: saturate(1); }
  50% { transform: scale(1.05); filter: saturate(1.08); }
}

@keyframes scan-drift {
  from { background-position: 0 0; }
  to { background-position: 0 12px; }
}

@keyframes tile-in {
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .nav {
    justify-content: flex-start;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hall-grid,
  .page-hero,
  .auth-wrap,
  .steps,
  .plans,
  .band {
    grid-template-columns: 1fr;
  }

  .feed-rail {
    max-height: none;
    overflow: visible;
  }

  .feed {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reg-layout .auth-panel {
    order: 0;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 18px, 1280px);
  }

  .feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-name {
    font-size: 1.15rem;
  }
}
