/* --------------------------------------------------------------------------
   The door
   The whole page, until the server knows who is asking. Not a banner and not a
   modal over a list that is not there — there is nothing behind this to look at,
   and pretending otherwise would just be a screen full of empty furniture.
   -------------------------------------------------------------------------- */
.door {
    position: fixed; inset: 0; z-index: 80;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    padding: 24px 20px;
    overflow-y: auto;
}
.door[hidden] { display: none; }
.door-card {
    width: min(400px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 22px 18px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.door-head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.door-head canvas { display: block; image-rendering: pixelated; }
.door-head b { font-size: 13.5px; font-weight: 600; letter-spacing: 0.2px; }

.door section { display: none; }
.door[data-step="ask"] section[data-step="ask"],
.door[data-step="code"] section[data-step="code"],
.door[data-step="password"] section[data-step="password"] { display: block; }
/* The step rules above set `display` on whole sections, which is exactly strong enough to beat
   the user agent's rule for `hidden` — so an element hidden from script stayed on screen. This
   puts `hidden` back on top, where a one-word attribute deserves to be. */
.door [hidden] { display: none !important; }

.door .lede { margin: 0 0 6px 0; font-size: 15px; font-weight: 600; }
.door .fine { margin: 0 0 16px 0; font-size: 12.5px; line-height: 1.5; color: var(--dim); }
.door .fine b { color: var(--ink); font-weight: 600; }
.door label {
    display: block; margin-bottom: 6px;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--faint);
}
.door input[type="text"], .door input[type="password"] {
    width: 100%;
    background: #101014; border: 1px solid var(--line); border-radius: 9px;
    padding: 10px 12px; font-size: 15px; color: var(--ink);
    margin-bottom: 14px;
}
.door input:focus { outline: none; border-color: var(--accent-ed); }
.door .go {
    width: 100%;
    background: var(--accent); color: #17110e;
    font-size: 14px; font-weight: 600;
    border-radius: 10px; padding: 12px;
}
.door .go:disabled { background: #2a2a32; color: var(--faint); cursor: default; }
.door .alt {
    display: block; width: 100%;
    margin-top: 10px; padding: 8px;
    color: var(--dim); font-size: 12.5px; text-align: center;
}
.door .alt:hover { color: var(--ink); }
.door .say { margin: 14px 0 0 0; font-size: 12.5px; line-height: 1.5; color: var(--accent); min-height: 1px; }
.door .say:empty { display: none; }
.door .say.calm { color: var(--dim); }

/* Six boxes rather than one field: on a phone this is typed with a thumb while reading a code
   off another screen, and a target you can hit without looking is worth the extra markup. */
.digits { display: flex; gap: 8px; margin-bottom: 16px; }
.digits input {
    flex: 1 1 0; min-width: 0; width: 100%;
    height: 56px;
    background: #101014; border: 1px solid var(--line); border-radius: 10px;
    text-align: center;
    font-family: var(--mono); font-size: 22px; color: var(--ink);
    padding: 0;
    -moz-appearance: textfield;
}
.digits input::-webkit-outer-spin-button, .digits input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.digits input:focus { outline: none; border-color: var(--accent); background: #16161c; }
.digits input.filled { border-color: #3a3a45; }
@media (max-width: 380px) { .digits { gap: 5px; } .digits input { height: 50px; font-size: 19px; } }

.toast {
    position: fixed; z-index: 70;
    left: 50%; transform: translateX(-50%);
    bottom: calc(20px + var(--status-h));
    background: #1e1e25; border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 14px; font-size: 12.5px; color: var(--ink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: toast 200ms var(--ease);
    max-width: min(420px, calc(100vw - 32px));
}
.toast[hidden] { display: none; }
.toast.err { border-color: #4a2b25; color: #dda08e; }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

