@import url('https://fonts.googleapis.com/css2?family=M+PLUS+1+Code:wght@400;500&display=swap');
.practice-layer{--p-ground:rgba(13,15,19,.94);--p-panel:rgba(13,15,19,.9);--p-line:rgba(255,255,255,.22);--p-ink:#fff;--p-muted:#dfe3e8;--p-accent:#ff8a4c;--p-ok:#5ff0b0;--p-warn:#ffd84d;--p-bad:#ff8a7a;
  position:absolute;inset:0;z-index:5;grid-area:1/1/2/-1;box-sizing:border-box;display:flex;align-items:center;justify-content:center;
  padding:12px;background:rgba(8,12,20,.28);color:var(--p-ink);font:14px/1.5 system-ui,-apple-system,"Noto Sans JP",sans-serif;text-align:left;
  border-radius:inherit;overflow:hidden;-webkit-user-select:text;user-select:text}
.practice-layer *,.practice-layer *::before,.practice-layer *::after{box-sizing:border-box}
.practice-layer [hidden]{display:none!important}
.practice-layer.is-sheet{position:fixed;inset:0;z-index:1100;border-radius:0;overflow:auto;overscroll-behavior:contain;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
html.practice-sheet-open,html.practice-sheet-open body{overflow:hidden}
.practice-card{width:min(440px,100%);max-height:100%;overflow:auto;padding:20px 22px;border-radius:18px;background:#fff;color:#1d2330;box-shadow:0 14px 44px rgba(10,20,40,.35)}
.practice-kicker{margin:0 0 6px;color:#2f5bea;font-weight:700;font-size:13px}
.practice-title{margin:0 0 8px;font-size:19px;line-height:1.35;font-weight:800;color:#1d2330}
.practice-task{margin:0 0 14px;color:#4a5263}
.practice-actions{display:flex;flex-wrap:wrap;gap:10px}
.practice-layer.is-small{padding:6px}
.practice-layer.is-small .practice-card{padding:12px 14px}
.practice-layer.is-small .practice-card .practice-task{display:none}
.practice-layer.is-small .practice-title{font-size:15px;margin-bottom:6px}
.practice-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;margin:0;padding:6px 16px;border:1px solid #d5dae3;border-radius:999px;background:#fff;color:#1d2330;font:700 14px/1.2 system-ui,-apple-system,"Noto Sans JP",sans-serif;cursor:pointer;white-space:nowrap}
.practice-button:hover{background:#f1f4f9}
.practice-button:focus-visible{outline:3px solid #2f5bea;outline-offset:2px}
.practice-button.is-primary,.practice-button.is-run{border-color:transparent;background:#2f5bea;color:#fff;box-shadow:0 3px 0 #1f3fae}
.practice-button.is-primary:hover,.practice-button.is-run:hover{background:#2a52d6}
.practice-button.is-run{min-height:46px;padding:8px 26px;border-radius:12px;font-size:18px}
.practice-button.is-run::before{content:"";width:0;height:0;border-style:solid;border-width:7px 0 7px 12px;border-color:transparent transparent transparent #fff}
.practice-button.is-run:active{transform:translateY(2px);box-shadow:0 1px 0 #1f3fae}
.practice-button.is-small{min-height:26px;padding:3px 10px;border-color:rgba(255,255,255,.18);background:transparent;color:#c7cdd8;font-size:12px;font-weight:600}
.practice-button.is-small:hover{background:rgba(255,255,255,.1)}
.practice-layer.is-working{display:block;padding:clamp(12px,2.2%,28px);background:rgba(8,12,20,.28)}
.practice-body{height:100%;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(14px,2.4%,32px);align-items:stretch}
.practice-stage{display:flex;flex-direction:column;justify-content:center;gap:10px;min-width:0;min-height:0}
.practice-paused{align-self:flex-start;display:inline-flex;align-items:center;gap:8px;margin:0;padding:6px 14px 6px 8px;border-radius:999px;background:rgba(20,26,38,.82);color:#fff;font-weight:800;font-size:14px}
.practice-paused::before{content:"";width:22px;height:22px;border-radius:50%;background:rgba(255,255,255,.16) linear-gradient(90deg,transparent 7px,#fff 7px,#fff 10px,transparent 10px,transparent 13px,#fff 13px,#fff 16px,transparent 16px) center/100% 10px no-repeat}
.practice-output-label{margin:0;font-size:12px;line-height:1.4;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.practice-result{position:relative;width:100%;aspect-ratio:16/9;max-height:100%;border-radius:14px;background:#0b0d11;overflow:hidden;box-shadow:0 10px 30px rgba(0,0,0,.35)}
.practice-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent;display:block}
.practice-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;padding:12px;color:#c7cdd8;text-align:center;font-size:14px}
.practice-panel{position:relative;display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0;padding:16px 18px;border-radius:18px;background:#fff;color:#1d2330;box-shadow:0 14px 44px rgba(10,20,40,.35);overflow:auto}
.practice-head{display:flex;align-items:center;gap:10px;flex:none;min-width:0;padding-bottom:10px;border-bottom:1px solid #edf0f5}
.practice-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:#2f5bea;color:#fff;font:800 13px/1 ui-monospace,Menlo,monospace}
.practice-name{flex:1;min-width:0;margin:0;font-size:18px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
.practice-timer{flex:none;display:inline-flex;align-items:center;gap:6px;margin:0;padding:4px 12px;border-radius:999px;background:#f1f4f9;color:#1d2330;font-variant-numeric:tabular-nums;font-weight:800}
.practice-timer.is-up{background:#fff4d6;color:#8a5a00}
.practice-up{font-weight:700}
.practice-back{flex:none;min-height:32px;padding:4px 12px;font-size:13px}
.practice-steps{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px;flex:none}
.practice-step{display:flex;align-items:flex-start;gap:10px;color:#9aa2b1;font-size:15px;font-weight:700;line-height:1.45}
.practice-step-mark{flex:none;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border:2.5px solid #c9cfdb;border-radius:50%;font-size:13px;color:#9aa2b1}
.practice-step.is-current{color:#1d2330;font-size:16px}
.practice-step.is-current .practice-step-mark{border-color:#2f5bea;color:#2f5bea}
.practice-step.is-done{color:#4a5263}
.practice-step.is-done .practice-step-mark{border-color:#12b886;background:#12b886;color:transparent;position:relative}
.practice-step.is-done .practice-step-mark::after{content:"";position:absolute;left:7px;top:3px;width:6px;height:11px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg)}
.practice-window{flex:1;min-height:150px;display:flex;flex-direction:column;border-radius:14px;background:#1e2230;overflow:hidden}
.practice-window-bar{flex:none;display:flex;align-items:center;gap:6px;padding:8px 10px;background:#262b3b}
.practice-dots{display:inline-flex;gap:6px;margin-right:auto}
.practice-dots i{width:11px;height:11px;border-radius:50%;background:#ff5f57}
.practice-dots i:nth-child(2){background:#febc2e}.practice-dots i:nth-child(3){background:#28c840}
.practice-editor{flex:1;min-height:0;display:grid;grid-template-columns:auto minmax(0,1fr);background:transparent;overflow:hidden}
.practice-gutter,.practice-code,.practice-colours{margin:0;padding:12px 12px;font:15px/1.7 "M PLUS 1 Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.01em;tab-size:2}
.practice-gutter{min-width:2.6em;overflow:hidden;text-align:right;color:#6b7387;background:transparent;-webkit-user-select:none;user-select:none;white-space:pre}
.practice-code-area{position:relative;min-width:0;min-height:0;overflow:hidden}
.practice-code,.practice-colours{position:absolute;inset:0;width:100%;height:100%;box-sizing:border-box;white-space:pre;overflow-wrap:normal;word-break:normal}
.practice-code{min-height:0;resize:none;border:0;outline:0;background:transparent;color:transparent;-webkit-text-fill-color:transparent;overflow:auto;caret-color:#ffcc33;z-index:1}
.practice-code::selection{background:rgba(110,160,255,.35);-webkit-text-fill-color:transparent}
.practice-colours{overflow:hidden;color:#e6e9ef;pointer-events:none;-webkit-user-select:none;user-select:none}
.practice-gutter,.practice-colours{padding-bottom:calc(12px + var(--practice-bar-y,0px))}.practice-colours{padding-right:calc(12px + var(--practice-bar-x,0px))}
.pc-comment{color:#7f8aa3;font-style:italic}.pc-string{color:#a5e075}.pc-number{color:#f9ae58}.pc-keyword{color:#c792ea}
.pc-literal{color:#ff7a90}.pc-function{color:#6cb6ff}.pc-property{color:#7fdbca}.pc-name{color:#e6e9ef}.pc-punct{color:#a3acbf}
.practice-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;flex:none}
.practice-status{font-size:13px;color:#4a5263;min-width:0}
.practice-status:empty{display:none}
.practice-done{margin-left:auto;display:inline-flex;align-items:center;gap:8px;padding:8px 18px;border-radius:999px;background:#12b886;color:#fff;font-size:18px;font-weight:800;box-shadow:0 3px 0 #0b8a63}
.practice-done::before{content:"";width:9px;height:16px;border:solid #fff;border-width:0 3px 3px 0;transform:rotate(45deg) translateY(-2px)}
.practice-feedback-line{display:block}
.practice-feedback{flex:none;margin:0;padding:10px 14px;border-radius:12px;background:#e8f8f1;color:#0b6b4a;font-weight:700}
.practice-console{flex:none;min-height:64px;max-height:30%;margin:0;padding:10px 14px;list-style:none;border-radius:14px;background:#1e2230;color:#e6e9ef;overflow:auto;font:14px/1.6 "M PLUS 1 Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.practice-log{padding:1px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.practice-log::before{content:"> ";color:#6b7387}
.practice-log-level,.practice-log-line{font-weight:700;font-family:system-ui,-apple-system,sans-serif}
.practice-log.is-warn{color:#ffd166}
.practice-log.is-error{color:#ff8a8a}
.practice-log.is-stopped{color:#ffd166;font-family:system-ui,-apple-system,sans-serif;font-weight:600}
.practice-log.is-info{color:#9cc7ff}
.practice-confetti{position:absolute;inset:0;z-index:3;pointer-events:none;overflow:hidden}
.practice-confetti span{position:absolute;top:-12px;width:9px;height:14px;border-radius:2px;opacity:.95;animation-name:practice-fall;animation-timing-function:cubic-bezier(.2,.6,.4,1);animation-fill-mode:forwards}
@keyframes practice-fall{0%{transform:translate(0,0) rotate(0)}100%{transform:translate(var(--x),110vh) rotate(var(--r));opacity:.9}}
@media (prefers-reduced-motion:no-preference){
  .practice-done.is-pop,.practice-feedback.is-pop{animation:practice-pop .45s cubic-bezier(.2,1.4,.4,1)}
  .practice-card{animation:practice-in .18s ease-out}
}
@keyframes practice-pop{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}
@keyframes practice-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.practice-layer.is-working.is-stacked{overflow:auto}
.practice-layer.is-stacked .practice-body{display:flex;flex-direction:column;height:auto}
.practice-layer.is-stacked .practice-panel{order:-1;overflow:visible}
.practice-layer.is-stacked .practice-head{flex-wrap:wrap}
.practice-layer.is-stacked .practice-name{flex-basis:calc(100% - 50px)}
.practice-layer.is-stacked .practice-window{flex:none;height:min(46vh,320px)}
.practice-layer.is-stacked .practice-code,.practice-layer.is-stacked .practice-colours,.practice-layer.is-stacked .practice-gutter{font-size:16px}
.practice-layer.is-stacked .practice-console{max-height:180px}
.practice-ask{margin:10px 0 0;padding:12px 14px;border:1px solid #d5dae3;border-radius:14px;background:#fff;color:#1d2330;font:14px/1.5 system-ui,-apple-system,"Noto Sans JP",sans-serif;box-shadow:0 4px 14px rgba(10,20,40,.08);text-align:left}
.practice-ask[hidden]{display:none}
.practice-ask-head{display:flex;align-items:center;gap:8px}
.practice-ask-label{flex:1;min-width:0;margin:0;color:#2f5bea;font-weight:800;font-size:13px}
.practice-ask-close{flex:none;min-height:28px;padding:2px 10px;font-size:16px;line-height:1}
.practice-ask-text{margin:8px 0;padding:10px 12px;border-radius:10px;background:#f1f4f9;font-size:15px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text}
.practice-ask-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.practice-ask-status{font-size:13px;color:#0b6b4a;font-weight:700}
.practice-ask-hint{margin:8px 0 0;color:#4a5263;font-size:13px}
.practice-result.is-git{aspect-ratio:auto;min-height:260px;background:#fff;color:#1d2330;overflow:auto}
.practice-git-runner{position:absolute;width:1px;height:1px;overflow:hidden;opacity:0;pointer-events:none}
.practice-git-runner .practice-frame{width:1px;height:1px;border:0}
.practice-repo{padding:16px 18px;font:14px/1.5 system-ui,-apple-system,"Noto Sans JP",sans-serif;text-align:left}
.practice-repo[hidden]{display:none}
.practice-repo-none,.practice-repo-empty{margin:0 0 10px;color:#6b7387}
.practice-repo-branch{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 10px}
.practice-repo-label{font-weight:800;color:#4a5263;font-size:13px}
.practice-repo-code{font:13px/1.4 "M PLUS 1 Code",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;padding:2px 8px;border-radius:999px;background:#f1f4f9;color:#1d2330}
.practice-repo-code.is-branch{background:#2f5bea;color:#fff;font-weight:700}
.practice-repo-code.is-other{background:#eef1f6;color:#4a5263}
.practice-repo-merging{margin:0 0 10px;padding:8px 12px;border-radius:10px;background:#fff4e0;color:#8a4b00;font-weight:700}
.practice-repo-title{margin:12px 0 6px;font-size:13px;font-weight:800;color:#4a5263}
.practice-repo-commits,.practice-repo-files{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:6px}
.practice-repo-commit{display:flex;align-items:center;gap:10px;padding:6px 10px;border:1px solid #e3e7ee;border-radius:10px}
.practice-repo-commit .practice-repo-code{flex:none;border-radius:6px;background:#1e2230;color:#f9ae58}
.practice-repo-commit.is-merge .practice-repo-code{color:#c792ea}
.practice-repo-message{min-width:0;overflow-wrap:anywhere}
.practice-repo-file{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.practice-repo-file .practice-repo-code{border-radius:6px}
.practice-repo-tag{font-size:12px;font-weight:700;padding:2px 8px;border-radius:999px}
.practice-repo-tag.is-staged{background:#e8f8f1;color:#0b6b4a}
.practice-repo-tag.is-changed{background:#fff4e0;color:#8a4b00}
.practice-repo-tag.is-untracked{background:#eef1f6;color:#4a5263}
.practice-repo-tag.is-conflict{background:#ffe8ea;color:#a1162a}
.practice-repo-tag.is-ignored{background:#f1f4f9;color:#6b7387}
.practice-repo-tag.is-committed{background:#e9efff;color:#2f5bea}
.practice-quiz-task{margin:0;color:#1d2330;font-size:16px;font-weight:700;line-height:1.5}
.practice-quiz{display:flex;flex-direction:column;gap:10px;min-width:0}
.practice-quiz-how{margin:0;color:#4a5263;font-size:13px}
.practice-choices{display:flex;flex-direction:column;gap:8px}
.practice-choice{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:2px solid #e3e7ee;border-radius:12px;cursor:pointer;font-size:15px;line-height:1.45}
.practice-choice:hover{background:#f6f8fb}
.practice-choice input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:#2f5bea}
.practice-choice:has(input:checked){border-color:#2f5bea;background:#f1f5ff}
.practice-choice.is-right,.practice-order-item.is-right,.practice-criterion.is-right{border-color:#12b886;background:#e8f8f1}
.practice-choice.is-wrong,.practice-order-item.is-wrong,.practice-criterion.is-wrong{border-color:#ff8a7a;background:#fff1ef}
.practice-order{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
.practice-order-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border:2px solid #e3e7ee;border-radius:12px;font-size:15px;line-height:1.4;background:#fff}
.practice-order-number{flex:none;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;border-radius:50%;background:#2f5bea;color:#fff;font-weight:800;font-size:13px}
.practice-order-text{flex:1;min-width:0;overflow-wrap:anywhere}
.practice-order-move.is-small{flex:none;min-width:36px;min-height:32px;border-color:#d5dae3;color:#1d2330;font-size:16px}
.practice-order-move.is-small:hover{background:#f1f4f9}
.practice-order-move:disabled{opacity:.3;cursor:default}
.practice-weak{margin:0;padding:10px 14px;border-left:4px solid #ff8a4c;border-radius:10px;background:#fff6ef}
.practice-weak-label{margin:0 0 4px;color:#8a4a1c;font-size:12px;font-weight:700}
.practice-weak-text{margin:0;font-size:15px;line-height:1.5;color:#1d2330}
.practice-rewrite-label{font-weight:700;font-size:14px}
.practice-rewrite{width:100%;min-height:120px;padding:10px 12px;border:2px solid #d5dae3;border-radius:12px;font:16px/1.55 system-ui,-apple-system,"Noto Sans JP",sans-serif;color:#1d2330;background:#fff;resize:vertical}
.practice-rewrite:focus{outline:none;border-color:#2f5bea}
.practice-quiz-left{color:#4a5263;font-size:12px}
.practice-quiz-left:empty{display:none}
.practice-panel.is-quiz .practice-done{align-self:flex-start;margin-left:0}
.practice-result.is-quiz{aspect-ratio:auto;flex:1;min-height:0;overflow:auto;background:#fff;color:#1d2330;padding:16px 18px}
.practice-quiz-placeholder{margin:0;color:#6b7387;text-align:center;padding:24px 8px}
.practice-quiz-verdict{margin:0 0 8px;font-size:18px;font-weight:800;color:#1d2330}
.practice-quiz-verdict.is-right{color:#0b8a63}
.practice-quiz-verdict.is-wrong{color:#c0392b;font-size:16px}
.practice-quiz-check{margin:0;padding:10px 14px;border-radius:12px;background:#e8f8f1;color:#0b6b4a;font-weight:700;line-height:1.5}
.practice-quiz-hint{margin:8px 0 0;padding:10px 14px;border-radius:12px;background:#fff8e1;color:#6b4e00;line-height:1.5}
.practice-quiz-note{margin:0 0 8px;color:#4a5263}
.practice-quiz-comment{margin:0 0 10px;padding:10px 14px;border-radius:12px;background:#f1f5ff;color:#1d2330;line-height:1.55;white-space:pre-wrap}
.practice-quiz-sub{margin:4px 0 2px;font-weight:800}
.practice-self{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.practice-criterion{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:2px solid #e3e7ee;border-radius:12px;cursor:pointer;line-height:1.45}
.practice-criterion input{flex:none;width:18px;height:18px;margin:2px 0 0;accent-color:#12b886}
.practice-criterion-text{flex:1;min-width:0}
.practice-criterion-mark{flex:none;font-size:12px;font-weight:800;color:#4a5263}
.practice-example{margin-top:4px;padding:8px 12px;border-radius:12px;background:#f6f8fb}
.practice-example summary{cursor:pointer;font-weight:800}
.practice-example-text{margin:8px 0 0;white-space:pre-wrap;line-height:1.55}
.practice-quiz-right{display:flex;flex-direction:column;gap:8px}
.practice-layer.is-quiz .practice-stage{justify-content:flex-start}
.practice-layer.is-stacked .practice-result.is-quiz{flex:none;min-height:140px}
