:root { color-scheme: dark; --bg:#14181b; --panel:#1d2327; --line:#313a40; --text:#e9eeed; --dim:#9aa8a8; --accent:#7fc7b2; --warn:#e9b04a; --bad:#f0604f; }
* { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 "Segoe UI", system-ui, sans-serif; padding-bottom: env(safe-area-inset-bottom) }
h1 { font-size: 24px; margin: 0 0 8px } h2 { font-size: 14px; margin: 0 0 10px; color: var(--dim); font-weight: 600 }
small, #scoretext, #uploadmsg { color: var(--dim); font-size: 14px } p { margin: 8px 0 }
button, .button { font: inherit; color: var(--text); background: #2a3237; border: 1px solid var(--line); border-radius: 6px; padding: 9px 14px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center }
button:disabled { opacity: .4; cursor: default }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.primary { background: var(--accent); border-color: var(--accent); color: #0d1f19; font-weight: 600 }
.danger { color: var(--bad) } .stop { background: var(--bad); border-color: var(--bad); color: #210603; font-weight: 700; white-space: nowrap }
input { font: inherit; color: var(--text); background: #101416; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; min-height: 44px; min-width: 0 }
#gate { max-width: 360px; margin: 14vh auto; padding: 24px; display: grid; gap: 12px } #gate label { display: grid; gap: 4px } .error { color: var(--bad) }
header { position: sticky; top: 0; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line) }
#banner { font-weight: 600; padding-left: 12px; border-left: 5px solid var(--dim) } #banner.ok { border-color: var(--accent) } #banner.warn { border-color: var(--warn) } #banner.bad { border-color: var(--bad); color: var(--bad) }
main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; padding: 16px; max-width: 1640px; margin: auto }
@media (max-width: 960px) { main { grid-template-columns: minmax(0, 1fr); padding: 10px } }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px }
#view { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; margin-bottom: 14px }
#view img { width: 100%; height: 100%; object-fit: contain; display: block } #view canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none }
#age { position: absolute; left: 10px; bottom: 10px; background: #000c; padding: 2px 8px; border-radius: 4px; font-size: 13px } #resumecam { position: absolute; inset: 0; margin: auto; width: max-content; max-width: 90%; height: max-content }
.row { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap } .row strong { overflow-wrap: anywhere }
.bar { height: 10px; background: #0d1113; border-radius: 5px; overflow: hidden; margin: 10px 0 14px } .bar i { display: block; height: 100%; width: 0; background: var(--accent) }
dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0 0 14px } dt { color: var(--dim); font-size: 13px } dd { margin: 0; font-variant-numeric: tabular-nums }
.buttons { display: flex; gap: 8px; flex-wrap: wrap } .end { justify-content: flex-end }
.temp { display: grid; grid-template-columns: 60px 1fr 78px auto; gap: 8px; align-items: center; margin-bottom: 10px } .temp b, .big { font-variant-numeric: tabular-nums; font-weight: 600 } .big { font-size: 26px }
#chart { width: 100%; height: 64px; display: block; margin-top: 8px }
#files { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto } #files li { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line) } #files span { overflow-wrap: anywhere; min-width: 0; font-size: 14px } #files small { display: block }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 420px; width: calc(100% - 32px) } dialog::backdrop { background: #000a } dialog h2 { font-size: 19px; color: var(--text) }
.check { display: flex; gap: 10px; align-items: center; margin: 12px 0; min-height: 44px } .check input { width: 22px; height: 22px; min-height: 0; flex: none }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #2f393e; border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; max-width: 92vw; opacity: 0; pointer-events: none; transition: opacity .2s } #toast.on { opacity: 1 } #toast.bad { border-color: var(--bad) }
@media (prefers-reduced-motion: reduce) { #toast { transition: none } }
