/* 共通スタイル — テーマ色は各フォルダの theme.css で上書き */
:root {
  --bg-dark: #0f172a;
  --bg-slide: #1e293b;
  --accent: #38bdf8;
  --accent-soft: #0ea5e9;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --good: #4ade80;
  --bad: #f87171;
  --warning: #fbbf24;
  --card-bg: #334155;
  --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
}

.presentation {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2.5rem 5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.slide.prev {
  transform: translateX(-40px);
}

.slide-inner {
  max-width: 920px;
  width: 100%;
}

.slide-inner.compact {
  font-size: 0.97rem;
}

.slide-inner.compact h2 {
  margin-bottom: 1rem;
}

.slide-inner.compact .bullet-list {
  font-size: 0.98rem;
  line-height: 1.65;
}

.slide-inner.cover {
  text-align: center;
}

.slide-inner.cover h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.3;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.slide-inner.cover.end h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  -webkit-text-fill-color: var(--text);
  background: none;
}

.badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-soft);
  color: #fff;
  border-radius: 2rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 3rem;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.content-grid.single {
  grid-template-columns: 1fr;
}

@media (max-width: 640px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.card.highlight {
  border: 2px solid var(--accent);
}

.card.warning {
  border-left: 4px solid var(--warning);
}

.card .emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.icon-list {
  list-style: none;
  font-size: 1.1rem;
  line-height: 2;
}

.icon-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.icon-list span {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.bullet-list {
  margin: 1rem 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

.bullet-list li {
  margin-bottom: 0.5rem;
}

.bullet-list.compact {
  margin-top: 0.5rem;
  font-size: 0.98rem;
  line-height: 1.65;
}

.term-list {
  list-style: none;
  margin-top: 0.75rem;
}

.term-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.98rem;
  line-height: 1.6;
}

.term-list li:last-child {
  border-bottom: none;
}

.term-list strong {
  color: var(--accent);
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
  .compare {
    grid-template-columns: 1fr;
  }
}

.compare-bad,
.compare-good {
  padding: 1.25rem;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.6;
}

.compare-bad {
  background: rgba(248, 113, 113, 0.15);
  border: 2px solid var(--bad);
}

.compare-good {
  background: rgba(74, 222, 128, 0.15);
  border: 2px solid var(--good);
}

.tip-box,
.danger-box,
.info-box {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-top: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.tip-box {
  background: rgba(56, 189, 248, 0.15);
  border-left: 4px solid var(--accent);
}

.info-box {
  background: rgba(148, 163, 184, 0.12);
  border-left: 4px solid var(--text-muted);
  margin-top: 0;
  margin-bottom: 1rem;
}

.danger-box {
  background: rgba(248, 113, 113, 0.2);
  border-left: 4px solid var(--bad);
  margin-bottom: 1rem;
}

.footnote {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.steps {
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 1rem 1rem 1rem 4rem;
  margin-bottom: 0.75rem;
  background: var(--card-bg);
  border-radius: 10px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: var(--bg-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
}

.steps li strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.steps li span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.example-box {
  background: var(--card-bg);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--bad);
  font-size: 0.98rem;
  line-height: 1.6;
}

.example-box.good {
  border-left-color: var(--good);
}

.example-box .label {
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.example-box .label.bad { color: var(--bad); }
.example-box .label.good { color: var(--good); }

.summary-list {
  list-style: none;
  font-size: 1.15rem;
  line-height: 2.2;
}

.summary-list li::before {
  content: "✓ ";
  color: var(--good);
  font-weight: bold;
}

.closing {
  margin-top: 2rem;
  font-size: 1.2rem;
  text-align: center;
  color: var(--accent);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.code-inline {
  font-family: "Cascadia Code", "Consolas", "Source Code Pro", monospace;
  font-size: 0.9em;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

.timeline {
  list-style: none;
  border-left: 2px solid var(--accent);
  margin-left: 0.5rem;
  padding-left: 1.25rem;
}

.timeline li {
  position: relative;
  margin-bottom: 0.85rem;
  font-size: 0.97rem;
  line-height: 1.55;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

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

.abbr-note {
  font-size: 0.82em;
  color: var(--text-muted);
  font-weight: normal;
}

.slide-inner.compact .abbr-note {
  font-size: 0.78em;
}

.glossary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.88rem;
  line-height: 1.5;
}

.glossary-grid dt {
  color: var(--accent);
  font-weight: bold;
}

.glossary-grid dd {
  color: var(--text-muted);
  margin: 0 0 0.5rem 0;
}

@media (max-width: 640px) {
  .glossary-grid {
    grid-template-columns: 1fr;
  }
}

.flow-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.flow-chain span {
  background: var(--card-bg);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.flow-chain .arrow {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
}

.controls {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  padding: 0.6rem 1.25rem;
  border-radius: 3rem;
  border: 1px solid var(--card-bg);
}

.controls button {
  background: var(--accent-soft);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}

.controls button:hover {
  background: var(--accent);
}

.controls button:active {
  transform: scale(0.97);
}

.controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.progress {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-width: 4.5rem;
  text-align: center;
}

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-bg);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  width: 0%;
  transition: width 0.35s ease;
}

body:fullscreen .controls,
body:-webkit-full-screen .controls {
  bottom: 2rem;
}

.site-back {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 200;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 2rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--card-bg);
  transition: color 0.2s, border-color 0.2s;
}

.site-back:hover {
  color: var(--text);
  border-color: var(--accent);
}
