/* アプリで使う色をまとめています。 */
:root { --navy:#132c4f; --blue:#377dcc; --green:#13a58c; --green-dark:#0d7e6d; --mint:#e8f8f4; --ink:#243447; --muted:#687386; --line:#dce6eb; --white:#fff; --bg:#f4f8fa; --error:#cf4456; --shadow:0 18px 44px rgba(19,44,79,.1); }
/* 余白を含めて幅を計算します。 */
* { box-sizing:border-box; }
/* ページ全体の文字と背景です。 */
body { margin:0; color:var(--ink); background:var(--bg); font-family:"Yu Gothic UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif; line-height:1.7; }
/* 内容が横に広がりすぎないようにします。 */
.container { width:min(980px,calc(100% - 32px)); margin-inline:auto; }
/* ページ上部を濃い青色にします。 */
.site-header { color:var(--white); background:var(--navy); }
/* ヘッダーの中を横並びにします。 */
.header-inner { display:flex; align-items:center; justify-content:space-between; min-height:68px; }
/* サイト名と戻るリンクの見た目です。 */
.brand,.back-link { color:var(--white); font-weight:900; text-decoration:none; }
.back-link { color:#d8e8f2; font-size:.9rem; }
/* アプリ名と日付を横に並べます。 */
.hero { display:flex; align-items:center; justify-content:space-between; gap:32px; padding:58px 0 34px; }
/* 英字の小見出しです。 */
.eyebrow { margin:0 0 6px; color:var(--green-dark); font-size:.8rem; font-weight:900; letter-spacing:.14em; }
/* 大見出しの見た目です。 */
h1 { margin:0; color:var(--navy); font-size:clamp(2.25rem,7vw,4.5rem); line-height:1.15; letter-spacing:-.04em; }
.hero p:last-child { margin:13px 0 0; color:var(--muted); }
/* 今日の日付をカードにします。 */
.today-card { min-width:220px; padding:20px 24px; border:1px solid #c9e9e2; border-radius:20px; background:var(--mint); }
.today-card span,.today-card small { display:block; color:var(--green-dark); }
.today-card strong { display:block; margin:3px 0; color:var(--navy); font-size:1.25rem; }
/* 3つの記録カードを横に並べます。 */
.summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:20px; }
.summary-card { padding:18px 20px; border:1px solid var(--line); border-radius:17px; background:var(--white); }
.summary-card span { display:block; color:var(--muted); font-size:.84rem; }
.summary-card strong { color:var(--navy); font-size:1.08rem; }
.summary-card b { font-size:1.55rem; }
/* タイピング部分を大きな白いカードにします。 */
.typing-card,.result-card,.guide-card { margin-bottom:24px; padding:34px; border:1px solid var(--line); border-radius:25px; background:var(--white); box-shadow:var(--shadow); }
/* カード上部の見出しと丸印を横に並べます。 */
.card-top { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.question-count { margin:0; color:var(--green-dark); font-weight:900; }
h2 { margin:0; color:var(--navy); font-size:clamp(1.35rem,4vw,1.9rem); }
.progress-dots { display:flex; gap:7px; }
.progress-dot { width:12px; height:12px; border-radius:50%; background:#d7e0e5; }
.progress-dot.done { background:var(--green); }
.progress-dot.current { outline:3px solid #bce8df; background:var(--green-dark); }
/* 今日の問題を目立つ枠に表示します。 */
.prompt { margin:25px 0 20px; padding:24px; border-left:6px solid var(--green); border-radius:12px; color:var(--navy); background:#f0f8f7; font-size:clamp(1.15rem,3.2vw,1.55rem); font-weight:800; letter-spacing:.03em; }
/* 入力欄のラベルです。 */
.input-label { display:block; margin-bottom:7px; color:var(--navy); font-weight:900; }
/* タイピングする入力欄です。 */
textarea { width:100%; padding:16px 18px; border:2px solid #cfdce3; border-radius:15px; color:var(--ink); background:var(--white); font:inherit; font-size:1.08rem; resize:vertical; outline:none; transition:border-color .2s,box-shadow .2s; }
textarea:focus { border-color:var(--blue); box-shadow:0 0 0 4px rgba(55,125,204,.12); }
textarea.mismatch { border-color:var(--error); box-shadow:0 0 0 4px rgba(207,68,86,.1); }
.input-message { min-height:1.7em; margin:7px 0 20px; color:var(--muted); font-size:.9rem; }
.input-message.error { color:var(--error); font-weight:800; }
/* 練習中の時間・速度・正確率を表示します。 */
.live-stats,.result-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.live-stats div,.result-grid div { padding:15px; border-radius:14px; text-align:center; background:#f4f7f9; }
.live-stats span,.result-grid span { display:block; color:var(--muted); font-size:.8rem; }
.live-stats strong,.result-grid strong { color:var(--navy); }
/* やり直しボタンです。 */
.sub-button,.main-button { border:0; border-radius:999px; font:inherit; font-weight:900; cursor:pointer; }
.sub-button { margin-top:22px; padding:10px 18px; color:var(--navy); background:#edf2f5; }
.main-button { margin-top:25px; padding:13px 24px; color:var(--white); background:var(--green-dark); }
/* 完了画面を中央寄せにします。 */
.result-card { padding:42px; text-align:center; }
.result-message { margin:9px 0 25px; color:var(--muted); }
/* 使い方の説明です。 */
.guide-card { box-shadow:none; }
.guide-card ol { padding-left:1.4em; }
.guide-card p { margin-bottom:0; color:var(--muted); }
/* ページ下部の見た目です。 */
.site-footer { margin-top:55px; padding:22px 16px; color:#c8d4df; background:var(--navy); text-align:center; }
.footer-links { display:flex; flex-wrap:wrap; justify-content:center; gap:16px; margin-bottom:8px; }
.footer-links a { color:#d8e8f2; text-decoration:none; }
/* スマートフォンではすべて縦並びにします。 */
@media (max-width:650px) { .hero { align-items:stretch; flex-direction:column; } .today-card { min-width:0; } .summary-grid { grid-template-columns:1fr; } .typing-card,.result-card,.guide-card { padding:23px; } .card-top { align-items:flex-start; flex-direction:column; } .live-stats,.result-grid { grid-template-columns:1fr; } }
