*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #000000;
    --fg: #f2f2f2;
    --muted: #888888;
    --border: #555555;
    --chat-border: #2a2a2a;
    --assistant-bg: #1b1b1b;
    --user-bg: #0d0d0d;
}

html, body {
    height: 100%;
    font-family: Georgia, serif;
    background: var(--bg);
    color: var(--fg);
    font-size: 16px;
    line-height: 1.65;
}

#app {
    height: 100%;
}

/* ─── LANDING ─────────────────────────────────────────────── */

#landing-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.landing-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 340px;
    text-align: center;
}

.logo {
    font-family: Georgia, serif;
    font-size: 34px;
    font-weight: normal;
    letter-spacing: 0.18em;
    color: var(--fg);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.door-image {
    max-width: 260px;
    width: 100%;
    display: block;
    margin: 8px auto 20px auto;
}

.headline {
    line-height: 1.3;
    color: var(--fg);
}

.headline > div:first-child {
    font-size: 30px;
    margin-top: 10px;
}

.headline .italic {
    font-size: 22px;
    font-style: italic;
    margin-top: 4px;
}

.subtext {
    font-size: 1rem;
    color: var(--fg);
    margin-top: 10px;
    margin-bottom: 16px;
}

#start-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: Georgia, serif;
    font-size: 18px;
    padding: 18px 36px;
    cursor: pointer;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-top: 24px;
    transition: border-color 0.15s;
}

#start-btn:hover {
    border-color: var(--fg);
}

#start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.landing-footer {
    font-size: 0.8rem;
    color: var(--muted);
}

.landing-footer a {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid #444;
}

.landing-footer a:hover {
    color: var(--fg);
    border-bottom-color: var(--fg);
}

/* ─── ORIENTATION / SESSION SCREEN ───────────────────────── */

#orientation-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.orientation-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 460px;
    gap: 2.2rem;
    text-align: center;
}

.session-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.session-logo {
    font-size: 20px;
    letter-spacing: 0.25em;
    font-weight: normal;
    color: var(--fg);
    text-transform: uppercase;
}

.session-headline {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.3;
}

.session-push {
    font-size: 24px;
    color: var(--fg);
}

.session-obvious {
    font-size: 24px;
    font-style: italic;
    color: var(--fg);
}

.session-divider {
    width: 180px;
    height: 1px;
    background: #333;
}

.session-prompt {
    font-size: 20px;
    color: var(--fg);
}

.orientation-input-wrap {
    width: 100%;
}

.orientation-input-row {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    align-items: flex-end;
}

#orientation-input {
    flex: 1;
    font-family: Georgia, serif;
    font-size: 0.95rem;
    background: #111;
    border: 1px solid #444;
    color: var(--fg);
    padding: 12px;
    resize: none;
    outline: none;
    line-height: 1.5;
}

#orientation-input:focus {
    border-color: #777;
}

#orientation-send-btn {
    background: transparent;
    border: 1px solid #555;
    color: var(--fg);
    font-family: Georgia, serif;
    font-size: 0.8rem;
    padding: 10px 16px;
    cursor: pointer;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    height: fit-content;
}

#orientation-send-btn:hover {
    border-color: var(--fg);
}

#orientation-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── CHAT HEADER (carried from session entry) ────────────── */

#chat-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.6rem 0 0;
    gap: 0.6rem;
    margin-bottom: 36px;
}

#chat-header .session-logo {
    font-size: 20px;
    letter-spacing: 0.25em;
}

#chat-header .session-push {
    font-size: 24px;
}

#chat-header .session-obvious {
    font-size: 24px;
    font-style: italic;
}

#chat-header .session-divider {
    margin-top: 0.8rem;
}

/* ─── SITUATION ANCHOR ────────────────────────────────────── */

#situation-anchor {
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.4rem 0 1.2rem;
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 0.5rem;
}

.anchor-label {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    color: var(--muted);
    text-transform: uppercase;
}

.anchor-text {
    font-size: 0.95rem;
    color: #c0c0c0;
    font-style: italic;
    line-height: 1.55;
}

/* ─── CHAT AREA ───────────────────────────────────────────── */

#chat-area {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 520px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

#transcript {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.message {
    max-width: 90%;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
    line-height: 1.65;
    white-space: pre-wrap;
}

.message.assistant {
    background: var(--assistant-bg);
    border: 1px solid var(--chat-border);
    align-self: flex-start;
    color: var(--fg);
}

.message.user {
    background: var(--user-bg);
    align-self: flex-end;
    border: 1px solid var(--border);
    color: var(--fg);
}

#input-row {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid var(--chat-border);
    align-items: flex-end;
}

#user-input {
    flex: 1;
    font-family: Georgia, serif;
    font-size: 0.95rem;
    background: #0f0f0f;
    border: 1px solid var(--border);
    color: var(--fg);
    padding: 0.6rem 0.8rem;
    resize: none;
    outline: none;
    line-height: 1.5;
}

#user-input:focus {
    border-color: #888;
}

#send-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--fg);
    font-family: Georgia, serif;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    letter-spacing: 0.03em;
    height: fit-content;
}

#send-btn:hover {
    border-color: var(--fg);
}

#send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ─── AUTH WALL ───────────────────────────────────────────── */

#auth-wall {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 1.5rem;
    color: var(--muted);
    font-style: italic;
}
