/* ===================
   Password Screen
   =================== */
.password-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.password-screen.hidden {
  display: none;
}

.password-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 340px;
  text-align: center;
}

.password-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.password-logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.password-logo span {
  font-size: 1.35rem;
  color: var(--white);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.password-logo b {
  font-weight: 700;
}

.password-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.password-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.15);
}

.password-input::placeholder {
  color: #6e7681;
}

.password-submit {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--accent);
  border: none;
  border-radius: 9999px;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(41, 182, 246, 0.25);
}

.password-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(41, 182, 246, 0.35);
}

.password-submit:active {
  transform: translateY(0);
}

.password-error {
  color: #f85149;
  font-size: 0.8rem;
  margin-top: 1rem;
  margin-bottom: 0;
  min-height: 1.2em;
}

body.locked > *:not(.password-screen) {
  display: none;
}

@media (max-width: 380px) {
  .password-box {
    padding: 2rem 1.5rem 1.75rem;
    border-radius: 12px;
  }

  .password-logo {
    margin-bottom: 1.75rem;
  }

  .password-logo svg {
    width: 24px;
    height: 24px;
  }

  .password-logo span {
    font-size: 1.2rem;
  }

  .password-input,
  .password-submit {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
  }
}

/* ===================
   CSS Variables
   =================== */
:root {
  --bg: #10141D;
  --bg-alt: #141923;
  --bg-light: #1C2329;
  --card: #1E242C;
  --border: #1C2329;
  --accent: #29B6F6;
  --accent-secondary: #E75691;
  --text: #E0E3E8;
  --text-muted: #D1D5DB;
  --white: #ffffff;
  --header-h: 48px;
  --index-w: 190px;
}

/* ===================
   Global Reset
   =================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'IBM Plex Sans', 'IBM Plex Sans JP', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 0;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================
   Header
   =================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(16, 20, 29, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 200;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1.15rem;
  text-decoration: none;
}

.logo-icon {
  flex-shrink: 0;
}

.logo-bold {
  font-weight: 700;
  color: var(--white);
}

.logo-light {
  font-weight: 300;
  color: var(--white);
}

.header-counter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}

.lang-toggle {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.lang-toggle:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.4);
}

.lang-toggle .flag {
  display: block;
  border-radius: 50%;
}

/* ===================
   Side Index
   =================== */
.slide-index {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--index-w);
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  z-index: 150;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0;
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.slide-index.open {
  transform: translateX(0);
}

.index-list {
  list-style: none;
  padding: 0;
  margin: auto 0;
}

.index-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.index-item:hover {
  background: rgba(41, 182, 246, 0.06);
}

.index-item.active {
  background: rgba(41, 182, 246, 0.08);
}

.index-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.index-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}

.index-item.active .index-dot {
  background: var(--accent);
}

.index-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
  line-height: 1.35;
}

.index-item.active .index-label {
  color: var(--white);
  font-weight: 500;
}

.index-number {
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.5;
  flex-shrink: 0;
  width: 1.1rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.index-item.active .index-number {
  color: var(--accent);
  opacity: 0.8;
}

/* Index toggle button */
.index-toggle {
  position: fixed;
  top: calc(var(--header-h) + 0.75rem);
  left: 0.75rem;
  z-index: 160;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.index-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ===================
   Slides Viewport
   =================== */
.slides-viewport {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  display: flex;
  padding: 2rem 1rem;
}

.slide.active {
  opacity: 1;
  visibility: visible;
}

.slide-inner {
  max-width: 700px;
  width: 100%;
  margin: auto;
  padding-bottom: 4rem;
}

.slide-inner--wide {
  max-width: 900px;
}

.slide-inner--center {
  text-align: center;
  padding-bottom: 0;
}

/* ===================
   Slide Controls (bottom)
   =================== */
.slide-controls {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 160;
  background: rgba(16, 20, 29, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
}

.ctrl-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.ctrl-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.ctrl-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.ctrl-btn:disabled:hover {
  color: var(--text-muted);
  border-color: var(--border);
}

.slide-counter {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 3.5rem;
  text-align: center;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ===================
   Typography
   =================== */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.5rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
  font-size: 1rem;
}

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

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

/* ===================
   Hero Section
   =================== */
.hero-frame {
  position: relative;
  padding: 2.5rem 1.5rem;
}

.hero-frame::before,
.hero-frame::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: var(--accent);
  border-style: solid;
}

.hero-frame::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.hero-frame::after {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.hero-divider {
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 0 auto 1.25rem;
}

.hero-author {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  margin-bottom: 0;
}

/* ===================
   Styled Lists
   =================== */
.styled-list {
  list-style: none;
  padding: 0;
}

.styled-list > li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
}

.styled-list > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.styled-list > li:last-child {
  margin-bottom: 0;
}

.styled-list strong {
  color: var(--white);
}

.sub-list {
  list-style: none;
  padding: 0;
  margin-top: 0.35rem;
}

.sub-list > li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.sub-list > li::before {
  content: '';
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
}

/* Agenda List */
.agenda-list {
  list-style: none;
  padding: 0;
}

.agenda-list > li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.65;
}

.agenda-list > li::before {
  content: '-';
  position: absolute;
  left: 0.25rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ===================
   Two-Column Grid
   =================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.col-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.col-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* ===================
   Comparison Grid
   =================== */
.comparison-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.comparison-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.comparison-card--accent {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(41, 182, 246, 0.08);
}

.comparison-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.85rem;
  padding-bottom: 0;
  border-bottom: none;
}

.comparison-list {
  list-style: none;
  padding: 0;
}

.comparison-list > li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.6;
}

.comparison-list > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.comparison-list > li:last-child {
  margin-bottom: 0;
}

.comparison-list strong {
  color: var(--white);
}

/* ===================
   Phase Detail Card
   =================== */
.phase-detail-card {
  margin-bottom: 1.5rem;
}

.phase-block {
  margin-bottom: 1rem;
}

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

.phase-detail-card .sub-list > li {
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.65rem;
}

.phase-detail-card .sub-list > li::before {
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border: none;
}

.phase-deliverable {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
}

/* ===================
   SVG Diagram Images
   =================== */
.diagram-svg {
  margin-top: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
}

.diagram-svg img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===================
   Three-Column Grid
   =================== */
.three-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.example-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.example-card h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.example-card .styled-list > li {
  font-size: 0.9rem;
  margin-bottom: 0.55rem;
}

.example-card .styled-list > li::before {
  top: 0.5em;
  width: 5px;
  height: 5px;
}

.example-card .sub-list > li {
  font-size: 0.85rem;
}

/* ===================
   Four-Column Grid
   =================== */
.four-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.candidate-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.candidate-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.candidate-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.6;
}

.candidate-notes {
  margin-top: 1.5rem;
}

/* ===================
   Section Title Slides
   =================== */
.section-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

/* ===================
   Section Items in Index
   =================== */
.index-item--section {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.index-item--section .index-label {
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent);
}

.index-item--section.active .index-label {
  color: var(--white);
}

.index-item--section .index-dot {
  background: var(--accent);
}

/* ===================
   Slide Closing Note
   =================== */
.slide-closing {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.closing-thanks {
  margin-top: 1rem;
  margin-bottom: 0;
  font-weight: 500;
  color: var(--accent);
}

/* ===================
   Footer (hidden in presentation mode)
   =================== */
footer {
  display: none;
}

/* ===================
   Tablet (640px)
   =================== */
@media (min-width: 640px) {
  header {
    padding: 0 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  h1, .hero-title {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  p {
    font-size: 1.05rem;
  }

  .slide {
    padding: 2.5rem 2rem;
  }

  .hero-frame {
    padding: 3rem 2.5rem;
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 80px;
    height: 80px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-author {
    font-size: 1.35rem;
  }

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .styled-list > li {
    font-size: 1.1rem;
  }

  .agenda-list > li {
    font-size: 1.15rem;
  }

  .two-col {
    grid-template-columns: 1fr 1fr;
  }

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

  .col-card {
    padding: 1.5rem;
  }

  .comparison-card {
    padding: 1.5rem;
  }

  .three-col {
    grid-template-columns: 1fr 1fr;
  }

  .four-col {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===================
   Desktop (768px)
   =================== */
@media (min-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  p {
    font-size: 1.1rem;
  }

  .slide {
    padding: 2.5rem 3rem;
  }
}

/* ===================
   Large Desktop (1024px): show side index
   =================== */
@media (min-width: 1024px) {
  .slide-index {
    transform: translateX(0);
  }

  .slides-viewport {
    left: var(--index-w);
  }

  .index-toggle {
    display: none;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-frame {
    padding: 3.5rem 4rem;
  }

  .hero-frame::before,
  .hero-frame::after {
    width: 100px;
    height: 100px;
  }

  .three-col {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .four-col {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .slide {
    padding: 3rem 4rem;
  }
}

/* ===================
   Scrollbar styling
   =================== */
.slide::-webkit-scrollbar {
  width: 4px;
}

.slide::-webkit-scrollbar-track {
  background: transparent;
}

.slide::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.slide::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.slide-index::-webkit-scrollbar {
  width: 3px;
}

.slide-index::-webkit-scrollbar-track {
  background: transparent;
}

.slide-index::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
