*{box-sizing:border-box}body{margin:0;background:#111;color:#f4f4f4;font:16px system-ui,sans-serif}main{padding:18px;max-width:1500px;margin:auto}header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}h1{font-size:24px;letter-spacing:.09em;margin:0;font-weight:850}small,.sort-label{color:#aaa;font-size:14px}button{min-height:44px;background:#222;border:1px solid #444;color:white;border-radius:7px;padding:9px 14px;font:inherit;cursor:pointer}button:hover{background:#383838}button:focus-visible{outline:2px solid #fff;outline-offset:2px}button:disabled{opacity:.5;cursor:wait}#gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}article{background:#191919;border:1px solid #333;border-radius:9px;overflow:hidden}.imagebutton{display:block;width:100%;padding:0;border:0;border-radius:0;background:#080808;aspect-ratio:4/3}.imagebutton img{width:100%;height:100%;object-fit:contain;display:block}.foot{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:8px;color:#bbb;font-size:14px}.votes{display:flex;gap:6px}.votes button{min-width:64px;white-space:nowrap}.error{color:#ffb3a9;text-align:center}dialog{padding:12px;margin:0;border:0;width:100%;height:100%;max-width:none;max-height:none;background:#090909;color:white}dialog[open]{display:flex;flex-direction:column;gap:10px}dialog::backdrop{background:#090909}.viewtop,.viewbottom{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-shrink:0}.viewbottom{justify-content:center;padding-bottom:env(safe-area-inset-bottom)}.viewbottom>button{font-size:30px;min-width:46px;line-height:1}.viewbottom .votes button{min-width:85px}#stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;touch-action:pan-y}#stage img{max-width:100%;max-height:100%;object-fit:contain}.login{min-height:100dvh;display:grid;place-items:center}.login form{width:min(90vw,350px);display:grid;gap:12px}.login input{background:#222;color:white;font:inherit;border:1px solid #555;border-radius:8px;width:100%;padding:14px}.login button{background:#eee;color:#111;font-weight:650}.login .error{margin:0}@media(max-width:600px){main{padding:12px 8px}h1{font-size:19px}small,.sort-label{font-size:12px}#gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.foot{padding:5px;flex-wrap:wrap}.foot .votes{flex:1;justify-content:flex-end;gap:4px}.foot button{padding:6px 7px;min-width:0;font-size:13px}.viewbottom .votes button{min-width:76px}}
