/* Taylormade — Inbox. Tokens from base.css. Phone-first. */
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); margin: 0; min-height: 100dvh; }
.gold { color: var(--gold); }
.ib-app, .ib-login { max-width: 640px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.ib-login { display: grid; gap: 12px; padding-top: 18vh; }
.ib-login h1 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 8px; }
.ib-login form { display: grid; gap: 8px; }
.ib-login label { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.ib-login input { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 12px 14px; font: inherit; font-size: 16px; }
.ib-err { color: var(--red); font-size: 0.9rem; min-height: 1.2em; margin: 6px 0 0; }

.ib-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 10px 0 14px; background: linear-gradient(var(--bg) 70%, transparent); }
.ib-brand { font-family: var(--font-display); font-weight: 800; letter-spacing: 0.08em; }
.ib-alerts { min-height: 40px; background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(233,185,73,.35); border-radius: 999px; padding: 8px 14px; font: 600 0.85rem var(--font-body); }
.ib-note { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--muted); font-size: 0.92rem; }
.ib-chips { display: flex; gap: 8px; margin: 4px 0 12px; }
.chip { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; min-height: 40px; padding: 0 16px; font: 500 0.88rem var(--font-body); transition: border-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease); }
.chip:active { transform: scale(0.97); }
@media (hover: hover) { .chip:hover { border-color: var(--gold); color: var(--text); } .row:hover { background: var(--bg-2); } }
.chip.on { border-color: var(--gold); color: var(--text); background: var(--gold-soft); }

.ib-list { display: grid; }
.row { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 14px 4px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; transition: background .2s var(--ease); }
.row:active { background: var(--bg-2); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-top: 7px; box-shadow: 0 0 0 4px var(--gold-soft); }
.row-main { display: grid; gap: 3px; min-width: 0; }
.row-main > *, .row-name { min-width: 0; }
.row-top { display: flex; justify-content: space-between; gap: 12px; }
.row-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row:not(.unread) .row-name { font-weight: 500; color: var(--muted); }
.row-ago { font-family: var(--font-mono); font-size: 0.72rem; color: var(--gold); flex: none; }
.row:not(.unread) .row-ago { color: var(--faint); }
.row-what { font-size: 0.85rem; color: var(--muted); }
.row-line { font-size: 0.92rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-empty { color: var(--muted); text-align: center; padding: 48px 0; }
.ib-more { width: 100%; margin-top: 12px; }
.ib-foot { text-align: center; padding: 28px 0 8px; }
.linkish { background: none; border: 0; color: var(--muted); font: 500 0.9rem var(--font-body); text-decoration: underline; text-underline-offset: 3px; padding: 8px; }

.ib-back { background: none; border: 0; color: var(--gold); font: 600 1rem var(--font-body); padding: 8px 0; }
.ib-name { font-family: var(--font-display); font-size: 1.35rem; margin: 4px 0 2px; overflow-wrap: anywhere; }
.ib-what { color: var(--gold); margin: 0 0 4px; font-weight: 600; }
.ib-contact { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; overflow-wrap: anywhere; }
.fact { border-top: 1px solid var(--line-soft); padding: 12px 0 2px; margin: 0; }
.fact:first-of-type { margin-top: 6px; }
.fact span, .msg span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.fact p, .msg p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.ib-thread { display: grid; gap: 8px; margin: 16px 0; }
.msg { background: var(--bg-2); border-radius: 14px; padding: 10px 12px; max-width: 88%; }
.msg.studio { justify-self: end; background: var(--gold-soft); }

.ib-compose { margin-top: 20px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px; }
.ib-compose-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ib-count { font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); }
#draft { width: 100%; box-sizing: border-box; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: 16px/1.55 var(--font-body); resize: vertical; }
.ib-tpl { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
/* actions stay reachable on long threads and above the keyboard */
.ib-actions { position: sticky; bottom: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--bg-2); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.ib-actions #sendBtn, .ib-actions #undoSend { grid-column: 1 / -1; }
.ib-empty .retry { margin-top: 12px; }
.ib-actions .btn { text-align: center; min-height: 48px; }
.ib-sent-it { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; padding: 12px; border: 1px dashed var(--gold); border-radius: 12px; }

.ib-toast { position: fixed; z-index: 5; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -12px); opacity: 0; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; transition: opacity .25s var(--ease), transform .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.ib-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Pitches ---------- */
.pt-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.72rem; color: var(--muted); }
.pt-badge.pt-held { border-color: var(--red); color: var(--red); }
.pt-badge.pt-dm_ready { border-color: var(--gold); color: var(--gold); }
.pt-status { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.pt-banner { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-size: 0.92rem; }
.pt-banner.pt-warn { border-color: var(--red); }
.pt-score { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.pt-score b { color: var(--text); font-weight: 600; margin-right: 4px; }
.pt-score a, .pt-timeline a, .ib-contact a { color: var(--gold); }
.pt-h { font-family: var(--font-display); font-size: 0.95rem; letter-spacing: 0.06em; margin: 24px 0 8px; }
.pt-subject { font-size: 0.95rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.pt-subject span { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-right: 6px; }
.pt-mail { display: block; width: 100%; height: min(70vh, calc(100dvh - 300px)); min-height: 320px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pt-fu { margin: 12px 0; }
.pt-fu summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; color: var(--muted); }
.pt-dm { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font: inherit; }
.pt-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.pt-shots img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }
.pt-proposal { display: grid; gap: 18px; }
.pt-proposal figure { margin: 0; }
.pt-proposal figcaption { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 6px; }
.pt-phone-scroll { width: min(100%, 390px); margin: 0 auto; max-height: min(64vh, 720px); overflow-y: auto; border-radius: 22px; border: 1px solid var(--line); background: #000; }
.pt-phone-scroll img { display: block; width: 100%; height: auto; }
.pt-desk img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.pt-timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 0.88rem; color: var(--muted); }
.pt-timeline span { display: inline-block; min-width: 3ch; color: var(--text); }
.pt-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 calc(8px + env(safe-area-inset-bottom)); }
.pt-note { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
.pt-form { display: grid; gap: 8px; }
.pt-form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; margin: 8px 0; min-width: 0; }
.pt-form label, .pt-form legend { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pt-form input, .pt-form textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); padding: 12px 14px; font: inherit; font-size: 16px; width: 100%; box-sizing: border-box; }
.pt-hint { text-transform: none; letter-spacing: 0; font-size: 0.8rem; color: var(--muted); }
a.chip { display: inline-flex; align-items: center; text-decoration: none; }
