:root {
    color-scheme: light dark;
    --canvas: #f4eee4;
    --paper: #fdf8ef;
    --ink: #30231d;
    --muted: #665249;
    --line: #d6c7b6;
    --accent: #803d2c;
    --button-text: #fffaf4;
    font-family: system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root {
        --canvas: #1d1918;
        --paper: #27201e;
        --ink: #f4e7db;
        --muted: #cab3a6;
        --line: #534139;
        --accent: #eda88c;
        --button-text: #331e16;
    }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem clamp(1rem, 5vw, 3rem); border-bottom: 1px solid var(--line);
}
a { color: var(--accent); text-underline-offset: .23em; }
.brand { font: 600 1.6rem Georgia, serif; color: var(--ink); text-decoration: none; }
main {
    width: min(39rem, calc(100% - 2rem)); margin: clamp(2rem, 8vh, 6rem) auto;
    padding: clamp(1.35rem, 5vw, 2.75rem); background: var(--paper);
    border: 1px solid var(--line); border-radius: 1rem;
}
h1 { font: 500 clamp(2rem, 6vw, 3rem)/1.1 Georgia, serif; margin: 0 0 1.15rem; }
p { color: var(--muted); line-height: 1.55; }
form { display: grid; gap: .85rem; margin: 1.4rem 0 0; }
label { display: grid; gap: .45rem; font-weight: 600; }
input, button { font: inherit; border-radius: .55rem; padding: .65rem .8rem; }
input { min-width: 0; background: var(--canvas); color: var(--ink); border: 1px solid var(--line); }
button { justify-self: start; border: 0; background: var(--accent); color: var(--button-text); cursor: pointer; }
form[action$="logout"] button { background: transparent; color: var(--accent); padding-inline: 0; text-decoration: underline; }
ul { padding: 0; margin: 1.4rem 0 0; list-style: none; border-top: 1px solid var(--line); }
li { display: flex; gap: .75rem; justify-content: space-between; align-items: center; flex-wrap: wrap;
    padding: .85rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
small { display: block; color: var(--muted); margin-top: .2rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.brand { display: inline-flex; gap: .6rem; align-items: center; }
.brand img { width: 2.3rem; height: 2.3rem; display: block; }
.message { margin-top: 1rem; border-inline-start: 3px solid var(--accent); padding-inline-start: .75rem; }
[aria-busy="true"] button { opacity: .55; }

.queue { margin-top: 1.65rem; }
.queue h2 { font: 600 1.25rem Georgia, serif; margin: 0; }
.queue p { margin-bottom: 0; }
.queue ul { margin-top: .6rem; }
.queue-contact { min-width: 0; overflow-wrap: anywhere; }
.queue-action { margin: 0; }
form[action="/new-code"] button { background: transparent; color: var(--accent); padding-inline: 0; text-decoration: underline; }

form select {
  display: block;
  width: 100%;
  margin-top: .45rem;
  padding: .75rem;
  font: inherit;
  color: inherit;
  background: inherit;
  border: 1px solid currentColor;
  border-radius: .4rem;
}

.code-entry-link { background: transparent; color: var(--accent); padding-inline: 0; text-decoration: underline; margin-top: 1rem; }

.account-pagination { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-block: 1rem; }
