/* Eng2Mouth 공통 스타일 (모든 페이지) — 유리 패널/입력/버튼/모바일 내비 */
:root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --accent: #3b82f6;
    --accent-2: #8b5cf6;
    --call-green: #22c55e;
    --call-red: #ef4444;
}
html { -webkit-text-size-adjust: 100%; }
body {
    background: radial-gradient(circle at 10% 10%, rgba(59,130,246,0.20), transparent 35%),
                radial-gradient(circle at 90% 0%, rgba(168,85,247,0.18), transparent 40%),
                radial-gradient(circle at 50% 100%, rgba(16,185,129,0.10), transparent 45%),
                #05070f;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.35); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.55); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.glass { background: rgba(255,255,255,0.05); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.09); }
.glass-strong { background: rgba(255,255,255,0.07); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border: 1px solid rgba(255,255,255,0.12); }
.glass-soft { background: rgba(255,255,255,0.03); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,0.07); }
.glass-input { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); transition: all .2s ease; color: inherit; }
.glass-input:focus { background: rgba(255,255,255,0.09); border-color: rgba(96,165,250,0.6); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); outline: none; }
.btn-glow { background: linear-gradient(135deg, #3b82f6, #8b5cf6); box-shadow: 0 8px 24px rgba(59,130,246,0.35); color: #fff; }
.btn-glow:hover { box-shadow: 0 10px 30px rgba(139,92,246,0.45); transform: translateY(-1px); }
.btn-glow:active { transform: translateY(0); }
.btn-call { background: linear-gradient(135deg, #22c55e, #10b981); box-shadow: 0 8px 24px rgba(34,197,94,0.35); color: #fff; }
.btn-call:hover { box-shadow: 0 10px 30px rgba(16,185,129,0.5); transform: translateY(-1px); }
.btn-call:active { transform: translateY(0) scale(0.98); }
.btn-ghost { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.10); }
.btn-ghost:hover { background: rgba(255,255,255,0.10); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tabular { font-variant-numeric: tabular-nums; }
.score-track { height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.score-fill { height: 100%; border-radius: 4px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.bar-track { background: rgba(255,255,255,0.06); border-radius: 4px 4px 0 0; }

/* 모바일 하단 내비 */
.e2m-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + var(--safe-bottom));
    background: rgba(8, 11, 22, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.e2m-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 2px; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.45); border-radius: 12px; transition: color .15s; }
.e2m-bottom-nav a.active { color: #93c5fd; }
.e2m-bottom-nav a i { font-size: 17px; }
.e2m-bottom-nav a.nav-call { position: relative; top: -14px; }
.e2m-bottom-nav a.nav-call .call-orb {
    width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #22c55e, #10b981); color: #fff; box-shadow: 0 8px 24px rgba(34,197,94,0.45);
    border: 3px solid rgba(8, 11, 22, 0.9);
}
.e2m-bottom-nav a.nav-call .call-orb i { font-size: 20px; }
@media (min-width: 768px) { .e2m-bottom-nav { display: none; } }
.page-scroll { padding-bottom: calc(84px + var(--safe-bottom)); }
@media (min-width: 768px) { .page-scroll { padding-bottom: 32px; } }

/* 토스트 */
#e2mToast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%) translateY(10px); z-index: 200; opacity: 0; pointer-events: none; transition: all .2s; max-width: calc(100vw - 32px); }
#e2mToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 768px) { #e2mToast { bottom: 28px; } }

/* 모달 */
.e2m-modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(5,7,15,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .e2m-modal-backdrop { align-items: center; padding: 20px; } }
.e2m-modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 24px); overflow-y: auto; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-bottom); animation: e2mSheetUp .22s cubic-bezier(.2,.8,.2,1); }
@media (min-width: 640px) { .e2m-modal { border-radius: 22px; max-height: calc(100dvh - 40px); } }
@keyframes e2mSheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.e2m-modal[hidden], .e2m-modal-backdrop[hidden] { display: none !important; }

/* 페르소나/주제 카드 */
.persona-card { transition: transform .15s, border-color .15s, background .15s; cursor: pointer; }
.persona-card:hover { transform: translateY(-2px); }
.persona-card.selected { border-color: rgba(96,165,250,0.7) !important; background: rgba(59,130,246,0.12) !important; box-shadow: 0 0 0 2px rgba(59,130,246,0.25); }
.topic-card { transition: transform .15s, border-color .15s, background .15s; cursor: pointer; }
.topic-card:hover { transform: translateY(-2px); border-color: rgba(96,165,250,0.45); }
.topic-card.done::after { content: "완료"; position: absolute; top: 10px; right: 10px; font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 999px; background: rgba(16,185,129,0.2); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }

/* 세그먼트 */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.seg button { padding: 6px 12px; border-radius: 9px; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.5); transition: all .15s; white-space: nowrap; }
.seg button.active { background: rgba(59,130,246,0.25); color: #bfdbfe; }
html[data-ui-theme-mode="light"] .seg button { color: #5a6781; }
html[data-ui-theme-mode="light"] .seg button.active { background: rgba(59,130,246,0.18); color: #1d4ed8; }

/* 접근성 */
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
