:root {
  --bg: #f6efe6;
  --surface: #fffaf4;
  --ink: #2b2420;
  --muted: #7a6d63;
  --accent: #d9774b;
  --accent-ink: #ffffff;
  --mine: #f1dccb;
  --line: #e6d8ca;
  --danger: #b3382c;
  --radius: 18px;
  /* Calendar kinds: quiet tints, readable text in both themes */
  --k-activity: #dfe9f5; --k-vacation: #dcefdc; --k-celebration: #f6dfe6; --k-school: #f3ead0;
  --k-other: #e6ddd2; --k-birthday: #f9dcc8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a17;
    --surface: #27231f;
    --ink: #f3ebe3;
    --muted: #a99a8d;
    --accent: #e08a5f;
    --mine: #3a2e26;
    --line: #3a332d;
    --danger: #ef7d70;
    --k-activity: #2a3647; --k-vacation: #26392a; --k-celebration: #42283a; --k-school: #3d3622;
    --k-other: #3b3631; --k-birthday: #4a3020;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 17px; line-height: 1.45; }

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; }

/* Pairing */
.pair { max-width: 420px; margin: 0 auto; padding: 48px 20px; text-align: center; }
.pair-logo { width: 88px; height: 88px; }
.pair h1 { margin: 16px 0 4px; font-size: 28px; }
.pair p { color: var(--muted); margin: 0 0 24px; }
.pair form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; text-align: left; }
.pair label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; color: var(--muted); font-size: 15px; }
.pair input {
  width: 100%; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 18px;
}
#pair-code { letter-spacing: 0.4em; font-size: 26px; text-align: center; }
.pair button[type=submit] {
  padding: 14px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.error { color: var(--danger); min-height: 1.4em; margin: 0; }

/* Chat: a sidebar with the conversations, and the chat beside it */
.app {
  height: 100dvh; display: grid; grid-template-columns: 272px 1fr;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.app.side-hidden { grid-template-columns: 0 1fr; }
.app.side-hidden .sidebar { visibility: hidden; }
.main {
  min-width: 0; display: grid; grid-template-rows: auto 1fr auto auto auto; grid-template-columns: minmax(0, 1fr);
  width: 100%; max-width: 820px; margin: 0 auto; height: 100dvh;
}
.bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; }
.bar h1 { flex: 1; min-width: 0; margin: 0 6px; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.bar-actions { display: flex; gap: 2px; }
@media (min-width: 761px) { .app:not(.side-hidden) .side-toggle, .app:not(.side-hidden) #side-open { visibility: hidden; } }

.icon-btn {
  width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: transparent; color: var(--muted); transition: background .15s, color .15s;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--line); color: var(--ink); outline: none; }
.icon-btn[aria-pressed=true] { color: var(--accent); }

.sidebar {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; height: 100dvh;
  background: var(--surface); border-right: 1px solid var(--line);
}
.side-head { display: flex; justify-content: space-between; padding: 8px 10px; }
.chat-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.chat-list h2 { margin: 14px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; }
.chat-item { display: flex; align-items: center; border-radius: 10px; }
.chat-item:hover, .chat-item.current { background: var(--line); }
.chat-item a { flex: 1; min-width: 0; padding: 9px 10px; color: var(--ink); text-decoration: none; font-size: 15px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item .icon-btn { width: 32px; height: 32px; opacity: 0; }
.chat-item:hover .icon-btn, .chat-item.current .icon-btn, .chat-item .icon-btn:focus-visible { opacity: 1; }
.chat-item .icon { width: 17px; height: 17px; }
.chat-empty { margin: 16px 10px; color: var(--muted); font-size: 14px; }
.side-foot { display: flex; align-items: center; gap: 2px; padding: 10px; border-top: 1px solid var(--line);
  padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.account { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 15px; }
.who { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scrim { display: none; }

/* Phones: the sidebar slides over the chat */
@media (max-width: 760px) {
  .app, .app.side-hidden { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: min(300px, 84vw);
    padding-top: env(safe-area-inset-top); transform: translateX(-102%); transition: transform .2s ease;
    visibility: visible !important; }
  .app.side-open .sidebar { transform: none; box-shadow: 0 0 40px rgb(0 0 0 / .25); }
  .app.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 9; background: rgb(0 0 0 / .35); }
}

.chip {
  padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px;
}
.chip[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.quiet { color: var(--muted); }

.messages { overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  max-width: 85%; padding: 10px 14px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.me { align-self: flex-end; background: var(--mine); border-color: transparent; }
.msg.zizi { align-self: flex-start; }
.msg.error { color: var(--danger); }
.msg .tool { display: block; color: var(--muted); font-size: 14px; }
.msg a { color: var(--accent); font-weight: 600; }
.hello { color: var(--muted); text-align: center; margin: auto 0; }

.composer {
  display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: end;
  margin: 0 12px calc(12px + env(safe-area-inset-bottom)); padding: 7px;
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgb(0 0 0 / .07);
}
.composer textarea {
  resize: none; max-height: 160px; padding: 10px 4px; border: 0; background: transparent; outline: none;
  align-self: center;
}
.round {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--line) 70%, transparent); color: var(--ink); border: 0;
}
.round:hover { background: var(--line); }
.composer .round { width: 46px; height: 46px; }
.composer .round .icon { width: 24px; height: 24px; stroke-width: 1.8; }
/* Like the Claude app: send is a quiet circle until there is something to send. */
.round.send.ready { background: var(--ink); color: var(--bg); }
.round.send.ready:hover { background: var(--ink); opacity: .85; }
.round.send.stop .icon { width: 20px; height: 20px; }
#dictate.recording { background: var(--danger); color: #fff; animation: dictating 1.2s ease-in-out infinite; }
@keyframes dictating { 50% { box-shadow: 0 0 0 6px rgb(200 60 50 / .25); } }
@media (prefers-reduced-motion: reduce) { #dictate.recording { animation: none; } }
@keyframes pulse { 50% { transform: scale(1.12); } }
.status { margin: 0; padding: 0 16px 8px; color: var(--muted); font-size: 14px; min-height: 1.4em; text-align: center; }

/* Photo sheet */
.sheet { border: 0; border-radius: var(--radius); padding: 0; width: min(760px, calc(100vw - 24px));
  background: var(--surface); color: var(--ink); }
.sheet::backdrop { background: rgb(0 0 0 / 0.4); }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px; }
.sheet h2 { margin: 0; font-size: 20px; }
.sheet label { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; color: var(--muted); font-size: 15px; }
/* A long option or a phone's wide time picker must not stretch the sheet past the screen. */
.sheet select, .sheet input, .sheet textarea { max-width: 100%; min-width: 0; }
.sheet details { min-width: 0; }
.sheet select { padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 17px; }
.hint { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.table-wrap { overflow-x: auto; }
.preview table { border-collapse: collapse; font-size: 14px; }
.preview th, .preview td { border: 1px solid var(--line); padding: 2px; }
.preview th { padding: 6px; color: var(--muted); font-weight: 600; }
.preview input { width: 4.5em; border: 0; background: transparent; padding: 6px; text-align: center; font-size: 15px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; }
.primary { padding: 10px 16px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.primary:disabled { opacity: 0.4; }
.check { display: flex !important; align-items: center; gap: 10px; }
.code { margin: 0; font-size: 44px; font-weight: 700; letter-spacing: 0.25em; text-align: center; min-height: 1.2em; }
.msg img { display: block; max-width: 220px; max-height: 220px; border-radius: 10px; margin-bottom: 6px; }

/* Icons: one colour, taken from the text around them. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -5px; }
.icon.big { width: 30px; height: 30px; }
.chip .icon { width: 17px; height: 17px; vertical-align: -3px; }

.attachments { display: flex; gap: 8px; padding: 6px 16px; overflow-x: auto; }
.thumb { position: relative; flex: none; }
.thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; display: block; }
.thumb button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.thumb .icon { width: 14px; height: 14px; }
.msg .photos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.msg .photos img { max-width: 160px; max-height: 160px; margin: 0; }
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.notice .chip { font-size: 14px; }

/* Settings */
.sheet.wide { width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.round.small { width: 38px; height: 38px; }
.sheet details { border-top: 1px solid var(--line); padding-top: 10px; }
.sheet summary { cursor: pointer; font-weight: 600; font-size: 17px; padding: 4px 0; }
.sheet details > * + * { margin-top: 10px; }
.sheet input:not([type=checkbox]) { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); font-size: 16px; }
.rows { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 140px; }
.row small { color: var(--muted); }
.row input { width: 9em; }
/* Phones: the rule's name on its own line, its time and "Vypnúť" side by side below it. */
@media (max-width: 520px) { #s-notify .row .grow { flex-basis: 100%; } }
.warn { padding: 10px 12px; border-radius: 10px; background: var(--mine); color: var(--ink); }
.sheet-actions.left { justify-content: flex-start; flex-wrap: wrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); display: inline-block; }
.dot.on { background: #3a9d5d; }
/* Touch screens have no hover: keep the remove button visible, but quiet. */
@media (hover: none) { .chat-item .icon-btn { opacity: .55; } }

/* Sidebar menu */
.side-nav { padding: 0 8px 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  background: transparent; font-size: 15px; text-align: left; }
.nav-item:hover, .nav-item.current { background: var(--line); }
.nav-item .icon { width: 19px; height: 19px; color: var(--muted); }

/* Calendar */
.calendar-view { min-width: 0; height: 100dvh; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
.calendar-view .bar-actions { align-items: center; }
.cal-body { overflow-y: auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line);
  border-left: 1px solid var(--line); margin-bottom: 20px; }
.cal-head { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: default; }
.cal-day.other { background: color-mix(in srgb, var(--bg) 60%, var(--line)); }
.cal-day.other .num { color: var(--muted); }
.cal-day .num { font-size: 13px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .num { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-day.can-add { cursor: pointer; }
.ev { display: block; width: 100%; text-align: left; padding: 2px 6px; border-radius: 6px; font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--k-other); color: var(--ink); }
.ev[data-kind=activity] { background: var(--k-activity); }
.ev[data-kind=vacation] { background: var(--k-vacation); }
.ev[data-kind=celebration] { background: var(--k-celebration); }
.ev[data-kind=school] { background: var(--k-school); }
.ev[data-kind=birthday] { background: var(--k-birthday); }
.more { font-size: 12px; color: var(--muted); padding: 0 6px; }

.cal-agenda h2 { margin: 18px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; }
.agenda-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px;
  margin-bottom: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.agenda-item.readonly { cursor: default; }
.agenda-item .bar-kind { width: 4px; align-self: stretch; border-radius: 2px; background: var(--k-other);
  filter: saturate(3) brightness(.85); }
.agenda-item[data-kind=activity] .bar-kind { background: var(--k-activity); }
.agenda-item[data-kind=vacation] .bar-kind { background: var(--k-vacation); }
.agenda-item[data-kind=celebration] .bar-kind { background: var(--k-celebration); }
.agenda-item[data-kind=school] .bar-kind { background: var(--k-school); }
.agenda-item[data-kind=birthday] .bar-kind { background: var(--k-birthday); }
.agenda-item .what { flex: 1; min-width: 0; }
.agenda-item strong { display: block; font-weight: 600; font-size: 16px; }
.agenda-item small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.agenda-empty { color: var(--muted); margin: 24px 0; text-align: center; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet textarea { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  font-size: 16px; resize: vertical; }
.members { border: 0; padding: 0; margin: 0; }
.members legend { color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.members div { display: flex; flex-wrap: wrap; gap: 6px; }
.members label { display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink) !important; cursor: pointer; }
.members label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) !important; }
.members input { position: absolute; opacity: 0; pointer-events: none; }
.sheet-actions .grow { flex: 1; }

@media (max-width: 760px) {
  .cal-grid { display: none; }
  .calendar-view .bar-actions .chip { padding: 6px 10px; }
  .calendar-view .icon-btn { width: 36px; }
  #cal-close { display: none; }
  .field-row { grid-template-columns: 1fr; }
}

/* Phone menu at the bottom, like the Claude app; on wider screens the sidebar does this */
.tabbar { display: none; }
@media (max-width: 760px) {
  .app { grid-template-rows: minmax(0, 1fr) auto; }
  .main, .calendar-view { height: auto; min-height: 0; grid-row: 1; }
  .tabbar { grid-row: 2; }
  .composer { margin-bottom: 8px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
    margin: 0 12px calc(8px + env(safe-area-inset-bottom)); padding: 6px;
    border-radius: 28px; background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 6px 24px rgb(0 0 0 / .07);
  }
  .tab { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 22px;
    background: transparent; font-size: 13px; font-weight: 600; color: var(--ink); }
  .tab .icon { width: 24px; height: 24px; }
  .tab.current { background: var(--line); }
  .cal-body { padding-bottom: 12px; }
}

/* Calendar views: week, month, year */
.cal-tools { display: flex; justify-content: center; padding: 4px 0 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--line); }
.seg button { padding: 6px 16px; border-radius: 9px; background: transparent; font-size: 14px; color: var(--muted); }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.cal-grid.week .cal-day { min-height: 340px; }
.day-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 4px; }
.day-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.cal-grid.week .ev { white-space: normal; }
.cal-grid.year { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 24px; border: 0; }
.mini-name { display: block; margin-bottom: 6px; padding: 2px 4px; border-radius: 6px; background: transparent;
  font-weight: 600; font-size: 15px; text-transform: capitalize; }
.mini-name:hover { background: var(--line); }
.mini-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-head { font-size: 11px; color: var(--muted); }
.mini-day { aspect-ratio: 1; border-radius: 50%; background: transparent; font-size: 12px; padding: 0; }
.mini-day:hover { background: var(--line); }
.mini-day.busy { background: var(--k-activity); font-weight: 600; }
.mini-day.today { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.cal-agenda h2.today { color: var(--accent); }
.agenda-none { margin: 0 0 6px 12px; color: var(--muted); }
@media (min-width: 761px) { .cal-body.week .cal-agenda { display: none; } }
@media (max-width: 760px) {
  .cal-grid.week { display: none; }
  .cal-grid.year { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .cal-tools { padding-top: 0; }
}

/* Voice conversation, like ChatGPT's: full screen, an orb that follows the voice */
.voice { position: fixed; inset: 0; z-index: 20; display: grid; grid-template-rows: 1fr auto; background: var(--bg);
  padding: env(safe-area-inset-top) 24px calc(28px + env(safe-area-inset-bottom)); }
.voice-stage { display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; }
.voice-orb { width: 168px; height: 168px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--accent) 55%, white), var(--accent) 70%);
  transform: scale(var(--level, 1)); transition: transform .08s linear; box-shadow: 0 10px 50px rgb(217 119 75 / .35); }
.voice[data-state=loading] .voice-orb, .voice[data-state=thinking] .voice-orb { animation: breathe 1.6s ease-in-out infinite; }
.voice[data-state=speaking] .voice-orb { animation: talk .5s ease-in-out infinite alternate; }
.voice[data-state=muted] .voice-orb { filter: grayscale(1); opacity: .45; }
@keyframes breathe { 50% { transform: scale(.88); opacity: .75; } }
@keyframes talk { from { transform: scale(.96); } to { transform: scale(1.08); } }
.voice-status { margin: 0; font-size: 19px; font-weight: 600; }
.voice-text { margin: 0; max-width: 34ch; color: var(--muted); font-size: 16px; min-height: 3em;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.voice-actions { display: flex; justify-content: center; gap: 28px; }
.voice-btn { width: 64px !important; height: 64px !important; }
.voice-btn .icon { width: 28px; height: 28px; }
.voice-btn[aria-pressed=true] { background: var(--ink); color: var(--bg); }
.voice-btn.end { background: var(--danger); color: #fff; }

/* House guide */
.guide-card { width: 100%; display: grid; gap: 8px; text-align: left; padding: 14px 16px; margin: 4px 0 12px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.guide-text strong { display: block; font-size: 16px; }
.guide-text small { color: var(--muted); font-size: 14px; }
.guide-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.guide-bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.guide-list { margin: -4px 0 14px; }
.guide-step { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: transparent; }
.guide-step .mark { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line); color: transparent; }
.guide-step.done .mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.guide-step .mark .icon { width: 16px; height: 16px; }
.guide-step strong { display: block; font-weight: 600; font-size: 15px; }
.guide-step small { display: block; color: var(--muted); font-size: 13px; }
.search { display: flex !important; align-items: center; gap: 8px; padding: 0 12px; margin-bottom: 10px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.search input { flex: 1; border: 0; background: transparent; padding: 11px 0; outline: none; font-size: 16px; color: var(--ink); }
.home-cat { margin: 18px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.home-item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px;
  margin-bottom: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.home-item img, .home-item .noimg { width: 56px; height: 56px; flex: none; border-radius: 10px; object-fit: cover;
  background: var(--line); display: grid; place-items: center; color: var(--muted); }
.home-item strong { display: block; font-weight: 600; font-size: 16px; }
.home-item small { display: block; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.home-item .lock { font-size: 12px; color: var(--muted); }
.hd-photos { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.hd-photos figure { margin: 0; flex: none; width: min(100%, 460px); scroll-snap-align: start; }
.hd-photos img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 12px; background: var(--line); }
.hd-photos figcaption { color: var(--muted); font-size: 14px; margin-top: 4px; }
.hd-fields { display: grid; gap: 10px; }
.hd-fields div b { display: block; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.hd-fields div p { margin: 2px 0 0; white-space: pre-wrap; }
.he-photos-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 15px; }
.he-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.he-photo { position: relative; display: grid; gap: 4px; }
.he-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; }
.he-photo input { padding: 6px 8px !important; font-size: 14px !important; }
.he-photo button { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.he-photo button .icon { width: 15px; height: 15px; }
.msg .home-photos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg .home-photos img { width: 150px; height: 112px; object-fit: cover; border-radius: 10px; margin: 0; }
.trainer-intro { margin: 0 2px 10px; }

/* Notifications */
.notice-body { line-height: 1.45; overflow-wrap: anywhere; min-width: 0; }
.notice-body p { margin: 0 0 6px; }
.notice-summary { color: var(--muted); font-size: 15px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.notice-child { margin: 16px 0 4px; font-size: 18px; }
.notice-head { margin: 10px 0 4px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase;
  letter-spacing: .04em; }
.notice-list { margin: 0; padding-left: 20px; }
.notice-list li { margin: 3px 0; }
#notice-dialog { overflow-x: hidden; }
.push-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 12px auto 0; max-width: 460px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; color: var(--ink); }
.push-card .icon { color: var(--accent); flex: none; }
.push-card span { flex: 1; font-size: 15px; }
#push-toggle[aria-pressed=true] { color: var(--accent); }
