/* Her app's column beside her page (page/app/feed.js). On a laptop it is a full-height column to the right of her camera;
   on a phone it sits over the lower half of the picture, above Go Live. Halo's palette: hot pink #ff0069 on warm cream
   #fff2f6 (CARRIED-OVER, The screens). */
:root { --halo: #ff0069; --her-w: clamp(360px, 34vw, 560px); --her-bg: #fff2f6; --her-ink: #2a141f; --her-line: #f1d3df; --her-dim: #8c6b79; }

.her-app { position: fixed; z-index: 5; display: flex; flex-direction: column; color: var(--her-ink); font: 15px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
.her-app[hidden], .her-app.behind { display: none; }
.her-app button { width: auto; height: auto; font-weight: 500; } /* the page styles every button as its big Go live */

/* Her page while her app is on: Go live in Halo's pink (Stop stays dark), her sites as logo pills, and no Keys: keys
   belong in Setup (page/app/setup.html), one of the three screens. */
body.has-her-app button#go:not([data-live="true"]) { background: var(--halo); }
body.has-her-app .pill[data-state="live"] { background: var(--halo); }
body.has-her-app #rooms, body.has-her-app #keys-open { display: none !important; }
.her-strip { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.her-strip-site { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: #fff2f6; color: #2a141f; font-size: 13px; font-weight: 600; }
.her-strip-site img { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: #fff; }
.her-strip-word { font-weight: 500; color: #8c6b79; }
.her-strip-site[data-state="live"] { background: var(--halo); color: #fff; }
.her-strip-site[data-state="live"] .her-strip-word { color: #fff; }
.her-app .icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.her-app .icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 900px) {
  body.has-her-app main { margin-right: var(--her-w); }
  .her-app { top: 0; right: 0; bottom: 0; width: var(--her-w); background: var(--her-bg); border-left: 1px solid var(--her-line); }
}
@media (max-width: 899px) {
  .her-app { left: 0; right: 0; bottom: calc(200px + env(safe-area-inset-bottom)); height: 38vh; background: #fff2f6f2; border-radius: 16px 16px 0 0; }
  .her-tabs { gap: 2px; padding: 6px 8px; }
  .her-tab { padding: 6px 8px; font-size: 13px; }
  .her-pill { padding: 6px; }
  .her-pill span:not(.icon) { display: none; }
}

.her-tabs { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--her-line); }
.her-tab, .her-pill, .her-icon-button, .her-jump { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--her-dim); font: inherit; font-size: 14px; cursor: pointer; border-radius: 999px; }
.her-tab { padding: 6px 10px; white-space: nowrap; }
.her-tab[aria-pressed="true"] { color: var(--her-ink); background: #ff006914; }
.her-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.her-pill { padding: 5px 10px; border: 1px solid var(--her-line); font-size: 13px; white-space: nowrap; }
.her-pill[aria-pressed="true"] { color: var(--her-ink); border-color: var(--halo); background: #ff006914; }
.her-pill.needs-tap { color: #fff; background: var(--halo); animation: her-nudge 1.6s ease-in-out infinite; }
@keyframes her-nudge { 50% { box-shadow: 0 0 0 6px #ff006930; } }
.her-icon-button { padding: 6px; }

.her-pane { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.her-pane[hidden] { display: none; }
.her-empty, .her-note { margin: 16px; color: var(--her-dim); font-size: 14px; }
.her-note { font-size: 12px; }

/* The feed: full width, no pictures. Name and site on top, the message under it; on the right the time, and a tip under
   the time, so a row that wraps keeps its tip in one place. */
.her-feed { flex: 1; margin: 0; padding: 8px 10px 12px; list-style: none; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.her-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 7px 10px; border-radius: 8px; }
.her-row[data-kind="tip"] { background: #ff006912; }
.her-row[data-kind="private"] { background: #2a141f0a; }
.her-head { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.her-site { flex: none; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--her-dim); }
.her-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.her-text, .her-translation { margin: 2px 0 0; overflow-wrap: anywhere; }
.her-translation { color: var(--her-dim); font-style: italic; }
.her-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
.her-time { color: var(--her-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.her-tip { display: inline-flex; align-items: center; gap: 4px; color: var(--halo); font-weight: 700; font-size: 13px; }

/* A big tip is loud: larger, lit, and it flashes once as it arrives. */
.her-row.big { padding: 12px; background: linear-gradient(90deg, #ff006933, #ff00690f); box-shadow: inset 3px 0 0 var(--halo); }
.her-row.big .her-name, .her-row.big .her-tip { font-size: 18px; }
.her-row.big .her-tip .icon { width: 22px; height: 22px; }
.her-row.arrived { animation: her-arrive 1.6s ease-out; }
@keyframes her-arrive { 0% { background: #ff006966; transform: scale(1.02); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .her-row.arrived { animation: none; } }

.her-jump { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 6px 14px; color: #fff; background: var(--halo); font-weight: 600; }
.her-jump[hidden] { display: none; }

/* Tonight and the tip menu. */
.her-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
.her-stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--her-line); border-radius: 12px; }
.her-stat-label { color: var(--her-dim); font-size: 12px; }
.her-stat-value { font-size: 22px; font-variant-numeric: tabular-nums; }
.her-sites, .her-menu { margin: 0; padding: 4px 14px 8px; list-style: none; }
.her-site-row, .her-menu-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--her-line); }
.her-site-row > :last-child, .her-menu-item > :last-child { margin-left: auto; }
.her-site-live, .her-site-tokens { color: var(--her-dim); font-size: 13px; }
.her-ok { color: #1f8a52; font-size: 13px; }
.her-diff { color: var(--halo); font-size: 13px; }
.her-diff-row { padding: 4px 0 4px 12px; color: var(--her-dim); font-size: 13px; }

/* The one-time link's page (page/app/device.html). */
body.device { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #fff2f6; color: #2a141f; font: 16px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
.device-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; }
.device-card h1 { margin: 6px 0 0; font-size: 24px; }
.device-card p { margin: 0; color: #8c6b79; max-width: 320px; }

/* Setup (page/app/setup.html), the agency's screen. */
body.setup { margin: 0; min-height: 100vh; background: #fff2f6; color: #2a141f; font: 15px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; }
.setup-main { width: min(720px, 100%); margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.setup-head { display: flex; align-items: center; gap: 12px; }
.setup-head h1 { margin: 0; font-size: 24px; }
.setup-pick { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.setup-main select, .setup-main input { height: 42px; padding: 0 12px; border: 1px solid #f1d3df; border-radius: 10px; background: #fff; color: #2a141f; font-size: 15px; }
.setup-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid #f1d3df; border-radius: 14px; background: #fff; }
.setup-card h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.setup-card img { border-radius: 50%; }
.setup-field { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 14px; }
.setup-field input { grid-column: 1 / -1; }
.setup-set { color: #1f8a52; font-weight: 600; }
.setup-unset { color: #8c6b79; }
.setup-card button { align-self: flex-start; padding: 10px 18px; border: 0; border-radius: 999px; background: #ff0069; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.setup-note, .setup-line { margin: 0; color: #8c6b79; font-size: 14px; }
.setup-link { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff2f6; font-family: ui-monospace, monospace; font-size: 13px; overflow-wrap: anywhere; user-select: all; }
.setup-sites { display: flex; flex-direction: column; gap: 12px; }
