/* The teammate copy of Janeway's page (#128). boot.js puts the class tw on
   <html> before the page draws anything. Contract section 7: everything the
   owner's Mac alone does is hidden, and the teammate screens from Iris's
   frames (tree108-128: 02, 06, 07, 08, 08b, 09) are drawn here. The page's own
   CSS variables carry the colors, so dark mode follows the Mac page. */

/* ---- Hidden: the owner's Mac only ---- */
/* Personal Staff */
html.tw #staff-setup-w, html.tw #smt-staff, html.tw #smp-staff, html.tw #pod-own, html.tw #own-sep, html.tw #own-sep2,
/* Start or Join a pod, a new pod, a new workspace */
html.tw .side-acts, html.tw #b-start-pod, html.tw #b-join-pod, html.tw #plus-menu, html.tw #b-plus2, html.tw .ap-create, html.tw #b-new-pod,
html.tw #s-new, html.tw #s-join, html.tw #a-join, html.tw [data-ws-new], html.tw [data-testid="ws-new-form"],
/* This computer, Claude sign-in and accounts, the owner's Settings */
html.tw #s-settings, html.tw #s-accounts, html.tw #s-other, html.tw #s-owner, html.tw #s-done, html.tw #s-slack,
/* Chat connection */
html.tw #slack-card, html.tw #open-in, html.tw #b-crew-sw,
/* Folders and files: attachments need the owner's upload */
html.tw #fold-asks, html.tw #b-attach, html.tw #achips,
/* Podmate setup, adding or removing a podmate, Remove on pod people, profile edits */
html.tw #pod-rows, html.tw #b-sugg, html.tw #sugg-list, html.tw [data-pp-add], html.tw .pp-rm, html.tw .iv-more,
html.tw #ps-learned, html.tw [data-testid="lesson-edit"], html.tw [data-testid="lesson-remove"],
/* Invites from this browser (slice 2) */
html.tw [data-testid="whos-invite"], html.tw [data-testid="invite-card"], html.tw #iv-sec,
/* Voice notes (slice 1) */
html.tw #b-mic, html.tw #mic-line, html.tw #mic-offer, html.tw #mic-denied,
/* The owner's pod menu, level offer, private chat with the leader, and the leader chat itself */
html.tw #b-pod-more, html.tw #pod-menu, html.tw #offer-card, html.tw #h-tabs, html.tw #b-leader-chat,
/* "{leader} is starting…" says a podmate is about to answer: a teammate's post never starts a turn */
html.tw #chat-wait,
/* Closing a group vote is the owner's (the page draws Close it for whoever is people[0]) */
html.tw [data-testid="decision-close"],
/* The guest view this replaces */
html.tw #gchat, html.tw #guest-side, html.tw #lv-dlg, html.tw #lv-veil {
  display: none !important;
}

/* ---- Touch targets on a phone: Send and the Chat and Pod toggle are at least 44 by 44 px ---- */
@media (max-width: 1023px) {
  html.tw .home .ptabs button { min-height: 44px; min-width: 44px; }
}
@media (max-width: 767px) {
  html.tw .compose .send { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
}

/* ---- Header: name and Leave (frame 08) ---- */
/* Last in the title row, whatever order the page gives its own parts on a phone. */
.tw-hd { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; align-self: center; order: 99; }
.tw-hd-b {
  min-height: 44px; min-width: 44px; padding: 0 10px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 800; color: var(--accent-text); border-radius: 10px;
}
.tw-hd-b:hover { background: var(--card); }
.tw-hd-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tw-hd-b[hidden] { display: none; }

/* ---- The owner's computer is off (frame 06): one quiet bar ---- */
.tw-off {
  margin: 6px -24px 0; padding: 8px 14px; text-align: center;
  font-size: 13.5px; font-weight: 700; color: var(--muted);
  background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.tw-off[hidden] { display: none; }
@media (max-width: 767px) { .tw-off { margin-left: -16px; margin-right: -16px; } }

/* ---- A post waiting to send, then sent (frame 07): muted, never an error color ---- */
.tw-mark { font-size: 13px; font-weight: 700; color: var(--muted); margin: 4px 6px 0; text-align: right; }
/* A post or vote the owner's computer couldn't take: the page's own text color, so it reads as needing a retry. */
.tw-mark.tw-mark-fail { color: var(--fg); }
.jcard .jc-note.tw-vote-fail { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--fg); }

/* ---- A project a later link added (frame 02) ---- */
.tw-added { text-align: center; padding: 12px 0 4px; }
.tw-added[hidden] { display: none; }
.tw-added-t { margin: 0 0 12px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.tw-pill {
  min-height: 52px; padding: 0 28px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 17px; font-weight: 800;
}
.tw-pill:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }

/* ---- Leave, one confirm (frame 08b) ---- */
.tw-veil { position: fixed; inset: 0; background: rgba(20, 18, 40, .45); z-index: 90; }
.tw-dlg {
  position: fixed; z-index: 91; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 440px); padding: 20px; border-radius: 16px; background: var(--bg); color: var(--fg);
  box-shadow: 0 10px 40px rgba(20, 18, 40, .25);
}
.tw-dlg-t { margin: 0 0 8px; font-size: 19px; font-weight: 900; }
.tw-dlg-p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.45; }
.tw-dlg-acts { display: flex; gap: 12px; flex-wrap: wrap; }
.tw-btn {
  flex: 1 1 160px; min-height: 48px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--accent); background: var(--bg); color: var(--accent-text);
  font: inherit; font-size: 16px; font-weight: 800;
}
.tw-btn.danger { background: #b3261e; border-color: #b3261e; color: #fff; }
.tw-btn:disabled { opacity: .6; cursor: default; }
.tw-btn:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }

/* ---- Settings, a modal in the browser (frame 09) ---- */
.tw-set { position: fixed; inset: 0; z-index: 85; background: var(--bg); color: var(--fg); overflow-y: auto; }
.tw-set-col { max-width: 520px; margin: 0 auto; padding: 24px 20px 48px; }
.tw-set-top { display: flex; align-items: center; min-height: 48px; }
.tw-set-h { margin: 0; flex: 1; font-size: 24px; font-weight: 900; }
.tw-link {
  min-height: 44px; min-width: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 800; color: var(--accent-text);
}
.tw-sh { font-weight: 900; font-size: 16px; margin: 20px 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tw-srow { display: flex; align-items: center; gap: 10px; min-height: 56px; font-weight: 700; font-size: 16px; }
.tw-srow b { font-weight: 900; }
button.tw-srow { width: 100%; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: 16px; text-align: left; }
.tw-danger, button.tw-srow.tw-danger { color: #b3261e; font-weight: 800; }
button.tw-srow:focus-visible, .tw-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- The teammate's own layer: passkey steps (auth.js), waiting, refusal ---- */
.tw-root { position: fixed; inset: 0; z-index: 95; background: var(--bg); color: var(--fg); overflow-y: auto; }
.tw-root[hidden] { display: none; }
/* The owner's computer is off: the page can't know who is working, so the Live view says nothing about it (Wren, Nov 23). */
.tw-owner-off [data-testid="chat-live-none"] { display: none !important; }
/* The joining and no-projects screens: the same page as the sign-in screens in auth.css (.tma-page). */
.tw-notice { min-height: 100%; display: flex; flex-direction: column; font-family: var(--display); }
.tw-notice-top { flex: 0 0 auto; height: 64px; display: flex; align-items: center; padding: 0 40px; border-bottom: 1px solid var(--line); }
.tw-brand { font-weight: 900; font-size: 20px; color: var(--accent); }
.tw-notice-main { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.tw-notice-t { margin: 0; max-width: 420px; font-size: 17px; line-height: 1.4; text-align: center; }
@media (max-width: 600px) { .tw-notice-top { padding: 0 12px; } }
/* Devices in Settings reads like the rest of Settings: the same heading and row text. */
.tw-devices .tma-sec-title { margin: 20px 0 4px; font-size: 16px; }
.tw-devices .tma-dev-name, .tw-devices .tma-textbtn { font-size: 16px; }
