* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overscroll-behavior-y: none;
}


button, a, .task-checkbox, .task-card, .nav-btn, .fab, .pg-btn, .game-cell, .puyo-cell {
  touch-action: manipulation;
}

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --high: #ef4444;
  --high-light: #fee2e2;
  --medium: #f59e0b;
  --medium-light: #fef3c7;
  --low: #10b981;
  --low-light: #d1fae5;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
  --radius: 14px;
  --header-height: 56px;
  --nav-height: 64px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* ── Background ── */
#bgImg {
  position: fixed;
  top: var(--header-height);
  bottom: var(--nav-height);
  left: max(0px, calc((100vw - 480px) / 2));
  right: max(0px, calc((100vw - 480px) / 2));
  background-image: var(--bg-image, url('bg.png'));
  background-position: top center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}

#app { position: relative; z-index: 1; }

#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 20;
  height: var(--header-height);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 10px rgba(99,102,241,0.35);
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 32px;
  mix-blend-mode: screen;
  opacity: 0.9;
  pointer-events: none;
}



/* ── Main ── */
.main {
  flex: 1;
  margin-top: var(--header-height);
  padding: 14px 14px calc(var(--nav-height) + 80px);
  overflow-y: auto;
  min-height: 0;
}

.main.game-mode {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.view { display: flex; flex-direction: column; gap: 10px; }
.view.hidden { display: none; }

/* ── YouTube banner ── */
.yt-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 11px 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  margin-bottom: 4px;
  transition: opacity 0.15s, transform 0.15s;
}

.yt-banner:active { opacity: 0.8; transform: scale(0.98); }
.yt-banner.hidden { display: none; }

.yt-icon { width: 28px; height: 28px; flex-shrink: 0; }

.yt-label {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.yt-arrow { color: var(--text-muted); flex-shrink: 0; }

/* ── Section header ── */
.section-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 4px;
  margin-top: 6px;
}
.section-header:first-child { margin-top: 0; }
.section-header-toggle { cursor: pointer; user-select: none; }
.section-header-toggle:hover { color: var(--text); }

/* ── Task Card ── */
.task-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 11px;
  align-items: flex-start;
  border-left: 4px solid transparent;
  transition: opacity 0.2s, transform 0.15s;
}

.task-card.priority-high   { border-left-color: var(--high); }
.task-card.priority-medium { border-left-color: var(--medium); }
.task-card.priority-low    { border-left-color: var(--low); }

.task-card.completed { opacity: 0.55; }
.task-card.completed .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Checkbox */
.task-checkbox {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.2s;
  background: white;
}

.task-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
}

.task-checkbox.checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
  display: block;
}

/* Body */
.task-body { flex: 1; min-width: 0; }

.task-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  word-break: break-word;
  line-height: 1.4;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge-high   { background: var(--high-light);   color: var(--high); }
.badge-medium { background: var(--medium-light);  color: #b45309; }
.badge-low    { background: var(--low-light);     color: #047857; }

.task-due {
  font-size: 12px;
  color: var(--text-muted);
}

.task-due.overdue { color: var(--high); font-weight: 700; }
.task-due.today   { color: var(--primary); font-weight: 600; }

.task-repeat {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
}

.task-memo {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.55;
  word-break: break-word;
}

/* Actions */
.task-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.task-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.task-btn:hover, .task-btn:active { background: var(--bg); color: var(--text); }
.task-btn.delete:hover, .task-btn.delete:active { background: var(--high-light); color: var(--high); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
}

.empty-icon { font-size: 52px; margin-bottom: 14px; opacity: 0.4; }

.empty-cal-icon {
  width: 64px;
  height: 64px;
  border: 3px solid var(--text-muted);
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto 14px;
  opacity: 0.35;
  display: flex;
  flex-direction: column;
}
.empty-cal-header {
  background: var(--text-muted);
  height: 18px;
  flex-shrink: 0;
}
.empty-cal-date {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
}
.empty-state p { font-size: 15px; line-height: 1.7; }
.empty-state small { font-size: 13px; }

/* ── FAB ── */
.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(99,102,241,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 20;
}

.fab:hover   { box-shadow: 0 6px 18px rgba(99,102,241,0.55); transform: scale(1.06); }
.fab:active  { transform: scale(0.94); }

@media (min-width: 480px) {
  .fab { right: calc(50% - 220px); }
}

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding-bottom: env(safe-area-inset-bottom, 0);
  transition: color 0.2s;
}

.nav-btn.active { color: var(--primary); }
.nav-btn:active { background: var(--bg); }

/* ── Week view ── */
.week-list { display: flex; flex-direction: column; gap: 10px; }

.week-day-block {}

.week-day-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 4px;
  margin-top: 4px;
}

.week-day-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 24px;
}

.week-day-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.week-day-header.is-today .week-day-label,
.week-day-header.is-today .week-day-date {
  color: var(--primary);
}

.week-day-header.is-today .week-day-label {
  font-size: 14px;
}

.week-day-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.week-day-header.is-today .week-day-line {
  background: var(--primary-light, #e0e7ff);
}

.week-no-tasks {
  font-size: 12px;
  color: var(--border);
  padding: 4px 4px 8px;
  font-style: italic;
}

.week-no-date-block { margin-top: 8px; }

/* ── Game (Puyo Puyo) ── */

/* FAB をゲーム画面で完全非表示 */
.fab.hidden { display: none !important; }

/*
  #gameView: CSS Grid で
    行1(1fr)  = ボード＋サイド
    行2(auto) = 操作ボタン
  列1(1fr)  = ボード
  列2(auto) = サイドパネル
*/
#gameView {
  position: fixed;
  top: var(--header-height);
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  left: max(0px, calc((100vw - 480px) / 2));
  right: max(0px, calc((100vw - 480px) / 2));
  display: grid;
  grid-template-columns: 1fr 72px;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 4px 8px 4px;
  box-sizing: border-box;
  z-index: 5;
}
#gameView.hidden { display: none !important; }

/* ボードエリア（行1・列1） */
.game-board-wrap {
  grid-row: 1;
  grid-column: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  position: relative;
}

.chain-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 8px rgba(99,102,241,0.8), 0 2px 0 rgba(0,0,0,0.3);
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s, transform 0.12s;
  z-index: 20;
  white-space: nowrap;
}
.chain-display.chain-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: chainPop 0.9s ease-out forwards;
}
@keyframes chainPop {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1.3); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -70%) scale(0.9); }
}

.chain-display.all-clear-visible {
  font-size: 32px;
  color: #fde68a;
  text-shadow: 0 0 12px rgba(251,191,36,0.9), 0 2px 0 rgba(0,0,0,0.3);
  animation: allClearPop 1.8s ease-out forwards;
}
@keyframes allClearPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.4); }
  30%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.95); }
}

/* スタートオーバーレイ */
.game-start-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  z-index: 10;
  transition: opacity 0.3s;
}
.game-start-overlay.hidden {
  display: none;
}

.game-start-title {
  font-size: 20px;
  font-weight: 800;
  color: white;
  letter-spacing: 0.06em;
  text-shadow: 0 0 20px rgba(99,102,241,0.8);
}

.game-start-btn {
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99,102,241,0.5);
  transition: transform 0.15s, box-shadow 0.15s;
  letter-spacing: 0.04em;
}
.game-start-btn:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(99,102,241,0.4);
}

/* 操作ボタン：グリッド2行目に配置 */
.pg-controls {
  grid-row: 2;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0;
}

/* .game-layout は不要になったが念のため残す */
.game-layout { display: contents; }

/* ── サイドパネル ── */
.game-side {
  grid-row: 1;
  grid-column: 2;
  width: 72px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding-top: 4px;
  overflow: hidden;
}

/* スコア＋タイマー縦並び */
.gs-score-timer-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* スコアカード */
.gs-score-card {
  width: 100%;
  background: linear-gradient(135deg, #6366f1 0%, #a78bfa 100%);
  border-radius: 10px;
  padding: 4px 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
}

.gs-score-label {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pg-score {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* タイマーカード */
.gs-timer-card {
  width: 100%;
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  border-radius: 10px;
  padding: 4px 4px 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}

.gs-timer-label {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pg-timer {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.pg-timer.pg-timer-low {
  color: #fef08a;
  animation: timerPulse 0.5s ease-in-out infinite alternate;
}

@keyframes timerPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.15); }
}

/* NEXTカード */
.gs-next-card {
  width: 100%;
  background: white;
  border: 2px solid #e0e7ff;
  border-radius: 14px;
  padding: 8px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.gs-next-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pg-next {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

/* リセットボタン */
.game-reset-btn {
  margin-top: 8px;
  width: 100%;
  background: linear-gradient(135deg, #fce7f3 0%, #ede9fe 100%);
  border: none;
  border-radius: 12px;
  padding: 12px 4px;
  font-size: 13px;
  font-weight: 800;
  color: #7c3aed;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(124,58,237,0.15);
  letter-spacing: 0.04em;
}
.game-reset-btn:active { opacity: 0.8; transform: scale(0.96); }

/* BGMボタン */
.gs-bgm-btn {
  width: 100%;
  background: linear-gradient(135deg, #e0e7ff, #ede9fe);
  border: none;
  border-radius: 12px;
  padding: 7px 4px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(99,102,241,0.15);
}
.gs-bgm-btn:active { opacity: 0.8; transform: scale(0.96); }

/* キーワード鍵スロット */
.gs-key-slots {
  margin-top: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gs-key-slot {
  width: 100%;
  border-radius: 8px;
  padding: 5px 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.3s, color 0.3s;
}
.gs-key-slot.locked {
  background: rgba(255,255,255,0.3);
  color: #c7d2fe;
  font-size: 13px;
}
.gs-key-slot.unlocked {
  color: #6366f1;
}
@keyframes keyPop {
  0%   { transform: scale(0.8); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.gs-key-slot.key-pop { animation: keyPop 0.45s ease-out forwards; }

/* ベストスコア */
.gs-best-card {
  width: 100%;
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gs-best-label {
  font-size: 8px;
  font-weight: 800;
  color: #a5b4fc;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gs-best-score {
  font-size: 14px;
  font-weight: 800;
  color: #818cf8;
}

/* ── コレクション ── */
.gs-collection {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.gs-char-slot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  flex-shrink: 0;
}

/* ロック中：シルエット */
.gs-char-slot.locked {
  filter: brightness(0) opacity(0.25);
  cursor: default;
}

/* 解除済み */
.gs-char-slot:not(.locked) {
  box-shadow: 0 0 0 2.5px #a78bfa, 0 4px 12px rgba(167,139,250,0.5);
}
.gs-char-slot:not(.locked):active {
  transform: scale(0.93);
}

.gs-char-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* コレクト時のポップアニメ */
@keyframes collectPop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.25); }
  100% { transform: scale(1);   opacity: 1; }
}
.gs-char-slot.collect-pop {
  animation: collectPop 0.5s cubic-bezier(0.32,0.72,0,1) forwards;
}

/* 特別❄オーバーレイ */
.special-snow-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  text-shadow: 0 0 8px rgba(255,255,255,1), 0 0 18px rgba(200,220,255,0.9), 0 0 30px rgba(180,210,255,0.6);
  pointer-events: none;
  animation: sparkle 1.2s ease-in-out infinite alternate;
}
@keyframes sparkle {
  from { opacity: 0.7; transform: scale(0.9); }
  to   { opacity: 1;   transform: scale(1.1); }
}

/* ── エピソードビューアー ── */
.episode-viewer {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.episode-viewer.hidden { display: none; }

.episode-viewer-inner {
  background: #fff;
  background-size: cover;
  background-position: center;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.episode-viewer-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
  border-radius: 18px;
  pointer-events: none;
  z-index: 0;
}
.episode-viewer-header,
.episode-viewer-body {
  position: relative;
  z-index: 1;
}

.episode-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.episode-viewer-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}

.episode-viewer-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.episode-viewer-body {
  padding: 20px 24px;
  overflow-y: auto;
  line-height: 2;
  font-size: 14px;
  color: var(--text);
}

.episode-viewer-body p {
  margin: 0;
}

.episode-narou-link {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.episode-narou-link a {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
}

/* ── キャラクター全画面表示 ── */
.chara-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: linear-gradient(160deg, #0d0d1f 0%, #1a0a2e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 24px 32px;
  animation: fadeIn 0.25s ease;
  cursor: pointer;
  overflow: hidden;
}
.chara-viewer.hidden { display: none; }

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

.chara-viewer-logo {
  height: 36px;
  opacity: 0.85;
  mix-blend-mode: screen;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.chara-viewer-img {
  max-height: 48dvh;
  max-width: 82vw;
  object-fit: contain;
  object-position: top;
  filter: drop-shadow(0 0 40px rgba(167,139,250,0.45));
  animation: slideUp 0.35s cubic-bezier(0.32,0.72,0,1);
  flex-shrink: 1;
}

.chara-viewer-profile {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  animation: slideUp 0.35s cubic-bezier(0.32,0.72,0,1);
  text-align: center;
}

.chara-viewer-name {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.chara-viewer-role {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 0.08em;
}

.chara-viewer-bio {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-top: 4px;
}

.chara-viewer-hint {
  margin-top: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

/* Instagram ボタン（サイドパネル下部） */
.gs-ig-btn {
  margin-top: auto;
  margin-bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(238,42,123,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.gs-ig-btn:active {
  transform: scale(0.92);
  box-shadow: 0 1px 6px rgba(238,42,123,0.3);
}

/* ── 設定ページ ── */
.settings-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 24px 32px;
  gap: 12px;
}

.settings-catch {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
  margin: 0 0 24px;
  text-align: center;
}

.settings-desc {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.settings-desc p {
  font-size: 13px;
  line-height: 1.8;
  color: #475569;
  margin: 0;
}

.settings-closing {
  font-size: 14px !important;
  font-weight: 500;
  color: #334155 !important;
}

.settings-author {
  font-size: 12px;
  color: #475569;
  letter-spacing: 0.12em;
  margin: 0 0 24px;
  text-align: right;
  width: 100%;
  max-width: 300px;
}

.music-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.music-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.music-play-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.music-play-btn:active { opacity: 0.7; }
.music-title {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.music-row.locked {
  opacity: 0.5;
}
.music-lock {
  font-size: 16px;
  flex-shrink: 0;
}
.music-title.locked-title {
  color: var(--text-muted);
}
.music-unlock-hint {
  font-size: 10px;
  color: #b0bec5;
  margin: 2px 0 0;
}

.music-yt-link {
  display: block;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  text-decoration: underline;
  opacity: 0.8;
}

.settings-copyright {
  font-size: 11px;
  color: #cbd5e1;
  letter-spacing: 0.08em;
  text-align: center;
  margin: 32px 0 8px;
  width: 100%;
  max-width: 300px;
}

.settings-contact {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 24px;
  text-align: right;
  width: 100%;
  max-width: 300px;
}
.settings-contact a {
  color: var(--primary);
  text-decoration: none;
}
.settings-contact a:active {
  opacity: 0.7;
}

.settings-section {
  width: 100%;
  max-width: 300px;
  margin-top: 28px;
  margin-bottom: 20px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.settings-section-hint {
  font-size: 11px;
  color: #94a3b8;
  margin: 0 0 10px;
  line-height: 1.6;
}

.settings-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.settings-chara-btns {
  display: flex;
  gap: 8px;
}

.settings-chara-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
  font-size: 11px;
  color: var(--text-muted);
}
.settings-chara-btn img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
}
.settings-chara-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
}
.settings-chara-btn:active { transform: scale(0.95); }
.settings-chara-random {
  font-size: 24px;
  line-height: 44px;
  width: 44px;
  text-align: center;
}

.settings-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 280px;
}

.settings-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.settings-link-btn:active {
  transform: scale(0.95);
}

.settings-kindle {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  box-shadow: 0 4px 14px rgba(249,115,22,0.4);
}

.settings-instagram {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  box-shadow: 0 4px 14px rgba(238,42,123,0.4);
}

.settings-youtube {
  background: linear-gradient(135deg, #c4302b 0%, #ff0000 100%);
  box-shadow: 0 4px 14px rgba(255,0,0,0.35);
}

.settings-official {
  background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
  box-shadow: 0 4px 14px rgba(167,139,250,0.45);
}

.settings-narou {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}

/* ゲームボード本体：5列×10行、サイズはJSで確定 */
.puyo-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 3px;
  padding: 6px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #e0e7ff 0%, #fce7f3 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  touch-action: none;
}

/* ── Puyo cell ── */
.puyo-cell {
  aspect-ratio: 1;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.08s;
}

/* ガラスツヤ */
.game-cell-snow::after {
  content: '';
  position: absolute;
  top: 6%;
  left: 12%;
  width: 45%;
  height: 35%;
  background: rgba(255,255,255,0.55);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
}

.puyo-cell.empty {
  background: rgba(255,255,255,0.15) !important;
  border: 1px solid rgba(255,255,255,0.3);
}
.puyo-cell.empty::after { display: none; }

.puyo-cell.popping {
  animation: puyoPop 0.32s ease forwards;
}

@keyframes puyoPop {
  0%   { transform: scale(1);    opacity: 1; }
  45%  { transform: scale(1.4);  opacity: 0.7; }
  100% { transform: scale(0);    opacity: 0; }
}

/* 特別❄ガラスハイライト */
.puyo-cell.special-cell::after {
  content: '';
  position: absolute;
  top: 6%;
  left: 12%;
  width: 45%;
  height: 35%;
  background: rgba(255,255,255,0.55);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(1px);
}

/* 特別❄消去グロー */
.puyo-cell.special-cell.popping {
  animation: snowGlow 0.38s ease forwards;
  z-index: 10;
}

@keyframes snowGlow {
  0%   { transform: scale(1);    opacity: 1;    box-shadow: 0 0 0px  rgba(180,230,255,0); }
  25%  { transform: scale(1.6);  opacity: 1;    box-shadow: 0 0 22px 10px rgba(160,220,255,0.95), 0 0 44px 20px rgba(255,255,255,0.55); }
  55%  { transform: scale(1.35); opacity: 0.85; box-shadow: 0 0 28px 12px rgba(160,220,255,0.7); }
  100% { transform: scale(0);    opacity: 0;    box-shadow: 0 0 0px  rgba(180,230,255,0); }
}

.game-cell-img {
  width: 115%;
  height: 115%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}

.game-cell-snow {
  font-size: 18px;
  background: rgba(219,234,254,0.4) !important;
  border: 1.5px solid rgba(255,255,255,0.85);
}

/* next piece */
.pg-next-piece {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 14px;
}
.pg-next-piece::after {
  content: '';
  position: absolute;
  top: 6%; left: 12%;
  width: 45%; height: 35%;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
}


.pg-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 0;
  font-size: 18px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.1s, background 0.1s;
  user-select: none;
}

.pg-btn:active {
  transform: scale(0.93);
  background: var(--primary-light, #e0e7ff);
}

.pg-btn-drop {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.pg-game-over {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(15,23,42,0.6);
  border-radius: var(--radius);
  color: white;
  font-size: 18px;
  font-weight: 800;
  gap: 8px;
}

/* ── 音符パーティクル ── */
.note-particle {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 18px;
  animation: noteFly var(--dur, 0.7s) ease-out forwards;
  transform-origin: center;
}

@keyframes noteFly {
  0%   { transform: translate(0, 0) scale(1) rotate(0deg);   opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.4) rotate(var(--rot)); opacity: 0; }
}

/* ── ギャラリー ── */
/* ── スペシャル枠 ── */
.special-slots {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.special-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s;
}
.special-slot img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
}
.special-slot:not(.locked):hover { border-color: var(--primary); }
.special-slot:not(.locked):active { transform: scale(0.95); }
.special-slot.locked {
  opacity: 0.5;
  cursor: default;
}
.special-lock { font-size: 22px; line-height: 48px; }
.episode-icon { font-size: 22px; line-height: 48px; }

.special-code-row {
  display: flex;
  gap: 8px;
}
.special-code-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.special-code-input:focus { border-color: var(--primary); }
.special-code-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s;
}
.special-code-btn:active { transform: scale(0.95); }
.special-code-hint {
  font-size: 12px;
  margin: 6px 0 0;
  min-height: 16px;
  text-align: center;
}

.episode-hint-item {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
  opacity: 0.85;
}

/* ── ギャラリー ── */
.settings-gallery-btn {
  margin-top: 8px;
  padding: 12px 32px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.12s;
}
.settings-gallery-btn:active {
  transform: scale(0.96);
  border-color: var(--primary);
  color: var(--primary);
}

.gallery-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gallery-overlay.hidden { display: none; }

.gallery-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
  transition: background 0.15s;
}
.gallery-arrow:hover { background: rgba(255,255,255,0.3); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-img-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-logo {
  position: absolute;
  bottom: 18px;
  right: 18px;
  height: 28px;
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
  filter: brightness(10);
}

.gallery-dots {
  position: absolute;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.2s;
}
.gallery-dot.active {
  background: #fff;
}

/* ── ゲーム離脱確認 ── */
/* ゲーム中ナビロック */
.nav-btn.nav-locked {
  color: var(--primary) !important;
  opacity: 0.5;
  animation: navLockPulse 0.25s ease;
}
@keyframes navLockPulse {
  0%  { transform: scale(1); }
  50% { transform: scale(0.85); }
  100%{ transform: scale(1); }
}

.leave-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.leave-overlay.hidden { display: none; }

.leave-dialog {
  background: var(--surface, #1e1e2e);
  border-radius: 20px;
  padding: 28px 24px 20px;
  width: 280px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.leave-msg {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.6;
  margin: 0 0 20px;
}

.leave-btns {
  display: flex;
  gap: 10px;
}

.leave-cancel, .leave-ok {
  flex: 1;
  padding: 11px 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.12s;
}
.leave-cancel:active, .leave-ok:active { transform: scale(0.95); }

.leave-cancel {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.leave-ok {
  background: var(--primary, #6366f1);
  color: #fff;
}

/* ── Greeting overlay ── */
.greeting-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  animation: greetingFadeIn 0.2s ease;
  cursor: pointer;
}

.greeting-overlay.hidden { display: none; }

.greeting-overlay.fading {
  animation: greetingFadeOut 0.25s ease forwards;
}

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

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

.greeting-content {
  max-width: 480px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  padding: 0 24px 90px;
  animation: greetingSlideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

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

.greeting-chara {
  height: 220px;
  width: auto;
  object-fit: contain;
  object-position: top;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.greeting-bubble {
  background: white;
  border-radius: 20px 20px 20px 4px;
  padding: 18px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  margin-bottom: 32px;
  max-width: 240px;
}

.greeting-bubble p {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.8;
}

/* キャラおすすめタグ */
.rec-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  color: white;
  margin-right: 5px;
  vertical-align: middle;
  line-height: 1.6;
}
.rec-narou  { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.rec-insta  { background: linear-gradient(135deg, #833ab4, #fd1d1d); }
.rec-yt     { background: #c4302b; }
.rec-kindle { background: #f97316; }

/* ── Praise popup ── */
.praise-popup {
  position: fixed;
  bottom: var(--nav-height);
  left: max(0px, calc((100vw - 480px) / 2));
  right: max(0px, calc((100vw - 480px) / 2));
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 16px 12px;
  gap: 10px;
  z-index: 50;
  pointer-events: none;
  animation: praiseIn 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.praise-popup.hidden { display: none; }

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

.praise-bubble {
  background: white;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-width: 220px;
  position: relative;
  margin-bottom: 16px;
}

.praise-bubble p {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-line;
}

.praise-chara {
  height: 140px;
  width: auto;
  object-fit: contain;
  object-position: top;
  flex-shrink: 0;
  mix-blend-mode: normal;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--card);
  border-radius: 22px 22px 0 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 4px;
  flex-shrink: 0;
}

.modal-title { font-size: 18px; font-weight: 700; }

.modal-close {
  background: var(--bg);
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s;
}

.modal-close:hover, .modal-close:active { background: var(--border); color: var(--text); }

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.required { color: var(--high); }

.form-input,
.form-select,
.form-textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
}

.form-input.error { border-color: var(--high); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-textarea { resize: none; line-height: 1.55; }

.modal-footer {
  padding: 12px 20px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary  { background: var(--primary); color: white; }
.btn-primary:hover  { opacity: 0.9; }

.btn-secondary { background: var(--bg); color: var(--text); }
.btn-secondary:hover { background: var(--border); }
