/* title-theme.css - the look of the TITLE screen (K 2026-10-10 23:3x: 「claudeに作ってもらうと、だいたいこの配色と言うか見た目になる（暗い茶＋金の明朝）。これをやめて、私テイストにして」→「タイトルのことね」).
   K's taste = his adopted picture style ISP-002「かし子I絵柄・夏空クリアフラット」: a clear, saturated summer-sky azure as the biggest colour field, a deep warm chestnut outline,
   opaque clean local colours, ONE hard shallow shadow (never a blur), the cap yellow, grass lime, white clouds with a pale cold hard shadow. Cute, flat, readable.
   index.html's dark brown + gold (the #start gradient, h1 var(--gold), button) is overridden here. Only the title overlay (#start) is touched (the rules are scoped to #start, so it keeps the look while it fades out after 「とびたつ」): the HUD, the result screen and the photo-mode buttons keep theirs.
   Look: 空の看板 (white sign + yellow button). K chose this one on 2026-10-11 ("タイトルはAでいい"); the other two proposals (b ステッカー, c 教室ノート) and their switch were removed.
   Fonts come from Google Fonts through <link> in index.html (same way as JIZURA); offline they fall back to the system fonts below. */

html{
  --sky:#0486f5; --sky-deep:#0b55b8; --sky-pale:#c7e2f8; --cloud:#fff;
  --cap:#ffcf3f; --cap-deep:#d89a10; --grass:#b8c838; --grass-deep:#7f9a1f;
  --ink:#4b2915; --ink-soft:#7a4a2c; --peach:#ffe9d6; --coral:#ff7a66; --pink:#ff9fbd; --mint:#86d9a8; --paper:#fff8e8;
  --f-title:"Mochiy Pop One","HGP創英角ポップ体","UD デジタル 教科書体 NK-B","Hiragino Maru Gothic ProN","Yu Gothic UI",sans-serif;
  --f-ui:"Zen Maru Gothic","M PLUS Rounded 1c","Hiragino Maru Gothic ProN","Yu Gothic UI","Meiryo",sans-serif;
  --cloud-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 236'%3E%3Cg fill='%23c7e2f8' transform='translate(0 15)'%3E%3Ccircle cx='105' cy='135' r='70'/%3E%3Ccircle cx='205' cy='98' r='88'/%3E%3Ccircle cx='308' cy='128' r='66'/%3E%3Ccircle cx='372' cy='160' r='46'/%3E%3Ccircle cx='62' cy='170' r='44'/%3E%3Crect x='62' y='150' width='312' height='60' rx='30'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='105' cy='135' r='70'/%3E%3Ccircle cx='205' cy='98' r='88'/%3E%3Ccircle cx='308' cy='128' r='66'/%3E%3Ccircle cx='372' cy='160' r='46'/%3E%3Ccircle cx='62' cy='170' r='44'/%3E%3Crect x='62' y='150' width='312' height='60' rx='30'/%3E%3C/g%3E%3C/svg%3E");
  --plane-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 224 134'%3E%3Cg stroke='%234b2915' stroke-width='6' stroke-linejoin='round' stroke-linecap='round'%3E%3Crect x='40' y='92' width='132' height='15' rx='7.5' fill='%23fff3d6'/%3E%3Cpath d='M72 22 L72 94 M140 22 L140 94' fill='none'/%3E%3Cpath d='M170 72 L210 50 L210 94 Z' fill='%23e5483e'/%3E%3Cellipse cx='110' cy='76' rx='70' ry='22' fill='%23e5483e'/%3E%3Cpath d='M48 76 a24 22 0 0 1 22 -21 v42 a24 22 0 0 1 -22 -21z' fill='%23fff3d6'/%3E%3Ccircle cx='122' cy='52' r='15' fill='%23ffdcc0'/%3E%3Cpath d='M107 50 a15 13 0 0 1 30 0 z' fill='%23ffcf3f'/%3E%3Ccircle cx='117' cy='56' r='2.4' fill='%234b2915' stroke='none'/%3E%3Ccircle cx='128' cy='56' r='2.4' fill='%234b2915' stroke='none'/%3E%3Crect x='34' y='8' width='148' height='15' rx='7.5' fill='%23fff3d6'/%3E%3Ccircle cx='108' cy='15.5' r='4' fill='%230486f5' stroke='none'/%3E%3Ccircle cx='158' cy='15.5' r='4' fill='%230486f5' stroke='none'/%3E%3Crect x='20' y='46' width='9' height='56' rx='4.5' fill='%23c7e2f8'/%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- shared: the title overlay ---------- */
html #start{background:none;color:var(--ink);font-family:var(--f-ui);text-shadow:none}
html #start::before,html #start::after{content:"";position:absolute;z-index:-1;pointer-events:none;background:var(--cloud-img) center/contain no-repeat;aspect-ratio:440/236}
html #start::before{top:-3vh;right:-8vw;width:min(34vw,500px);animation:ttDriftA 16s ease-in-out infinite alternate}
html #start::after{bottom:11vh;left:-9vw;width:min(25vw,360px);transform:scaleX(-1);animation:ttDriftB 19s ease-in-out infinite alternate}
@keyframes ttDriftA{from{transform:translateX(0)}to{transform:translateX(-34px)}}
@keyframes ttDriftB{from{transform:scaleX(-1) translateX(0)}to{transform:scaleX(-1) translateX(-30px)}}
@media(prefers-reduced-motion:reduce){html #start::before,html #start::after{animation:none}}

html #start h1{margin:0;font-family:var(--f-title);font-weight:400;text-shadow:none;color:var(--sky);line-height:1.14}
html #start h2{font-family:var(--f-ui);font-weight:700;text-shadow:none;color:var(--ink)}
html #start button{font-family:var(--f-title);font-weight:400;letter-spacing:.08em;border-radius:999px;border:4px solid var(--ink);color:var(--ink);background:#fff;cursor:pointer;transition:transform .12s ease-out,box-shadow .12s ease-out,background .12s;text-shadow:none}
html #start button:active:not(:disabled){transform:translateY(5px)}
html #start #loadMsg{font-family:var(--f-ui);font-weight:700;text-shadow:none;opacity:1;color:var(--ink)}
html #start #bestInfo{font-family:var(--f-ui);font-weight:700;text-shadow:none;opacity:1;color:var(--ink)}
html #start #ctrls b,html #start .chRow button.sub{font-family:var(--f-ui)}
html #start #ctrls b{background:var(--cap);color:var(--ink);border:2px solid var(--ink);border-radius:8px;padding:0 8px;font-weight:900;box-shadow:0 2px 0 var(--cap-deep)}

/* ---------- theme A  空の看板: a white sign with the title, a yellow ribbon, a big cap-yellow button ---------- */
html #start h1{
  position:relative;display:inline-block;align-self:center;padding:.2em .6em .26em;font-size:clamp(36px,6vw,92px);letter-spacing:.015em;
  background:#fff;border:.07em solid var(--ink);border-radius:.55em;transform:rotate(-1.6deg);
  box-shadow:0 .1em 0 var(--sky-pale),0 .1em 0 .07em var(--ink);
}
html #start h1 span{-webkit-text-stroke:.14em var(--ink);paint-order:stroke fill;margin:0 .03em}
html #start h1 span:first-child{color:var(--sky)}
html #start h1 span:last-child{color:var(--cap)}
html #start h2{align-self:center;margin:1.1em 0 auto;padding:.34em 1.3em .4em;font-size:clamp(14px,1.9vw,25px);letter-spacing:.1em;background:var(--cap);border:4px solid var(--ink);border-radius:999px;transform:rotate(1deg);box-shadow:0 .28em 0 var(--cap-deep),0 .28em 0 4px var(--ink)}
html #start #titleBtns{gap:0}
html #start #startBtn{font-size:clamp(26px,3.6vw,48px);padding:.34em 1.9em .4em;background:var(--cap);box-shadow:0 9px 0 var(--cap-deep),0 9px 0 4px var(--ink);margin-bottom:8px}
html #start #startBtn:hover:not(:disabled){transform:translateY(-3px);background:#ffd95e;box-shadow:0 12px 0 var(--cap-deep),0 12px 0 4px var(--ink)}
html #start #startBtn:active:not(:disabled){transform:translateY(6px);box-shadow:0 3px 0 var(--cap-deep),0 3px 0 4px var(--ink)}
html #start #startBtn:disabled{background:#ffeaa6;color:#a3825c;border-color:#9f805e;box-shadow:0 9px 0 #e8d08e,0 9px 0 4px #9f805e;opacity:1;cursor:progress}
html #start button.sub{font-size:clamp(13px,1.35vw,17px);letter-spacing:.06em;padding:.5em 1.5em .55em;margin-top:18px;border-width:3px;background:#fff;color:var(--sky-deep);box-shadow:0 5px 0 var(--sky-pale),0 5px 0 3px var(--ink)}
html #start button.sub:hover:not(:disabled){background:#eaf6ff;transform:translateY(-2px)}
html #start button.sub:disabled{opacity:1;color:#8a9bb0;border-color:#9f805e;background:#f4f4f4;box-shadow:0 5px 0 #dedede,0 5px 0 3px #9f805e}
html #start #loadMsg{align-self:center;padding:.28em 1.1em .32em;font-size:14px;background:#fff;border:3px solid var(--ink);border-radius:999px;box-shadow:0 4px 0 var(--sky-pale),0 4px 0 3px var(--ink);margin-bottom:1.2em}
html #start #bestInfo{align-self:center;padding:.2em 1em;background:var(--peach);border:3px solid var(--ink);border-radius:999px;font-size:14px;letter-spacing:.06em}

/* the 「あそびかた・むずかしさ・きろく」 panel: the sky fills the screen, the texts sit on white cards */
html #start.more{background:var(--sky)}
html #start.more h1{font-size:clamp(28px,4vw,58px);padding:.14em .5em .2em}
html #start.more h2{margin:.8em 0 .7em;font-size:clamp(12px,1.35vw,18px);padding:.22em 1em .28em}
html #start.more #startBtn{font-size:clamp(20px,2.3vw,30px);padding:.22em 1.4em .28em;margin-bottom:0;box-shadow:0 6px 0 var(--cap-deep),0 6px 0 4px var(--ink)}
html #start.more #loadMsg{margin-bottom:.7em}html #start.more button.sub{margin-top:12px}
html #start.more #ctrls,html #start.more #chBox{box-sizing:border-box;width:min(94vw,900px);background:#fff;color:var(--ink);border:4px solid var(--ink);border-radius:26px;padding:18px 26px 20px;opacity:1;box-shadow:0 8px 0 var(--sky-pale),0 8px 0 4px var(--ink);font-weight:500;text-align:center}
html #start.more #chBox{margin-top:16px;padding-top:12px}
html #start.more #ctrls{margin-top:18px;font-size:clamp(13px,1.35vw,16px);line-height:1.9}
html #start .chRow{color:var(--ink);font-weight:700;opacity:1;letter-spacing:.12em}
html #start .chRow>span{opacity:1;color:var(--sky-deep)}
html #start .chRow button.sub{margin-top:0;font-size:14px;padding:.3em 1.1em .35em;letter-spacing:.05em;border-width:3px;box-shadow:0 4px 0 var(--sky-pale),0 4px 0 3px var(--ink);color:var(--ink)}
html #start .chRow button.on{background:var(--sky);color:#fff;box-shadow:0 4px 0 var(--sky-deep),0 4px 0 3px var(--ink)}
html #start #chDesc{color:var(--ink-soft);opacity:1;font-weight:700}
html #start .medal{border:2px solid var(--ink);background:var(--cap);color:var(--ink)}
html body.title #book{background:rgba(4,134,245,.92);color:var(--ink);font-family:var(--f-ui)}
html body.title #book .panel{background:#fff;border:4px solid var(--ink);border-radius:26px;box-shadow:0 8px 0 var(--sky-pale),0 8px 0 4px var(--ink)}
html body.title #book h3,html body.title #book .rt th,html body.title #book .rt td b,html body.title #book .mt b{color:var(--sky-deep)}
html body.title #book .mt{border:2px solid var(--ink-soft);background:#fff7de;opacity:.55}html body.title #book .mt.got{opacity:1;border-color:var(--ink);background:var(--cap)}
html body.title #book .mt b{color:var(--ink)}html body.title #book .rt th,html body.title #book .rt td{border-color:#c9b79f}
html body.title #book button.sub{font-family:var(--f-ui)}

/* the toy biplane (with かし子 in the cockpit) flying out of the title's top-left corner - themes a and b */
html #start h1::before{content:"";position:absolute;left:-1.62em;top:-.12em;width:1.75em;aspect-ratio:224/134;background:var(--plane-img) center/contain no-repeat;transform:rotate(-9deg);pointer-events:none;animation:ttFly 4.6s ease-in-out infinite alternate}
@media(max-width:1000px){html #start h1::before{display:none}}
@keyframes ttFly{from{translate:0 0;rotate:0deg}to{translate:.08em -.1em;rotate:3deg}}
@media(prefers-reduced-motion:reduce){html #start h1::before{animation:none}}

/* ---------- small screens ---------- */
@media(max-width:600px){
  html #start{padding-left:12px;padding-right:12px;padding-top:clamp(24px,5vh,46px)}
  html #start h1{font-size:clamp(34px,11.5vw,64px)}
  html #start h2{font-size:clamp(12px,3.6vw,16px);letter-spacing:.04em;padding:.3em .9em .36em}
  html #start #startBtn{font-size:clamp(24px,8vw,34px)}
  html #start .subRow{gap:4px}
  html #start button.sub{font-size:13px;padding:.45em 1.05em .5em}
  html #start.more #ctrls,html #start.more #chBox{padding:14px 14px 16px;border-radius:20px}
  html #start::before{width:62vw;right:-14vw}html #start::after{width:52vw;left:-14vw}
}
@media(max-height:500px) and (min-width:600px){
  html #start h1{font-size:clamp(28px,5.4vw,52px);padding:.14em .5em .2em}
  html #start h2{margin:.7em 0 auto;font-size:clamp(11px,1.6vw,15px)}
  html #start #startBtn{font-size:22px;padding:.26em 1.5em .32em;margin-bottom:4px}
  html #start button.sub{margin-top:10px;font-size:12px}
  html #start::before,html #start::after{display:none}
}
