/* 資格クイズ（大人向け）2026-11-15 v3：勉強クイズ本体と同じ形・同じ色で、青い地だけ藍色 */
:root {
  --blue: #233f8f; --blue-2: #1d4fc0; --sky: #8db6ff; --orange: #ff7a2f; --yellow: #ffcd38; --red: #ef4a3c; --green: #22a45d;
  --ink: #141414; --sub: #5b5e66; --card: #fff; --cream: #fff8ea; --quiz-bg: #f1f5fc; --okt: #e2f5e9; --ngt: #fde6e3;
  --ok: var(--green); --ng: var(--red);
  --r: 14px; --line: 2px solid var(--ink); --pop: 3px 3px 0 var(--ink);
  --head: 'Dela Gothic One', 'M PLUS 1', 'Hiragino Sans', sans-serif; --body: 'M PLUS 1', 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { margin: 0; padding: 0; box-sizing: border-box; } [hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); background-color: var(--blue); background-image: var(--noise); color: var(--ink); line-height: 1.65; min-height: 100vh; overflow-x: clip; }
a { color: var(--blue-2); }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#app { max-width: 760px; margin: 0 auto; padding: 16px 16px 20px; }
.screen { display: none; } .screen.on { display: flex; flex-direction: column; gap: 12px; }

/* 押せるものの共通の形 */
.exam, .back, .chip, .go, .choice, .cta a { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--pop); transition: transform .08s, box-shadow .08s; min-height: 44px; }
.exam:active, .back:active, .chip:active, .go:active, .choice:not(.done):active, .cta a:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* トップ */
.hero { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: 8px; padding: 18px 18px 14px; border: 2px solid var(--orange); border-radius: 18px; isolation: isolate; }
.hero-text { position: relative; z-index: 2; }
.hero h1 { font-family: var(--head); font-weight: 400; font-size: clamp(2.6rem, 7vw, 3.7rem); white-space: nowrap; line-height: 1.02; color: var(--orange); letter-spacing: -.01em; transform: rotate(-4deg) skewX(-6deg); transform-origin: left bottom; margin-bottom: 14px; }
.hero .lead { display: inline-block; color: #fff; font-weight: 800; font-size: 1.02rem; line-height: 1.5; background: var(--ink); border-radius: 10px; padding: 6px 12px; }
.hero-art { position: relative; z-index: 1; } .hero-art img { display: block; width: 100%; height: auto; }
.bub { position: absolute; border-radius: 50%; z-index: 0; pointer-events: none; }
.bub.b1 { width: 74px; height: 74px; background: var(--yellow); left: -14px; bottom: -16px; }
.bub.b2 { width: 34px; height: 34px; background: var(--sky); left: 50px; bottom: -22px; border: var(--line); }
.bub.b3 { width: 46px; height: 40px; background: #fff; right: -10px; top: -14px; border: var(--line); }
.bub.b4 { width: 22px; height: 22px; background: var(--red); right: 34px; top: -20px; }
h1, .band, .exam b, .bar h2 { transition: opacity .18s; }
html.fl h1, html.fl .band, html.fl .exam b, html.fl .bar h2 { opacity: 0; }
.band { align-self: flex-start; font-family: var(--head); font-weight: 400; font-size: 1.15rem; line-height: 1.2; background: var(--yellow); border: var(--line); border-radius: 999px; padding: 7px 18px 8px; margin-top: 10px; transform: rotate(-1.5deg); }
.exams { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.exam { display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 12px; text-decoration: none; color: var(--ink); }
.exam:hover { background: var(--cream); }
.exam i { grid-row: 1 / 3; width: 56px; height: 56px; border-radius: 12px; border: var(--line); background: var(--c); color: #fff; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .82rem; line-height: 1.1; text-align: center; padding: 2px; }
.exam b { font-family: var(--head); font-weight: 400; font-size: 1.12rem; line-height: 1.3; align-self: end; }
.exam span { font-size: .8rem; color: var(--sub); font-weight: 600; align-self: start; }
.back-main { text-align: center; font-size: .92rem; } .back-main a { color: #fff; font-weight: 800; }

/* 資格のページ */
.bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar h2 { flex: 1; min-width: 0; font-family: var(--head); font-weight: 400; font-size: 1.7rem; line-height: 1.2; color: #fff; }
.bar h2::before { content: ''; display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--orange)); border: var(--line); margin-right: 10px; vertical-align: .12em; }
.back { padding: 6px 14px; font-weight: 800; font-size: .92rem; flex: none; }
#exam h3, #result h3 { color: #fff; font-size: .95rem; font-weight: 800; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 4px 14px; min-height: 38px; font-size: .9rem; font-weight: 800; box-shadow: 2px 2px 0 var(--ink); }
.chip.on { background: var(--yellow); }
.starts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.go { background: var(--orange); color: var(--ink); padding: 12px 22px; font-weight: 800; font-size: 1.08rem; }
.go.sub { background: var(--card); font-size: .98rem; }
.note { font-size: .9rem; color: #fff; font-weight: 600; } .note a { color: #fff; font-weight: 800; }

/* 4択（地は落ち着いた色） */
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .9rem; font-weight: 800; }
.qhead span:first-child { display: inline-flex; padding: 3px 12px; border-radius: 999px; background: var(--c); color: #fff; border: var(--line); }
.qhead span:last-child { font-family: var(--head); font-weight: 400; font-size: 1.1rem; color: #fff; }
.prog { height: 10px; border: var(--line); border-radius: 999px; background: #fff; overflow: hidden; } .prog i { display: block; height: 100%; background: var(--c); }
.qbox { background: var(--card); border: var(--line); border-radius: var(--r); padding: 18px 18px 16px; position: relative; margin-top: 8px; }
.qbox::before { content: 'Q'; position: absolute; top: -14px; left: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; border: var(--line); font-weight: 800; font-size: .95rem; display: grid; place-items: center; line-height: 1; }
.qtext { font-size: 1.15rem; font-weight: 600; line-height: 1.75; white-space: pre-wrap; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 14px; font-size: 1.02rem; line-height: 1.55; text-align: left; }
.choice b { flex: none; width: 30px; height: 30px; border-radius: 50%; border: var(--line); display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--cream); }
.choice:not(.done):hover { background: var(--cream); }
.choice.done { cursor: default; color: var(--ink); }
.choice.done:not(.ok):not(.ng) { color: #9a9da5; box-shadow: 2px 2px 0 var(--ink); } .choice.done:not(.ok):not(.ng) b { opacity: .5; }
.choice.ok { background: var(--okt); border-color: var(--ok); box-shadow: 3px 3px 0 var(--ok); } .choice.ok b { background: var(--ok); border-color: var(--ok); color: #fff; }
.choice.ng { background: var(--ngt); border-color: var(--ng); box-shadow: 3px 3px 0 var(--ng); } .choice.ng b { background: var(--ng); border-color: var(--ng); color: #fff; }
.flash-ok .choice.ok, .flash-ok .res { animation: pop .32s ease-out; } .flash-ng .choice.ng { animation: shake .34s ease-out; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 55% { transform: translateX(4px); } 80% { transform: translateX(-2px); } }
#fb { display: flex; flex-direction: column; gap: 8px; }
.res { align-self: flex-start; font-family: var(--head); font-size: 1.35rem; line-height: 1.2; padding: 5px 16px 6px; border-radius: 999px; border: var(--line); color: #fff; }
.res.ok { background: var(--ok); } .res.ng { background: var(--ng); }
.why { font-size: .97rem; background: var(--ngt); border: var(--line); border-radius: var(--r); padding: 10px 14px; }
.exp { font-size: .97rem; line-height: 1.8; background: var(--card); border: var(--line); border-radius: var(--r); padding: 12px 14px; }
#fb .go { align-self: stretch; background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--c); }
.qfoot { display: flex; margin-top: 4px; } .qfoot .back { background: transparent; box-shadow: none; color: #fff; border-color: #fff; }

/* 結果 */
.score { position: relative; overflow: hidden; background: var(--card); border: var(--line); border-radius: 18px; padding: 16px 20px; font-size: 1.1rem; font-weight: 800; }
.score::after { content: ''; position: absolute; right: -22px; bottom: -22px; width: 64px; height: 64px; border-radius: 50%; background: var(--yellow); border: var(--line); }
.score b { font-family: var(--head); font-weight: 400; font-size: 3rem; color: var(--orange); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.score small { font-size: 1rem; color: var(--sub); margin-left: 6px; }
.miss { background: var(--card); border: var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.miss .exp { border: 0; padding: 0; }

/* 説明・解説ページ（白いカードの上に） */
.info, .doc { max-width: 728px; margin: 6px auto 0; padding: 16px 20px; background: var(--card); border: var(--line); border-radius: 18px; font-size: .93rem; line-height: 1.85; }
.doc { margin-top: 16px; }
.info h2, .doc h2 { font-family: var(--head); font-weight: 400; font-size: 1.1rem; margin: 1.1em 0 .3em; color: var(--blue-2); }
.info h2:first-child { margin-top: 0; }
.info a, .doc a { font-weight: 600; } .info ul, .doc ul { padding-left: 1.3em; }
.doc h1 { font-family: var(--head); font-weight: 400; font-size: 1.7rem; line-height: 1.3; margin: 6px 0 12px; }
.crumb { font-size: .82rem; }
.upd { background: #fff4d6; border: var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.cta { margin: 14px 0; } .cta a { display: inline-flex; align-items: center; background: var(--orange); color: var(--ink) !important; text-decoration: none; font-weight: 800; padding: 10px 18px; }
.q { border: var(--line); border-radius: var(--r); padding: 12px 14px; margin: 10px 0; background: #fff; }
.q h3 { font-size: .85rem; color: var(--sub); } .q h3 small { margin-left: 8px; } .q .qt { font-weight: 600; margin: 4px 0; } .q ol { padding-left: 1.4em; margin: 4px 0; }
.q summary { cursor: pointer; font-weight: 800; color: var(--blue-2); } .q .ng { color: var(--sub); font-size: .88rem; }
.foot { max-width: 760px; margin: 18px auto 0; padding: 12px 16px 28px; font-size: .82rem; color: #fff; }
.foot a { color: #fff; margin-right: 14px; display: inline-block; }
@media (max-width: 600px) {
  #app { padding: 12px 12px 16px; }
  .info, .doc { margin-left: 12px; margin-right: 12px; padding: 14px 16px; }
  .hero { grid-template-columns: 1fr; padding: 14px 14px 10px; } .hero-art { margin: 0 -4px; }
  .hero h1 { font-size: 2.9rem; margin-bottom: 10px; }
  .exams { gap: 8px; } .exam { grid-template-columns: 46px 1fr; column-gap: 8px; padding: 8px 10px; }
  .exam i { width: 46px; height: 46px; font-size: .72rem; } .exam b { font-size: .95rem; } .exam span { font-size: .72rem; line-height: 1.35; }
  .bar h2 { font-size: 1.45rem; }
}
#fb .go small { display: block; font-size: .72rem; font-weight: 600; opacity: .75; margin-top: 2px; }

/* 2026-11-16 どこまで やったか（ゲージ） */
.pg { display: flex; height: 8px; border-radius: 99px; background: #e8e2d4; border: 2px solid var(--ink); overflow: hidden; }
.pg i { display: block; height: 100%; } .pg .c { background: #2fb36a; } .pg .w { background: #f2a33a; }
.pg.big { height: 16px; margin: 6px 0 4px; }
.exam.has-pg .pg { grid-column: 2; margin-top: 4px; }
.exam { grid-template-rows: auto auto auto; }
.pgbox { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--pop); padding: 10px 14px; margin: 14px 0 4px; color: var(--ink); }
.pgt { font-weight: 800; font-size: .95rem; } .pgt b { font-size: 1.25rem; }
.pgl { display: flex; gap: 12px; font-size: .75rem; font-weight: 700; color: var(--sub); }
.pgl span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; background: #e8e2d4; border: 1px solid var(--ink); vertical-align: -1px; }
.pgl .lc::before { background: #2fb36a; } .pgl .lw::before { background: #f2a33a; }

/* 自分の記録：勉強クイズ（src/style.css）と同じ形 2026-11-16 本人「勉強の ほうみたいに」 */
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; }
#record { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.rec-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rec-num { background: var(--card); border: var(--line); border-radius: var(--r); padding: 8px 12px 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; color: var(--ink); }
.rec-num span { width: 100%; font-size: .78rem; font-weight: 800; color: var(--sub); display: flex; align-items: center; gap: 4px; }
.rec-num b { font-family: var(--head); font-weight: 400; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rec-num small { font-size: .8rem; font-weight: 600; color: var(--sub); }
.rec-num.streak { background: var(--yellow); } .rec-num.streak span { color: var(--ink); } .rec-num.streak .ic { color: var(--red); }
.rec-sub { color: #fff; font-weight: 800; font-size: .92rem; margin-top: 2px; }
.sbars { background: var(--card); border: var(--line); border-radius: var(--r); padding: 8px 14px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; color: var(--ink); }
.sbar { display: grid; grid-template-columns: 4.6em 1fr 6.4em; align-items: center; gap: 8px; padding: 5px 0; font-size: .88rem; }
.sbar-name { display: flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }
.sbar-name .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); border: 1.5px solid var(--ink); flex: none; }
.sbar-track { height: 12px; border: var(--line); border-radius: 999px; background: #f1f1ef; overflow: hidden; }
.sbar-track i { display: block; height: 100%; background: var(--c); }
.sbar-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; } .sbar-val small { font-weight: 600; color: var(--sub); font-size: .78em; }
.sbar.none .sbar-val, .sbar.none .sbar-name { color: var(--sub); }
.resume-link { align-self: flex-start; background: none; border: 0; min-height: 40px; padding: 2px 0; color: #fff; font: inherit; font-weight: 800; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; text-align: left; cursor: pointer; }
.rec-empty { color: #fff; font-size: .9rem; }
.wrong-all { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; text-align: left; background: var(--orange); color: var(--ink); font: inherit; font-weight: 800; font-size: 1.05rem; border: var(--line); border-radius: var(--r); box-shadow: var(--pop); cursor: pointer; }
.wrong-all:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.wrong-all > .ic:first-child { width: 30px; height: 30px; padding: 5px; background: #fff; border: var(--line); border-radius: 50%; }
.wrong-all > .ic:last-child { margin-left: auto; width: 26px; height: 26px; }
.wrong-all small { display: block; font-size: .8rem; font-weight: 600; }
.exam .pg .c, .exam .pg .w { background: var(--c); }
@media (max-width: 600px) { .sbars { grid-template-columns: 1fr; } .rec-num b { font-size: 1.45rem; } .rec-num { padding: 6px 10px 8px; } }
