:root{--quest-ink:#151d3c;--quest-paper:#faf9ff;--quest-border:#dad9f0;--quest-purple:#5942b2;--quest-red:#b41024}
body{color:var(--quest-ink);background:var(--quest-paper);font-family:"Hiragino Sans","Yu Gothic UI",Meiryo,"Noto Sans JP",system-ui,sans-serif}
.q-header{background:#fff;border-bottom:1px solid #e2e0ec;flex:none}
.q-header-inner{width:min(100% - 32px,1040px);margin:auto;display:flex;align-items:center;gap:12px;min-height:58px}
.q-brand{display:inline-flex;gap:9px;align-items:center;font-family:Arial,"Yu Gothic UI",sans-serif;font-size:clamp(14px,3.6vw,18px);font-weight:800;letter-spacing:.015em;color:#142449;text-decoration:none;white-space:nowrap}
.q-brand b{font-size:.86em;color:#475775;font-weight:700;letter-spacing:.055em}
.q-header-inner nav{margin-left:auto;display:flex;align-items:center;gap:6px}
.q-header-inner nav a,.q-parent{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:44px;min-height:44px;color:#3c3c60;text-decoration:none;font-weight:700;font-size:.87rem;border-radius:10px}
.q-parent{font-size:1.55rem}.q-parent:hover,.q-header-inner nav a:hover{background:#efedfb}
body[data-route=home] #q-home-link{display:none}
#app{width:min(100% - 36px,1040px);max-width:100%;padding:24px 0 36px;outline:none}
body[data-route=home]{min-height:100vh;min-height:100dvh}
body[data-route=home] #app{width:min(calc(100% - 40px),920px);padding:0;flex:none}
.q-home{display:grid;grid-template-rows:minmax(66px,.64fr) minmax(160px,2.9fr) auto;gap:clamp(8px,1.7vh,17px);height:min(calc(100vh - 59px),840px);height:min(calc(100dvh - 59px),840px);min-height:300px;padding:clamp(7px,1.5vh,16px) 0 max(env(safe-area-inset-bottom),clamp(9px,1.7vh,17px))}
.q-hero{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;border-radius:20px;border:1px solid #dcd7f7;background:linear-gradient(110deg,#eee9fc,#f7f4ff 56%,#e8e9ff)}
.q-hero>div{padding:0 clamp(16px,3.6vw,41px);z-index:1}
.q-hero p{margin:0 0 4px;color:#5e419a;font-size:clamp(.7rem,1.65vw,.88rem);font-weight:750;letter-spacing:.035em}
.q-hero h1{color:#171c3c;letter-spacing:-.04em;font-size:clamp(1.9rem,5vw,3rem);margin:0;line-height:1.18}
.q-hero img{height:100%;width:43%;position:absolute;right:0;object-fit:contain;object-position:right center;mix-blend-mode:multiply;mask-image:linear-gradient(90deg,transparent,#000 30%);z-index:0}
.q-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(9px,1.8vh,18px)}
.q-card{border:1px solid #dedcef;border-radius:20px;background:#fff;color:var(--quest-ink);box-shadow:0 3px 12px #35306209;display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;text-align:center;overflow:hidden;gap:clamp(1px,.5vh,6px);padding:clamp(7px,1.4vh,16px);transition:border-color .15s,box-shadow .15s,transform .15s}
.q-card.q-next{border:2px solid #ae98df}.q-card:hover{border-color:#8d76ca;box-shadow:0 7px 18px #42346518;transform:translateY(-1px)}
.q-card-art{display:block;width:100%;min-height:0;height:clamp(45px,15vh,147px);flex:0 1 auto;object-fit:contain;mix-blend-mode:multiply}
.q-card>div{flex:0 0 auto;max-width:100%}
.q-card h2{font-size:clamp(1.1rem,3vw,1.72rem);line-height:1.35;letter-spacing:-.035em;margin:0;font-weight:800}
.q-card p{color:#53576d;font-size:clamp(.78rem,1.75vw,.95rem);line-height:1.5;margin:2px 0 0;overflow-wrap:anywhere}
.q-sites{display:grid;grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;gap:clamp(5px,1.3vw,14px)}
.q-sites a{background:white;border:1px solid var(--quest-border);border-radius:13px;min-height:48px;max-width:100%;width:100%;padding:8px 6px;display:flex;align-items:center;justify-content:center;gap:8px;color:var(--quest-ink);font:700 clamp(.76rem,1.8vw,1rem)/1.2 system-ui,"Yu Gothic UI",sans-serif;text-decoration:none}
.q-sites a:hover{background:#f3f1fc;border-color:#a28ddd}.q-sites img{height:23px;width:23px}.q-sites a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.q-sites a:focus-visible,.q-card:focus-visible{outline:3px solid #7557de;outline-offset:1px}
.q-page{margin:auto;max-width:820px}.q-list-section{margin:23px 0}.q-list-section h2{font-size:1.12rem}.q-resume{background:#eeebfd;border:1px solid #d9d3ef;border-radius:15px;padding:14px 18px;display:flex;gap:10px;align-items:center;justify-content:space-between}.q-resume small{color:#574694}.q-resume h2{font-size:1.1rem;margin:0}.q-tools{display:flex;gap:8px;flex-wrap:wrap}
.quest-split{display:flex;align-items:stretch;gap:0}.quest-split>button{background:var(--quest-red);color:white;min-height:44px;border:none;padding:9px 14px;font-weight:750}.quest-split>button:first-child{border-radius:11px 0 0 11px;flex:1}.quest-split>button+button{border-radius:0 11px 11px 0;border-left:1px solid #fff9}
@media(max-width:580px){.q-header-inner{width:calc(100% - 14px);gap:2px;min-height:48px}.q-brand{gap:5px}.q-brand img{width:29px;height:29px}.q-brand b{letter-spacing:0}.q-header-inner nav{gap:0}.q-header-inner nav a{font-size:.78rem}.q-parent{min-width:38px}#app{width:calc(100% - 24px);padding:17px 0 28px}body[data-route=home] #app{width:calc(100% - 24px)}.q-home{height:calc(100vh - 49px);height:calc(100dvh - 49px);grid-template-rows:minmax(65px,.64fr) minmax(170px,2.8fr) auto}.q-hero{border-radius:16px}.q-card{border-radius:15px}.q-sites a{flex-direction:column;gap:3px;padding:6px 3px}.q-sites img{height:20px;width:20px}.q-hero img{width:40%}}
@media(max-height:560px) and (min-width:450px){.q-header-inner{min-height:43px}.q-brand img{width:27px;height:27px}.q-header-inner nav a,.q-parent{min-height:42px}.q-home{height:calc(100dvh - 44px);min-height:225px;grid-template-rows:auto minmax(88px,1fr) auto;padding:4px 0 6px;gap:5px}.q-hero{height:46px;border-radius:10px}.q-hero>div{display:flex;align-items:center;gap:12px}.q-hero p{margin:0}.q-hero h1{font-size:1.46rem}.q-grid{gap:5px}.q-card{flex-direction:row;gap:10px;padding:3px 8px;border-radius:11px}.q-card-art{width:22%;height:100%;max-height:77px}.q-card h2{font-size:1.04rem}.q-card p{font-size:.77rem}.q-sites a{min-height:44px;padding:3px;flex-direction:row}.q-sites img{width:19px;height:19px}}
@media(min-width:581px) and (min-height:561px){.q-sites a{min-height:54px}.q-grid{gap:15px}.q-card-art{max-width:80%}}
@media(max-width:374px){.q-brand{font-size:.78rem}.q-card h2{font-size:1.03rem}.q-card p{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){.q-card:hover{transform:none}}
/* Leave room within the home screen for storage status on local-file browsers. */
body[data-route=home]{display:grid;height:100vh;height:100dvh;grid-template-rows:auto auto minmax(0,1fr);align-content:start}
body[data-route=home] .q-header{grid-row:1}
body[data-route=home] .save-alert{grid-row:2;font-size:.85rem;line-height:1.4;padding:5px 4vw}
body[data-route=home] #app{grid-row:3;align-self:stretch;min-height:0;margin:0 auto}
body[data-route=home] .q-home{height:100%;max-height:840px}
