:root { color-scheme: dark; font-family: system-ui, sans-serif; background: #101113; color: #eeeae2; }
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 85% 0, #3c261b66, transparent 55%); min-height: 100vh; }
main { max-width: 1080px; margin: auto; padding: 60px 28px 30px; }
.eyebrow, .step { font-size: .73rem; font-weight: 700; letter-spacing: .16em; color: #d29665; }
h1 { font-size: clamp(2.2rem, 6vw, 4.7rem); line-height: 1.05; letter-spacing: -.055em; margin: 16px 0; font-weight: 900; }
h1 span { color: #ff8248; }
.intro { color: #bab7b0; max-width: 620px; line-height: 1.65; margin-bottom: 32px; }
.panel { background: #191b1e; border: 1px solid #373839; border-radius: 12px; padding: 28px; }
.files { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.file-card { display: flex; flex-direction: column; gap: 12px; border: 1px dashed #55504a; border-radius: 8px; padding: 22px; background: #202124; min-width: 0; }
.file-card strong { font-size: 1.35rem; }
.file-card > span:not(.step) { color: #b7b3ac; font-size: .85rem; }
input[type=file] { width: 100%; font: inherit; font-size: .82rem; padding-top: 8px; }
input::file-selector-button { background: #363638; color: #fff; border: 0; border-radius: 4px; padding: 9px 12px; margin-right: 10px; cursor: pointer; }
.hint, footer { font-size: .82rem; color: #aaa69f; line-height: 1.7; }
.hint { margin: 16px 0; }
details { border-top: 1px solid #363638; padding-top: 18px; margin: 22px 0; }
summary { cursor: pointer; color: #ded8ce; }
.options { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 20px; font-size: .85rem; }
.options label:not(.checkbox) { display: grid; gap: 8px; }
select { background: #28292b; color: #fff; font: inherit; padding: 9px; border: 1px solid #555; border-radius: 4px; }
.checkbox { display: flex; align-items: center; gap: 7px; }
input[type=checkbox] { accent-color: #ff8248; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
button { font: inherit; cursor: pointer; }
#start { background: #ff8248; color: #20150f; font-weight: 750; padding: 14px 28px; border: 0; border-radius: 5px; }
#start span { margin-left: 32px; }
button:disabled { opacity: .5; cursor: wait; }
a { color: #c8b9a4; text-underline-offset: 4px; }
.actions a { font-size: .87rem; }
#status { color: #b4b1a9; font-size: .85rem; line-height: 1.6; min-height: 1.6em; }
#status.error { color: #ff9a79; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 12px; font-size: .8rem; letter-spacing: .04em; }
.toolbar button { background: #2e2f31; border: 1px solid #505052; color: #eee; padding: 8px 12px; border-radius: 4px; }
#screen { width: 100%; height: min(72vw, 720px); min-height: 300px; background: #000; }
#screen:fullscreen { height: 100vh; }
#game { width: 100%; height: 100%; }
footer { border-top: 1px solid #343433; margin-top: 38px; padding-top: 16px; }
footer p { margin: 4px 0; }
:focus-visible { outline: 2px solid #ffad7e; outline-offset: 4px; }
[hidden] { display: none !important; }
.online { margin-top: 30px; }
.online h2 { font-size: 1.8rem; letter-spacing: -.03em; margin: 12px 0; }
.online button { background: #37302b; color: #f4dbc3; border: 1px solid #6d5544; padding: 10px 14px; border-radius: 5px; }
.online input[type=text] { min-width: 0; background: #101113; color: #eee; border: 1px solid #55504a; padding: 11px 12px; border-radius: 4px; font: inherit; }
.room-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.room-actions label { font-size: .85rem; }
.room-actions input { flex: 1; }
.invite-row { display: flex; gap: 12px; margin-top: 8px; }
.invite-row input { flex: 1; }
#players { display: grid; grid-template-columns: repeat(2, 1fr); list-style: none; padding: 0; gap: 8px; }
#players li { background: #242426; padding: 10px 12px; font-size: .85rem; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#players button { padding: 5px 8px; font-size: .75rem; }
#net-status { color: #b4b1a9; font-size: .85rem; line-height: 1.6; }
#net-status.error { color: #ff9a79; }
#remote-video { width: 100%; max-height: 75vh; background: #000; margin: 12px 0; }
@media (max-width: 640px) {
  main { padding: 32px 16px; }
  .panel { padding: 18px; }
  .files { grid-template-columns: 1fr; }
  .file-card { padding: 18px; }
  .toolbar { flex-wrap: wrap; }
}
