html {
    color-scheme: dark;
    background: #151515;
    color: #dedede;
    font: 16px/1.5 system-ui, sans-serif;
}
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { width: 100%; max-width: none; box-sizing: border-box; margin: 0 auto; padding: 2rem 1rem; flex: 1; }
body > nav, body > footer { background: #202020; padding: 1rem; }
body > nav { margin-bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 2rem; white-space: nowrap; overflow-x: auto; }
body > nav p { margin: 0 0 0 auto; text-align: right; }
h1 { font-size: 1.6rem; font-weight: 600; }
a { color: #b8cee8; text-underline-offset: .2em; }
p { color: #aaa; }
ul { padding-left: 1.3rem; }
li { margin: .5rem 0; }
fieldset { border: 1px solid #393939; margin: 1.5rem 0; padding: 1rem; min-width: 0; }
legend { padding: 0 .4rem; font-weight: 600; }
label { display: block; margin: .8rem 0 .3rem; }
input, textarea, button {
    box-sizing: border-box;
    font: inherit;
    color: inherit;
    background: #202020;
    border: 1px solid #494949;
    border-radius: 3px;
    padding: .5rem .65rem;
    max-width: 100%;
}
input, textarea { width: 100%; }
input { width: auto; }
label + input { width: 100%; }
textarea { display: block; field-sizing: content; min-height: 3lh; max-height: 10lh; overflow-y: auto; resize: vertical; }
button { cursor: pointer; }
button:hover { background: #303030; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #b8cee8; outline-offset: 2px; }

nav { margin-bottom: 2rem; }
footer { border-top: 1px solid #393939; }

section { margin: 2rem 0; }
img { display: block; width: 100%; max-width: 100%; height: auto; }
q { white-space: normal; overflow-wrap: anywhere; }

main:has(> article) {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.2fr) minmax(14rem, 1fr);
    grid-template-areas: "chat content inventory";
    gap: 2rem;
    align-items: start;
}
main > article { grid-area: content; min-width: 0; }
main > aside { min-width: 0; overflow-wrap: anywhere; }
main > aside:first-of-type { grid-area: chat; }
main > aside:last-of-type { grid-area: inventory; }
aside > h2, aside > section:first-child { margin-top: 0; }
article > nav { margin-top: 0; }
@media (max-width: 65rem) {
    main:has(> article) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "content" "chat" "inventory";
    }
}

main { padding: 3rem clamp(1.5rem, 4vw, 5rem); }
body > nav, body > footer { padding: 1.5rem clamp(1.5rem, 4vw, 5rem); }
main:has(> article) { gap: clamp(2rem, 4vw, 4.5rem); }
fieldset { padding: 1.5rem; }
section { margin: 2.5rem 0; }
@media (max-width: 40rem) {
    main { padding: 2rem 1.25rem; }
    body > nav, body > footer { padding: 1rem 1.25rem; }
    fieldset { padding: 1rem; }
}

li > form { display: inline-block; margin: .25rem 0 .25rem .5rem; }

form > div { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
form > div > input { flex: 1 1 12rem; min-width: 0; }
form > div > button { flex: 0 0 auto; }

article p { overflow-wrap: anywhere; }

video { display: block; width: 100%; max-height: 60vh; background: #090909; }
form > ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; list-style: none; padding: 0; }
form > ol > li { min-width: 0; }
form > ol img { margin: .5rem 0; cursor: pointer; }
