/* The web channel's page: a phone, held in one hand. Its own palette, close to
   the panel's warm one, but this is not the wall and owes it nothing. */
:root {
  --bg: #f3ece2; --card: #fffdfa; --fg: #332c23; --dim: #8c8071; --line: #ebe2d5;
  --mine: #e8915c; --mine-fg: #1b1710;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16130f; --card: #221e19; --fg: #f1e8dc; --dim: #9c9183; --line: #2f2922; --mine: #f0a870; }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--fg);
  font: 17px/1.4 system-ui, sans-serif;
  display: flex; flex-direction: column;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; color: var(--dim); font-size: 14px; min-height: 48px;
}
button, .button {
  font: inherit; border: 0; border-radius: 999px; padding: 10px 18px; min-height: 44px;
  background: var(--card); color: var(--fg); text-decoration: none; display: inline-flex; align-items: center;
}
header button { padding: 6px 14px; min-height: 36px; font-size: 14px; }
main { flex: 1; overflow-y: auto; padding: 8px 16px; display: flex; flex-direction: column; gap: 8px; }
.msg {
  max-width: 82%; padding: 10px 14px; border-radius: 18px; white-space: pre-wrap; overflow-wrap: anywhere;
  background: var(--card);
}
.msg.mine { align-self: flex-end; background: var(--mine); color: var(--mine-fg); }
.msg.pending { opacity: .6; }
body.busy main::after {
  content: "…"; align-self: flex-start; color: var(--dim); font-size: 24px; padding: 0 14px;
  animation: think 1.2s ease-in-out infinite;
}
@keyframes think { 50% { opacity: .3; } }
#signin { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; text-align: center; }
#signin[hidden], form[hidden] { display: none; }
#why { color: var(--dim); margin: 0; }
#name { font-weight: 300; font-size: 40px; margin: 0; }
.note { color: var(--dim); font-size: 14px; max-width: 30ch; margin: 0; }
form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg); }
textarea {
  flex: 1; font: inherit; resize: none; border: 1px solid var(--line); border-radius: 22px;
  padding: 10px 14px; background: var(--card); color: var(--fg); max-height: 30vh;
}
#send { background: var(--mine); color: var(--mine-fg); }
/* Held, not tapped: no text selection, no long-press menu, no scrolling. */
#talk {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none;
  white-space: nowrap; min-width: 9.5em; justify-content: center;
}
#talk.on { background: #d9534f; color: #fff; animation: think 1s ease-in-out infinite; }
#hint { padding: 0 16px 8px; text-align: center; max-width: none; }
#hint:empty { display: none; }
body.listening .msg { opacity: .8; }
/* A voice note: in italics until it has been heard, then what was heard,
   marked as said rather than typed. */
.msg.voice.recording { font-style: italic; }
.msg.voice.heard::before { content: "said: "; opacity: .65; }
