:root {
  --bg: #050510;
  --bg-card: rgba(8, 15, 40, 0.85);
  --cyan: #00d4ff;
  --purple: #bf00ff;
  --pink: #ff0080;
  --green: #00ff9d;
  --text: #e8f2fa;
  --muted: #9bbdd4;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
}

/* Grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}

/* ── NAV ───────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(5,5,16,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,212,255,0.18);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 0.2rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  border-radius: 3px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--cyan);
  border-color: rgba(0,212,255,0.25);
  background: rgba(0,212,255,0.05);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cyan);
  border-radius: 1px;
}

/* mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: rgba(5,5,16,0.97);
  border-bottom: 1px solid rgba(0,212,255,0.15);
  z-index: 999;
  padding: 1rem 1.5rem;
}

.nav-drawer.open { display: block; }

.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.nav-drawer a {
  display: block;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  border-left: 2px solid rgba(0,212,255,0.3);
}

.nav-drawer a:hover { color: var(--cyan); border-left-color: var(--cyan); }

/* ── LAYOUT ─────────────────────── */
main {
  position: relative;
  z-index: 1;
  padding-top: 56px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
}

.neon-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  opacity: 0.25;
}

/* ── SECTION HEADER ─────────────── */
.sh {
  margin-bottom: 0.9rem;
}

.sh-tag {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.18em;
  margin-bottom: 0.4rem;
  opacity: 0.75;
}

.sh-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.95rem, 2.5vw, 1.3rem);
  font-weight: 700;
  color: #fff;
  padding-left: 0.9rem;
  position: relative;
}

.sh-title::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 70%;
  background: var(--cyan);
  border-radius: 2px;
}

/* ── HERO ────────────────────────── */
#hero {
  text-align: center;
  padding: 1.5rem 1.5rem 1rem;
  max-width: 100%;
}

.hero-badge {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.5);
  padding: 0.25rem 0.9rem;
  border-radius: 20px;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
}

.hero-org {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.4rem, 5vw, 2.6rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 0.2rem;
}

.hero-title .accent { color: var(--cyan); }

.hero-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  font-weight: 400;
  color: var(--cyan);
  letter-spacing: 0.3em;
  margin-bottom: 0.9rem;
}

.hero-subtitle::before,
.hero-subtitle::after {
  content: '';
  display: block;
  width: 3rem;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--cyan));
}

.hero-subtitle::after {
  background: linear-gradient(to left, transparent, var(--cyan));
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  margin-bottom: 1rem;
}

.hero-meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.hero-meta-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.hero-meta-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--cyan);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-cyan {
  color: var(--cyan);
  border: 1px solid var(--cyan);
  background: rgba(0,212,255,0.08);
}

.btn-cyan:hover { background: rgba(0,212,255,0.16); }

.btn-purple {
  color: var(--purple);
  border: 1px solid var(--purple);
  background: rgba(191,0,255,0.07);
}

.btn-purple:hover { background: rgba(191,0,255,0.14); }

/* ── CARDS (generic) ─────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.14);
  border-radius: 8px;
  padding: 1.4rem;
  backdrop-filter: blur(8px);
}

/* ── NOTICE ──────────────────────── */
#notice {
  background: rgba(255,0,128,0.03);
}

.notice-bar {
  background: var(--bg-card);
  border: 1px solid rgba(255,0,128,0.3);
  border-radius: 8px;
  padding: 0.8rem 1.1rem;
}

.notice-bar .badge {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.68rem;
  background: rgba(255,0,128,0.12);
  color: var(--pink);
  border: 1px solid rgba(255,0,128,0.3);
  padding: 0.18rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}

.notice-bar p { font-size: 0.88rem; line-height: 1.8; }

/* ── SURVEYS ─────────────────────── */
.survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.survey-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.14);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}

.status-badge {
  display: inline-block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.status-open   { background: rgba(255,0,128,0.12); color: var(--pink); border: 1px solid rgba(255,0,128,0.3); }
.status-pending{ background: rgba(122,159,191,0.08); color: var(--muted); border: 1px solid rgba(122,159,191,0.2); }

.survey-card h3 { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.4rem; }
.survey-card p  { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }
.survey-card .btn { margin-top: 0.8rem; font-size: 0.75rem; padding: 0.45rem 1rem; }

/* ── INFO DL ─────────────────────── */
.info-dl {
  border: 1px solid rgba(0,212,255,0.13);
  border-radius: 8px;
  overflow: hidden;
}

.info-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(0,212,255,0.08);
}

.info-row:last-child { border-bottom: none; }

.info-row:nth-child(odd) { background: rgba(0,212,255,0.03); }

.info-row dt {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--cyan);
  white-space: nowrap;
  flex-shrink: 0;
  width: 9rem;
}

.info-row dd {
  font-size: 0.86rem;
  line-height: 1.6;
}

/* ── TIMELINE ────────────────────── */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--cyan), var(--purple), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 0.6rem;
}

.tl-dot {
  position: absolute;
  left: -2.15rem;
  top: 0.7rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  z-index: 1;
}

.tl-item.reserve .tl-dot { border-color: var(--muted); }

.tl-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.14);
  border-radius: 8px;
  overflow: hidden;
}

.tl-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: rgba(0,212,255,0.04);
  border-bottom: 1px solid rgba(0,212,255,0.1);
  cursor: pointer;
  user-select: none;
}

.tl-item.reserve .tl-head { background: rgba(122,159,191,0.03); }

.sess-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  background: var(--cyan);
  color: var(--bg);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.tl-item.reserve .sess-badge { background: var(--muted); }

.tl-date {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan);
  flex-shrink: 0;
}

.tl-item.reserve .tl-date { color: var(--muted); }

.tl-label {
  font-size: 0.85rem;
  font-weight: 400;
  flex: 1;
  min-width: 0;
}

.tl-arrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
}

.tl-card.open .tl-arrow { transform: rotate(180deg); display: inline-block; }

.tl-body {
  max-height: 0;
  overflow: hidden;
}

.tl-card.open .tl-body { max-height: 800px; }

.tl-body-inner {
  padding: 0.7rem 1rem;
}

.tl-body-inner ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }

.tl-body-inner li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.84rem;
  line-height: 1.6;
}

.tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 0.18rem;
}

.tag-w { background: rgba(0,255,157,0.12); color: var(--green); border: 1px solid rgba(0,255,157,0.25); }
.tag-e { background: rgba(191,0,255,0.1); color: var(--purple); border: 1px solid rgba(191,0,255,0.25); }

.tl-break {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.tl-break::before,
.tl-break::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(122,159,191,0.2);
}

/* ── TEXTBOOK ────────────────────── */
.tb-note {
  background: rgba(191,0,255,0.05);
  border: 1px solid rgba(191,0,255,0.2);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
}

.tb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.ch-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid rgba(191,0,255,0.14);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.ch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(191,0,255,0.22);
  border-color: rgba(191,0,255,0.45);
}

.ch-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  color: var(--purple);
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.ch-title {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  display: block;
}

.ch-card:hover .ch-title {
  color: var(--purple);
}

/* ── RESOURCES ───────────────────── */

/* ── CONTACT ─────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,212,255,0.13);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
}

.contact-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  letter-spacing: 0.07em;
}

.contact-card p { font-size: 0.86rem; color: var(--muted); line-height: 1.8; }

.contact-email {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.45rem 0.9rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: var(--cyan);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 4px;
  text-decoration: none;
  word-break: break-all;
}

.contact-email:hover { background: rgba(0,212,255,0.07); }

/* ── FOOTER ──────────────────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(0,212,255,0.1);
  background: rgba(5,5,16,0.95);
  text-align: center;
  padding: 1.2rem 1.5rem;
}

.footer-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
}

.footer-note { font-size: 0.78rem; color: var(--muted); line-height: 1.8; margin-bottom: 0.8rem; }
.footer-copy { font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; color: rgba(122,159,191,0.4); }

/* ── SCROLLBAR ───────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.25); border-radius: 3px; }

/* ── LINKS ───────────────────────── */
a { color: var(--cyan); }

/* ── RESPONSIVE ──────────────────── */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  section.container { padding: 2rem 1rem; }

  .hero-title { font-size: clamp(1.3rem, 7vw, 2rem); }

  .survey-grid,
  .res-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .tb-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .timeline { padding-left: 2rem; }
  .tl-dot { left: -1.7rem; }

  .tl-date { font-size: 0.72rem; }
  .tl-label { font-size: 0.8rem; }
}

@media (max-width: 400px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; text-align: center; }
}

/* ── THEME TOGGLE BUTTON ─────────── */
.theme-toggle {
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 20px;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.05em;
  line-height: 1;
}

.theme-toggle:hover { background: rgba(0,212,255,0.15); }

/* ── LIGHT MODE ──────────────────── */
html[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-card: #ffffff;
  --cyan: #0088bb;
  --purple: #7700bb;
  --pink: #cc0044;
  --green: #007744;
  --text: #1a2d3e;
  --muted: #5577aa;
}

html[data-theme="light"] body { background: #e8eaed; color: #1a2d3e; }

html[data-theme="light"] body::before { display: none; }

html[data-theme="light"] nav {
  background: rgba(244,247,251,0.95);
  border-bottom-color: rgba(0,136,187,0.2);
}

html[data-theme="light"] .nav-logo { text-shadow: none; }
html[data-theme="light"] .nav-links a { color: #5577aa; }

html[data-theme="light"] .nav-drawer {
  background: rgba(244,247,251,0.98);
  border-bottom-color: rgba(0,136,187,0.15);
}

html[data-theme="light"] .nav-drawer a {
  color: #1a2d3e;
  border-left-color: rgba(0,136,187,0.25);
}

html[data-theme="light"] .theme-toggle {
  background: rgba(0,136,187,0.08);
  border-color: rgba(0,136,187,0.3);
  color: #0088bb;
}

html[data-theme="light"] .hero-badge { border-color: rgba(0,136,187,0.5); }
html[data-theme="light"] .hero-org { color: #5577aa; }
html[data-theme="light"] .hero-title { color: #1a2d3e; }
html[data-theme="light"] .hero-subtitle { color: #0088bb; }
html[data-theme="light"] .hero-meta-label { color: #5577aa; }
html[data-theme="light"] .hero-meta-value { color: #0088bb; }

html[data-theme="light"] .sh-title { color: #1a2d3e; }
html[data-theme="light"] .sh-title::before { background: #0088bb; }

html[data-theme="light"] .neon-divider { opacity: 0.12; }

html[data-theme="light"] .notice-bar {
  background: #fff;
  border-color: rgba(204,0,68,0.25);
}

html[data-theme="light"] .notice-bar .badge {
  background: rgba(204,0,68,0.08);
  border-color: rgba(204,0,68,0.3);
}

html[data-theme="light"] .survey-card {
  background: #fff;
  border-color: rgba(0,136,187,0.18);
}

html[data-theme="light"] .status-open {
  background: rgba(204,0,68,0.08);
  border-color: rgba(204,0,68,0.3);
}

html[data-theme="light"] .status-pending {
  background: rgba(85,119,170,0.07);
  border-color: rgba(85,119,170,0.2);
  color: #5577aa;
}

html[data-theme="light"] .info-dl { border-color: rgba(0,136,187,0.18); }
html[data-theme="light"] .info-row { border-bottom-color: rgba(0,136,187,0.08); }
html[data-theme="light"] .info-row:nth-child(odd) { background: rgba(0,136,187,0.03); }
html[data-theme="light"] .info-row dd { color: #1a2d3e; }

html[data-theme="light"] .timeline::before {
  background: linear-gradient(to bottom, transparent, #0088bb, #7700bb, transparent);
}

html[data-theme="light"] .tl-dot { background: #f4f7fb; }
html[data-theme="light"] .tl-item.reserve .tl-dot { border-color: #5577aa; }

html[data-theme="light"] .tl-card {
  background: #fff;
  border-color: rgba(0,136,187,0.18);
}

html[data-theme="light"] .tl-head {
  background: rgba(0,136,187,0.04);
  border-bottom-color: rgba(0,136,187,0.1);
}

html[data-theme="light"] .tl-item.reserve .tl-head { background: rgba(85,119,170,0.03); }
html[data-theme="light"] .tl-label { color: #1a2d3e; }
html[data-theme="light"] .tl-arrow { color: #5577aa; }
html[data-theme="light"] .tl-body-inner li { color: #1a2d3e; }

html[data-theme="light"] .tag-w {
  background: rgba(0,119,68,0.08);
  color: #007744;
  border-color: rgba(0,119,68,0.25);
}

html[data-theme="light"] .tag-e {
  background: rgba(119,0,187,0.07);
  color: #7700bb;
  border-color: rgba(119,0,187,0.2);
}

html[data-theme="light"] .tb-note {
  background: rgba(119,0,187,0.04);
  border-color: rgba(119,0,187,0.18);
}

html[data-theme="light"] .ch-card {
  background: #fff;
  border-color: rgba(119,0,187,0.14);
}

html[data-theme="light"] .ch-card:hover {
  box-shadow: 0 8px 24px rgba(119,0,187,0.14);
  border-color: rgba(119,0,187,0.38);
}

html[data-theme="light"] .ch-title { color: #1a2d3e; }

html[data-theme="light"] .contact-card {
  background: #fff;
  border-color: rgba(0,136,187,0.18);
}

html[data-theme="light"] .contact-card p { color: #5577aa; }

html[data-theme="light"] .contact-email {
  color: #0088bb;
  border-color: rgba(0,136,187,0.3);
}

html[data-theme="light"] footer {
  background: rgba(244,247,251,0.98);
  border-top-color: rgba(0,136,187,0.12);
}

html[data-theme="light"] .footer-logo { text-shadow: none; color: #0088bb; }
html[data-theme="light"] .footer-note { color: #5577aa; }
html[data-theme="light"] .footer-copy { color: rgba(85,119,170,0.5); }
