/* E-BASE英語塾 - メインCSS（スマホ専用設計）*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
    --p: #F97316; --pd: #EA580C; --pl: #FFF7ED;
    --dk: #1a1a1a; --g8: #292524; --g6: #57534E;
    --g5: #78716C; --g4: #A8A29E; --g3: #D6D3D1;
    --g2: #E7E5E4; --g1: #F5F5F4; --g0: #FAFAF9;
    --w: #FFFFFF;
    --gr: #16A34A; --grl: #DCFCE7;
    --bl: #3B82F6; --bll: #DBEAFE;
    --pu: #7C3AED; --pul: #EDE9FE;
    --rd: #EF4444; --rdl: #FEF2F2;
    --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --ja: 'Noto Sans JP', sans-serif;
    --en: 'DM Sans', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--ja); color: var(--dk); background: var(--g0); line-height: 1.7; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--p); text-decoration: none; }
img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* Layout */
.container { max-width: 480px; margin: 0 auto; padding: 0 16px; }
.page { padding-bottom: 80px; /* ナビ分 */ }

/* Header */
.header { background: var(--w); border-bottom: 1px solid var(--g2); padding: 14px 16px; position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: 480px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.header .logo { font-family: var(--en); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; color: var(--dk); }
.header .logo-mark { width: 28px; height: 28px; background: var(--p); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; }
.header .logo span { color: var(--p); }
.header-action { font-size: 13px; color: var(--g5); }

/* Bottom Navigation */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--w); border-top: 1px solid var(--g2); display: flex; justify-content: space-around; padding: 8px 0 env(safe-area-inset-bottom); z-index: 50; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--g4); padding: 4px 12px; transition: color 0.2s; }
.bottom-nav a.active { color: var(--p); }
.bottom-nav a svg { width: 22px; height: 22px; }

/* Cards */
.card { background: var(--w); border-radius: var(--radius); border: 1px solid var(--g2); padding: 20px; margin-bottom: 12px; }
.card-accent { border-left: 3px solid var(--p); }
.card-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.card-subtitle { font-size: 12px; color: var(--g5); }

/* Streak */
.streak { text-align: center; padding: 24px 0; }
.streak-number { font-family: var(--en); font-size: 48px; font-weight: 700; color: var(--p); line-height: 1; }
.streak-label { font-size: 12px; color: var(--g5); margin-top: 4px; }
.streak-fire { font-size: 28px; }

/* Progress Bar */
.progress { background: var(--g1); border-radius: 20px; height: 8px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; border-radius: 20px; background: var(--p); transition: width 0.5s ease; }

/* Task Checklist */
.task-list { list-style: none; }
.task-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--g1); }
.task-item:last-child { border-bottom: none; }
.task-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--g3); flex-shrink: 0; display: flex; align-items: center; justify-content: center; margin-top: 1px; cursor: pointer; transition: all 0.2s; }
.task-check.done { background: var(--gr); border-color: var(--gr); }
.task-check.done::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 700; }
.task-text { font-size: 14px; line-height: 1.6; }
.task-text.done { color: var(--g4); text-decoration: line-through; }
.task-meta { font-size: 11px; color: var(--g4); margin-top: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; width: 100%; }
.btn-primary { background: var(--p); color: #fff; box-shadow: 0 2px 8px rgba(249,115,22,0.2); }
.btn-primary:hover { background: var(--pd); transform: translateY(-1px); }
.btn-secondary { background: var(--g1); color: var(--dk); }
.btn-outline { background: transparent; color: var(--p); border: 1.5px solid var(--p); }
.btn-success { background: var(--gr); color: #fff; }
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn + .btn { margin-top: 8px; }

/* Form */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--g6); margin-bottom: 6px; }
.form-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--g2); border-radius: var(--radius-sm); font-size: 16px; background: var(--w); transition: border-color 0.2s; -webkit-appearance: none; }
.form-input:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.form-error { font-size: 12px; color: var(--rd); margin-top: 4px; }

/* Login Page */
.login-page { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; background: var(--w); }
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--p); border-radius: 14px; color: #fff; font-family: var(--en); font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.login-logo-name { font-family: var(--en); font-size: 22px; font-weight: 700; }
.login-logo-name span { color: var(--p); }
.login-logo-sub { font-size: 12px; color: var(--g4); margin-top: 4px; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-orange { background: var(--pl); color: var(--pd); }
.badge-green { background: var(--grl); color: var(--gr); }
.badge-blue { background: var(--bll); color: var(--bl); }
.badge-red { background: var(--rdl); color: var(--rd); }

/* Section Title */
.section-title { font-size: 13px; font-weight: 600; color: var(--g5); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; margin-top: 24px; }

/* Stage Info */
.stage-info { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--pl); border-radius: var(--radius); margin-bottom: 16px; }
.stage-number { font-family: var(--en); font-size: 28px; font-weight: 700; color: var(--p); line-height: 1; }
.stage-name { font-size: 15px; font-weight: 600; }
.stage-detail { font-size: 12px; color: var(--g5); }

/* Alert */
.alert { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 12px; font-size: 13px; line-height: 1.6; }
.alert-info { background: var(--bll); color: var(--bl); }
.alert-success { background: var(--grl); color: var(--gr); }
.alert-warning { background: var(--pl); color: var(--pd); }
.alert-error { background: var(--rdl); color: var(--rd); }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--g5); }
.text-orange { color: var(--p); }
.text-green { color: var(--gr); }
.text-blue { color: var(--bl); }
.text-red { color: var(--rd); }
.font-en { font-family: var(--en); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none; }

/* Animation */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 0.4s ease; }

/* Stopwatch */
.stopwatch { text-align: center; padding: 32px 0; }
.stopwatch-time { font-family: var(--en); font-size: 56px; font-weight: 700; color: var(--dk); line-height: 1; letter-spacing: -1px; }
.stopwatch-label { font-size: 12px; color: var(--g4); margin-top: 8px; }
.stopwatch-btns { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }
.stopwatch-btn { width: 60px; height: 60px; border-radius: 50%; border: none; font-size: 20px; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center; }
.stopwatch-btn-start { background: var(--p); color: #fff; box-shadow: 0 4px 16px rgba(249,115,22,0.3); }
.stopwatch-btn-stop { background: var(--rd); color: #fff; }
.stopwatch-btn-reset { background: var(--g1); color: var(--g5); }
