/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --surface: #14141f;
  --surface-2: #1c1c2e;
  --border: #2a2a40;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --accent: #ff3b3b;
  --accent-glow: rgba(255, 59, 59, 0.3);
  --blue: #4488ff;
  --green: #22cc88;
  --purple: #8855ff;
  --orange: #ff8844;
  --yellow: #ffcc44;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

code, pre, .code-block {
  font-family: 'JetBrains Mono', monospace;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 4rem 2rem 3rem;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,59,59,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(68,136,255,0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0f 0%, #10101a 100%);
}

.hero-content { position: relative; max-width: 720px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.accent { color: var(--accent); }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

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

.meta-item {
  font-size: 0.95rem;
  color: var(--text-dim);
}

.meta-icon { margin-right: 0.3rem; }

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 0.9rem 2.5rem;
  border-radius: 50px;
  text-decoration: none !important;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ===== Tab Nav ===== */
.tab-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
}

.tab-nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tab-nav-inner::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 1rem 1.2rem;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ===== Content ===== */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

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

.section-header {
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: 1.8rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
}
.section-header p { color: var(--text-dim); }

.sub-heading {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ===== Timeline ===== */
.timeline { position: relative; }

.tl-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.tl-time {
  flex-shrink: 0;
  width: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--accent);
  padding-top: 1.2rem;
  text-align: right;
}

.tl-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  position: relative;
}

.tl-card-break {
  background: var(--surface-2);
  border-style: dashed;
  text-align: center;
}

.tl-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.tl-dur {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--surface-2);
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.6rem;
}

.tl-card > p { color: var(--text-dim); font-size: 0.92rem; }

.tl-tag {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag-talk { background: rgba(68,136,255,0.15); color: var(--blue); }
.tag-demo { background: rgba(34,204,136,0.15); color: var(--green); }
.tag-qa { background: rgba(136,85,255,0.15); color: var(--purple); }

.tl-details { margin-top: 1rem; }

.detail-block {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
}

.detail-block h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.detail-block ul, .detail-block ol {
  margin-left: 1.2rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.detail-block li { margin-bottom: 0.3rem; }
.detail-block li strong { color: var(--text); }

.detail-block p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.code-block {
  background: #0d0d18;
  color: var(--green);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  overflow-x: auto;
  margin: 0.5rem 0;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-all;
}

code {
  background: var(--surface-2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
}

.steps-list li {
  margin-bottom: 0.8rem !important;
}

/* FAQ */
.faq { margin-top: 0.5rem; }
.faq details {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.faq summary {
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}
.faq summary:hover { color: var(--accent); }
.faq details p {
  padding: 0 1rem 0.8rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===== Skills ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.skill-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.skill-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; }
.skill-card p { font-size: 0.82rem; color: var(--text-dim); margin-bottom: 0.5rem; }

.skill-diff {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.diff-1 { background: rgba(34,204,136,0.15); color: var(--green); }
.diff-2 { background: rgba(255,136,68,0.15); color: var(--orange); }
.diff-3 { background: rgba(136,85,255,0.15); color: var(--purple); }

.skill-note {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--yellow);
  margin-left: 0.3rem;
}

/* Top skills */
.top-skills { display: flex; flex-direction: column; gap: 1rem; }

.top-skill {
  display: flex;
  gap: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
}

.top-rank {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.top-body h4 { margin-bottom: 0.4rem; }
.top-body p { font-size: 0.88rem; color: var(--text-dim); }

/* How-to */
.how-to { display: flex; flex-direction: column; gap: 1rem; }

.how-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.how-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.how-step h4 { margin-bottom: 0.3rem; }
.how-step p { font-size: 0.88rem; color: var(--text-dim); }

/* Placement */
.placement-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.placement-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.placement-row:last-child { border-bottom: none; }

.placement-priority {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: var(--accent);
  color: #fff;
  min-width: 60px;
  text-align: center;
}
.placement-priority.mid { background: var(--blue); }
.placement-priority.low { background: var(--text-dim); }

/* API table */
.api-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.api-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.api-row:last-child { border-bottom: none; }
.api-row strong { min-width: 110px; flex-shrink: 0; }
.api-row a { flex: 1; }
.api-row span { color: var(--text-dim); font-size: 0.82rem; }

/* ===== Security ===== */
.alert-box {
  background: rgba(255,59,59,0.08);
  border: 1px solid rgba(255,59,59,0.25);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
}
.alert-box strong { color: var(--accent); display: block; margin-bottom: 0.4rem; }
.alert-box p { color: var(--text-dim); font-size: 0.92rem; }

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.ov-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
}
.ov-card span {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.ov-card small { color: var(--text-dim); font-weight: 400; }

.copy-sections { margin-top: 2rem; }

.copy-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.copy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.copy-header h3 { font-size: 1rem; }

.copy-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}
.copy-btn:hover { background: var(--border); }
.copy-btn.copied { background: var(--green); color: #000; border-color: var(--green); }

.copy-code {
  background: #0d0d18;
  color: var(--text-dim);
  padding: 1.2rem 1.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.check-example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
}

.check-bad, .check-good {
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.check-bad {
  background: rgba(255,59,59,0.08);
  border: 1px solid rgba(255,59,59,0.2);
}
.check-good {
  background: rgba(34,204,136,0.08);
  border: 1px solid rgba(34,204,136,0.2);
}
.check-bad h4 { color: var(--accent); margin-bottom: 0.5rem; }
.check-good h4 { color: var(--green); margin-bottom: 0.5rem; }
.check-bad code, .check-good code {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}

/* Matrix */
.matrix-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.matrix-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.7fr;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.matrix-row:last-child { border-bottom: none; }
.matrix-header {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ===== Security Guide ===== */
.sec-items { display: flex; flex-direction: column; gap: 1.2rem; }

.sec-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
}
.sec-item h3 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.sec-item ul { margin-left: 1.2rem; color: var(--text-dim); font-size: 0.9rem; margin-bottom: 0.5rem; }
.sec-item li { margin-bottom: 0.3rem; }
.sec-item li strong { color: var(--text); }

.sec-critical { border-left: 4px solid var(--accent); }
.sec-important { border-left: 4px solid var(--orange); }
.sec-recommended { border-left: 4px solid var(--yellow); }

.sec-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}
.badge-critical { background: rgba(255,59,59,0.15); color: var(--accent); }
.badge-important { background: rgba(255,136,68,0.15); color: var(--orange); }
.badge-recommended { background: rgba(255,204,68,0.15); color: var(--yellow); }

/* ===== Tips ===== */
.tips-list { display: flex; flex-direction: column; gap: 1.5rem; }

.tip-card {
  display: flex;
  gap: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.tip-card:hover { border-color: var(--accent); }

.tip-num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent), #ff6644);
  color: #fff;
  font-weight: 900;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.tip-body { flex: 1; min-width: 0; }
.tip-body h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.tip-body > p { color: var(--text-dim); font-size: 0.92rem; margin-bottom: 1rem; }

.tip-example {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
}
.tip-example h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tip-point {
  background: rgba(68,136,255,0.08);
  border: 1px solid rgba(68,136,255,0.2);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: var(--text-dim);
}
.tip-point strong { color: var(--blue); }

@media (max-width: 640px) {
  .tip-card { flex-direction: column; gap: 0.8rem; }
  .tip-num { width: 40px; height: 40px; font-size: 1.1rem; }
}

/* ===== Links ===== */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-decoration: none !important;
  transition: border-color 0.2s, transform 0.2s;
}
.link-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.link-icon { font-size: 1.5rem; }
.link-card strong { color: var(--text); font-size: 0.95rem; }
.link-card span { color: var(--text-dim); font-size: 0.82rem; }

.cta-link {
  border-color: var(--accent) !important;
  background: rgba(255,59,59,0.05);
}
.cta-link:hover {
  border-color: var(--accent) !important;
  background: rgba(255,59,59,0.1);
}

/* Quickstart */
.quickstart { display: flex; flex-direction: column; gap: 1rem; }

.qs-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.qs-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--green);
  color: #000;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.qs-step strong { display: block; margin-bottom: 0.3rem; }

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.site-footer p { margin-bottom: 0.3rem; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .hero { padding: 3rem 1.2rem 2rem; }
  .hero h1 { font-size: 1.6rem; }
  .content { padding: 1.5rem 1rem 3rem; }
  .tl-item { flex-direction: column; gap: 0; }
  .tl-time { text-align: left; padding: 0 0 0.3rem; width: auto; }
  .tl-tag { position: static; margin-bottom: 0.5rem; display: inline-block; }
  .check-example { grid-template-columns: 1fr; }
  .matrix-row { grid-template-columns: 1fr; gap: 0.2rem; font-size: 0.8rem; }
  .matrix-header { display: none; }
  .top-skill { flex-direction: column; gap: 0.8rem; }
  .skills-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .overview-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .link-grid { grid-template-columns: 1fr; }
  .api-row { flex-direction: column; gap: 0.3rem; }
  .api-row strong { min-width: auto; }
  .placement-row { flex-direction: column; gap: 0.3rem; align-items: flex-start; }
}

/* Download buttons for seminar skills */
.skill-card.skill-download {
  border-color: var(--green);
  position: relative;
}
.skill-card.skill-download::before {
  content: "🎁 セミナー配布";
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--green);
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.download-btn {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.5rem 1.2rem;
  background: var(--green);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: opacity 0.2s;
}
.download-btn:hover {
  opacity: 0.85;
}

/* Chat log tab */
.chat-log {
  max-height: 70vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--surface);
  font-size: 0.85rem;
  line-height: 1.6;
}
.chat-msg {
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}
.chat-msg.chat-speaker {
  background: rgba(255,59,59,0.06);
  margin: 0 -1rem;
  padding: 0.4rem 1rem;
  border-radius: 4px;
}
.chat-time {
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  min-width: 3.5rem;
  flex-shrink: 0;
}
.chat-name {
  color: var(--blue);
  font-weight: 600;
  min-width: 6rem;
  flex-shrink: 0;
}
.chat-speaker .chat-name {
  color: var(--accent);
}
.chat-text {
  color: var(--text);
  flex: 1;
  word-break: break-word;
}
.chat-text a {
  color: var(--blue);
  text-decoration: underline;
}
.chat-continuation {
  padding-left: 10rem;
  color: var(--text);
  word-break: break-word;
}
@media (max-width: 600px) {
  .chat-msg { flex-direction: column; gap: 0.1rem; }
  .chat-continuation { padding-left: 1rem; }
}
