/*
 * グローヴエンターテイメント様 夏インターンIG広告提案
 * TASTE: スタイリッシュ（ディープネイビー×スカイブルー）
 */
:root {
  /* ── カラー ── */
  --c-base:          #0F172A;
  --c-main:          #F1F5F9;
  --c-accent:        #38BDF8;
  --c-sub:           #94A3B8;
  --c-border:        rgba(255, 255, 255, 0.08);
  --c-surface:       #1E293B;
  --c-bridge-bg:     #38BDF8;
  --c-bridge-text:   #0F172A;

  /* ── タイポグラフィ ── */
  --font-head:       'Noto Sans JP', 'Inter', sans-serif;
  --font-body:       'Noto Sans JP', 'Inter', sans-serif;

  /* ── UIオーバーレイ用（px系・ライトモーダル） ── */
  --c-card:          #FFFFFF;
  --c-text:          #0F172A;
  --c-text-muted:    #64748B;
  --c-accent-soft:   #E0F2FE;
  --shadow-soft:     0 12px 40px rgba(0, 0, 0, 0.35);
}

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

html, body {
  width: 100%;
  height: 100%;
  background: var(--c-base);
  font-family: var(--font-body);
  color: var(--c-main);
  overflow: hidden;
}

:lang(ja) { line-break: strict; }

/* ============ ステージ / スライド ============ */
.slide-stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background: var(--c-base);
}

.deck {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-width: calc(100vh * 16 / 9);
  max-height: calc(100vw * 9 / 16);
  margin: auto;
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  container-type: inline-size;
  overflow: hidden;
  background: var(--c-base);
}

.slide.active {
  display: flex;
  flex-direction: column;
  animation: slideFade 0.25s ease;
}

@keyframes slideFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.slide-content {
  width: 100%;
  height: 100%;
  padding: 4.2cqw 7cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5cqw;
}

/* ============ タイポグラフィ（cqw固定スケール） ============ */
.slide-hero    { font-size: 7.2cqw; font-weight: 900; line-height: 1.2;  letter-spacing: 0.02em; word-break: normal; text-wrap: balance; }
.slide-h1      { font-size: 4.8cqw; font-weight: 700; line-height: 1.2;  letter-spacing: 0.02em; word-break: normal; text-wrap: balance; }
.slide-h2      { font-size: 3.2cqw; font-weight: 700; line-height: 1.25; letter-spacing: 0.02em; word-break: normal; text-wrap: balance; }
.slide-h3      { font-size: 2.2cqw; font-weight: 600; line-height: 1.25; letter-spacing: 0.02em; text-wrap: balance; }
.slide-title   { font-size: 2cqw;   font-weight: 400; line-height: 1.6;  letter-spacing: 0.02em; text-wrap: pretty; }
.slide-body    { font-size: 1.6cqw; font-weight: 400; line-height: 1.6;  letter-spacing: 0.02em; text-wrap: pretty; }
.slide-caption { font-size: 1.1cqw; font-weight: 300; line-height: 1.6;  letter-spacing: 0.05em; color: var(--c-sub); }
.slide-micro   { font-size: 0.9cqw; font-weight: 300; line-height: 1.6;  letter-spacing: 0.05em; color: var(--c-sub); }
.slide-number  { font-size: 9.6cqw; font-weight: 900; line-height: 1;    color: var(--c-accent); }

.text-accent { color: var(--c-accent); }
.quote-copy {
  font-size: 1.9cqw;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--c-accent);
}
.text-sub    { color: var(--c-sub); }
.nowrap-label { white-space: nowrap; }

/* ============ 見出しまわり ============ */
.slide-header { display: flex; flex-direction: column; gap: 1.2cqw; }

.eyebrow {
  font-size: 1.1cqw;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--c-accent);
}

.headline {
  position: relative;
  padding-bottom: 1.2cqw;
}
.headline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 6cqw;
  height: 0.3cqw;
  background: var(--c-accent);
}

/* ============ グリッド / カード ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5cqw; align-items: stretch; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5cqw; align-items: stretch; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; align-items: stretch; }

.card {
  background: var(--c-surface);
  border: 0.1cqw solid var(--c-border);
  border-radius: 0.8cqw;
  padding: 2.2cqw;
  display: flex;
  flex-direction: column;
  gap: 1.2cqw;
  height: 100%;
}
.card--accent { border: 0.2cqw solid var(--c-accent); }

.card-label {
  font-size: 1.15cqw;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-accent);
}

.stat-lg {
  font-size: 5.4cqw;
  font-weight: 900;
  line-height: 1.1;
  color: var(--c-accent);
}
.stat-md {
  font-size: 3.4cqw;
  font-weight: 900;
  line-height: 1.15;
  color: var(--c-main);
}

/* ============ フロー ============ */
.flow {
  display: flex;
  align-items: stretch;
  gap: 1.2cqw;
}
.flow-step {
  flex: 1;
  background: var(--c-surface);
  border: 0.1cqw solid var(--c-border);
  border-radius: 0.8cqw;
  padding: 1.8cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8cqw;
}
.flow-step--accent { border: 0.2cqw solid var(--c-accent); }
.flow-arrow {
  align-self: center;
  width: 2.4cqw;
  height: 2.4cqw;
  flex: none;
  color: var(--c-accent);
}

/* ============ チップ ============ */
.chip-row { display: flex; flex-wrap: wrap; gap: 1.2cqw; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.7cqw 1.6cqw;
  border: 0.1cqw solid var(--c-border);
  border-radius: 0.8cqw;
  background: var(--c-surface);
  font-size: 1.5cqw;
  white-space: nowrap;
}

/* ============ タイムライン ============ */
.timeline { display: flex; flex-direction: column; gap: 1.4cqw; }
.tl-row {
  display: grid;
  grid-template-columns: 13cqw 1fr;
  gap: 1.5cqw;
  align-items: center;
}
.tl-name { font-size: 1.3cqw; color: var(--c-sub); text-align: right; }
.tl-track { position: relative; height: 2.8cqw; }
.tl-bar {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 0.8cqw;
  background: rgba(56, 189, 248, 0.22);
  border: 0.1cqw solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05cqw;
  color: var(--c-main);
  white-space: nowrap;
  padding: 0 0.8cqw;
}
.tl-bar--accent {
  background: var(--c-accent);
  color: var(--c-bridge-text);
  font-weight: 700;
  border: none;
}
.tl-axis {
  position: relative;
  height: 1.6cqw;
  border-top: 0.05cqw solid rgba(255, 255, 255, 0.25);
}
.tl-axis-label {
  position: absolute;
  top: 0.3cqw;
  transform: translateX(-50%);
  font-size: 1cqw;
  color: var(--c-sub);
  white-space: nowrap;
}
.tl-marks { position: relative; height: 5.6cqw; }
.tl-mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4cqw;
  font-size: 1cqw;
  color: var(--c-main);
  white-space: nowrap;
}
.tl-mark::before {
  content: "";
  width: 0.6cqw;
  height: 0.6cqw;
  border-radius: 50%;
  background: var(--c-accent);
}
.tl-mark--low { padding-top: 2.4cqw; }
.tl-mark--low::before { display: none; }

/* ============ チェックリスト ============ */
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8cqw;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  background: var(--c-surface);
  border: 0.1cqw solid var(--c-border);
  border-radius: 0.8cqw;
  padding: 1.6cqw 2cqw;
}
.check-num {
  font-size: 2.6cqw;
  font-weight: 900;
  color: var(--c-accent);
  min-width: 3.2cqw;
  text-align: center;
}

/* ============ 注意ストリップ ============ */
.note-strip {
  border-left: 0.3cqw solid var(--c-accent);
  background: var(--c-surface);
  border-radius: 0 0.8cqw 0.8cqw 0;
  padding: 1.4cqw 2cqw;
}

/* ============ ブリッジ ============ */
.slide--bridge { background: var(--c-bridge-bg); }
.slide--bridge .slide-content { color: var(--c-bridge-text); }
.slide--bridge .eyebrow { color: var(--c-bridge-text); opacity: 0.7; }
.slide--bridge .slide-caption { color: var(--c-bridge-text); opacity: 0.75; }

/* ============ 表紙 / 締め ============ */
.cover-bar {
  width: 6cqw;
  height: 0.4cqw;
  background: var(--c-accent);
}
.cover-meta {
  display: flex;
  gap: 2cqw;
  align-items: baseline;
}

/* ==================================================
   UIオーバーレイ（px単位・スライド外）
   ================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-title {
  font-size: 12px;
  color: var(--c-sub);
  letter-spacing: 0.05em;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-label {
  font-size: 12px;
  color: var(--c-sub);
  letter-spacing: 0.05em;
}
.menu-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.8);
  color: var(--c-main);
  font-size: 16px;
  cursor: pointer;
}
.menu-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }

/* サイドバー（デフォルト非表示・オーバーレイ式） */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background: var(--c-surface);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 220;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}
.sidebar.open { transform: translateX(0); }
.sidebar-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-sub);
  letter-spacing: 0.1em;
  padding: 0 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}
.sidebar-list li {
  padding: 9px 20px;
  font-size: 13px;
  color: var(--c-main);
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.sidebar-list li:hover { background: rgba(56, 189, 248, 0.08); }
.sidebar-list li.current {
  color: var(--c-accent);
  background: rgba(56, 189, 248, 0.1);
  font-weight: 700;
}
.sidebar-list .num {
  font-size: 11px;
  color: var(--c-sub);
  min-width: 18px;
}
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  z-index: 210;
}
.backdrop.open { display: block; }

/* トークスクリプト（下端ホバー） */
.notes-hover-zone {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  z-index: 80;
}
.notes-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 30vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 24px 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #CBD5E1;
  transform: translateY(100%);
  transition: transform 0.2s ease;
  z-index: 85;
}
.notes-panel.show { transform: translateY(0); }

/* ===== パスワードロック ===== */
.lock-overlay {
  position: fixed;
  inset: 0;
  background: var(--c-base);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lock-overlay.unlocked { display: none; }
.lock-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 320px;
  padding: 32px;
  background: var(--c-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
}
.lock-title { font-size: 16px; font-weight: 700; color: var(--c-main); }
.lock-sub { font-size: 12px; color: var(--c-sub); }
#lock-input {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: var(--c-base);
  color: var(--c-main);
  font-size: 14px;
}
#lock-input:focus { outline: none; border-color: var(--c-accent); }
#lock-btn {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: var(--c-accent);
  color: var(--c-base);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.lock-err { font-size: 12px; color: #F87171; min-height: 1em; }

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== Memo feature ===== */
.memo-list-btn{
  margin-left:12px;background:var(--c-accent-soft);color:#0369A1;
  border:1px solid #7DD3FC;padding:6px 12px;border-radius:18px;cursor:pointer;
  font-size:12px;font-weight:700;display:flex;align-items:center;gap:6px;transition:all .15s;
}
.memo-list-btn:hover{background:var(--c-accent);color:#0F172A}
.memo-list-btn span{
  background:var(--c-accent);color:#0F172A;border-radius:10px;
  min-width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;
  font-size:11px;padding:0 5px;
}
.memo-list-btn:hover span{background:#0F172A;color:var(--c-accent)}
.memo-btn{
  position:fixed;top:60px;right:16px;width:44px;height:44px;border-radius:50%;
  background:var(--c-surface);border:1px solid rgba(255,255,255,0.15);cursor:pointer;font-size:18px;
  z-index:90;display:flex;align-items:center;justify-content:center;
  transition:transform .15s,border-color .15s;
}
.memo-btn:hover{border-color:var(--c-accent);transform:scale(1.05)}
.memo-dot{
  position:absolute;top:6px;right:6px;width:10px;height:10px;border-radius:50%;
  background:var(--c-accent);display:none;border:2px solid var(--c-base);
}
.memo-btn.has-note .memo-dot{display:block}

/* ===== Modal ===== */
.modal{
  position:fixed;inset:0;background:rgba(2,6,23,.6);
  display:none;align-items:center;justify-content:center;z-index:300;padding:20px;
}
.modal.open{display:flex}
.modal-card{
  background:var(--c-card);border-radius:16px;padding:24px;width:520px;max-width:100%;
  box-shadow:var(--shadow-soft);display:flex;flex-direction:column;gap:16px;
}
.modal-card-lg{width:680px;max-height:80vh}
.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.modal-head strong{font-size:16px;color:var(--c-text)}
.modal-sub{font-size:12px;color:var(--c-text-muted);margin-top:4px}
.modal-close{
  background:none;border:none;font-size:24px;cursor:pointer;color:var(--c-text-muted);
  padding:0 8px;line-height:1;
}
.modal-close:hover{color:#0284C7}
#memo-textarea{
  width:100%;min-height:160px;padding:12px;border:1px solid #CBD5E1;
  border-radius:8px;font-family:inherit;font-size:14px;line-height:1.6;resize:vertical;
  color:var(--c-text);background:#F8FAFC;
}
#memo-textarea:focus{outline:none;border-color:var(--c-accent)}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.btn-primary{
  background:#0284C7;color:#fff;border:none;padding:10px 20px;
  border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:background .15s;
}
.btn-primary:hover{background:#0369A1}
.btn-ghost{
  background:none;color:var(--c-text-muted);border:1px solid #CBD5E1;
  padding:10px 16px;border-radius:8px;font-size:13px;cursor:pointer;transition:all .15s;
}
.btn-ghost:hover{background:var(--c-accent-soft);color:#0369A1;border-color:#0284C7}
.memo-list{
  flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:12px;
  max-height:50vh;padding-right:4px;
}
.memo-list-empty{text-align:center;color:var(--c-text-muted);padding:32px;font-size:13px}
.memo-item{
  background:#F8FAFC;border:1px solid #E2E8F0;border-radius:8px;padding:12px 16px;
}
.memo-item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.memo-item-title{font-size:13px;font-weight:700;color:#0284C7;cursor:pointer}
.memo-item-title:hover{text-decoration:underline}
.memo-item-text{font-size:13px;color:var(--c-text);line-height:1.7;white-space:pre-wrap}
.memo-item-del{background:none;border:none;color:var(--c-text-muted);cursor:pointer;font-size:14px;padding:2px 6px}
.memo-item-del:hover{color:#0284C7}
