:root {
    /* Dark Theme (Default) */
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --container-bg: #1e293b;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    /* Factorization highlight (darker bg needs brighter purple) */
    --factor-color: #c4b5fd;
    --secondary-color: #3b82f6;
    --button-bg: #334155;
    --button-hover: #475569;
    --correct-color: #22c55e;
    --wrong-color: #ef4444;
    --timer-color: #22c55e;
    --timer-warning: #eab308;
    --timer-danger: #ef4444;
    --bonus-color: #3b82f6;
    /* New: Blue for carry-over time */

    --panel-border: rgba(255, 255, 255, 0.1);
    --start-bg: radial-gradient(circle at 50% 0%, var(--container-bg) 0%, var(--bg-color) 70%);
    --modal-overlay: rgba(15, 23, 42, 0.9);
    --modal-bg: var(--container-bg);

    /* 追加：Start画面 */
    --start-bg-1: #1e293b;
    --start-bg-2: #0f172a;

    /* 追加：Modal */
    --modal-overlay: rgba(15, 23, 42, 0.9);
    --modal-bg: #1e293b;
    --modal-border: rgba(255,255,255,0.1);

      /* ability buttons (dark) */
    --ability-bg: rgba(255,255,255,0.10);
    --ability-border: rgba(255,255,255,0.18);
    --ability-text: var(--text-color);
    --ability-subtext: rgba(248,250,252,0.85);
}

.light-theme {
    --bg-color: #f0fdf4;
    --text-color: #1e293b;
    --container-bg: #ffffff;
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    /* In light theme, keep the same as accent */
    --factor-color: var(--accent-color);
    --secondary-color: #3b82f6;
    --button-bg: #ecfdf5;
    /* Brighter for light theme */
    --button-hover: #d1fae5;
    --correct-color: #16a34a;
    --wrong-color: #dc2626;
    --timer-color: #16a34a;
    --timer-warning: #d97706;
    --timer-danger: #dc2626;
    --bonus-color: #2563eb;

    --panel-border: rgba(0, 0, 0, 0.08);
    --modal-overlay: rgba(240, 253, 244, 0.9);

    /* 追加：Start画面（明るい版） */
    --start-bg-1: #ffffff;
    --start-bg-2: #e2e8f0;

    /* 追加：Modal（明るい版） */
    --modal-overlay: rgba(255,255,255,0.75);
    --modal-bg: #ffffff;
    --modal-border: rgba(0,0,0,0.12);

    /* ability buttons (light) */
    --ability-bg: rgba(0,0,0,0.04);
    --ability-border: rgba(0,0,0,0.12);
    --ability-text: #0f172a;
    --ability-subtext: rgba(15,23,42,0.75);
}

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

html, body {
  height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100dvh;              /* 対応ブラウザ */
    min-height: -webkit-fill-available; /* iOS Safari向け */
}

.controls-container {
    position: absolute;
    top: 20px;
    right: 20px;
    left: auto;
    display: flex;
    gap: 10px;
    flex-direction: row-reverse;
    /* Fullscreen on far right */
}

#debug-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: auto;
    font-size: 0.8rem;
    padding: 0 16px;
}

/* Larger Cooldown Text */
.ability-cooldown {
    display: block;
    font-size: 1.5rem;
    /* Increased size for visibility */
    font-weight: bold;
    color: var(--wrong-color);
}

.ready .ability-cooldown {
    color: var(--correct-color);
    font-size: 1rem;
}

/* Advice Modal - Non-blocking background */
#advice-modal.modal {
    pointer-events: none;
    /* Let clicks pass through background */
    background: transparent;
}

#advice-modal .modal-content {
    pointer-events: none;
    /* Completely non-blocking (do not steal clicks from option buttons) */
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.char-img-large {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.5);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    cursor: default;
}

.app-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.score-board {
    background: var(--card-bg);
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.score-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

#score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}



.score-sep {
    color: var(--text-muted);
    opacity: 0.6;
    margin: 0 0.25rem;
}

.time-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

#playtime {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
}
.question-text {
    margin-bottom: 2rem;
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.option-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 2rem;
    min-width: 7ch;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.2s;
}

.option-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.option-btn:hover::before {
    opacity: 1;
}

.option-btn:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background: var(--modal-bg);
    border: 1px solid var(--modal-border);
    color: var(--text-color);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.hidden .modal-content {
    transform: scale(0.9);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--wrong-color);
}

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

#final-score {
    color: var(--text-color);
    font-weight: 700;
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.primary-btn:hover {
    background: #7c3aed;
    /* Darker violet */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Animations */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.3s ease-in-out;
    border-color: var(--wrong-color) !important;
    color: var(--wrong-color) !important;
}

.factorization-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.factorization-text .highlight {
    color: var(--wrong-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Controls and Timer */
.controls-container {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 12px);
    right: calc(env(safe-area-inset-right) + 12px);
    left: auto;
    display: flex;
    flex-direction: row-reverse;
    /* Fullscreen on right, Sound on left of it */
    gap: 10px;
    z-index: 100;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    backdrop-filter: blur(5px);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    border-radius: 8px;
    /* Added consistency */
}

.light-theme .control-btn {
    background: var(--button-bg);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.light-theme .ability-btn {
    background: var(--button-bg);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.light-theme .ability-btn:hover:not(:disabled) {
    background: var(--button-hover);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn.active {
    background: rgba(139, 92, 246, 0.3);
    /* Violet with opacity */
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Consolidated above */

/* Start Screen */
.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 0%, var(--start-bg-1) 0%, var(--start-bg-2) 70%);
    z-index: 50;
    padding: 2rem;
}

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

.main-title {
    font-size: 3rem;
    line-height: 1.2;
}

.main-title span {
    font-size: 1.5rem;
    display: block;
    margin-top: 0.5rem;
    font-weight: 300;
    opacity: 0.8;
}

.large-btn {
    font-size: 1.5rem;
    padding: 1.2rem 3rem;
    margin: 1.5rem 0;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    min-width: 12em;
    min-height: 3.2em;
}

#game-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-container.hidden {
    display: none;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-left: 0.5rem;
}

/* Timer */
.timer-display {
    width: 100%;
    max-width: 500px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.timer-bar {
    height: 100%;
    background: var(--timer-color);
    width: 0%;
    transform-origin: left;
    transition: width 0.08s linear, background 0.1s ease;
}

.timer-bar.bonus {
    background: var(--bonus-color);
}

.timer-bar.warning {
    background: #fbbf24;
    /* Amber */
}

.timer-bar.danger {
    background: #ef4444;
    /* Red */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* Special Abilities：固定レイアウト（PCは4列、スマホは2x2） */
.special-abilities-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 520px;  /* 好みで調整 */
  margin: 24px auto 0;
  justify-items: stretch;
  align-items: stretch;
}

/* ボタン寸法を統一 */
.ability-btn {
  width: 100%;
  height: 84px;              /* ここで固定 */
  min-width: 7rem;
  padding: 10px 12px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: var(--ability-bg);
  border: 1px solid var(--ability-border);
  color: var(--ability-text);
  opacity: 1;                 /* 透過で読めなくなるのを防ぐ */
}

/* スマホ等：2列にして崩れを防ぐ */
@media (max-width: 520px) {
  .special-abilities-container {
    grid-template-columns: repeat(2, 1fr);
    max-width: 360px;
  }
  .ability-btn {
    height: 78px;
  }
}

.ability-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.ability-btn:disabled {
    opacity: 0.75;
    filter: none;
    cursor: not-allowed;
    background: rgba(15, 23, 42, 0.5);
}

.ability-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ability-text);
}

/* クール表示を“ドットバー”向けに読みやすく */
.ability-cooldown {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    letter-spacing: 0.12em;
    font-size: 1.05rem;
    line-height: 1;
    white-space: nowrap;
    color: var(--ability-subtext);
    height: 1.2em;
    display: block;
}

@keyframes dotTick {
  0%   { transform: translateY(0) scale(1);   opacity: 1; }
  35%  { transform: translateY(-2px) scale(1.05); opacity: 1; }
  100% { transform: translateY(0) scale(1);   opacity: 1; }
}

.ability-cooldown.cooldown-tick {
  animation: dotTick 160ms ease-out;
}

.ability-btn.ready {
    border-color: var(--correct-color);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* クールタイム中（●●●○○○）は常に見やすい色 */
.ability-btn:not(.ready) .ability-cooldown {
    color: #fbbf24;               /* Amber 400 */
    text-shadow: 0 0 6px rgba(251,191,36,0.35);
}

/* READY 時 */
.ability-btn.ready .ability-cooldown {
    color: var(--correct-color);
    text-shadow: 0 0 6px rgba(34,197,94,0.35);
}

@keyframes readyFlash {
  0%   { box-shadow: 0 0 0 rgba(34,197,94,0); transform: translateY(0); }
  30%  { box-shadow: 0 0 18px rgba(34,197,94,0.45); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 rgba(34,197,94,0); transform: translateY(0); }
}

/* READY中は“控えめに点滅”させたいなら infinite に */
.ability-btn.ready {
  animation: readyFlash 900ms ease-in-out infinite;
}

/* CHECK ability (active): make it obvious */
@keyframes checkPulse {
  0%   { transform: translateY(0);   box-shadow: 0 0 0 rgba(139, 92, 246, 0.0); }
  40%  { transform: translateY(-1px); box-shadow: 0 0 20px rgba(139, 92, 246, 0.55); }
  100% { transform: translateY(0);   box-shadow: 0 0 0 rgba(139, 92, 246, 0.0); }
}

.ability-btn.check-active {
  border-color: var(--accent-color) !important;
  background: rgba(139, 92, 246, 0.12);
  animation: checkPulse 850ms ease-in-out infinite;
}

.ability-btn.check-active .ability-cooldown {
  color: var(--accent-color) !important;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5) !important;
  letter-spacing: 0.10em;
}

/* Advice Modal */
#advice-modal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    pointer-events: none;
    /* Completely non-blocking (do not steal clicks from option buttons) */
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* High Score Mode (Halved Cooldowns) */
.ability-btn.high-score-mode {
    border-color: #fbbf24;
    /* Amber/Gold */
    box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
}

/* Debug Indicators on Options */
.option-btn.debug-correct {
    border-color: var(--correct-color);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.option-btn.debug-correct::after {
    content: '○';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: var(--correct-color);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.option-btn.advice-highlight {
    border-color: #fbbf24;
    /* Amber */
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.5);
}

.option-btn.disabled {
    opacity: 0.2;
    pointer-events: none;
    border-color: transparent;
}

/* Advice は画面を暗くしない＆クリックを奪わない */
#advice-modal.modal{
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

#advice-modal .modal-content{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  pointer-events: none;
}

/* ライトモード：ゲーム中タイトルを濃く */
.light-theme #game-container h1 {
    background: none;
    -webkit-text-fill-color: #0f172a; /* slate-900 */
    text-shadow: none;
}

.hidden { display: none !important; }

/* Debug系の見た目（任意） */
.debug-score-btn {
  width: auto;
  padding: 0 14px;
  font-weight: 700;
}

/* ハイスコア時：🔥が大きいので少し縮める */
.ability-btn.high-score-mode .ability-cooldown {
  font-size: 0.95rem;
}

/* ライトモード：スタート画面タイトルを暗めに（※テーマclassは .light-theme） */
.light-theme .start-screen .main-title,
.light-theme .start-screen h1.main-title {
  background: linear-gradient(135deg, #2b1649 0%, #4c1d95 55%, #1e3a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

/* 念のため：ライトモードのスタート画面内の通常 h1 も上書き（クラスが無い場合） */
.light-theme .start-screen h1 {
  background: linear-gradient(135deg, #2b1649 0%, #4c1d95 55%, #1e3a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

/* =========================
   数字選択肢（.option-btn）：枠をクッキリ
   ========================= */

/* テーマ別に枠色を変える（darkは :root、lightは .light-theme 上書き） */
:root{
  --option-border-strong: rgba(255,255,255,0.22);
  --option-border-shadow: rgba(255,255,255,0.10);
}
.light-theme{
  --option-border-strong: rgba(76,29,149,0.45);
  --option-border-shadow: rgba(76,29,149,0.18);
}

/* 実際の選択肢ボタン（数字） */
.option-btn{
  border: 2px solid var(--option-border-strong);
  box-shadow: 0 0 0 1px var(--option-border-shadow);
}

/* hover / focus でさらに強調 */
.option-btn:hover,
.option-btn:focus-visible{
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.35);
}

/* 押下時 */
.option-btn:active{
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.45);
}

.option-btn.debug-correct{
  border-color: var(--correct-color) !important;
  border-width: 3px;
  box-shadow: 0 0 0 1px rgba(16,185,129,0.35), 0 0 18px rgba(16,185,129,0.45) !important;
}

.option-btn.advice-highlight{
  border-color: #fbbf24 !important;
  border-width: 3px;
  box-shadow: 0 0 0 1px rgba(251,191,36,0.35), 0 0 18px rgba(251,191,36,0.55) !important;
}

/* ===== Game Over / Clear modal extra actions ===== */
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
}

.secondary-btn {
  padding: 0.85rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: transparent;
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.secondary-btn:hover {
  transform: translateY(-1px);
  background: rgba(139, 92, 246, 0.10);
  border-color: rgba(139, 92, 246, 0.45);
}

/* ===== High Score (Start Screen) ===== */
.highscore-panel {
    margin: 1.5rem 0 1.5rem;
    padding: 1rem 1.5rem;
    width: 100%;
    max-width: 360px;
    border: 1px solid var(--panel-border);
    border-radius: 1rem;
    background: rgba(0,0,0,0.05);
    backdrop-filter: blur(6px);
}

.highscore-title {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    opacity: 0.75;
    margin-bottom: 0.5rem;
}

.highscore-list {
    list-style: decimal;
    padding-left: 1.2rem;
    text-align: left;
}

.highscore-list li {
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    white-space: nowrap;
}

.highscore-score {
    color: var(--text-color);
    font-weight: 700;
}

.highscore-time {
    opacity: 0.85;
    font-family: ui-monospace, monospace;
}

.ad-container{
  margin-top: 16px;
  min-height: 250px;         /* 90 → 250 */
  display: flex;
  justify-content: center;
}

.ad-container ins.adsbygoogle{
  display: block;
  width: 100%;
  min-height: 250px;
}

#start-screen{
  background: transparent;
}

/* 広告コンテナは必ず幅を持つ */
#start-ad.ad-container{
  width: 100%;
}

/* ins が幅0にならないようにする */
#start-ad ins.adsbygoogle{
  display: block;
  width: 100%;
  max-width: 360px;
  min-height: 250px;
}

.app-footer{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  padding: 6px 12px;
  font-size: 12px;
  text-align: center;
  z-index: 99999;
  pointer-events: none;

  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
}

body.light .app-footer{
  background: rgba(255,255,255,0.6);
  color: rgba(0,0,0,0.7);
}

.footer-sep{ margin: 0 6px; }

.app-footer a{
  pointer-events: auto; /* ←リンクだけ復活 */
}

/* footer link visibility */
.app-footer a.footer-link{
  color: #60a5fa;          /* 落ち着いた青（darkでもlightでも見える） */
  text-decoration: underline;
  font-weight: 500;
}

.app-footer a.footer-link:hover{
  color: #93c5fd;
}

.blog-btn{
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100000; /* モーダル等より上に出したくないなら下げる */
  font-weight: 600;
  letter-spacing: 0.02em;
}

.blog-btn{
  font-size: 0.85rem;
  padding: 0 10px;
}