/* The date book. One explicit color scheme, Hal's own: since 28 Nov 2026 a deep indigo violet of low chroma, light cream words, teal to
   pick things out (her words: "way too much gold yellow on everything ... the white to black is too big in contrast"). Her reading faces: Crimson Pro to
   read, Lora italic for asides. Single column under 820px so it works on the phone. */

@font-face { font-family: "Crimson Pro"; src: url("/fonts/crimson.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Crimson Pro"; font-style: italic; src: url("/fonts/crimson-italic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Lora"; font-style: italic; src: url("/fonts/lora-italic.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  /* 30 Nov 2026, her words: "It's way too much purple. And then the teal is too bright." A dark ink with only a breath of
     blue, and a quieter teal. The cream text stays. */
  --bg: #1b1d22;
  --bg-2: #23262d;
  --bg-3: #2c3038;
  --line: #3a3f49;
  --text: #efe6d2;
  --dim: #cfc6b2;
  --faint: #9d9a92;
  --accent: #6fa89d;
  --accent-soft: #6fa89d2e;
  --ok: #6fcf8f;
  --late: #ff8a9b;
  --news: #6fa8ff;
  --read: "Crimson Pro", Georgia, serif;
  --aside: "Lora", Georgia, serif;
  font-size: 18px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--read); line-height: 1.4;
  height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: var(--bg-3); border: 1px solid var(--line); border-radius: 8px; padding: 3px 11px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.quiet { background: none; color: var(--faint); }
input, select, textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.aside { font-family: var(--aside); font-style: italic; color: var(--faint); }
.small { font-size: .8rem; margin: 0 0 .5rem; }
h1, h2, h3, h4 { font-weight: 600; margin: 0; }

#top { display: flex; align-items: center; gap: 14px; padding: 10px 18px; padding-top: max(10px, env(safe-area-inset-top)); border-bottom: 1px solid var(--line); background: var(--bg); z-index: 6; flex: none; }
#top h1 { font-size: 1.25rem; color: var(--accent); white-space: nowrap; }
#top .home { color: var(--faint); text-decoration: none; font-size: .9rem; }
#top .days { display: flex; gap: 6px; margin-left: auto; }
#sync { margin: 0; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sync a { color: var(--accent); }
#top .days button { min-width: 2.2rem; }

#head { padding: 14px 18px 4px; max-width: 1200px; }
#head h2 { font-size: 1.5rem; margin-bottom: 8px; }
#aware { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
#aware li { border-left: 3px solid var(--news); padding: 2px 10px; background: var(--bg-2); border-radius: 0 8px 8px 0; font-size: .95rem; }
#aware li.deadline { border-color: var(--accent); }
#aware li.waiting { border-color: var(--late); }
#aware li.with { border-color: var(--ok); }
#aware li .k { font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .8rem; margin-right: 6px; }
#say-form { display: flex; gap: 8px; }
#say-text { flex: 1; font-size: 1.05rem; padding: 8px 12px; min-width: 0; }
#say-preview { min-height: 1.3em; margin: 6px 2px 0; font-size: .9rem; }
#say-preview b { font-family: var(--read); font-style: normal; color: var(--text); }

#day > div, #all-box, #journal, #aims, #diary { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.bar-line { display: flex; align-items: center; gap: 10px; }
.bar-line h3 { font-size: 1.2rem; }
.bar-line button { margin-left: auto; }
#choose-btn { background: var(--accent-soft); border-color: var(--accent); }

.group { margin-top: 12px; }
.group h4 { font-size: .9rem; color: var(--faint); font-weight: 600; margin-bottom: 2px; }
.group h4 .aside { font-weight: 400; }
.things { list-style: none; margin: 0; padding: 0; }
.thing { display: grid; grid-template-columns: auto 1fr auto; gap: 1px 10px; align-items: start; padding: 7px 4px; border-top: 1px solid var(--line); }
.things > .thing:first-child { border-top: none; }
.thing input[type=checkbox] { margin-top: 4px; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.thing.done .t { text-decoration: line-through; color: var(--faint); }
.thing .t { font-weight: 600; }
.thing .t .src { font-weight: 400; font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .8rem; margin-left: 6px; }
.thing .meta { grid-column: 2; font-size: .82rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: 3px 12px; }
.thing .meta .late { color: var(--late); }
.thing .meta .soon { color: var(--accent); }
.thing .meta .needs::before { content: "needs "; color: var(--faint); }
.thing .meta .unlocks::before { content: "waiting on it: "; color: var(--faint); }
.thing .meta .aim { color: var(--faint); font-family: var(--aside); font-style: italic; }
.thing .meta .with::before { content: "with "; color: var(--faint); }
.thing .ask { grid-column: 2; font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .85rem; }
.thing .acts { grid-row: 1 / span 3; grid-column: 3; display: flex; gap: 4px; }
.thing .acts button { font-size: .75rem; padding: 1px 8px; }
.thing.today-row { cursor: grab; }
.thing.today-row.drag { opacity: .4; }
.thing.today-row.over { border-top: 2px solid var(--accent); }
.yest { color: var(--faint); font-family: var(--aside); font-style: italic; font-size: .78rem; }

#else { margin-top: 14px; }
#else summary { cursor: pointer; color: var(--faint); }

#journal h3, #aims h3 { font-size: 1.1rem; }
#journal h4 { font-size: .9rem; color: var(--faint); margin-top: 10px; }
#aim-list { list-style: none; margin: 0; padding: 0; }
.aim { padding: 6px 0; border-top: 1px solid var(--line); }
.aim:first-child { border-top: none; }
.aim .n { font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.aim .n .when { margin-left: auto; font-weight: 400; font-size: .8rem; color: var(--faint); }
.aim.quiet .n .when { color: var(--accent); }
.aim .open { font-size: .8rem; color: var(--dim); }
.aim .x { font-size: .7rem; padding: 0 6px; opacity: .6; }
#aim-form { display: flex; gap: 6px; margin-top: 8px; }
#aim-form input { flex: 1; min-width: 0; }

#journal-text { width: 100%; resize: vertical; font-size: 1rem; line-height: 1.45; }
#finished { margin: 4px 0 0; padding-left: 1.1rem; color: var(--dim); font-size: .9rem; }

dialog { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; max-width: 460px; width: 94vw; }
dialog::backdrop { background: #0009; }
#edit-form { display: flex; flex-direction: column; gap: 7px; font-size: .92rem; }
#edit-form label { display: flex; flex-direction: column; gap: 2px; color: var(--dim); }
#edit-form label.f-month { flex-direction: row; align-items: center; gap: 6px; }
#edit-form label.f-month input { width: 4.5rem; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.row-end #edit-remove { margin-right: auto; }

@media (max-width: 820px) {
  #head { padding: 12px 12px 4px; }
  #top { gap: 8px; padding: 8px 12px; }
  #top h1 { font-size: 1.05rem; }
  #top .home { font-size: .8rem; }
  #top .days button { min-width: 1.8rem; padding: 3px 8px; }
  .thing { grid-template-columns: auto 1fr; }
  .thing .acts { grid-row: auto; grid-column: 2; }
}

/* what just happened, after every click (2026-11-05) */
#told { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 24px)); margin: 0;
  background: var(--bg-3); color: var(--text); border: 1px solid var(--accent); border-radius: 10px; padding: 10px 16px;
  box-shadow: 0 6px 24px #0008; z-index: 20; }
.tick { display: inline-flex; flex-direction: column; align-items: center; font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .68rem; cursor: pointer; }
.how { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; margin: 6px 0 12px; }
.how p { margin: 8px 0; }

/* already part of my day, by project, the journal (2026-11-05) */
#desk, #mood { max-width: 1180px; margin: 0 auto 10px; padding: 0 16px; }
#desk h3, #mood h3 { margin: 6px 0 2px; }
a.chip { text-decoration: none; display: inline-block; }
.chip.late { border-color: var(--late); }
.chip.mood-set { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; cursor: default; }
.chip.mood-set input { flex: 1 1 10em; min-width: 0; font: inherit; font-size: 16px; padding: 4px 8px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.chip.mood-set button { font: inherit; padding: 4px 10px; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.chip.late small { color: var(--late); }
#routine { max-width: 1180px; margin: 0 auto 10px; padding: 0 16px; }
#routine h3 { margin: 6px 0 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.chip { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; color: var(--text); cursor: pointer; text-align: left; }
.chip small { display: block; font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .7rem; }
.chip.on { border-color: var(--ok); background: #6fcf8f1f; }
button.quiet.on { border-color: var(--accent); color: var(--accent); }
.by { display: inline-flex; gap: 6px; }
.quietly { color: var(--faint); }
#diary { max-width: 820px; margin: 0 auto; padding: 0 16px 40px; }
.diary-day { border-bottom: 1px solid var(--line); padding: 8px 0; }
.diary-day h4 { margin: 4px 0; }
.diary-day .page { white-space: pre-wrap; margin: 4px 0 8px; }

/* the way there: a link to where a thing gets done */
a.go, button.go { display: inline-block; font-size: .78rem; padding: 2px 10px; border: 1px solid var(--accent); border-radius: 6px; color: var(--accent); text-decoration: none; white-space: nowrap; align-self: center; }
a.go:hover, button.go:hover { background: var(--accent-soft); }
.chips a.go, .chips button.go { padding: 6px 12px; margin-left: -4px; }
#build { margin: auto 4px 4px; padding-top: 1.5rem; text-align: left; }
#build button { margin-left: .25rem; }
/* pictures and videos (6 Nov 2026) */
.media { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .6rem 0; }
.media figure { margin: 0; display: flex; flex-direction: column; gap: .25rem; max-width: 100%; }
.media img, .media video { display: block; max-width: min(260px, 100%); max-height: 260px; border-radius: 8px; background: #16151f; }
.media figure .x { align-self: flex-start; font-size: .8rem; }
.media .add-media { align-self: center; }
#post-thumbs img { max-width: 120px; max-height: 120px; border-radius: 8px; }
button.go { font-family: inherit; background: none; cursor: pointer; }
#post-dialog label { display: block; }
#post-dialog textarea { display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; }
#post-state.posted, #post-state.kept { font-size: 1.05rem; margin: .6rem 0 1rem; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--accent); }
#post-state.kept { border-color: var(--line, #555); }

/* rooms and the menu (6 Nov 2026): one room at a time fills the screen; the page itself never scrolls */
#menu-btn { font-size: 1.3rem; line-height: 1; padding: 4px 10px; color: var(--text); }
#shell { flex: 1; display: flex; min-height: 0; position: relative; }
#menu { flex: none; width: 250px; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
body:not(.menu-open) #menu { display: none; }
#menu button { text-align: left; padding: 11px 14px; font-size: 1.05rem; background: none; border: 1px solid transparent; border-radius: 10px; color: var(--dim); }
#menu button.on { background: var(--bg-3); border-color: var(--accent); color: var(--accent); }
#scrim { display: none; }
#stage { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.room { max-width: 900px; padding: 14px 18px 70px; display: flex; flex-direction: column; gap: 16px; }
.room > section#head, .room > section#routine { padding: 0; margin: 0; max-width: none; }
@media (max-width: 899px) {
  #menu { display: flex !important; position: absolute; top: 0; bottom: 0; left: 0; z-index: 5; width: min(80vw, 310px);
    transform: translateX(-102%); transition: transform .2s ease; box-shadow: 6px 0 24px #0009; }
  body.menu-open #menu { transform: none; }
  body.menu-open #scrim { display: block; position: absolute; inset: 0; z-index: 4; background: #000a; }
  .room { padding: 12px 12px 70px; }
}
#menu #build button { font-size: .8rem; padding: 3px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--faint); margin: 4px 0 0; }

/* projects: one open at a time (2026-11-07) */
#aim-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
details.project { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-3); padding: 0 12px; }
details.project[open] { border-color: var(--accent); padding-bottom: 10px; }
details.project summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; padding: 11px 0; list-style: none; }
details.project summary::-webkit-details-marker { display: none; }
details.project summary .n { font-weight: 600; font-size: 1.05rem; }
details.project summary .when { margin-left: auto; font-size: .8rem; color: var(--faint); white-space: nowrap; }
details.project.quiet summary .when { color: var(--accent); }
details.project .add-to { display: flex; gap: 6px; margin-top: 8px; }
details.project .add-to input { flex: 1; min-width: 0; }
details.project .x { font-size: .72rem; margin-top: 6px; }
#edit-form label.check { flex-direction: row; align-items: center; gap: 8px; }

/* from her records, to check (2026-11-07) */
.thing .meta .check { color: var(--accent); font-family: var(--aside); font-style: italic; }
.thing .meta .check button { font-size: .72rem; padding: 0 8px; margin-left: 2px; font-style: normal; }

/* folded groups (2026-11-07): name and count; tap to open; one open at a time */
details.fold { border-top: 1px solid var(--line); margin: 0; }
details.fold > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 2px; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .fname { font-weight: 600; color: var(--dim); }
details.fold > summary .fcount { font-size: .8rem; color: var(--faint); padding: 0 2px; }
details.fold > summary .fnote { font-size: .78rem; width: 100%; }
details.fold[open] > summary .fname { color: var(--accent); }

/* keeping up (2026-11-07) */
#upkeep h3 { font-size: 1.1rem; }
#upkeep .add-to { display: flex; gap: 6px; margin-top: 8px; }
#upkeep .add-to input[name=title] { flex: 1; min-width: 0; }
#upkeep .add-to input[name=per_week] { width: 7.5rem; }

#aware li.ask { border-color: var(--accent); }

/* the creature (7 Nov 2026): over every room, in the top bar; its home opens over the page */
#pet-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border: none; background: none; }
#pet-btn svg { display: block; }
#pet-btn .pet-glow { font-size: .78rem; color: var(--accent); font-family: var(--aside); font-style: italic; }
#checkin { border-left: 3px solid #a68ad0; background: var(--bg-2); border-radius: 0 8px 8px 0; padding: 6px 10px; margin: 0 0 10px; }
#checkin .pet-ask { margin: 0; }
#checkin .k { font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .8rem; margin-right: 6px; }
#checkin .chip { padding: 4px 12px; }
#checkin .add-to { display: flex; gap: 6px; }
#checkin .add-to input { flex: 1; min-width: 0; }
#pet-dialog { max-width: 520px; max-height: 92dvh; overflow-y: auto; }
#pet-home h3 { margin-bottom: 8px; }
#pet-home h4 { margin: 12px 0 2px; }
.pet-scene svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.pet-pick { display: flex; gap: 10px; margin: 8px 0 12px; }
.pet-choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; border-radius: 12px; background: var(--bg-3); }
.pet-choice.on { border-color: var(--ok); }
.pet-shop .chip[disabled] { opacity: .45; cursor: default; }
#pet-home input[type=text] { width: 100%; }
.pet-bob { animation: pet-bob 1.8s steps(1, end) infinite; }   /* an 8 bit hop: one sprite pixel up, then down */
.pet-pulse { animation: pet-pulse 1.2s steps(1, end) infinite; }
@keyframes pet-bob { 0% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pet-pulse { 0% { opacity: .3; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pet-bob, .pet-pulse { animation: none; } }

/* a project as a tree (2026-11-07): each thing under what it comes after, a line showing what connects to what */
.things.tree > .tnode { margin-left: calc(var(--depth, 0) * 1.25rem); border-top: none; position: relative; }
.things.tree > .tnode.deep { border-left: 2px solid var(--line); padding-left: 10px; }
.things.tree > .tnode.deep.is-ready { border-left-color: var(--accent); }
.things.tree > .tnode.deep.is-done { border-left-color: var(--ok); }
.things.tree .after { color: var(--news); }
.things.tree .doneon { color: var(--ok); }

/* the web of her projects (2026-11-07): the big dots are projects, tap one to open its things */
#aims .views { margin-left: auto; display: flex; gap: 6px; }
#aim-webbox { display: flex; flex-direction: column; gap: 8px; }
#aim-web-canvas { height: min(62dvh, 560px); border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; touch-action: none; }
#aim-web-canvas canvas { width: 100%; height: 100%; display: block; }
#aim-card .card-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
/* the creature's question waiting in its home after the morning (7 Nov 2026) */
.pet-waiting { border-left: 3px solid #a68ad0; background: var(--bg-3); border-radius: 0 8px 8px 0; padding: 6px 10px; margin: 10px 0; }
.pet-waiting .k, #checkin .k { font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .8rem; margin-right: 6px; }
.pet-waiting .pet-ask { margin: 0; }
.pet-waiting .chip, #checkin .chip { padding: 4px 12px; }
.pet-waiting .add-to { display: flex; gap: 6px; }
.pet-waiting .add-to input { flex: 1; min-width: 0; }
.pet-pick { flex-wrap: wrap; }
.pet-choice { flex: 1 1 0; min-width: 0; padding: 8px; }
.pet-choice svg { width: 72px; height: 72px; }

/* the perch (7 Nov 2026 evening): the creature at the top of every room, saying little things through the day */
#perch { display: flex; align-items: center; gap: 10px; padding: 3px 18px; border-bottom: 1px solid var(--line); background: var(--bg); flex: none; }
#perch-pet { padding: 0; border: none; background: none; flex: none; }
#perch-pet svg { display: block; width: 52px; height: 52px; }
#perch-say { flex: 1; min-width: 0; margin: 0; font-family: var(--aside); font-style: italic; color: var(--dim); font-size: .92rem; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#perch #pet-btn { flex: none; display: flex; flex-direction: column; align-items: flex-end; padding: 2px 4px; font-size: .85rem; color: var(--dim); }
#perch #pet-btn .pet-glow { font-size: .72rem; }
.pet-pat { animation: pet-pat .5s steps(2, end) 1; }
@keyframes pet-pat { 0% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .pet-pat { animation: none; } }
@media (max-width: 820px) { #perch { padding: 2px 12px; gap: 8px; } #perch-pet svg { width: 46px; height: 46px; } }
/* its home in tabs, so nothing in it scrolls on the phone */
.pet-tabs { display: flex; gap: 6px; margin: 8px 0 6px; flex-wrap: wrap; }
.pet-tabs button { border-radius: 999px; padding: 3px 12px; font-size: .9rem; }
.pet-tabs button.on { border-color: var(--accent); color: var(--accent); }
.pet-scene svg { max-height: 30dvh; }
.pet-shop .chip { padding: 4px 11px; font-size: .9rem; }
.pet-choice { flex: 1 1 40%; }
#aim-card { display: flex; flex-direction: column; gap: 6px; }
#aim-card .add-to { display: flex; gap: 6px; }
#aim-card .add-to input { flex: 1; min-width: 0; }
#aim-card .card-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
#aim-card .card-things { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#aim-card .card-things li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
#aim-card .card-thing { flex: 1 1 12rem; min-width: 0; background: none; border: 0; padding: 4px 0; text-align: left; color: var(--text); }
#aim-card .card-thing:hover { color: var(--accent); }
#aim-card .card-note { white-space: pre-wrap; overflow-wrap: anywhere; }
#aim-card .card-write { display: flex; flex-direction: column; gap: 6px; }
#aim-card .card-write textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.notes { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.notes-head { color: var(--accent); }
.notes .card-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.note, .note-new { display: flex; flex-direction: column; gap: 6px; }
.note textarea, .note-new textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.note audio { width: 100%; max-width: 420px; height: 40px; color-scheme: dark; }
.note-words { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-name { display: inline; background: none; border: 0; border-bottom: 1px dotted var(--accent); border-radius: 0; padding: 0; color: inherit; font: inherit; text-align: left; }
.talk { padding: 9px 26px; background: var(--accent-soft); border-color: var(--accent); }
.talk.on { background: #7a2230; border-color: #d0566a; color: var(--text); }
.rec-clock { font-variant-numeric: tabular-nums; }
#rec-bar { position: fixed; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 8px); z-index: 60; max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: var(--bg-3); border: 1px solid #d0566a; border-radius: 12px; }
#rec-bar .rec-what { flex: 1 1 9rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#rec-bar .talk { padding: 7px 14px; }
.note.reply { padding-left: 12px; border-left: 2px solid var(--accent); }
.thinker select { font-size: .85rem; padding: 3px 6px; max-width: 13rem; }
#aim-find { display: flex; flex-direction: column; gap: 6px; }
#aim-find input { width: 100%; box-sizing: border-box; }
#aim-find .find-out { display: flex; flex-wrap: wrap; gap: 6px; }
#aim-find .find-out button { text-align: left; }
#aim-find .find-out button.on { border-color: var(--accent); }

/* My to-dos organized (2026-11-07): two drop downs, folds inside folds */
#all-box .org { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-left: auto; font-size: .85rem; color: var(--faint); }
#all-box .org select { font-size: .85rem; padding: 3px 6px; }
details.fold details.fold { margin-left: 12px; }
details.fold details.fold > summary .fname { font-weight: 500; }

/* the creature and its house at the bottom of every room (7 Nov 2026 evening); these replace the band at the top */
#perch { position: static; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 4px 6px; flex: none; padding: 4px 10px 0;
  border-top: 1px solid var(--line); border-bottom: none; background: #191823; }
#perch-say { grid-column: 1; margin: 0; padding: 0 2px; font-family: var(--aside); font-style: italic; font-size: .86rem; color: var(--dim); cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#perch #pet-btn { display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 10px; color: var(--dim); }
#perch #pet-btn .pet-glow { font-size: .72rem; color: var(--accent); }
#perch-fold { padding: 0 8px; font-size: .8rem; }
#perch-scene { grid-column: 1 / -1; cursor: pointer; }
#perch-scene svg { display: block; height: min(132px, 18dvh); width: auto; max-width: 100%; margin: 0 auto; }
#perch.folded { padding-bottom: 4px; }
#perch.folded #perch-scene { display: none; }
#perch .me.pet-pat { animation: pet-pat .5s steps(2, end) 1; }
#pet-dialog { margin: auto auto 0; width: 100%; max-width: 560px; border-radius: 14px 14px 0 0; max-height: 90dvh; }
.pet-scene svg { display: block; width: 100%; height: auto; max-height: 24dvh; border-radius: 8px; }
.pet-tabs { gap: 5px; margin: 8px 0 6px; }
.pet-tabs button { padding: 2px 10px; font-size: .85rem; }

/* the bottom band, again (7 Nov 2026 night, her words: "there's no reason for it to be ... minimizable ... the whole
   picture of the bottom should fill the whole part"; "the things it says ... should be in little chat bubbles") */
#perch { position: relative; display: block; padding: 0; z-index: 3; }
#perch-scene svg { display: block; width: 100%; height: auto; margin: 0; }
@media (min-width: 700px) { #perch-scene svg { width: auto; height: 170px; margin: 0 auto; } }
#perch-fold { display: none !important; }
#perch-say { position: absolute; left: 50%; bottom: 69%; transform: translate(-50%, 6px); max-width: min(80%, 420px); width: max-content; margin: 0;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 4px 11px; font-family: var(--aside); font-style: italic;
  font-size: .88rem; line-height: 1.3; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; -webkit-line-clamp: 3; }
#perch-say.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
#perch-say::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -7px; border: 7px solid transparent; border-top-color: #16151f; border-bottom: 0; }
#perch-say::before { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--bg-2); border-bottom: 0; z-index: 1; }
#perch #pet-btn { position: absolute; right: 6px; top: auto; bottom: 4px; flex-direction: row; gap: 6px; padding: 3px 9px; background: #16151fd9; border: 1px solid var(--line); }
#perch #pet-btn .pet-glow { font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { #perch-say { transition: none; } }

/* the creature is the one she talks to (28 Nov 2026): a line to say something over its land, and its answers in the bubble */
#perch-say.opens { cursor: pointer; text-decoration: underline dotted #6b6680; text-underline-offset: 3px; }
#perch-say.answer { -webkit-line-clamp: unset; display: block; max-height: min(46dvh, 300px); overflow-y: auto; max-width: min(92%, 520px); bottom: calc(69% + 2px); }
/* 2 Dec 2026, her words: "it's dark teal on a dark background. It's unreadable." These are buttons, so they carry the page's
   own dark button with its cream words, and room for a thumb. Then, the same day: "Why is it so light colored? ... It's way too
   much contrast." The bubble is dark like the rest of the page now, and its buttons one soft step lighter. */
#perch-say .perch-line { display: block; margin-top: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-3); font-style: normal; font-size: .9rem; color: var(--text); text-align: left; text-decoration: none; }
#perch-say .perch-acts { display: flex; gap: 10px; margin-top: 6px; } #perch-say .perch-acts .perch-line { display: inline-block; margin: 0; font-weight: 600; }
#perch-talk { position: absolute; left: 8px; right: 8px; bottom: 6px; display: flex; gap: 6px; align-items: center; z-index: 4;
  background: #16151fe6; border: 1px solid var(--line); border-radius: 12px; padding: 5px 6px; }
#perch-talk[hidden] { display: none; }
#perch-talk input { flex: 1; min-width: 0; font-size: 1rem; padding: 6px 9px; }
#perch-talk button { flex: none; padding: 5px 10px; }
#perch-talk button.quiet { padding: 5px 7px; font-size: .85rem; }
#pet-home textarea { display: block; width: 100%; box-sizing: border-box; font-size: 1rem; }
@media (min-width: 700px) { #perch-talk { left: 50%; right: auto; width: min(560px, 92%); transform: translateX(-50%); } }

/* security and what happens on the sites (8 Nov 2026): security.js */
#menu-btn.urgent { color: var(--late); border-color: var(--late); }
.alert-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.alert-chips .chip { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: .9rem; cursor: pointer; }
.alert-chips .chip.on { border-color: var(--accent); color: var(--text); }
.alert-group { margin: 0 0 14px; }
.alert-group h4 { margin: 0 0 6px; }
.alert-group.late h4 { color: var(--late); }
.alert-group.look h4 { color: var(--accent); }
.alert { border-left: 3px solid var(--line); padding: 7px 10px; margin: 0 0 6px; }
.alert.lvl1 { border-left-color: var(--late); }
.alert.lvl2 { border-left-color: var(--accent); }
.alert summary { cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.alert-title { color: var(--text); overflow-wrap: anywhere; }
.alert-meta { color: var(--faint); }
.alert-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--dim); margin: 6px 0; }
.alert-fold { margin: 0 0 10px; }
.alert-fold > summary { cursor: pointer; color: var(--dim); padding: 4px 0; }
.site-tree, .protocols { margin: 4px 0 10px; padding-left: 1.1rem; color: var(--dim); }
.protocols .state { font-size: .8rem; color: var(--faint); }
.protocols .state.running { color: var(--ok); }
.protocols .state.partly { color: var(--accent); }
.sec-add { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.sec-add input { flex: 1 1 140px; min-width: 0; }
.alert-why { color: var(--text); margin: 6px 0; overflow-wrap: anywhere; }
.alert.fresh .alert-title { color: var(--accent); }

/* TALKING TO HAL (2026-11-12): the button at the top of every room, and the place to say it. talk.js */
#talk-btn { white-space: nowrap; padding: 5px 12px; border-color: var(--accent); color: var(--text); }
#talk-btn .narrow { display: none; }
@media (max-width: 560px) { #talk-btn .wide { display: none; } #talk-btn .narrow { display: inline; } #top { gap: 8px; padding-left: 10px; padding-right: 10px; } }
#talk-dialog { max-width: 680px; width: 100vw; height: min(80dvh, 760px); padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  margin: auto auto 0; border-radius: 16px 16px 0 0; border-bottom: 0; }
#talk-dialog[open] { animation: talk-up .22s ease; }
@keyframes talk-up { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
/* the conversation opens from the creature at the bottom now (30 Nov 2026); the button at the top is gone */
#talk-btn { display: none !important; }
#perch-talk .perch-send { border-color: var(--accent); color: var(--accent); }
#perch-talk .perch-send[hidden] { display: none; }
#talk-dialog .talk-pat { margin-left: auto; margin-right: 6px; }
#talk-dialog[open] { display: flex; flex-direction: column; gap: 8px; }
#talk-dialog h3 { margin: 0; }
#talk-who:empty { display: none; }
#talk-who { margin: 0; }
#talk-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 4px 4px 4px 0; }
#talk-form { display: flex; gap: 8px; align-items: flex-end; }
#talk-text { flex: 1; min-width: 0; resize: vertical; min-height: 2.8rem; max-height: 40vh; font: inherit; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ask { display: flex; flex-direction: column; gap: 6px; }
.ask .said { margin: 0; align-self: flex-end; max-width: 88%; padding: 8px 12px; background: var(--bg-3); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask .did { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ask .did li { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ask .did .link { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-align: left; font: inherit; cursor: pointer; }
.ask .did li.undone .link { text-decoration: line-through; color: var(--faint); }
.ask .did .quiet { padding: 2px 10px; font-size: .85rem; }
.ask .reply { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.ask .offer { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; }
.ask .offer p { margin: 0; }
.ask .offer label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }

/* PLAIN WORDS PASS (2026-11-12) */
#top h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#top #today-btn { min-width: 0; }
#edit-form textarea { width: 100%; box-sizing: border-box; resize: vertical; font: inherit; color: var(--text); }
#edit-links a { margin-right: 4px; overflow-wrap: anywhere; }
#edit-links:empty { display: none; }
#edit-when { border-top: 1px solid var(--line); padding-top: 6px; }
#edit-when summary { cursor: pointer; color: var(--dim); padding: 4px 0; }
#edit-when[open] { display: flex; flex-direction: column; gap: 7px; }
#aim-card .card-note a { overflow-wrap: anywhere; }
#aim-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; color: var(--dim); }
#aim-key > span { white-space: nowrap; }
#aim-key .k { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
#aim-key .k.ring { width: 10px; height: 10px; border: 2px solid var(--accent); background: var(--bg-3); box-sizing: border-box; }
#aim-key .k.ready { background: var(--accent); }
#aim-key .k.waiting { background: var(--news); }
#aim-key .k.done { background: var(--ok); }
/* DUE SOON, first on Today (2026-11-14) */
#due { margin: 6px 0 12px; }
#due h3 { margin: 0 0 6px; }
#due-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
#due-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 6px 2px; border-top: 1px solid var(--line); }
#due-list li:first-child { border-top: 0; }
#due-list .due-name { flex: 1 1 12rem; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: var(--text); font: inherit; font-weight: 600; overflow-wrap: anywhere; }
#due-list button.due-name:hover { color: var(--accent); }
#due-list .due-when { color: var(--dim); font-size: .9rem; }
#due-list li.near .due-when { color: var(--accent); }
#due-list li.late .due-when { color: var(--late, #e07a6a); }
#due-list .due-aim { color: var(--faint); font-size: .82rem; }
#aware-head { margin: 4px 0; color: var(--dim); }
/* a waiting notice is a button that opens its to-do (20 Nov 2026) */
button.linkish { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.meta .opens { color: var(--accent); }

/* a day gone, on Today (28 Nov 2026): says where taps and words go */
#past-day { margin: 2px 0 10px; color: var(--accent); }
#myday { margin: 0 0 18px; }
.happened-work summary { cursor: pointer; }

/* pills, on Today (28 Nov 2026): her list, and two taps beside each one that never set each other */
#pills { margin: 0 0 18px; }
#pills h3 { margin: 6px 0 2px; }
.pill-standing { margin: 2px 0 8px; }
.pill-list { list-style: none; margin: 0 0 8px; padding: 0; }
.pill-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pill-name { flex: 1 1 9em; min-width: 0; overflow-wrap: anywhere; }
.pill-name small { display: block; font-family: var(--aside); font-style: italic; color: var(--faint); font-size: .8rem; }
.pill-taps { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-tap { min-height: 44px; min-width: 5.5em; font: inherit; }
.pill-tap small { display: inline; margin-left: 6px; }
.pill-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.pill-add input { flex: 1 1 12em; min-width: 0; font: inherit; font-size: 16px; padding: 8px 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.pill-add button, #pills button.quiet { font: inherit; min-height: 44px; padding: 6px 12px; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.pill-part { margin: 0 0 10px; }
.pill-part h4 { margin: 10px 0 2px; font: inherit; font-weight: 600; }
.pill-part h4 small { margin-left: 8px; font-family: var(--aside); font-style: italic; font-weight: 400; color: var(--dim); }
.pill-wholes { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
#pills button.quiet.on { border-color: var(--ok); background: #6fcf8f1f; }
.pill-whens { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.pill-add select { font: inherit; font-size: 16px; min-height: 44px; padding: 6px 8px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.pill-name small.pill-food { font-style: normal; color: var(--dim); }
.pill-check { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; }
.pill-check input { width: 20px; height: 20px; margin-right: 4px; }

/* buttons: little things she ticks, always here (28 Nov 2026) */
#taps { margin: 0 0 12px; }
.tap-row-top { display: flex; align-items: flex-start; gap: 8px; }
.tap-strip { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 auto; min-width: 0; }
.tapb { position: relative; width: 52px; height: 52px; display: grid; place-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); cursor: pointer; font: inherit; padding: 0; }
.tapb-icon { font-size: 1.5rem; line-height: 1; }
.tapb.on { border-color: var(--ok); background: #6fcf8f1f; }
.tapb.asking { border-color: var(--accent); }
.tapb-n { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: var(--ok); color: #10131a; font-size: .8rem; font-weight: 700; line-height: 20px; text-align: center; }
#taps button.quiet { font: inherit; min-height: 44px; padding: 6px 12px; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.tap-gear { flex: 0 0 auto; }
.tap-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.tap-ask-name { flex: 1 0 100%; }
.tap-said { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tap-edit { margin: 8px 0 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; max-height: 55vh; overflow: auto; overscroll-behavior: contain; }
.tap-list { list-style: none; margin: 0 0 8px; padding: 0; }
.tap-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tap-on { display: flex; align-items: center; gap: 8px; flex: 1 1 12em; min-width: 0; min-height: 44px; cursor: pointer; }
.tap-on input[type=checkbox] { width: 22px; height: 22px; flex: 0 0 auto; }
.tap-name { overflow-wrap: anywhere; }
.tap-icon-in { width: 3.2em; flex: 0 0 auto; text-align: center; font: inherit; font-size: 18px; padding: 6px 4px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.tap-row select, .tap-add input[name=title] { font: inherit; font-size: 16px; min-height: 44px; padding: 6px 8px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; }
.tap-add { display: flex; flex-wrap: wrap; gap: 8px; }
.tap-add input[name=title] { flex: 1 1 10em; min-width: 0; }
.tap-add button { font: inherit; min-height: 44px; padding: 6px 12px; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
/* pills, folded to one short row */
.pill-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pill-top h3 { margin: 0 4px 0 0; }
.pill-head { min-height: 44px; font: inherit; }
.pill-head.open { border-color: var(--accent); }
.pill-manage { max-height: 55vh; overflow: auto; overscroll-behavior: contain; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }

/* THE CREATURE AS ONE SHORT ROW (28 Nov 2026, later): the little character, what it says, a button to say something, and the
   little house that opens its house in a pop-up. Replaces the strip that drew the whole house on every room. */
#perch { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 10px; min-height: 52px; box-sizing: border-box; border-top: 1px solid var(--line); border-bottom: 0; background: var(--bg) !important; z-index: 3; }
/* room for an iPhone's rounded corners and the bar at the bottom of its screen (her words: "we need a little more padding at the
   bottom. The way it is currently gets cut off by the corners of my iPhone"). The page runs edge to edge (viewport-fit=cover),
   and the old strip had only grass down there; a row of buttons needs to sit above it. */
#perch { padding: 6px max(14px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 10px) max(14px, env(safe-area-inset-left)); }
#perch-scene { flex: none; width: 44px; height: 44px; cursor: pointer; }
#perch-scene svg { display: block; width: 44px; height: 44px; margin: 0; }
#perch-scene svg.pet-pat { animation: pet-pat .5s steps(2, end) 1; }
#perch-say { position: static; transform: none; flex: 1 1 auto; min-width: 0; width: auto; max-width: none; margin: 0; padding: 6px 10px; opacity: 1; pointer-events: auto;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-family: var(--aside); font-style: italic; font-size: .9rem; line-height: 1.25;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; visibility: hidden; }
#perch-say.show { visibility: visible; transform: none; }
#perch-say::before, #perch-say::after { display: none; }
#perch-say.answer { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); max-width: none; max-height: min(46dvh, 320px); overflow-y: auto; display: block; -webkit-line-clamp: unset; }
#perch-talk-btn { flex: none; min-height: 44px; min-width: 44px; padding: 4px 12px; font: inherit; background: none; color: var(--text); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
#perch #pet-btn { position: static; flex: none; min-height: 44px; display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 3px 9px; background: none; border: 1px solid var(--line); border-radius: 10px; }
#perch-talk { bottom: calc(100% + 6px); }
#pet-house { margin: 0 0 10px; }
.pet-house-pic { border-radius: 10px; overflow: hidden; }
.pet-house-pic svg { display: block; width: 100%; height: auto; max-height: 40dvh; }
.pet-house-say { margin: 8px 0 0; padding: 6px 10px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-radius: 12px; font-family: var(--aside); font-style: italic; }
/* the buttons, smaller (her words: "those can totally be smaller") */
.tapb { width: 44px; height: 44px; border-radius: 10px; }
.tapb-icon { font-size: 1.25rem; }
.tapb-n { top: -5px; right: -5px; min-width: 18px; height: 18px; line-height: 18px; font-size: .72rem; border-radius: 9px; }
.tap-strip { gap: 7px; }

/* the say box and the speech box, after her first try on her phone (28 Nov 2026) */
#perch-talk { left: 8px; right: 8px; bottom: calc(100% + 6px); display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; transform: none; width: auto; }
#perch-talk[hidden] { display: none; }
#perch-talk input { flex: none; width: 100%; box-sizing: border-box; font-size: 16px; min-height: 44px; padding: 8px 10px; }
.perch-talk-row { display: flex; flex-wrap: wrap; gap: 8px; }
#perch-talk .perch-talk-row button, #perch-talk button.quiet { flex: 1 1 auto; min-height: 44px; padding: 6px 12px; font-size: 1rem; }
/* what it says is always there in the row, so there is never an empty gap; only an answer lifts up, above the say box */
#perch-say { visibility: visible; }
#perch-say:empty { visibility: hidden; }
#perch-say.answer:not(.show) { position: static; display: -webkit-box; -webkit-line-clamp: 2; max-height: none; overflow: hidden; }
#perch-say.answer.show { bottom: calc(100% + 6px + var(--talk-h, 0px)); z-index: 5; }
#perch-say .perch-open { font-style: normal; }

/* THE ROW, SIMPLER (28 Nov 2026, later still): the creature, a box to type in, a microphone, the little house.
   What it says floats above the row for a moment and then goes; nothing in the row is a label. */
#perch-talk { position: static; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: row; align-items: center; gap: 6px; padding: 0; background: none; border: 0; border-radius: 0; }
#perch-talk[hidden] { display: none; }
#perch-talk input { flex: 1 1 auto; min-width: 0; width: auto; min-height: 44px; font-size: 16px; padding: 8px 12px; border-radius: 22px; background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }
#perch-talk .perch-mic { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; background: none; color: var(--text); border: 1px solid var(--line); cursor: pointer; }
#perch-talk .perch-mic.on { background: #d9534f; border-color: #d9534f; color: #fff; animation: mic-on 1.2s ease-in-out infinite; }
@keyframes mic-on { 50% { box-shadow: 0 0 0 6px #d9534f44; } }
@media (prefers-reduced-motion: reduce) { #perch-talk .perch-mic.on { animation: none; } }
#perch-talk-btn { display: none !important; }
#perch-say, #perch-say.answer:not(.show) { position: absolute; left: 8px; right: 8px; bottom: calc(100% + 6px); width: auto; max-width: none; visibility: hidden; display: block; -webkit-line-clamp: unset; max-height: min(46dvh, 320px); overflow-y: auto; z-index: 5; }
#perch-say.show, #perch-say.answer.show { visibility: visible; }
#perch-say:not(.answer) { left: 8px; right: auto; max-width: calc(100% - 16px); }

/* THE NOTES ROOM (28 Nov 2026): record, type, and every note in a box that scrolls inside itself */
#notes-room { max-width: 760px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }
#notes-room .room-h { margin: 10px 0 8px; }
.notes-room { display: flex; flex-direction: column; gap: 10px; min-height: 0; flex: 1 1 auto; }
.notes-new { display: flex; gap: 10px; align-items: stretch; }
.note-rec { flex: none; width: 84px; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.note-rec-dot { width: 26px; height: 26px; border-radius: 50%; background: #d9534f; }
.note-rec.on { border-color: #d9534f; background: #d9534f22; }
.note-rec.on .note-rec-dot { border-radius: 5px; animation: mic-on 1.2s ease-in-out infinite; }
.notes-type { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.notes-type textarea { width: 100%; box-sizing: border-box; flex: 1 1 auto; font: inherit; font-size: 16px; resize: none; }
.notes-type button { align-self: flex-end; min-height: 44px; padding: 6px 16px; }
.notes-all { list-style: none; margin: 0; padding: 0 6px 0 0; flex: 1 1 auto; min-height: 120px; max-height: calc(100dvh - 330px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; border-top: 1px solid var(--line); }
.note-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.note-item audio { width: 100%; }
.note-put { font: inherit; font-size: 16px; min-height: 36px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 4px; margin-left: auto; max-width: 55%; }
.note-where { padding: 2px 8px; }

/* an option this Hal's profile has switched off (options.js) */
.opt-off { display: none !important; }

/* the bottom row's order (28 Nov 2026, her words: "the speech box should be next to the bird ... and then obviously the
   microphone next to it ... the house part needs to go on the right hand side"), and the house is only the house: how many
   it has to spend is inside, not in the row ("it doesn't need to say 8 shinies") */
#perch-scene { order: 1; }
#perch-talk { order: 2; }
#perch #pet-btn { order: 3; min-width: 44px; justify-content: center; padding: 3px 8px; }
#perch #pet-btn .pet-glow { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* what the creature noticed today, at the top of the conversation (30 Nov 2026) */
#talk-dialog .pet-noticed { border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; font-size: .9rem; }
#talk-dialog .pet-noticed > summary { cursor: pointer; color: var(--accent); }
#talk-dialog .pet-noticed p { margin: 6px 0; }
