:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: #e8ecec; background: #161d24; --muted: #98a5ac; --accent: #a9d9c6; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, .button { font: inherit; border: 1px solid #3b4850; background: #27343c; border-radius: 8px; padding: 10px 14px; color: #eef4f2; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #35464f; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
header { height: 82px; padding: 0 28px; display: flex; align-items: center; gap: 22px; background: #1b242c; border-bottom: 1px solid #33404a; }
.brand { color: var(--accent); display: flex; gap: 11px; align-items: center; font-size: 34px; text-decoration: none; }
.brand span { color: #f1f1ea; font-size: 23px; font-weight: 650; letter-spacing: -.7px; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 2px; font-weight: 400; }
.puzzle-icon { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.progress { max-width: 450px; flex: 1; margin: 0 auto 0 20px; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-bottom: 9px; color: #c0cbc9; }
.track { height: 4px; border-radius: 4px; background: #35424b; overflow: hidden; }
#fill { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
#connection { font-size: 11px; color: var(--muted); }
.quiet { background: transparent; border-color: transparent; font-size: 12px; color: #c3cdce; padding: 9px 5px; }
main { height: calc(100dvh - 82px); display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
#workbench { position: relative; overflow: hidden; touch-action: none; background-color: #182128; background-image: radial-gradient(#34434c 1px, transparent 1px); background-size: 22px 22px; }
.room-label { position: absolute; top: 22px; left: 25px; display: flex; gap: 9px; align-items: center; font-size: 12px; z-index: 2; pointer-events: none; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.muted { color: var(--muted); font-size: 12px; }
#world { position: absolute; transform-origin: 0 0; }
#frame { position: absolute; background: #29353b; box-shadow: 0 0 0 6px #3e504f, 0 0 0 8px #162027, 0 14px 40px #0005; border: 1px solid #698578; }
.group { position: absolute; cursor: grab; }
.group.fixed { cursor: default; }
.tile { position: absolute; width: 126px; height: 126px; max-width: none; user-select: none; pointer-events: none; filter: drop-shadow(0 2px 2px #0007); }
.fixed .tile { filter: none; }
.group.held .tile { filter: drop-shadow(0 0 3px #b5ead6); }
.holder { position: absolute; top: -28px; left: 0; background: #abd9c7; color: #172d26; padding: 3px 7px; font-size: 11px; border-radius: 4px; white-space: nowrap; pointer-events: none; }
.empty { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -30%); text-align: center; width: min(400px, 90%); }
.empty > .puzzle-icon { font-size: 52px; color: var(--accent); }
.empty h1 { font-size: 26px; font-weight: 500; letter-spacing: -.7px; }
.empty p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.board-tools { position: absolute; bottom: 22px; left: 22px; display: flex; align-items: center; gap: 7px; z-index: 2; }
.board-tools button { background: #223039; font-size: 12px; padding: 9px 12px; }
.board-tools span { color: #81949b; font-size: 11px; margin-left: 8px; }
kbd { color: #97b2ac; margin-left: 10px; font-size: 10px; }
.completion { position: absolute; bottom: 85px; left: 50%; transform: translateX(-50%); background: #a9d9c6; color: #18372b; padding: 16px 22px; border-radius: 10px; text-align: center; }
aside { background: #1d272f; border-left: 1px solid #35414a; overflow-y: auto; }
aside section { padding: 22px; border-bottom: 1px solid #344049; }
.identity { background: linear-gradient(145deg, #2c3c3e, #1d272f); }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 600; letter-spacing: 2px; }
h2 { font-size: 15px; font-weight: 550; margin: 0 0 15px; }
.identity h2 { font-size: 21px; line-height: 1.3; font-weight: 500; margin: 13px 0 10px; letter-spacing: -.5px; }
.identity p { color: #a6b7b9; font-size: 12px; line-height: 1.8; }
.twitch { display: block; text-align: center; background: #7654b5; border-color: #9270ca; margin-top: 18px; font-size: 12px; }
.twitch:hover { background: #8a64ce; }
.room-link { color: var(--accent); display: block; font-size: 12px; margin-top: 12px; }
.channel-settings { margin-top: 16px; width: 100%; font-size: 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; }
.section-heading > span { color: var(--accent); }
.tabs { display: flex; border-bottom: 1px solid #3a474e; gap: 16px; }
.tabs button { font-size: 11px; background: none; padding: 0 0 10px; border: 0; border-radius: 0; color: #9cadb1; }
.tabs button.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
ol, ul { padding: 0; margin: 13px 0 0; list-style: none; }
#leaders li { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 12px; }
.rank { color: #7c9198; width: 14px; font-size: 10px; }
.avatar { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 50%; background: #35474a; color: #b3d7cb; font-size: 11px; }
.score { margin-left: auto; color: var(--accent); }
.placeholder { color: #91a2a8; font-size: 12px; line-height: 1.7; padding: 12px 0; }
#players { display: flex; gap: 9px; flex-wrap: wrap; }
#players li { font-size: 11px; background: #293942; padding: 6px 9px; border-radius: 5px; }
.badge { background: #334740; font-size: 10px; padding: 3px 7px; border-radius: 10px; }
#chat { max-height: 180px; overflow: auto; min-height: 45px; }
#chat li { font-size: 12px; padding: 5px 0; line-height: 1.5; overflow-wrap: anywhere; }
#chat strong { color: var(--accent); margin-right: 6px; }
#chatForm { display: flex; gap: 6px; margin-top: 12px; }
input, select { width: 100%; background: #152129; color: #e7eeec; border: 1px solid #42525b; padding: 10px; border-radius: 6px; font: inherit; font-size: 12px; }
#chatForm input { min-width: 0; }
#chatForm button { padding: 8px 13px; }
dialog { background: #223039; border: 1px solid #4c6267; border-radius: 14px; color: #e9eeec; padding: 32px; width: min(490px, calc(100vw - 30px)); max-height: 85dvh; }
dialog::backdrop { background: #081218b8; backdrop-filter: blur(4px); }
dialog h2 { font-size: 25px; margin-top: 12px; }
dialog p, dd { color: #b1c0c1; font-size: 13px; line-height: 1.7; }
dt { font-size: 13px; color: var(--accent); margin-top: 17px; }
dd { margin: 5px 0; }
.close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 25px; }
label { display: block; font-size: 12px; color: #bac9c8; }
label input, label select { margin-top: 8px; }
.random-image { display: flex; align-items: center; gap: 9px; }
.random-image input { width: auto; margin: 0; accent-color: var(--accent); }
.grid-inputs { display: flex; align-items: flex-end; gap: 16px; margin: 20px 0; }
.grid-inputs label { flex: 1; min-width: 0; }
#pieceCount { max-width: 95px; padding: 10px 0; color: var(--accent); font-size: 12px; }
.primary { background: var(--accent); color: #17372b; width: 100%; }
.primary:hover { background: #c5ecda; }
#adminError, #settingsError { color: #ffb5a5; }
#saveSettings { margin-top: 20px; }
#history li { border-bottom: 1px solid #405059; padding: 14px 0; font-size: 13px; line-height: 1.8; }
#devForm { margin-top: 16px; }
#devForm button { margin-top: 8px; font-size: 12px; }
#toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%); border-radius: 7px; padding: 12px 20px; background: #d6e6de; color: #21352b; z-index: 10; font-size: 13px; }
.home-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; text-align: center; min-height: calc(100dvh - 110px); }
#authDialog .twitch { display: block; margin-top: 24px; text-align: center; }
#authTitle:focus { outline: none; }
@media (max-width: 900px) { header { gap: 12px; padding: 0 16px; } #connection { display: none; } .progress { margin-left: 8px; } main { grid-template-columns: minmax(0, 1fr) 260px; } .board-tools span { display: none; } }
@media (max-width: 620px) { header { height: 110px; flex-wrap: wrap; gap: 6px 15px; padding: 12px 16px; } .brand { font-size: 28px; } .brand span { font-size: 20px; } .progress { order: 5; flex-basis: 100%; max-width: none; margin: 0; } .progress-label { font-size: 10px; margin-bottom: 5px; } header .quiet { margin-left: auto; font-size: 11px; } main { height: auto; display: flex; flex-direction: column; } #workbench { height: 62dvh; min-height: 360px; } aside { border-left: none; display: grid; grid-template-columns: 1fr 1fr; overflow: visible; } aside section { padding: 18px; } .identity, .chat-section { grid-column: 1 / -1; } .identity h2 { font-size: 19px; } .identity p { margin-bottom: 0; } .twitch { margin-top: 12px; } .room-label { left: 17px; top: 18px; font-size: 10px; } .board-tools { left: 16px; bottom: 16px; } .completion { width: 85%; font-size: 12px; } }
