.ctf-shell {
  --background: #071018;
  --foreground: #d7f6ff;
  --cream: #071018;
  --card: #0c1624;
  --secondary: #102033;
  --muted: #7f9aaa;
  --pop: #39f3ff;
  --pop-foreground: #041016;
  --pop-2: #39f3ff;
  --pop-3: #ff2bd6;
  --font-sans: "Noto Sans JP", ui-sans-serif, sans-serif;
  --font-display: "Chakra Petch", "Noto Sans JP", sans-serif;
  --font-script: "Share Tech Mono", ui-monospace, monospace;
  background:
    radial-gradient(ellipse at 80% -10%, rgba(255, 43, 214, 0.16), transparent 42%),
    radial-gradient(ellipse at 10% 0%, rgba(57, 243, 255, 0.12), transparent 36%),
    #071018;
  color: var(--foreground);
}

.ctf-shell::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: repeating-linear-gradient(
    to bottom,
    rgba(215, 246, 255, 0.045),
    rgba(215, 246, 255, 0.045) 1px,
    transparent 1px,
    transparent 4px
  );
}

.ctf-shell .hero-bg {
  display: none;
}

.ctf-shell .blog-hero {
  background-image:
    linear-gradient(rgba(57, 243, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 243, 255, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
}

.ctf-shell .blog-hero h1 {
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgba(57, 243, 255, 0.28);
}

.ctf-shell .eyebrow {
  color: #39f3ff;
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ctf-shell .heading-bar {
  border-radius: 0;
  background: linear-gradient(90deg, #39f3ff, #ff2bd6);
  box-shadow: 0 0 12px rgba(57, 243, 255, 0.45);
}

.ctf-shell .blog-lead,
.ctf-shell .ctf-note,
.ctf-shell .ctf-status {
  color: #8eb4c4;
}

.ctf-shell .site-header,
.ctf-shell .site-header.is-scrolled,
.ctf-shell .site-header.is-open {
  border-bottom: 1px solid rgba(57, 243, 255, 0.35);
  background: rgba(7, 16, 24, 0.92);
  backdrop-filter: blur(14px);
}

.ctf-shell .logo img,
.ctf-shell .footer-logo img {
  border-radius: 2px;
  border-color: #39f3ff;
  background: #071018;
}

.ctf-shell .nav-desktop a,
.ctf-shell .footer-nav a,
.ctf-shell .footer-logo span,
.ctf-shell .site-footer p {
  color: #8eb4c4;
}

.ctf-shell .nav-desktop a:hover,
.ctf-shell .nav-desktop a[aria-current="page"],
.ctf-shell .footer-nav a:hover {
  color: #39f3ff;
}

.ctf-shell .header-cta,
.ctf-shell .btn-pop,
.ctf-shell .btn-ghost,
.ctf-shell .header-x,
.ctf-shell .menu-toggle {
  border-radius: 2px;
  box-shadow: none;
}

.ctf-shell .header-cta,
.ctf-shell .btn-pop {
  border-color: #39f3ff;
  background: transparent;
  color: #39f3ff;
  box-shadow: 0 0 16px rgba(57, 243, 255, 0.18);
}

.ctf-shell .header-cta:hover,
.ctf-shell .btn-pop:hover {
  transform: none;
  background: #39f3ff;
  color: #041016;
  box-shadow: 0 0 22px rgba(57, 243, 255, 0.4);
}

.ctf-shell .btn-ghost {
  border-color: rgba(255, 43, 214, 0.75);
  background: transparent;
  color: #ff8ae8;
}

.ctf-shell .btn-ghost:hover {
  background: rgba(255, 43, 214, 0.12);
}

.ctf-shell .header-x,
.ctf-shell .menu-toggle {
  border-color: #39f3ff;
  background: transparent;
  color: #39f3ff;
}

.ctf-shell .header-x:hover {
  transform: none;
  background: rgba(57, 243, 255, 0.12);
}

.ctf-shell .burger span,
.ctf-shell .burger-close span {
  background: #39f3ff;
}

.ctf-shell .nav-mobile {
  border-top: 1px solid rgba(57, 243, 255, 0.35);
  background: #071018;
}

.ctf-shell .site-footer {
  border-top: 1px solid rgba(57, 243, 255, 0.28);
  background: #05080e;
}

.ctf-shell .section-cream {
  background: transparent;
}

.ctf-shell .section-border {
  border-top: 1px solid rgba(57, 243, 255, 0.28);
}

.ctf-shell .section-cream + .section-cream {
  padding-top: 0;
}

.ctf-shell .ctf-answer-link {
  display: grid;
  gap: 0.35rem 1.5rem;
  max-width: 52rem;
  margin: 0 auto 2.75rem;
  padding: 1.25rem 1.4rem;
  border: 1px dashed #ff2bd6;
  border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 43, 214, 0.16), rgba(255, 43, 214, 0.04));
  color: inherit;
  text-decoration: none;
  box-shadow: 0 0 24px rgba(255, 43, 214, 0.12);
}

.ctf-shell .ctf-answer-link:hover {
  border-style: solid;
  background: rgba(255, 43, 214, 0.16);
  box-shadow: 0 0 28px rgba(255, 43, 214, 0.28);
}

.ctf-shell .ctf-answer-kicker {
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #ff8ae8;
}

.ctf-shell .ctf-answer-title {
  font-family: "Chakra Petch", var(--font-display), sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
  color: #ffd6f6;
}

.ctf-shell .ctf-answer-copy {
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #f3d7ee;
}

.ctf-shell .ctf-answer-go {
  justify-self: start;
  margin-top: 0.7rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid #ff2bd6;
  border-radius: 2px;
  background: #ff2bd6;
  color: #1a0614;
  font-family: "Chakra Petch", var(--font-display), sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ctf-shell .ctf-answer-link:hover .ctf-answer-go {
  background: #ff8ae8;
}

.ctf-shell .ctf-list-label {
  margin: 0 0 1.25rem;
  text-align: center;
  font-family: "Chakra Petch", var(--font-display), sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: #39f3ff;
}

.ctf-shell .catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(16rem, 24rem));
  justify-content: center;
}

@media (min-width: 720px) {
  .ctf-shell .ctf-answer-link {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 1.4rem 1.6rem;
  }

  .ctf-shell .ctf-answer-kicker,
  .ctf-shell .ctf-answer-title,
  .ctf-shell .ctf-answer-copy {
    grid-column: 1;
  }

  .ctf-shell .ctf-answer-go {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }
}

.ctf-shell .catalog-card {
  border-radius: 2px;
  border: 1px solid rgba(57, 243, 255, 0.4);
  background: rgba(8, 18, 32, 0.88);
  box-shadow: 0 0 24px rgba(57, 243, 255, 0.08);
}

.ctf-shell a.catalog-card:hover {
  transform: none;
  border-color: #39f3ff;
  box-shadow: 0 0 28px rgba(57, 243, 255, 0.22);
}

.ctf-shell .catalog-thumb {
  border-bottom: 1px solid rgba(57, 243, 255, 0.28);
  background: #05080e;
}

.ctf-shell .blog-tag {
  border-radius: 2px;
  border: 1px solid rgba(57, 243, 255, 0.55);
  background: transparent;
  color: #39f3ff;
}

.ctf-shell .ctf-panel {
  max-width: 44rem;
  margin: 0 auto;
}

.ctf-shell .ctf-panel + .ctf-panel {
  margin-top: 2rem;
}

.ctf-shell .ctf-panel[hidden] {
  display: none;
}

.ctf-shell .ctf-copy {
  margin: 1.25rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
}

.ctf-shell .ctf-copy code,
.ctf-shell .ctf-flag {
  font-family: "Share Tech Mono", ui-monospace, monospace;
}

.ctf-shell .ctf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.ctf-shell .ctf-machine {
  margin-top: 1.5rem;
  padding: 0.85rem;
  border: 1px solid rgba(57, 243, 255, 0.55);
  border-radius: 2px;
  background: #050b12;
  box-shadow:
    inset 0 0 24px rgba(57, 243, 255, 0.08),
    0 0 24px rgba(255, 43, 214, 0.12);
}

.ctf-shell .slot-reels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.4rem;
}

.ctf-shell .slot-reel {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(57, 243, 255, 0.25);
  border-radius: 2px;
  background: #0a121c;
  color: #9fd7e4;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  font-weight: 400;
}

.ctf-shell .slot-reel.is-seven {
  border-color: #39f3ff;
  background: rgba(57, 243, 255, 0.12);
  color: #39f3ff;
  text-shadow: 0 0 10px rgba(57, 243, 255, 0.8);
}

.ctf-shell .slot-reel.is-spinning {
  color: transparent;
  background: repeating-linear-gradient(
    180deg,
    #0a121c 0 14%,
    rgba(57, 243, 255, 0.2) 14% 22%
  );
  background-size: 100% 220%;
  animation: ctf-spin 0.16s linear infinite;
}

@keyframes ctf-spin {
  to {
    background-position: 0 22%;
  }
}

.ctf-shell .ctf-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.ctf-shell .ctf-form label {
  display: grid;
  gap: 0.4rem;
  font-family: "Share Tech Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.ctf-shell .input-mono {
  border-radius: 2px;
  border-color: rgba(57, 243, 255, 0.45);
  background: #050b12;
  color: #d7f6ff;
}

.ctf-shell .input-mono:focus {
  box-shadow: 0 0 0 1px #39f3ff, 0 0 16px rgba(57, 243, 255, 0.25);
}

.ctf-shell .ctf-note,
.ctf-shell .ctf-status {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 1.7;
}

.ctf-shell .ctf-status[data-state="error"] {
  color: #ff8ae8;
  font-weight: 700;
}

.ctf-shell .ctf-flag {
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid #39f3ff;
  border-radius: 2px;
  background: rgba(57, 243, 255, 0.08);
  box-shadow: 0 0 18px rgba(57, 243, 255, 0.16);
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-all;
}

@media (min-width: 720px) {
  .ctf-shell .slot-reels {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ctf-shell::before,
  .ctf-shell .slot-reel.is-spinning {
    animation: none;
  }

  .ctf-shell::before {
    display: none;
  }
}

.ctf-shell .ctf-guide {
  border-top: 1px solid rgba(57, 243, 255, 0.28);
}

.ctf-shell .ctf-guide h2,
.ctf-shell .ctf-guide h3 {
  font-family: "Chakra Petch", var(--font-display), sans-serif;
  letter-spacing: 0.04em;
}

.ctf-shell .ctf-guide h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: #d7f6ff;
}

.ctf-shell .ctf-guide h3 {
  margin: 2.25rem 0 0;
  font-size: 1.2rem;
  color: #39f3ff;
}

.ctf-shell .ctf-guide p,
.ctf-shell .ctf-guide li {
  color: #c5e4ef;
  font-size: 0.95rem;
  line-height: 1.85;
}

.ctf-shell .ctf-guide p {
  margin: 1.1rem 0 0;
}

.ctf-shell .ctf-guide a {
  color: #39f3ff;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.ctf-shell .ctf-guide ol {
  margin: 0.8rem 0 0;
  padding-left: 1.3rem;
}

.ctf-shell .ctf-guide li + li {
  margin-top: 0.4rem;
}

.ctf-shell .ctf-guide .faq-list {
  margin-top: 1.25rem;
}

.ctf-shell .ctf-guide .faq-item {
  border-radius: 2px;
  border: 1px solid rgba(57, 243, 255, 0.4);
  background: rgba(8, 18, 32, 0.88);
  box-shadow: none;
}

.ctf-shell .ctf-guide .faq-item.is-open {
  border-color: #39f3ff;
  box-shadow: 0 0 18px rgba(57, 243, 255, 0.12);
}

.ctf-shell .ctf-guide .faq-q,
.ctf-shell .ctf-guide .faq-a p {
  color: #d7f6ff;
}

.ctf-shell .ctf-guide .q-mark,
.ctf-shell .ctf-guide .a-mark {
  color: #ff8ae8;
}

.ctf-shell .ctf-guide .faq-toggle {
  border-radius: 2px;
  border-color: rgba(57, 243, 255, 0.55);
  background: transparent;
  color: #39f3ff;
}

.ctf-shell .ctf-guide .faq-item.is-open .faq-toggle {
  background: rgba(57, 243, 255, 0.14);
}
