:root {
  color-scheme: light dark;
  font: 16px/1.45 system-ui,sans-serif;
  --ink: light-dark(#1a2637,#f1f5fe);
  --muted: light-dark(#53627a,#b6c3d7);
  --surface: light-dark(#fff,#212c3c);
  --field: light-dark(#eef3fa,#192335);
  --line: light-dark(#cbd7e6,#4b5e7a);
  --action: light-dark(#1d5a75,#a6e1f3);
  --on-action: light-dark(#fff,#183646);
}
body { margin: 0; color: var(--ink); background: var(--field); }
main { width: min(calc(100% - 2rem), 64rem); margin: 2rem auto; }
h1,h2,p { margin: 0 0 .75rem; }
.workspace { display: grid; grid-template-columns: minmax(17rem, 1fr) minmax(0, 1.55fr); gap: 1rem; align-items: start; }
section { border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); min-width: 0; padding: 1rem; }
label { display: block; font-weight: 650; }
input,select,button { font: inherit; }
input[type=file],select { width: 100%; box-sizing:border-box; margin: .25rem 0 .5rem; }
select { border: 1px solid var(--line); border-radius: .3rem; padding: .35rem; }
progress { width: 100%; margin-block: .9rem .25rem; }
.permission { margin-block: .8rem; font-weight: 450; }
.hint,#photo-help,#mesh-info { font-size: .875rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
button,a { display: inline-block; border: 0; border-radius: .4rem; padding: .55rem .8rem; background: var(--action); color: var(--on-action); font-weight: 650; cursor: pointer; }
button:disabled { opacity: .62; }
[hidden] { display: none !important; }
canvas { display: block; width: 100%; height: clamp(15rem,48vw,30rem); background: var(--field); border-radius: .6rem; margin-bottom: .65rem; touch-action: none; }
img { width: min(9rem,100%); background: var(--field); border-radius: .5rem; }
#output .hint { margin-top: .55rem; }
#task-id { overflow-wrap: anywhere; }
@media (max-width: 700px) { .workspace { grid-template-columns: 1fr; } main { margin-block: 1rem; } }
