/* Interface refinements. Application and API contracts remain in their original files. */
:root{color-scheme:dark;--ease:cubic-bezier(.2,.8,.2,1)}
html.theme-light{color-scheme:light}
body{line-height:1.5;-webkit-font-smoothing:antialiased}
button,a,input,select,textarea,[role=button]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{transition:transform .16s var(--ease),background .2s,border-color .2s,box-shadow .2s,opacity .2s!important}
button:active:not(:disabled){transform:scale(.975)!important}
button:disabled{cursor:not-allowed!important;box-shadow:none!important;filter:none!important}
button:disabled:before{display:none}
:where(button,a,[role=button]):focus-visible{outline:3px solid var(--blue2,#73c7ff);outline-offset:4px}
input,select,textarea{scroll-margin-top:120px}
input::placeholder,textarea::placeholder{color:var(--muted,#9fb0c8);opacity:.8}
.top{padding:12px;box-shadow:0 8px 32px #0002,inset 0 1px #ffffff08}
.top h1{letter-spacing:-.8px}
h2{letter-spacing:-.5px;line-height:1.25}
.card{box-shadow:0 12px 36px #0002,inset 0 1px #ffffff05}
.choice{min-height:100px;padding:22px}
.title{line-height:1.4;letter-spacing:-.2px}
.meta{line-height:1.6}
.tabs button{min-height:44px}
.small,.score-btn{min-height:40px;min-width:40px}
.nav button{width:42px;height:42px}
.nav{margin-top:14px;gap:8px}
.button{min-height:48px;line-height:1.4}
.button.secondary{box-shadow:inset 0 1px #ffffff05}
.progress{height:6px;margin-top:20px}
.timer{white-space:nowrap}
.result{flex-wrap:wrap;overflow-wrap:anywhere}
.row>*{min-width:0}
.preview,.image{display:block}
.modal{overscroll-behavior:contain}
.modal img{object-fit:contain;max-height:calc(100dvh - 88px)}
.close{width:46px;height:46px;z-index:21}
.physics-login-card{box-shadow:0 30px 90px #0004,inset 0 1px #ffffff0a}
.physics-login-card input{text-align:left}
.physics-login-card button:disabled{opacity:.6}
@media(hover:hover) and (pointer:fine){.choice:hover{border-color:#73c7ff66;box-shadow:0 18px 45px #0003}.secondary:hover{background:rgba(117,170,255,.16)}}
@media(hover:none){.choice:hover,.button:hover,.small:hover,.nav button:hover{transform:none;box-shadow:none}.button:before{display:none}}
@media(max-width:700px){body{padding-bottom:calc(24px + env(safe-area-inset-bottom))}.choice{padding:18px;min-height:96px}.top{gap:8px}.top>div:not(.timer){min-width:0}.top h1{font-size:22px}.top .subtitle{max-width:clamp(90px,35vw,210px)}.back,.theme-toggle{flex-shrink:0}.timer{padding:7px;font-size:11px}.nav{gap:7px}.nav button{width:40px;height:40px}input,textarea,select{font-size:16px}.task-head{gap:8px;flex-wrap:wrap}.import-box{max-height:calc(100dvh - 36px)}.physics-login-card{margin:auto}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.history-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:28px 4px 12px}.history-heading h2{font-size:28px;margin:4px 0 6px}.history-heading p{margin:0}.history-count{flex-shrink:0;padding:7px 12px;border:1px solid var(--line);border-radius:20px;color:var(--blue2);font-size:13px;background:rgba(117,170,255,.07)}
.history-list{display:grid;gap:12px;margin:12px 0 20px}.history-link{width:100%;text-align:left;display:flex;align-items:center;gap:18px;margin:0;padding:22px;cursor:pointer;border:1px solid var(--line);color:var(--text)}.history-icon{display:grid;place-items:center;flex:0 0 44px;height:44px;border-radius:14px;border:1px solid var(--line);background:rgba(117,170,255,.08);color:var(--blue2);font-size:24px}.history-info{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px}.history-info .title{overflow-wrap:anywhere}.history-open{font-size:12px;color:var(--blue2);margin-top:7px}.history-open span{display:inline-block;transition:transform .2s}.history-scores{display:flex;align-items:center;gap:22px}.history-score,.history-primary{display:flex;flex-direction:column;align-items:flex-start}.history-score strong{font-size:36px;line-height:1.1;letter-spacing:-1px;color:var(--blue2)}.history-primary{padding-left:22px;border-left:1px solid var(--line)}.history-primary strong{font-size:22px;line-height:1.4}.history-scores .meta{font-size:11px;white-space:nowrap}
@media(hover:hover){.history-link:hover{border-color:var(--blue2);background:var(--card-strong);transform:translateY(-2px)!important;box-shadow:0 14px 36px #0003!important}.history-link:hover .history-open span{transform:translateX(4px)}}
@media(max-width:600px){.history-heading{align-items:flex-start;flex-direction:column;padding-top:22px;gap:12px}.history-heading h2{font-size:25px}.history-link{flex-wrap:wrap;padding:18px;gap:12px}.history-icon{flex-basis:38px;height:38px}.history-info{flex-basis:calc(100% - 52px)}.history-scores{width:100%;padding-top:14px;border-top:1px solid var(--line);gap:28px}.history-score strong{font-size:30px}.history-primary{padding-left:28px}.history-open{margin-top:3px}}

.review-media{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0}.review-media .small{padding:9px 16px}
