:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Hiragino Sans",Meiryo,sans-serif;color:#edf1ff;background:#0b1023;font-synthesis:none;--bg:#0b1023;--panel:#151e39;--panel2:#1b2745;--line:#2b3655;--muted:#aab5d1;--white:#f4f6ff;--accent:#fc9c8c;--purple:#a89bff;--mint:#7be7bd;--blue:#86bafc}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 50% -400px,#30335a 0,transparent 60%),var(--bg)}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.6}.shell{max-width:1080px;margin:0 auto;padding:0 24px 124px}.topbar{display:flex;align-items:center;gap:13px;height:100px}.brand-mark{height:48px;width:48px;border-radius:16px;background:linear-gradient(140deg,#ffb89d,#db786f);display:grid;place-items:center;color:#24213b;font-size:23px;font-weight:900;box-shadow:0 9px 28px #fd87712a}.brand-text{display:flex;flex-direction:column;gap:4px}.brand-text small{font-size:11px;letter-spacing:.08em;color:#b4c1dd}.brand-text strong{font-size:18px;letter-spacing:.015em}.version-pill{margin-left:auto;background:#273250;border:1px solid #3c4767;color:#bdc8e5;border-radius:50px;padding:8px 12px;font-size:11px}.view{display:none;animation:fade .24s ease both}.view.active{display:block}@keyframes fade{from{opacity:.35;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.hero{position:relative;overflow:hidden;min-height:332px;background:linear-gradient(111deg,#35385e 0%,#252d50 50%,#35305a 100%);border:1px solid #565579;border-radius:28px;padding:38px 46px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 12px 40px #0002}.hero::after{content:"";position:absolute;width:400px;height:400px;right:-90px;top:-120px;border:1px solid #ffffff12;border-radius:50%;box-shadow:0 0 0 65px #ffffff08,0 0 0 136px #ffffff04}.hero-content{z-index:1}.eyebrow,.kicker{font-size:11px;letter-spacing:.17em;font-weight:900;color:var(--accent)}.eyebrow span{padding:0 5px}.hero h1{font-size:clamp(27px,4.6vw,42px);letter-spacing:.025em;line-height:1.38;margin:17px 0 10px}.hero h1 em{font-style:normal;color:#ffd0b9}.hero p{margin:0 0 24px;color:#d2d5ee;font-size:14px;line-height:1.9}.hero-sigil{position:relative;z-index:1;flex:none;width:198px;height:198px;border:2px solid #ffd5b4b5;border-radius:50%;box-shadow:0 0 0 10px #ffffff0b,0 0 0 25px #ffffff07;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#ffd9b9;transform:rotate(-10deg);font-family:serif}.hero-sigil span{font-size:31px}.hero-sigil b{line-height:.98;font-size:75px}.hero-sigil small{font-size:12px;letter-spacing:.2em}.btn{border:0;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:14px 21px;border-radius:13px;font-size:14px;font-weight:800;white-space:normal;text-align:center;transition:transform .12s,background .12s}.btn:active,.menu-card:active,.option:active{transform:scale(.985)}.btn-hero{background:#ffd2b4;color:#30283a;box-shadow:0 6px 24px #e8a48830}.btn-hero span{margin-left:20px;font-size:18px}.btn-primary{background:linear-gradient(100deg,#f9ad9c,#f7c5a7);color:#252640}.btn-secondary{background:#2b3859;border:1px solid #485578;color:#e4eaff}.btn.full{width:100%;margin-top:22px}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:20px 0}.stat-card{border:1px solid #313b5b;background:linear-gradient(145deg,#1b2543,#17213b);border-radius:20px;padding:21px 23px;min-height:146px}.stat-label{font-weight:700;color:#bec8e0;font-size:13px}.stat-value{font-size:43px;letter-spacing:-.055em;font-weight:900;line-height:1.4;margin-top:7px;color:#fff;font-variant-numeric:tabular-nums}.stat-value small{font-size:17px;letter-spacing:0;padding-left:5px;color:#ced9ef}.stat-foot{font-size:11px;color:#aab9d5;line-height:1.5}.panel{background:linear-gradient(145deg,#18223e,#131d36);border:1px solid #303a59;border-radius:22px;padding:26px 28px;margin:19px 0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:0 0 23px}.section-head h2,.section-head h3{font-size:20px;letter-spacing:.015em;margin:7px 0 0}.date-chip,.small-pill{font-size:12px;color:#cbd6ec;padding:8px 12px;border:1px solid #394462;background:#252f4b;border-radius:100px}.progress-layout{display:flex;align-items:center;gap:38px}.progress-ring{--progress:0;flex:none;width:155px;height:155px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#f3b49c calc(var(--progress)*1%),#3a4365 0%)}.progress-ring>div{background:#1a2441;width:133px;height:133px;border-radius:50%;display:flex;flex-direction:column;justify-content:center;align-items:center}.progress-ring strong{font-weight:900;font-size:43px}.progress-ring strong small{font-size:18px;color:#aebbd6}.progress-ring span{font-size:11px;color:#a4b3d0}.progress-copy h3{font-size:19px;margin:0 0 9px}.progress-copy p{line-height:1.8;margin:0 0 18px;color:#aebdd9;font-size:13px}.menu-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.menu-card{position:relative;text-align:left;display:flex;flex-direction:column;min-height:168px;background:#212d4c;color:var(--white);border:1px solid #394968;border-radius:17px;padding:18px;gap:9px}.menu-card strong{font-size:15px}.menu-card small{color:#b7c5df;font-size:11px;line-height:1.6;padding-right:10px}.menu-icon{height:37px;width:37px;border-radius:12px;display:grid;place-items:center;font-size:22px;font-weight:900}.menu-orange{background:#b975623a;color:#ffc4aa}.menu-blue{background:#4589d537;color:#a7d1ff}.menu-purple{background:#9274cf37;color:#d3baff}.menu-arrow{position:absolute;right:14px;bottom:12px;color:#a9b6d0}.text-link,.back-link{background:transparent;border:0;color:#f7b59e;font-weight:800;padding:6px}.category-row{display:grid;grid-template-columns:144px 1fr 75px;align-items:center;gap:18px;margin:17px 0}.category-name{font-size:13px;color:#d3ddf3}.catbar{height:9px;background:#303c5a;border-radius:30px;overflow:hidden}.catbar div{height:100%;background:linear-gradient(90deg,#b0a7ff,#fcb59f);border-radius:30px;min-width:0}.category-value{text-align:right;color:#e5eaff;font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}.disclaimer{color:#8898bb;font-size:11px;text-align:center;margin:24px auto;line-height:1.8}.bottom-nav{position:fixed;bottom:14px;left:50%;transform:translateX(-50%);z-index:10;width:min(calc(100% - 32px),600px);display:grid;grid-template-columns:repeat(4,1fr);background:#242c48f5;border:1px solid #52607b;border-radius:22px;padding:7px;box-shadow:0 8px 35px #040816aa;backdrop-filter:blur(16px)}.nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:7px;background:transparent;border:0;color:#a9b5ce;border-radius:15px;min-height:54px}.nav-item.active{background:#ffffff13;color:#ffd0b5}.nav-item span{font-size:23px;line-height:26px}.nav-item small{font-size:10px;font-weight:700}.quiz-top{display:flex;align-items:center;justify-content:space-between;margin:10px 0 24px}.quiz-head{display:flex;align-items:flex-end;justify-content:space-between}.quiz-head h2{font-size:24px;margin:7px 0 15px}.quiz-head>span{color:#d4c9ff;font-size:17px;font-weight:900;margin-bottom:16px}.track{height:8px;border-radius:40px;background:#354360;overflow:hidden;margin-bottom:23px}.track>div{height:100%;width:0;background:linear-gradient(90deg,#b2a2ff,#ffc1aa);border-radius:40px;transition:width .2s}.question-panel{background:#17223e;border:1px solid #354264;border-radius:24px;padding:32px 34px;min-height:440px}.question-meta{display:flex;justify-content:space-between;align-items:center;gap:15px;font-size:12px;color:#aeb9d3}.category-label{display:inline-block;padding:7px 10px;color:#ffc6b1;background:#754c543b;border:1px solid #956d71;border-radius:10px;font-size:11px;font-weight:800}.question-panel h3{font-size:clamp(18px,3vw,23px);line-height:1.7;letter-spacing:.008em;margin:23px 0 10px;white-space:pre-line}.question-note{color:#aab9d6;line-height:1.8;font-size:12px;margin:0 0 25px}.options{display:flex;flex-direction:column;gap:12px}.option{display:flex;align-items:center;gap:14px;width:100%;min-height:66px;background:#243151;border:1px solid #455171;border-radius:14px;color:#f0f3ff;padding:12px 16px;text-align:left;font-size:14px;line-height:1.65}.option .letter{flex:none;width:34px;height:34px;border:1px solid #596780;background:#35415f;border-radius:10px;display:grid;place-items:center;font-weight:900;color:#bfcbe5}.option.correct{border-color:#6abf9d;background:#28574d66}.option.correct .letter{background:#28846c;color:#fff;border-color:#58ac93}.option.incorrect{background:#66394180;border-color:#d98e88}.option.incorrect .letter{background:#a04c52;color:#fff;border-color:#c46c71}.option.muted{opacity:.53}.feedback{margin-top:22px;padding:21px;border-radius:15px;background:#212e4a;border:1px solid #475477}.feedback-head{font-size:18px;font-weight:900;margin-bottom:12px}.feedback-head.yes{color:#85edc6}.feedback-head.no{color:#ffb2a8}.correct-answer{font-weight:800;font-size:13px;color:#f1d2bd;margin-bottom:9px}.explanation{font-size:13px;color:#dbe2f4;line-height:1.95;white-space:pre-line}.teacher-note{font-size:12px;line-height:1.9;color:#e7bfb9;border-top:1px solid #43506c;margin-top:17px;padding-top:13px}.microcopy{text-align:center;color:#8c9bbe;font-size:11px;line-height:1.8;padding:15px 10px}.complete-card{margin:45px auto;max-width:580px;text-align:center;padding:40px 24px;background:#1b2543;border:1px solid #455173;border-radius:28px}.complete-icon{font-size:53px}.complete-card h2{font-size:22px;line-height:1.6}.complete-score{font-size:57px;color:#ffd6b8;font-weight:900}.complete-pct{font-size:18px;font-weight:800}.complete-card p{color:#bac5dc;line-height:1.9}.complete-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:20px}.page-head{margin:24px 0}.page-head h2{font-size:29px;margin:7px 0}.page-head p{font-size:13px;line-height:1.8;color:#aebbda;max-width:680px}.tabs{display:flex;gap:9px}.tab{border:1px solid #495875;background:#212e4d;color:#b9c8e5;border-radius:13px 13px 0 0;padding:14px 20px;font-weight:800}.tab.active{background:#32395d;color:#ffcfb9;border-color:#92778b}.draw-panel{border-radius:0 22px 22px 22px;margin:0;padding:25px}.draw-title h3{font-size:20px}.draw-title p{font-size:13px;color:#bdc8e0;line-height:1.9}.tool-row{display:flex;gap:8px;flex-wrap:wrap;margin:19px 0 15px}.tool{border:1px solid #56627e;background:#253451;color:#dce5f8;font-size:12px;font-weight:800;padding:10px 13px;border-radius:10px}.tool.active{background:#635476;color:#fff1e3;border-color:#f4b8ac}.tool.light{background:#202a46}.draw-scroll{max-width:100%;overflow:auto;border:1px solid #69738a;border-radius:13px;background:#faf8f3;-webkit-overflow-scrolling:touch}.draw-stage{width:840px;height:520px;position:relative;isolation:isolate}.draw-stage svg{position:absolute;left:0;top:0;width:840px;height:520px;pointer-events:none}.draw-stage canvas{position:absolute;left:0;top:0;width:840px;height:520px;touch-action:none;cursor:crosshair}.draw-stage canvas.panning{pointer-events:none}.draw-hint{color:#aebbd1;font-size:11px;line-height:1.8}.draw-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.drawing-answer{border:1px solid #536986;background:#202f4a;border-radius:15px;padding:18px;margin-top:20px;color:#e5ecfa;font-size:13px;line-height:1.95}.drawing-answer h4{margin:0 0 8px;color:#bff3d6;font-size:16px}.drawing-answer ul{padding-left:19px;margin:4px 0}.counter-panel{border:1px solid #4c5b7a;background:#202c49;padding:18px;border-radius:15px;margin-top:17px}.counter-title{font-size:14px;font-weight:800;color:#ffd1b9}.counter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:480px;margin:13px 0}.counter-grid label{font-size:12px;color:#c1cee4;display:flex;flex-direction:column;gap:8px}.counter-grid input{background:#131f38;color:#fff;border:1px solid #5d6a86;padding:12px;font-size:16px;border-radius:9px;width:100%}.count-result{font-size:13px;line-height:1.8;margin-top:12px}.records-stats .stat-value{font-size:35px}.history-bars{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:8px;align-items:end;height:170px}.history-day{display:flex;flex-direction:column;align-items:center;gap:6px;color:#9aabc8;font-size:10px;min-width:0}.history-day .history-value{height:110px;width:100%;display:flex;align-items:flex-end;justify-content:center;background:#202b46;border-radius:6px;overflow:hidden}.history-day .history-value i{width:100%;display:block;background:linear-gradient(0deg,#9389db,#eeb69f);min-height:0}.history-day b{font-weight:700;color:#cad3e8}.history-day.no-data .history-value i{background:#45526d}.records-category{display:grid;grid-template-columns:130px 1fr 110px 110px;gap:12px;align-items:center;border-bottom:1px solid #33405b;padding:14px 0;font-size:12px}.records-category:last-child{border:0}.records-category .cat-caption{font-weight:700}.records-category .small-note{font-size:11px;color:#8497b8}.filter-label{font-size:12px;color:#b8c5db;display:flex;justify-content:flex-start;align-items:center;gap:10px;margin:8px 0 19px}.filter-label select{background:#263452;color:#f1f4ff;border:1px solid #4e5b7a;border-radius:10px;padding:9px;max-width:230px}.question-record{display:grid;grid-template-columns:minmax(0,1fr) 100px 100px;gap:8px;padding:13px 0;border-bottom:1px solid #35415e;align-items:center}.question-record:last-child{border:0}.question-record .q-title{font-size:12px;line-height:1.7}.question-record .q-title small{display:block;color:#9cb0d0;font-size:10px}.question-record .rate{text-align:center;font-size:13px;font-weight:800;font-variant-numeric:tabular-nums}.question-record .rate small{display:block;font-size:10px;color:#8fa1bf;font-weight:400;margin-top:3px}.record-header{color:#aebbd1;font-size:11px;padding:5px 0}.backup-panel{display:flex;justify-content:space-between;gap:16px;align-items:center;flex-wrap:wrap}.backup-panel h3{font-size:17px;margin:0}.backup-panel p{font-size:12px;color:#a9b9d4;line-height:1.8;max-width:450px}.backup-actions{display:flex;flex-wrap:wrap;gap:10px}.import-label{cursor:pointer}.backup-msg{font-size:12px;color:#a6edd0;flex-basis:100%}.reference-panel{padding:15px 12px}.reference-panel h3{margin:5px 0;font-size:16px}.reference-panel p{font-size:12px;line-height:1.8;color:#aab9d3}.reference-panel a{font-size:12px;color:#c6c8fa;display:block;margin:10px 0}.toast{position:fixed;bottom:108px;left:50%;z-index:20;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#ffd3b6;color:#2a3044;padding:12px 18px;max-width:90%;border-radius:14px;box-shadow:0 12px 40px #0005;font-weight:800;font-size:12px;transition:opacity .15s,transform .15s}.toast.show{opacity:1;transform:translate(-50%,0)}
@media(max-width:650px){.shell{padding:0 14px 104px}.topbar{height:80px;gap:8px}.brand-mark{width:39px;height:39px;border-radius:12px;font-size:19px}.brand-text small{font-size:9px}.brand-text strong{font-size:14px}.version-pill{font-size:9px;padding:6px 8px}.hero{min-height:293px;padding:25px 25px;border-radius:23px}.hero h1{font-size:29px}.hero p{font-size:12px;margin-bottom:21px}.hero-sigil{position:absolute;right:-44px;top:32px;opacity:.24;width:168px;height:168px}.stats-grid{gap:8px;margin:12px 0}.stat-card{min-height:114px;padding:15px 12px;border-radius:15px}.stat-label{font-size:10px;line-height:1.4}.stat-value{font-size:33px}.stat-value small{font-size:12px;padding-left:3px}.stat-foot{font-size:9px}.panel{border-radius:17px;padding:19px 16px;margin:12px 0}.section-head h2{font-size:18px}.progress-layout{gap:16px}.progress-ring{width:115px;height:115px}.progress-ring>div{width:98px;height:98px}.progress-ring strong{font-size:28px}.progress-ring strong small{font-size:13px}.progress-copy h3{font-size:15px}.progress-copy p{font-size:11px}.progress-copy .btn{font-size:12px;padding:12px}.menu-grid{grid-template-columns:1fr;gap:9px}.menu-card{min-height:78px;display:grid;grid-template-columns:45px 1fr;align-content:center;column-gap:9px;row-gap:3px}.menu-icon{grid-row:span 2}.menu-arrow{top:29px}.category-row{grid-template-columns:84px 1fr 52px;gap:9px}.category-name{font-size:11px}.category-value{font-size:11px}.question-panel{padding:23px 17px}.option{font-size:13px}.question-panel h3{font-size:19px}.page-head h2{font-size:24px}.tab{padding:12px 13px;font-size:12px}.draw-panel{padding:13px 9px}.draw-title{padding:6px}.tool{padding:10px;font-size:11px}.records-category{grid-template-columns:89px 1fr 65px 65px;gap:7px;font-size:11px}.records-category .small-note{font-size:9px}.question-record{grid-template-columns:minmax(0,1fr) 69px 69px}.question-record .rate{font-size:12px}.question-record .rate small{font-size:9px}.history-bars{gap:3px}.history-day{font-size:8px}.date-chip{font-size:10px}}
@media(min-width:651px) and (max-width:840px){.hero-sigil{width:154px;height:154px}}

/* v1.1: 沙耶のお手本をなぞる製図モード */
.guided-banner{background:linear-gradient(125deg,#31345c,#222c4a);border:1px solid #6e6a92;border-radius:16px;padding:18px;margin:17px 0 14px}
.guided-banner strong{display:block;color:#ffd0b6;font-size:16px;margin:8px 0}
.guided-banner p{font-size:12px;line-height:1.8;margin:6px 0 13px;color:#dde5f8}
.guide-checkbox{display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:13px;font-weight:700;color:#f9e4d5}
.guide-checkbox input{width:19px;height:19px;accent-color:#f0a997}
.cable-rule{display:flex;flex-direction:column;gap:5px;background:#182740;border:1px solid #54718a;border-radius:13px;padding:12px 14px;margin:12px 0}
.cable-rule b{color:#b0f1da;font-size:14px}
.cable-rule span{color:#aebed7;font-size:11px;line-height:1.6}
.palette-title{margin-top:17px;color:#f0c4b5;font-size:13px;font-weight:800}
.symbol-row{margin-top:9px}
.draw-controls{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:10px 0 13px}
.draw-controls label{display:flex;gap:7px;align-items:center;font-size:12px;color:#dde7f6}
.draw-controls select{background:#18233c;border:1px solid #627491;border-radius:10px;color:#fff;padding:10px;font-weight:750;font-size:13px}
.zoom-buttons{display:flex;gap:6px}
.tool-help{background:#292a47;border-left:4px solid #efb5a4;color:#fff0e7;padding:11px 12px;border-radius:7px;font-size:12px;line-height:1.65}
.draw-sized-stage{position:relative;width:840px;height:520px}
.draw-sized-stage .draw-stage{position:absolute;left:0;top:0;transform-origin:top left}
#guide-overlay{position:absolute;inset:0;width:840px;height:520px;pointer-events:none}
#guide-overlay svg{position:absolute;top:0;left:0;width:840px;height:520px;pointer-events:none}
.guide-progress{background:#1b2b42;border:1px solid #465f79;border-radius:13px;padding:12px 14px;margin-top:11px;line-height:1.8}
.guide-progress strong{color:#b5f6db;font-size:13px}
.guide-progress .guide-checklist{display:flex;flex-direction:column;margin-top:6px;gap:4px}
.guide-progress .step{font-size:12px;color:#b6c5da}
.guide-progress .step.done{color:#b6f6df}
@media(max-width:650px){.guided-banner{padding:14px}.draw-controls .tool{padding:9px 10px}.symbol-row .tool{flex:1 0 42%}}
