:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #12161b;
  --line: #222a33;
  --text: #e9e7e3;
  --dim: #8e98a3;
  --accent: #8cc8ff;
  --accent-soft: rgba(140, 200, 255, 0.12);
  --rob: #1b2633;
  --danger: #ff8f8f;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 16px/1.5 var(--font); }
button { font: inherit; color: inherit; }
[hidden], [data-off] { display: none !important; }

/* Chat */
body.chat-page { display: flex; flex-direction: column; height: 100dvh; }
.bar {
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid var(--line); background: var(--bg);
}
.who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.name { font-size: 18px; font-weight: 600; letter-spacing: 0.3px; }
.pill {
  border: 1px solid var(--line); background: var(--panel); border-radius: 999px;
  padding: 5px 12px; font-size: 14px; color: var(--dim); cursor: pointer;
}
.pill[data-v="business"] { color: var(--text); }
.pill[data-v="personal"] { color: var(--accent); border-color: rgba(140, 200, 255, 0.35); }
.icon-btn { background: none; border: 0; color: var(--dim); padding: 6px; cursor: pointer; border-radius: 10px; }
.icon-btn:focus-visible, .pill:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chat { flex: 1; overflow-y: auto; padding: 16px 16px 8px; -webkit-overflow-scrolling: touch; }
#messages { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.earlier {
  display: block; margin: 0 auto 12px; background: none; border: 1px solid var(--line);
  color: var(--dim); border-radius: 999px; padding: 4px 14px; font-size: 13px; cursor: pointer;
}
.day { align-self: center; color: var(--dim); font-size: 12px; margin: 10px 0 2px; letter-spacing: 0.4px; }
.msg { max-width: 86%; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.rob { align-self: flex-end; background: var(--rob); padding: 9px 14px; border-radius: var(--radius) var(--radius) 6px var(--radius); }
.msg.maya { align-self: flex-start; padding: 2px 2px; }
.msg.maya.push::before { content: "messaged you"; display: block; color: var(--accent); font-size: 12px; margin-bottom: 2px; }
.msg .time { display: block; color: var(--dim); font-size: 11px; margin-top: 3px; }
.msg.rob .time { text-align: right; }
.msg.error { color: var(--danger); }
.typing { display: inline-flex; gap: 5px; padding: 8px 2px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite ease-in-out; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .typing span { animation: none; opacity: 0.6; } }

.composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--bg);
  max-width: 760px; width: 100%; margin: 0 auto;
}
#input {
  flex: 1; resize: none; max-height: 160px; min-height: 44px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 22px;
  padding: 10px 16px; font: inherit; line-height: 1.4; outline: none;
}
#input:focus { border-color: rgba(140, 200, 255, 0.45); }
#send {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #07131f; display: grid; place-items: center;
}
#send:disabled { opacity: 0.45; cursor: default; }
#mic {
  width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: var(--panel); color: var(--accent); display: grid; place-items: center; position: relative;
}
#mic svg { grid-area: 1 / 1; }
#mic .i-stop, #mic .i-wave { display: none; }
#mic[data-state="listening"] { background: var(--accent); color: #07131f; border-color: var(--accent); }
#mic[data-state="listening"] .i-mic { display: none; }
#mic[data-state="listening"] .i-stop { display: block; }
#mic[data-state="listening"]::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent);
  opacity: 0.35; transition: opacity 0.12s, transform 0.12s;
}
#mic[data-state="listening"].hot::after { opacity: 0.9; transform: scale(1.08); }
#mic[data-state="hearing"] { opacity: 0.6; cursor: progress; }
#mic[data-state="speaking"] .i-mic { display: none; }
#mic[data-state="speaking"] .i-wave { display: block; animation: breathe 1.6s infinite ease-in-out; }
@keyframes breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #mic[data-state="speaking"] .i-wave { animation: none; } }
.say {
  background: none; border: 0; color: var(--dim); padding: 2px 6px; margin-left: 4px; cursor: pointer;
  vertical-align: middle; border-radius: 8px; line-height: 0;
}
.say:hover { color: var(--accent); }
.msg.rob.voice .time::before { content: "said · "; }
.msg.note { font-size: 14px; }
.msg.rob.file { border: 1px solid rgba(140, 200, 255, 0.25); }
.msg.rob.file .body::before { content: "📎 "; }
.msg.rob.file.pending { opacity: 0.6; }
.msg.maya.mail::before { content: "email"; display: block; color: var(--accent); font-size: 12px; margin-bottom: 2px; }
.msg.maya.dm::before { content: "instagram"; display: block; color: var(--accent); font-size: 12px; margin-bottom: 2px; }
.msg.maya.fix { max-width: 100%; align-self: stretch; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font: 12px/1.45 ui-monospace, "SF Mono", Consolas, monospace;
  color: var(--dim); max-height: 260px; overflow: auto; }
.msg.maya.fix .time::before { content: "fix mode · "; }
#fix-pw { flex: 1; min-width: 0; }
.open-file { display: inline-block; margin-top: 4px; color: var(--accent); font-size: 13px; }
/* a picture the agent made, right in the chat (2026-11-08) */
.msg-pic { display: block; margin-top: 8px; width: min(420px, 72vw); }   /* a set width: a bubble sized by a short line of text would shrink a % width to nothing */
.msg-pic img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); }
.attach { width: 36px; height: 44px; flex: none; padding: 0; display: grid; place-items: center; }

/* Settings sheet */
.sheet { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 10; }
.sheet-card {
  width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 90dvh; overflow-y: auto;
}
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-card { border-radius: 20px; } }
.sheet-card h2 { margin: 0 0 8px; font-size: 18px; }
.field-label { display: block; color: var(--dim); font-size: 13px; margin: 16px 0 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { background: none; border: 0; border-radius: 9px; padding: 8px 0; color: var(--dim); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--text); }
.seg.seg2 { grid-template-columns: repeat(2, 1fr); }
.hint { color: var(--dim); font-size: 13px; margin: 6px 0 0; }
.row { display: flex; align-items: center; gap: 10px; color: var(--dim); }
input[type="time"], input[type="number"], .gate input, #fix-pw {
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font: inherit; color-scheme: dark;
}
input[type="number"] { width: 90px; }
.accounts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.acct { padding: 10px 12px; border-top: 1px solid var(--line); }
.acct:first-child { border-top: 0; }
.acct-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acct-name { flex: 1 1 auto; min-width: 0; }
.acct-state { color: var(--dim); font-size: 13px; }
.acct-state.on { color: var(--accent); }
.acct-state.on::before { content: "✓ "; }
.acct-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.acct-form .row { gap: 8px; }
.acct-input {
  flex: 1; min-width: 0; width: 100%; background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px; font: inherit;
}
.acct-code { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel);
  font: 13px ui-monospace, "SF Mono", Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.acct-msg { margin: 0 0 8px; font-size: 14px; color: var(--danger); }
.acct-msg.ok { color: var(--accent); }
.hint.strong { color: var(--text); }
.hint a { color: var(--accent); }
.small { padding: 6px 12px; font-size: 14px; }
.sheet-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.link { background: none; border: 0; color: var(--dim); text-decoration: underline; cursor: pointer; padding: 6px 0; }
.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 9px 16px; cursor: pointer; }
.primary { background: var(--accent); color: #07131f; border: 0; border-radius: 12px; padding: 10px 20px; font-weight: 600; cursor: pointer; }

/* Sign-in and setup */
body.gate-page { display: grid; place-items: center; min-height: 100dvh; padding: 16px; }
.gate { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; text-align: center; }
.gate h1 { margin: 6px 0 4px; font-size: 24px; font-weight: 600; letter-spacing: 0.3px; }
.gate input { width: 100%; padding: 12px 14px; }
.gate .primary { padding: 12px; }
.mark { width: 64px; height: 64px; margin: 0 auto; display: block; }

/* Faces (2026-11-05) */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--line); }
.room-faces { display: inline-flex; flex: none; }
.room-faces img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); margin-left: -8px; }
.room-faces img:first-child { margin-left: 0; }
.msg.room-msg { display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; align-items: start; }
.msg.room-msg > :not(.room-face) { grid-column: 2; }
.room-face { grid-column: 1; grid-row: 1 / span 3; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; margin-top: 2px; }

/* The front door's picker (staff.trwlabs.com) */
.picker .pick {
  display: flex; flex-direction: row; align-items: center; gap: 14px; text-align: left; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
}
.picker .pick:hover, .picker .pick:focus-visible { border-color: rgba(140, 200, 255, 0.45); outline: none; }
.pick-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.pick-faces { display: inline-flex; flex: none; }
.pick-faces img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--panel); margin-left: -14px; }
.pick-faces img:first-child { margin-left: 0; }
.pick-name { font-size: 18px; font-weight: 600; }
.pick-what { color: var(--dim); font-size: 14px; }
.picker .link { margin-top: 8px; }
.error { color: var(--danger); min-height: 1.5em; margin: 0; font-size: 14px; }

/* The conference room */
.room-page .back { display: grid; place-items: center; text-decoration: none; }
.room-msg .room-who, .rob-to { display: block; font-size: 12px; font-weight: 600; margin-bottom: 2px; letter-spacing: 0.2px; }
.rob-to { color: var(--dim); font-weight: 400; }
.thinking { max-width: 720px; margin: 6px auto 0; color: var(--dim); font-size: 13px; font-style: italic; }
.room-composer { flex-direction: column; align-items: stretch; gap: 8px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.to-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--dim); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; cursor: pointer;
}
.chip[aria-pressed="true"] { color: var(--text); border-color: rgba(140, 200, 255, 0.45); background: var(--accent-soft); }
#free-talk[aria-pressed="false"] { opacity: 0.55; text-decoration: line-through; }
#room-voice .i-on { display: none; }
#room-voice[aria-pressed="true"] { color: var(--accent); }
#room-voice[aria-pressed="true"] .i-on { display: block; }
#room-voice[aria-pressed="true"] .i-off { display: none; }
#mic[data-state="listening"] .i-mic { display: none; }
#mic[data-state="listening"] .i-stop { display: block; }
.room-pick { border-color: rgba(140, 200, 255, 0.35); }
.room-page .who { min-width: 0; }
.room-page .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room-page .bar { gap: 8px; }
@media (max-width: 430px) {
  .room-faces { display: none; }
  .room-page .name { font-size: 17px; }
}

/* The conference room scene at the top of the room */
.room-scene { max-width: 720px; margin: 0 auto 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.room-scene img { display: block; width: 100%; height: auto; }

/* Who you're talking to: the profile card at the top of each chat, and faces beside their messages */
.profile { max-width: 720px; margin: 4px auto 18px; display: flex; align-items: center; gap: 16px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.profile-photo { width: 96px; height: 120px; object-fit: cover; border-radius: 12px; flex: none; }
.profile-text { min-width: 0; }
.profile-name { font-size: 22px; font-weight: 650; letter-spacing: 0.2px; }
.profile-title { color: var(--accent); font-size: 15px; margin-top: 2px; }
.profile-org { color: var(--dim); font-size: 13px; margin-top: 6px; letter-spacing: 0.6px; text-transform: uppercase; }
.msg.maya.faced { position: relative; margin-left: 40px; }
.msg-face { position: absolute; left: -40px; top: 2px; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }

/* TRW Labs branding on the conference room and the picker */
.brand-strip { max-width: 720px; margin: 2px auto 12px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 4px 2px; }
.brand-strip img { height: 26px; width: auto; }
.brand-strip span { color: var(--dim); font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }
.door-logo { height: 40px; width: auto; margin: 0 auto 6px; display: block; }

/* An office meeting uses the room page without the conference scene or the free-talk switch */
.office-meeting .room-scene, .office-meeting #free-talk { display: none; }
.ended { max-width: 720px; margin: 0 auto 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px;
  color: var(--dim); background: var(--panel); }
.ended a { color: var(--accent); }

/* Invites */
.invite-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.invite-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.invite-name { flex: 1 1 auto; font-weight: 600; }
.invite-face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.meeting-banner { max-width: 720px; margin: 0 auto 12px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft);
  border: 1px solid rgba(140, 200, 255, 0.35); }
.meeting-banner a { color: var(--accent); font-weight: 600; }
.msg.tool-note { color: var(--dim); font-size: 13px; font-style: italic; }

.to-line { display: flex; align-items: center; gap: 8px; }
.to-line .to-row { flex: 1; min-width: 0; }
.voices-chip { flex: none; }
.voices-chip[aria-pressed="true"] { color: var(--text); border-color: rgba(140, 200, 255, 0.55); background: var(--accent-soft); }

/* The message box is always on screen (no scrolling down to reach it), and so is the header */
body.chat-page { height: 100dvh; min-height: 0; overflow: hidden; }
body.chat-page .bar { position: sticky; top: 0; z-index: 6; flex: none; }
body.chat-page .composer { position: sticky; bottom: 0; z-index: 6; flex: none; background: var(--bg); }
body.chat-page .chat { min-height: 0; overscroll-behavior: contain; }

/* Jobs and the agent's computer (2026-11-05) */
.desk-btn { position: relative; }
.desk-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #ffb454; box-shadow: 0 0 0 2px var(--bg); }
.desk-card { max-width: 760px; }
.jobs { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.job { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); }
.job-waiting { border-color: #ffb454; }
.job-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.job-title { font-weight: 600; }
.job-state { font-size: 13px; color: var(--dim); white-space: nowrap; }
.job-waiting .job-state { color: #ffb454; }
.job-done .job-state { color: var(--accent); }
.job-meta { font-size: 12px; color: var(--dim); margin-top: 2px; }
.job-ask { margin: 8px 0 6px; }
.job-result { margin: 8px 0 4px; white-space: pre-wrap; font-size: 14px; }
.job-log { margin: 6px 0 2px; padding-left: 18px; font-size: 13px; color: var(--dim); }
.job .row { margin-top: 6px; }
.job .acct-input { flex: 1; min-width: 0; }
.desk-page { font-size: 12px; color: var(--dim); margin: 2px 0 6px; overflow-wrap: anywhere; }
.desk-shot { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #000; cursor: crosshair; touch-action: manipulation; }
.desk-keys { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.desk-keys button { padding: 6px 12px; }
.desk-row input { flex: 1; min-width: 0; }
.details-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.details-box summary { cursor: pointer; font-weight: 600; }
.details-form { display: flex; flex-direction: column; }
.details-form textarea { min-height: 70px; resize: vertical; }
.skill-steps { margin-top: 4px; font-size: 14px; }
.skill-steps summary { cursor: pointer; color: var(--dim); }
.teach-on { border: 1px solid #ff8f8f; border-radius: 12px; padding: 10px 12px; margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.teach-live { margin: 0; color: #ff8f8f; font-weight: 600; }
.teach-on textarea { min-height: 54px; resize: vertical; }
#teach-off .small { color: var(--dim); }
.draft-text { width: 100%; min-height: 140px; margin-top: 6px; resize: vertical; font: inherit; }

/* 2026-11-06: Done on what an agent flags, and the bio card. */
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.done-btn { display: inline-block; margin: 8px 0 0; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.done-btn:hover { border-color: var(--accent); }
.done-btn:disabled { opacity: 0.5; cursor: default; }
.done-note { max-width: 720px; margin: 6px auto; padding: 0 14px; color: var(--dim); font-size: 13px; }
.profile-bio { margin-top: 6px; font-size: 14px; }
.bio-role { color: var(--accent); font-size: 14px; margin: -2px 0 12px; }
.bio-text { margin: 0 0 14px; line-height: 1.6; }
.bio-email { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; color: var(--dim); font-size: 14px; }
.bio-email span { color: var(--text); overflow-wrap: anywhere; }
/* 2026-11-06: what's still outstanding. */
.needs-bar { display: block; max-width: 720px; width: calc(100% - 28px); margin: 0 auto 12px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); color: var(--accent); font: inherit; font-weight: 600;
  text-align: left; cursor: pointer; position: sticky; top: 8px; z-index: 3; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.needs-bar::after { content: " ›"; }
.needs-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; margin-top: 6px; }
.need { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--panel); }
.need-text { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.need-text.open { display: block; }
.need-meta { color: var(--dim); font-size: 13px; margin-top: 6px; }
.need.need-done { color: var(--dim); font-size: 14px; }
/* 2026-11-06: the staff homepage sits on the tech background from Rob's cover (no words, just the image). */
body.door-page { background: #000 url("/brand/tech-bg.svg") center 42% / cover no-repeat fixed; }
body.door-page .picker .pick { background: rgba(14, 17, 22, 0.88); backdrop-filter: blur(2px); }
.copy-btn { margin-left: 8px; }

/* Fingerprint sign-in card on the front door (2026-11-07) */
.fp-card { align-items: center; gap: 12px; cursor: default; }
.fp-card .pill { margin-left: auto; white-space: nowrap; }

/* 2026-11-07: the front door, redesigned for the phone. One hero (the conference room), the team as a photo grid,
   the break room as a slim row, and the fingerprint card only when it's needed. */
body.home-page { min-height: 100dvh; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, rgba(40, 70, 110, 0.35), transparent 60%),
              linear-gradient(rgba(5, 7, 10, 0.82), rgba(5, 7, 10, 0.94)), #000 url("/brand/tech-bg.svg") center 30% / cover no-repeat fixed; }
.home-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
  padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(rgba(5, 7, 10, 0.9), rgba(5, 7, 10, 0.55) 70%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.home-logo { height: 24px; width: auto; display: block; }
.home { width: 100%; max-width: 560px; margin: 0 auto; padding: 4px 16px 8px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.home-hello { margin: 6px 2px 0; font-size: 26px; font-weight: 650; letter-spacing: -0.2px; line-height: 1.2; }

.hero { position: relative; display: block; border-radius: 22px; overflow: hidden; text-decoration: none; color: #fff;
  aspect-ratio: 16 / 9; background: var(--panel); isolation: isolate;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  transition: transform 0.18s ease; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 5, 8, 0.55) 68%, rgba(3, 5, 8, 0.92)); }
.hero-text { position: absolute; left: 18px; right: 64px; bottom: 16px; display: flex; flex-direction: column; gap: 2px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: 1.1px;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.hero-title { font-size: 22px; font-weight: 650; letter-spacing: -0.1px; }
.hero-go { position: absolute; right: 16px; bottom: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: #07131f; box-shadow: 0 6px 18px -6px rgba(140, 200, 255, 0.7); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #5fe0a0; box-shadow: 0 0 0 3px rgba(95, 224, 160, 0.22); }

.home-label { margin: 8px 2px -6px; font-size: 12px; font-weight: 600; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--dim); }
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* two across on a phone: an odd headcount gives the last person a full-width tile instead of a lone half */
@media (max-width: 619px) {
  .team.odd > .tile:last-child { grid-column: 1 / -1; aspect-ratio: 2.08 / 1; }
  .team.odd > .tile:last-child img { object-position: 50% 22%; }
  /* a title that wraps to two lines pushed that name up out of line with its neighbour (Rob, 2026-11-08):
     every tile reserves two lines for the title, so names line up across the row */
  .tile-role { min-height: 2.6em; }
}
/* columns by headcount (maya/door.py _cols), as classes because the CSP blocks inline styles */
@media (min-width: 620px) {
  .team { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team.cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .team.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .team.cols-5 .tile-name { font-size: 16px; }
  .team.cols-5 .tile-role { font-size: 11.5px; min-height: 2.6em; }
}
.mine { gap: 14px; padding: 10px 14px 10px 10px; }
.mine-face { width: 64px; height: 64px; flex: none; border-radius: 12px; object-fit: cover; object-position: 50% 14%; }
.mine .slim-name { font-size: 17px; font-weight: 650; }
.tile { position: relative; display: block; aspect-ratio: 1 / 1.04; border-radius: 18px; overflow: hidden; color: #fff;
  text-decoration: none; background: var(--panel); isolation: isolate; transition: transform 0.18s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 12px 28px -16px rgba(0, 0, 0, 0.8); }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; z-index: -1;
  transition: transform 0.4s ease; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 52%, rgba(3, 5, 8, 0.6) 74%, rgba(3, 5, 8, 0.95)); }
.tile-text { position: absolute; left: 12px; right: 10px; bottom: 11px; display: flex; flex-direction: column; }
.tile-name { font-size: 17px; font-weight: 650; line-height: 1.25; }
.tile-role { font-size: 12.5px; line-height: 1.3; color: rgba(255, 255, 255, 0.72); }

.slim { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--text);
  background: rgba(18, 22, 27, 0.72); border: 1px solid rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.slim .pick-faces img { width: 30px; height: 30px; margin-left: -10px; border-color: #12161b; }
.slim .pick-faces img:first-child { margin-left: 0; }
.slim-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.slim-name { font-size: 15px; font-weight: 600; }
.slim-what { font-size: 13px; color: var(--dim); }
.slim-go { color: var(--dim); flex: none; }
.fp-card .fp-icon { color: var(--accent); flex: none; }
.slim .cal-icon { color: var(--accent); flex: none; margin: 0 4px; }
.fp-card .pill { flex: none; color: var(--text); }
.fp-msg { color: var(--accent); }

.home-foot { display: flex; justify-content: center; gap: 22px; padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); }
.foot-link { background: none; border: 0; padding: 6px 2px; color: var(--dim); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.foot-link:hover { color: var(--text); }

@media (hover: hover) {
  .hero:hover, .tile:hover { transform: translateY(-2px); }
  .tile:hover img { transform: scale(1.03); }
  .slim:hover { border-color: rgba(140, 200, 255, 0.3); }
}
.hero:active, .tile:active, .slim:active { transform: scale(0.98); }
.hero:focus-visible, .tile:focus-visible, .slim:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .hero, .tile, .tile img { transition: none; } .hero:active, .tile:active, .slim:active { transform: none; } }
@media (min-width: 900px) { .home { max-width: 760px; } }
.fp-card .fp-skip { flex: none; padding: 6px 4px; }
#fp-hint { font-size: 13px; margin: 0; }

/* 2026-11-07: tap a photo to see it full-screen (web/zoom.js). */
.room-scene img, .profile-photo, .avatar, .room-face, .msg-face, .room-faces img, .invite-face { cursor: zoom-in; }
.zoom { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: rgba(0, 0, 0, 0.94); cursor: zoom-out; animation: zoom-in 0.18s ease-out; }
.zoom img { max-width: 100vw; max-height: 100dvh; width: auto; height: auto; object-fit: contain; display: block; }
.zoom-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
body.zoom-open { overflow: hidden; }
@keyframes zoom-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .zoom { animation: none; } }

