/* Same Gauss red/cream palette; upload is a focused task, not a dark debug form. */
#photoPanel{width:min(960px,calc(100vw - 32px));background:#faf9f6;color:#25383d;border-color:#e8e3dd}
#photoPanel>summary{color:#25383d}#photoPanel input,#photoPanel textarea,#photoPanel select{color:#25383d;background:white;border-color:#dedbd7}
#photoPanel button{color:#25383d;background:white;border-color:#dedbd7;cursor:pointer}
#photoPanel .primary{background:#ff3048;color:white;border:0;padding:12px 20px;font-weight:650}
#photoPanel button:disabled{opacity:.5;cursor:default}.photo-heading{font-size:26px;margin:4px 0}.photo-intro{line-height:1.7;color:#74817f;margin:4px 0 16px}
.photo-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.photo-drop{padding:28px;border:1px dashed #bbc5c1;border-radius:18px;text-align:center;background:#f2f1ed}
html[data-upload-device=desktop] .photo-actions{justify-content:center}
.photo-drop.dragging{border-color:#ff3048;background:#fff1f2}.photo-drop p{font-size:14px;color:#74817f}
#photoFile,#albumFile{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}
#cropPanel{padding:18px;background:#eeede8;border-radius:16px}#cropCanvas{display:block;width:auto;max-width:100%;max-height:45dvh;margin:auto;touch-action:none;cursor:crosshair}
.crop-actions{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:14px}
.crop-edges{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.crop-edges label{margin:8px 0;font-size:12px}.crop-edges input{width:100%}
#photoPreview{max-height:210px;border-radius:12px;background:white;margin:auto}
.make-state{padding:24px;border:1px solid #ead7d9;border-radius:16px;background:#fff5f5}.make-state h2{font-size:22px;margin:0 0 12px}.make-state p{line-height:1.7}
#photoPanel [hidden]{display:none!important}#photoStatus{line-height:1.7;color:#675951}
#confirmPhoto{display:grid;grid-template-columns:1fr 1fr;gap:12px}#confirmPhoto>label:first-child,#photoWarnings,#generate,#matchedLesson{grid-column:1/-1}
#backendConnection{font-size:12px;color:#74817f}
html[data-upload-device=handheld] #photoPanel{width:100vw;max-height:100dvh;height:100dvh;top:0;left:0;transform:none;border-radius:0;padding:22px 18px;padding-top:max(22px,env(safe-area-inset-top))}
html[data-upload-device=handheld] .photo-drop{border:0;padding:10px 0;background:none}html[data-upload-device=handheld] .photo-drop .desktop-hint{display:none}
html[data-upload-device=desktop] #albumButton{display:none}
.make-progress-label{display:flex;justify-content:space-between;margin:24px 0 8px;font-size:13px;color:#73807d}.make-progress-label strong{color:#ed2944;font-variant-numeric:tabular-nums}#makeState:has(#makeProgress[hidden]) .make-progress-label{display:none}#makeProgress{display:block;appearance:none;-webkit-appearance:none;border:0;border-radius:999px;overflow:hidden;background:#e8e3dd;height:12px!important}#makeProgress[hidden]{display:none}#makeProgress::-webkit-progress-bar{background:#e8e3dd;border-radius:999px}#makeProgress::-webkit-progress-value{background:linear-gradient(90deg,#ff3048,#ed2944);border-radius:999px}#makeProgress::-moz-progress-bar{background:#ff3048;border-radius:999px}#makeProgress:indeterminate{background:repeating-linear-gradient(110deg,#f7bac3 0 12px,#fce6ea 12px 24px)}
#recognizedPreview{white-space:pre-wrap}
#stopPolling,.make-steps{display:none!important}
#makeGeometry{max-width:330px;margin:0 auto 20px}
#makeGeometry .task-geometry-cover{position:relative;overflow:hidden;aspect-ratio:5/3;border-radius:20px;background:radial-gradient(ellipse at 15% 95%,#72405044,transparent 60%),radial-gradient(ellipse at 90% 5%,#3a5a7044,transparent 65%),#1b2634}
#makeGeometry svg{display:block;width:100%;height:100%}
#makeGeometry .task-state-pill,#makeGeometry .task-cover-note{display:none}
#makeGeometry .geometry-orbit{transform-origin:150px 90px;animation:preparation-orbit 36s linear infinite}
#makeGeometry .geometry-figure{animation:preparation-float 8s ease-in-out infinite alternate}
#makeProgress:indeterminate{background:#e8e3dd;position:relative}
#makeProgress:indeterminate:after{content:none}
.preparation-progress-track{position:relative;height:12px;overflow:hidden;border-radius:999px;background:#e8e3dd}
.preparation-progress-track:has(#makeProgress[hidden]){display:none}
.preparation-progress-runner{display:none;position:absolute;inset:0 auto 0 0;width:35%;border-radius:inherit;background:linear-gradient(90deg,transparent,#ff3048,transparent);pointer-events:none}
.preparation-progress-track[data-busy=true] .preparation-progress-runner{display:block;animation:preparation-progress 1.8s linear infinite}
.make-state[data-stage=failed] .preparation-progress-runner,.make-state[data-stage=ready] .preparation-progress-runner,.make-state[data-stage=pending] .preparation-progress-runner,.make-state[data-stage=uncertain] .preparation-progress-runner{display:none}
#makeProgress:indeterminate::-webkit-progress-bar{background:transparent}
.make-state[data-stage=failed] #makeGeometry,.make-state[data-stage=ready] #makeGeometry,.make-state[data-stage=pending] #makeGeometry,.make-state[data-stage=uncertain] #makeGeometry{display:none}
#creationFeedback{margin-top:20px;padding:18px;border:1px solid #eadfdf;border-radius:16px;background:#fff}
#creationFeedback label{display:block;font-size:14px;line-height:1.7;color:#63716e}
#feedbackNote{box-sizing:border-box;width:100%;min-height:88px;margin:12px 0;border:1px solid #ddd;border-radius:10px;padding:12px;font:inherit}
#feedbackReceipt{font-size:12px;overflow-wrap:anywhere;color:#61736c}
@keyframes preparation-orbit{to{transform:rotate(360deg)}}
@keyframes preparation-float{from{transform:translateY(-2px)}to{transform:translateY(2px)}}
@keyframes preparation-progress{from{transform:translateX(-100%)}to{transform:translateX(330%)}}
@media(prefers-reduced-motion:reduce){#makeGeometry .geometry-orbit,#makeGeometry .geometry-figure,.preparation-progress-runner{animation:none}.preparation-progress-runner{left:32%;opacity:.55}}
#myMadeCourses.my-courses-return{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:24px;padding:18px 20px;border:1px solid #e8e3dd;border-radius:16px;background:#f4f2ee;color:#35413f;text-decoration:none;font-size:14px;transition:background .15s,border-color .15s}#myMadeCourses.my-courses-return strong{display:block;font-weight:600}#myMadeCourses.my-courses-return small{display:block;margin-top:4px;color:#818a85;font-size:12px;line-height:1.6}#myMadeCourses.my-courses-return svg{width:23px;height:23px;flex-shrink:0;fill:none;stroke:#a88d91;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}#myMadeCourses.my-courses-return:hover{background:#fceef0;border-color:#e9cbd0}#myMadeCourses.my-courses-return:focus-visible{outline:3px solid #b6c8d6;outline-offset:3px}
.make-state[data-stage=pending] .make-steps,.make-state[data-stage=ready] .make-steps{display:none}
@media(max-width:600px){#confirmPhoto{grid-template-columns:1fr}.crop-edges{grid-template-columns:1fr 1fr}.photo-heading{font-size:23px}}
#photoPanel[data-making=true] .photo-heading,#photoPanel[data-making=true] .photo-intro,#photoPanel[data-making=true] #photoDrop,#photoPanel[data-making=true] #confirmPhoto,#photoPanel[data-making=true] #photoPreview,#photoPanel[data-making=true] #reframePhoto{display:none!important}
.make-state{text-align:center;padding:32px 20px}.make-symbol{display:inline-grid;place-items:center;width:64px;height:64px;border-radius:20px;background:#ff3048;color:white;font:42px Georgia,serif;margin-bottom:20px}.make-steps{display:flex;justify-content:center;gap:18px;list-style:none;padding:0;margin:24px 0;color:#7b8581;font-size:13px}.make-steps li{flex:1;max-width:150px}.make-steps li:before{content:'○';display:block;font-size:22px;margin-bottom:5px;color:#c5c8c3}.make-state[data-stage=recognizing] .make-steps li:first-child,.make-state[data-stage=making] .make-steps li:nth-child(2){color:#ed2944;font-weight:650}#makeWaitHint{font-size:14px;color:#73807d}#makeProgress{width:100%;accent-color:#ff3048;height:8px}#recognizedSummary{padding:20px 0}#recognizedSummary h3{font-size:15px;color:#73807d}#recognizedPreview{line-height:1.9;background:white;border:1px solid #e8e3dd;border-radius:14px;padding:16px;overflow-wrap:anywhere}#photoPanel[data-making=true]{min-height:min(90dvh,740px)}
