/* 学習ナビ：C3進学アカデミーのホームページに合わせたデザイン（黒×赤、斜めのライン、太い英字見出し） */
:root {
  --red: #c70a0a; --red-deep: #9e0707; --red-soft: #fbe7e7;
  --black: #141414; --char: #202020; --char2: #2b2b2b;
  --bg: #f1f1f1; --card: #ffffff; --ink: #1a1a1a; --sub: #666666; --line: #e1e1e1;
  --yellow: #ffc800; --yellow-soft: #fff5cc;
  --radius: 4px;
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-en: "Oswald", "Impact", "AvenirNextCondensed-Heavy", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 18px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--red); }

/* ---- ヘッダー（黒地に赤の斜めライン） ---- */
header.top { position: sticky; top: 0; z-index: 10; color: #fff; padding: 8px 16px;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(112deg, var(--black) 0 62%, var(--red) 62% 63.5%, var(--black) 63.5% 66%, var(--red) 66% 66.8%, var(--char) 66.8%); }
.brand { display: flex; flex-direction: column; line-height: 1.05; margin-right: auto; text-decoration: none; color: #fff; }
.brand .logo { font-weight: 900; font-size: 20px; letter-spacing: .02em; white-space: nowrap; }
.brand .logo b { color: var(--red); font-family: var(--font-en); font-size: 26px; margin-right: 2px; }
.brand .logo sup { font-size: 13px; color: var(--red); }
.brand .tag { font-family: var(--font-en); font-size: 9.5px; letter-spacing: .12em; color: #bbb; }
header.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
header.top nav a { text-decoration: none; padding: 8px 12px; color: #fff; font-weight: 700; font-size: 16px;
  border-bottom: 3px solid transparent; }
header.top nav a:hover { border-bottom-color: var(--red); }
.demo-date { font-size: 13px; background: var(--yellow); color: var(--black); padding: 2px 10px; font-weight: 700; }

main { max-width: 760px; margin: 0 auto; padding: 16px; }
main.wide { max-width: 1100px; }
main.full { max-width: none; padding: 0; }
main.full > .flash { margin: 0; }

/* ---- 見出し ---- */
h1 { font-size: 26px; margin: 8px 0 4px; font-weight: 900; }
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 900; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
h2::before { content: ""; width: 7px; height: 1.1em; background: var(--red); transform: skewX(-18deg); flex: none; }
.en { font-family: var(--font-en); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
h2 .en { color: var(--red); font-size: 22px; }
h2 .ja { font-size: 16px; }
.date { color: var(--sub); font-size: 17px; font-weight: 700; }

/* ---- ホーム上部（黒×赤の斜めのヒーロー） ---- */
.hero { position: relative; overflow: hidden; color: #fff; margin: -16px -16px 18px; padding: 22px 20px 26px;
  background: linear-gradient(160deg, var(--black) 0 55%, var(--red) 55% 58%, var(--char) 58% 100%); }
.hero::after { content: ""; position: absolute; right: -60px; top: 0; width: 170px; height: 100%;
  background: var(--red); transform: skewX(-24deg); }
.hero > * { position: relative; z-index: 1; }
.hero .date { color: #ddd; }
.hero h1 { color: #fff; font-size: 28px; margin: 4px 0 0; }
.hero h1.greet { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hero .god { height: 96px; width: auto; margin-bottom: -26px; }
@media (max-width: 520px) { .hero .god { height: 72px; } }
.hero .slogan { font-family: var(--font-en); letter-spacing: .14em; font-size: 12px; color: var(--yellow); }

/* ---- カード ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin: 14px 0; box-shadow: 0 2px 0 rgba(0,0,0,.05); }
.card.primary { border-top: 6px solid var(--red); }
/* カード全体をタップできる（中のボタンのリンク先へ） */
.tap-card { position: relative; cursor: pointer; }
.tap-card .stretch::after { content: ""; position: absolute; inset: 0; }
.card.warn { border-left: 6px solid var(--red); }
.card.ok { border-left: 6px solid var(--yellow); }
.card.dark { background: var(--char); color: #fff; border-color: var(--char); }
.card.dark .muted { color: #bbb; }
.muted { color: var(--sub); font-size: 15px; }
.big { font-size: 24px; font-weight: 900; }
.huge { font-size: 44px; font-weight: 700; line-height: 1.05; font-family: var(--font-en); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---- ボタン（角ばった赤、押せる影） ---- */
.btn { display: inline-block; border: 0; border-radius: var(--radius); padding: 12px 22px; font-size: 18px; font-weight: 700;
  background: var(--red); color: #fff; text-decoration: none; cursor: pointer; font-family: inherit; min-height: 48px;
  box-shadow: 0 4px 0 var(--red-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-deep); }
.btn.ghost { background: #fff; color: var(--red); border: 2px solid var(--red); box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 15px; min-height: 36px; box-shadow: 0 2px 0 var(--red-deep); }
.btn.small.ghost { box-shadow: none; }
.btn[disabled] { opacity: .45; }

/* ---- 授業チェック ---- */
.check { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--card);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 8px 0; font-size: 19px;
  color: var(--ink); cursor: pointer; font-family: inherit; font-weight: 700; }
.check .box { width: 34px; height: 34px; border: 3px solid var(--black); flex: none;
  display: grid; place-items: center; font-weight: 900; }
.check.done { border-color: var(--black); background: var(--yellow-soft); }
.check.done .box { background: var(--red); border-color: var(--red); color: #fff; }
.bar { height: 14px; background: var(--line); overflow: hidden; transform: skewX(-18deg); }
.bar > span { display: block; height: 100%; background: var(--red); }
.complete { text-align: center; font-family: var(--font-en); font-size: 34px; letter-spacing: .08em; color: var(--black);
  background: var(--yellow); padding: 8px 10px; margin: 10px 0; transform: skewX(-8deg); }

/* ---- ラベル ---- */
.pill { display: inline-block; padding: 2px 10px; font-size: 14px; font-weight: 700; background: var(--line); color: var(--ink); }
.pill.bad { background: var(--red); color: #fff; }
.pill.warn { background: var(--yellow); color: var(--black); }
.pill.ok { background: var(--black); color: #fff; }
.pill.info { background: var(--char2); color: #fff; }
.pill.prep { background: #fff; color: var(--ink); border: 1px dashed var(--ink); }
.sign { display: inline-block; border: 2px solid var(--red); color: var(--red); padding: 1px 8px; font-size: 14px;
  font-weight: 900; transform: rotate(-4deg); }

/* ---- 表・フォーム ---- */
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
th { background: var(--black); color: #fff; font-weight: 700; }
.table-wrap { overflow-x: auto; }
.flash { background: var(--black); color: #fff; padding: 10px 14px; margin: 10px 0; border-left: 6px solid var(--red); font-weight: 700; }
input, select, textarea { font-size: 18px; padding: 10px 12px; border-radius: var(--radius); border: 2px solid var(--line);
  background: #fff; color: var(--ink); font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); }
textarea { width: 100%; min-height: 84px; }
label { display: block; margin: 12px 0 4px; font-weight: 700; }
form.inline { display: inline; }
.pageimg { width: 100%; height: auto; border: 1px solid var(--line); background: #fff; }
.review-item { padding: 12px 0; border-top: 1px solid var(--line); }
.review-item:first-of-type { border-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

/* ---- ログイン ---- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(150deg, rgba(20,20,20,.45) 0 48%, rgba(199,10,10,.85) 48% 52%, rgba(32,32,32,.45) 52%),
    url("login_bg.jpg") center / cover no-repeat, var(--black); }
.login { width: 100%; max-width: 420px; background: #fff; padding: 26px 24px; border-top: 6px solid var(--red); }
.login input { width: 100%; }
.login .brand { color: var(--ink); margin: 0 0 14px; }
.login .brand .tag { color: var(--sub); }

/* ---- 夢日記 ---- */
.choice { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.choice label { margin: 0; font-weight: 400; position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: inline-block; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; font-weight: 700; background: #fff; }
.choice input:checked + span { border-color: var(--red); background: var(--red); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--yellow); }
.rating-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rating-row .name { min-width: 150px; font-weight: 700; }
.rating-row .choice input:checked + span { background: var(--yellow); border-color: var(--black); color: var(--black); }
.gate { text-align: center; }
.q { font-weight: 900; margin: 16px 0 6px; }
@media (max-width: 520px) { body { font-size: 17px; } .huge { font-size: 36px; } .brand .tag { display: none; } }
.page-title { margin: 6px 0 10px; }
.page-title .en { display: block; color: var(--red); font-size: 15px; letter-spacing: .14em; }
.page-title h1 { margin: 0; }

/* ---- 5教科（2026-10-05） ---- */
.score-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.score-table th, .score-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.score-table thead th { font-size: 14px; color: var(--sub); font-weight: 700; }
.score-table tbody th { font-weight: 900; white-space: nowrap; }
.score-table input { width: 5em; }
.subject-label { margin: 12px 0 2px; font-weight: 900; color: var(--red); }
.subject-head { margin-top: 18px; }
.score-line span { display: inline-block; margin-right: 12px; }
.after-lesson { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.hw-date { margin: 18px 0 6px; }
.plan-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.plan > summary { list-style: none; text-align: center; }
.plan > summary::-webkit-details-marker { display: none; }
.plan form { margin-top: 10px; align-items: flex-end; }
.plan label { margin: 0; }
.btn.bye { font-size: 22px; padding: 14px 28px; }

/* ---- クリアテストの自己採点（2026-10-07） ---- */
a.check { text-decoration: none; color: inherit; }
.check .ct-go { margin-left: auto; font-size: 14px; font-weight: 700; color: var(--red); white-space: nowrap; padding-left: 8px; }
.ct-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ct-code { min-width: 7em; font-weight: 900; font-size: 20px; }
.ct-in { display: flex; align-items: center; gap: 6px; flex: 1; }
.ct-in input { width: 5em; font-size: 22px; text-align: center; }
.ct-slash { font-size: 22px; color: var(--sub); }

/* ---- フォレスタの周回（2026-10-07） ---- */
.fo-subject { padding: 10px 0; border-top: 1px solid var(--line); }
.fo-subject:first-of-type { border-top: 0; }
.fo-subject h3 { margin: 6px 0; font-size: 19px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fo-one { background: var(--yellow-soft); padding: 8px 12px; margin: 6px 0; }
.fo-subject details summary { cursor: pointer; color: var(--red); font-weight: 700; margin: 6px 0; }
.fo-subject .pill { margin: 2px 0; }

/* ---- バナー（テスト対策・入試対策で、関係するカードをまとめる。2026-10-12） ---- */
.banner { margin: 22px 0 14px; border: 2px solid var(--char); border-radius: var(--radius); background: var(--bg); }
.banner-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; background: var(--char); color: #fff; padding: 10px 16px; }
.banner-head .en { color: var(--yellow); font-size: 15px; letter-spacing: .12em; }
.banner-head .ja { font-size: 20px; font-weight: 900; }
.banner > .card { margin: 12px; }
.banner.exam { border-color: var(--red-deep); }
.banner.exam .banner-head { background: var(--red-deep); }
/* ---- Road of the Top 達成表（2026-10-12） ---- */
.road-box { width: 30px; height: 30px; accent-color: var(--red); }

/* 間違えた問題の番号（2026-10-12） */
.ct-wrong { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wbox { position: relative; }
.wbox input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wbox span { display: inline-block; min-width: 2.4em; padding: 6px 4px; text-align: center; font-size: 20px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--card); cursor: pointer; }
.wbox input:checked + span { background: var(--red); border-color: var(--red); color: #fff; font-weight: 900; }
.wbox input:focus-visible + span { outline: 3px solid #1a73e8; }
.wnums { font-size: 20px; letter-spacing: 2px; color: var(--red); }

/* ---- 今日の名言（2026-10-15） ---- */
.quote-card { background: var(--card); border-left: 6px solid var(--red); padding: 14px 18px 12px; margin: 0 0 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); border-radius: var(--radius); }
.quote-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.quote-head .en { color: var(--red); font-size: 15px; }
.quote-head .ja { font-size: 13px; color: var(--sub); font-weight: 700; }
.quote-no { margin-left: auto; font-size: 12px; color: var(--sub); }
.quote-text { font-size: 21px; font-weight: 700; line-height: 1.55; margin: 4px 0 6px; white-space: pre-line; }
.quote-text::before { content: "“"; color: var(--red); font-family: var(--font-en); margin-right: 2px; }
.quote-text::after { content: "”"; color: var(--red); font-family: var(--font-en); margin-left: 2px; }
.quote-who { text-align: right; font-weight: 700; margin: 0; }
.quote-src { font-weight: 400; font-size: 12px; color: var(--sub); }
.quote-note { background: var(--yellow-soft); padding: 6px 10px; margin: 10px 0 0; font-size: 15px; }
.quote-card.coaching { border-left-color: var(--yellow); }
.quote-card.coaching .quote-text::before, .quote-card.coaching .quote-text::after { content: none; }
