@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;900&display=swap');
:root { --ink:#202127; --paper:#faf8f2; --yellow:#ffe680; --navy:#0b1020; --muted:#676a70; --line:#deddd6; }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scroll-padding-top:25px; }
body { margin:0; background:var(--paper); color:var(--ink); font-family:'Noto Sans JP',sans-serif; line-height:1.8; }
a { color:inherit; text-decoration:none; }
button,input { font:inherit; }
button,a.button { cursor:pointer; }
button:disabled { cursor:wait; opacity:.6; }
:focus-visible { outline:3px solid #9e7938; outline-offset:5px; }
[hidden] { display:none!important; }
header,footer { max-width:1280px; margin:auto; padding:21px 40px; display:flex; justify-content:space-between; align-items:center; gap:24px; }
header { border-bottom:1px solid var(--line); }
header>a:last-child { font-size:11px; color:var(--muted); }
header>a:last-child span { margin-left:9px; }
.brand { display:flex; align-items:center; gap:10px; font-size:23px; font-weight:900; letter-spacing:2px; }
.brand>span { display:flex; flex-direction:column; line-height:1.1; }
.brand small { margin-top:5px; font:500 9px monospace; letter-spacing:.2em; color:#8b743d; }
main { max-width:1200px; margin:auto; padding:0 40px; }
.hero { display:grid; grid-template-columns:1.15fr 1fr; align-items:center; gap:20px; padding:50px 0 65px; min-height:600px; }
.eyebrow { font:600 10px/1.5 monospace; letter-spacing:1.6px; color:#87703c; }
h1 { font-size:clamp(36px,4.4vw,60px); line-height:1.45; letter-spacing:-2px; margin:22px 0; font-weight:900; }
h1 em { font-style:normal; background:linear-gradient(transparent 76%,var(--yellow) 76%); }
h2 { font-size:clamp(23px,2.5vw,31px); line-height:1.6; letter-spacing:-.04em; margin:10px 0 15px; }
h3 { font-size:17px; line-height:1.7; }
p { color:var(--muted); font-size:13px; }
.hero-copy>p:not(.eyebrow) { font-size:13px; line-height:2.1; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:20px; border:1px solid var(--ink); border-radius:7px; background:var(--ink); color:#fffefb; padding:13px 23px; font-size:12px; font-weight:600; transition:background .2s,transform .2s; }
.button:hover { background:#3a3b41; transform:translateY(-2px); }
.hero .button { margin-top:18px; }
.hero-meta { display:block; margin-top:15px; font-size:10px; color:#88877f; letter-spacing:.05em; }
.hero-scene { position:relative; height:445px; display:grid; place-items:center; min-width:0; }
.scene-circle { position:absolute; width:95%; aspect-ratio:1; border-radius:50%; background:#f0e6cc; }
.hero-mentor { position:relative; width:440px; max-width:112%; height:auto; z-index:1; filter:drop-shadow(0 15px 17px #0b102012); }
.mentor-note { position:absolute; top:0; right:0; z-index:2; border:1px solid var(--line); background:#fffefb; padding:11px 16px; border-radius:12px 12px 12px 0; font-size:11px; transform:rotate(3deg); }
.hero-number { position:absolute; bottom:15px; left:-8px; z-index:2; display:grid; justify-items:center; min-width:128px; padding:13px 20px; border:1px solid #ffffffaa; border-radius:13px; background:#fffefbf0; box-shadow:0 6px 25px #0b10200a; transform:rotate(-6deg); }
.hero-number>span { font:500 17px monospace; color:#8c8d8d; }
.hero-number b { font:500 11px monospace; color:#8b743d; margin:6px 0; }
.hero-number strong { font:700 35px monospace; }
.lesson { padding:44px 0 35px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.section-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; }
.section-note { font-size:11px; color:#88877f; padding-bottom:19px; }
.rules { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:28px 0; }
.rules article { border-left:1px solid var(--line); padding:0 0 0 20px; }
.rules article:first-child { padding-left:0; border-left:0; }
.rules small { font-size:10px; color:#8b743d; }
.rules h3 { font-family:monospace; letter-spacing:-.7px; font-size:17px; margin:17px 0 12px; }
.rules p { font-size:11px; line-height:2; }
details { font-size:12px; }
details p { font-size:12px; max-width:900px; line-height:2.1; }
summary { cursor:pointer; color:#8b743d; font-weight:500; }
#courses { padding:50px 0 70px; }
.courses { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-top:22px; }
.course { position:relative; display:flex; flex-direction:column; padding:23px; min-height:227px; text-align:left; border:1px solid var(--line); border-radius:12px; background:#fffefb; color:var(--ink); transition:transform .2s,box-shadow .2s,border-color .2s; }
.course:hover { transform:translateY(-3px); box-shadow:0 8px 25px #0b102009; border-color:#baa461; }
.course>span { display:block; font:500 9px monospace; letter-spacing:1px; color:#91918b; }
.course-symbol { display:grid; width:43px; height:43px; place-items:center; font:500 18px monospace; background:#f3ecd7; color:#6e5e36; border-radius:9px; margin:16px 0 13px; }
.course>strong { font-size:16px; margin-bottom:8px; font-weight:700; }
.course>small { font-size:10px; color:var(--muted); padding-right:10px; line-height:1.8; }
.course>i { position:absolute; right:23px; top:26px; font:400 15px monospace; color:#9a9a95; }
.practice,.result { max-width:850px; margin:30px auto 70px; padding:36px; border:1px solid var(--line); border-radius:16px; background:#fffefb; }
.quiz-top { display:flex; justify-content:space-between; gap:16px; align-items:center; }
.quiz-top p { font-weight:700; font-size:14px; }
.quiet { border:1px solid #d4d1c7; background:transparent; color:var(--ink); border-radius:7px; padding:10px 15px; font-size:11px; cursor:pointer; }
.quiet:hover { background:#f3f0e6; }
progress { display:block; width:100%; height:5px; accent-color:#ac9147; margin:22px 0; border:0; border-radius:5px; overflow:hidden; }
progress::-webkit-progress-bar { background:#eeece4; }
progress::-webkit-progress-value { background:#b39a57; border-radius:5px; }
#question { font-size:24px; overflow-wrap:anywhere; }
label { display:block; font-size:11px; font-weight:500; margin:25px 0 8px; }
.answer-display { display:block; min-width:0; width:100%; border:1px solid #bcbAAF; border-radius:9px; padding:13px 16px; font:30px monospace; background:#faf9f5; text-align:right; color:var(--ink); }
.answer-display[aria-invalid="true"] { border-color:#a95032; }
.answer-error { color:#a04b2e; font-size:11px; margin:8px 0; }
#answer-form { max-width:440px; }
.answer-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:10px 0; }
.answer-controls button { border:1px solid var(--line); background:#f5f3ec; color:#676257; min-height:40px; border-radius:7px; font-size:14px; cursor:pointer; touch-action:manipulation; }
.answer-controls span { font-size:10px; margin-left:3px; }
.answer-controls button:last-child { font-size:11px; }
.answer-controls [aria-pressed="true"] { background:#f3e6bd; border-color:#ac9147; color:#463819; }
.answer-keypad { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.answer-keypad button { min-height:55px; padding:5px; border:1px solid var(--line); border-radius:9px; background:white; color:var(--ink); font:500 25px monospace; cursor:pointer; touch-action:manipulation; box-shadow:0 2px 0 #e9e6de; }
.answer-keypad button:hover,.answer-controls button:hover { background:#f3ecd7; }
.answer-keypad button:active { transform:translateY(2px); box-shadow:none; background:#eee2bc; }
.answer-keypad .keypad-submit { background:var(--ink); color:#fffefb; border-color:var(--ink); font:600 14px 'Noto Sans JP',sans-serif; box-shadow:0 2px 0 #0b1020; }
.answer-keypad .keypad-submit:hover { background:#3a3b41; }
#answer-help { font-size:10px; }
.feedback:not(:empty) { display:flex; align-items:center; gap:17px; margin:24px 0; padding:18px; border-radius:10px; background:#f4f0e5; overflow-wrap:anywhere; }
.feedback>img { width:100px; height:100px; object-fit:contain; flex-shrink:0; }
.feedback p { margin:7px 0; font-size:11px; line-height:1.9; }
.feedback strong { font-size:18px; }
.feedback.good { background:#edf4ec; }
.feedback.error { background:#f7f0e2; }
.practice-hint { display:flex; align-items:center; gap:9px; border-top:1px solid #eeece4; padding-top:20px; margin-top:28px; color:#8b8981; font-size:10px; }
.practice-hint img { flex-shrink:0; }
.result-intro { display:grid; grid-template-columns:1fr 200px; align-items:center; gap:20px; }
.result-intro>img { display:block; width:200px; height:auto; }
.score { font:600 56px monospace; letter-spacing:-3px; color:var(--ink); margin:18px 0; }
.result-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:20px; }
.review-item { border-top:1px solid #e6e3d9; margin-top:25px; padding-top:15px; }
.review-item h3 { font-size:14px; }
.review-item p { font-size:11px; }
footer { border-top:1px solid var(--line); font-size:10px; color:var(--muted); }
.footer-brand { display:inline-flex; gap:10px; align-items:center; font:500 9px monospace; letter-spacing:.08em; }
@media(max-width:900px) { .hero { gap:15px; } .hero-scene { height:370px; } .hero-mentor { width:370px; } .rules,.courses { grid-template-columns:repeat(2,minmax(0,1fr)); } .rules article:last-child { grid-column:1/-1; border:0; padding-left:0; } .section-note { display:none; } }
@media(max-width:600px) {
  header,footer { padding:18px 22px; } main { padding:0 22px; }
  .hero { grid-template-columns:1fr; padding:35px 0 40px; gap:34px; min-height:0; } h1 { font-size:clamp(32px,8.5vw,45px); } .hero-copy>p:not(.eyebrow) { font-size:12px; }
  .hero-scene { width:100%; max-width:360px; justify-self:center; height:350px; } .hero-mentor { width:350px; max-width:100%; } .scene-circle { width:85%; } .hero-number { bottom:0; left:0; min-width:105px; padding:11px 15px; } .mentor-note { font-size:10px; }
  .rules,.courses { grid-template-columns:1fr; } .lesson { padding:30px 0; } .rules { gap:14px; } .rules article { border-left:0; border-bottom:1px solid #e9e6dc; padding:0 0 12px; } .rules article:last-child { border-bottom:0; }
  .course { min-height:210px; } #courses { padding:35px 0 45px; }
  .practice,.result { padding:20px; } .quiz-top { align-items:flex-start; } #question { font-size:20px; }
  .feedback:not(:empty) { align-items:flex-start; gap:10px; padding:12px; } .feedback>img { width:65px; height:80px; }
  .result-intro { grid-template-columns:minmax(0,1fr) 110px; gap:5px; } .result-intro>img { width:110px; } .score { font-size:45px; } #best { font-size:10px; }
  .result-actions { flex-direction:column; align-items:flex-start; } footer { align-items:flex-start; flex-direction:column; gap:12px; } .practice-hint { align-items:flex-start; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } *,*::before,*::after { transition:none!important; } }
