:root {
  color-scheme: light;
  --ink: #201d1a;
  --muted: #746d65;
  --line: rgba(74, 65, 55, 0.11);
  --paper: rgba(255, 253, 249, 0.79);
  --paper-solid: #fffdfa;
  --accent: #ee735d;
  --accent-dark: #c94d3d;
  --accent-soft: #ffe2d9;
  --sage: #587267;
  --shadow: 0 16px 50px rgba(80, 57, 38, 0.09);
  --shadow-raised: 0 22px 58px rgba(80, 57, 38, 0.15);
  --radius-lg: 26px;
  --radius-md: 18px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; background: #f4efe7; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 202, 187, 0.72), transparent 30%),
    radial-gradient(circle at 88% 84%, rgba(190, 212, 197, 0.64), transparent 31%),
    linear-gradient(135deg, #f7f2ea 0%, #f2ede5 52%, #f8f1e9 100%);
  overflow-x: hidden;
}

body.has-brand-intro { overflow: hidden; }

.brand-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.76), transparent 38%),
    #faf7f1;
  animation: brand-intro-exit 4.8s linear both;
}

.brand-intro img { display: block; width: min(480px, 84vw); height: auto; }

button, input, textarea { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-one { top: -150px; right: 18%; background: #ffd5c9; }
.ambient-two { bottom: -190px; left: 12%; background: #cbdccf; }

.surface {
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.custom-avatar { display: grid; place-items: center; color: white; border-radius: 50%; font-weight: 800; background: #f6f0e9; background-position: center; background-repeat: no-repeat; background-size: cover; }
.role-avatar { padding: 4px; object-fit: contain; }

.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(640px, 1fr) 288px;
  gap: var(--space-lg);
  width: min(1600px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}

.identity-rail {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  align-self: start;
  height: calc(100vh - 48px);
  padding: 22px 16px;
  border-radius: var(--radius-lg);
}

.brand { display: block; width: 100%; }
.brand-logo-viewport { display: block; width: 100%; }
.brand-logo { display: block; width: 100%; height: auto; }

.profile { display: flex; align-items: center; gap: 13px; margin: 24px 4px 32px; }
.profile strong, .profile span { display: block; }
.profile span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.avatar-wrap { position: relative; flex: 0 0 auto; width: 62px; height: 62px; }
.avatar-wrap .custom-avatar { width: 100%; height: 100%; font-size: 17px; transition: transform 0.3s ease; }
.avatar-wrap:hover .custom-avatar { transform: rotate(4deg) scale(1.04); }
.presence { position: absolute; right: -2px; bottom: -2px; display: grid; width: 25px; height: 25px; place-items: center; color: white !important; background: var(--accent); border: 3px solid #fffaf5; border-radius: 50%; }

.nav-list { display: grid; gap: 7px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; color: var(--muted); border: 0; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; transition: color 180ms ease, background 180ms ease, transform 180ms ease; }
.nav-item:hover { transform: translateX(2px); color: var(--ink); background: rgba(255, 255, 255, 0.56); }
.nav-item.is-active { color: var(--ink); background: white; box-shadow: 0 8px 24px rgba(79, 58, 42, 0.08); }
.nav-item > span:first-child { display: grid; width: 24px; place-items: center; color: var(--accent-dark); font-size: 18px; }

.rail-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; margin-top: auto; padding: 13px; color: var(--muted); border-radius: 16px; background: rgba(255, 255, 255, 0.48); font-size: 11px; line-height: 1.45; }
.rail-note p { margin: 0; }
.rail-note strong { color: var(--ink); }
.status-dot { flex: 0 0 auto; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #e6a745; box-shadow: 0 0 0 4px rgba(230, 167, 69, 0.14); }

.workspace { position: relative; min-width: 0; padding: 14px 0 156px; }
.workspace-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 0 6px; }
.eyebrow { margin: 0 0 7px; color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: 0.16em; }
.workspace-header h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(29px, 3.2vw, 44px); font-weight: 500; letter-spacing: -0.04em; }
.workspace-header p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.family-badge { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 9px 12px; border-radius: 17px; font-size: 11px; font-weight: 750; }
.family-badge .custom-avatar { width: 32px; height: 32px; font-size: 10px; }
.face-stack { display: flex; }
.face-stack i { display: grid; width: 28px; height: 28px; place-items: center; margin-left: -7px; border: 2px solid #fff; border-radius: 50%; background: #ffe5dc; font-size: 10px; font-style: normal; }
.face-stack i:first-child { margin-left: 0; }
.face-stack i:nth-child(2) { background: #dce8ef; }
.face-stack i:nth-child(3) { background: #f5e3af; }

.date-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; margin: 34px 0 30px; }
.date-strip button { display: grid; gap: 5px; place-items: center; min-height: 66px; color: var(--muted); border: 0; border-radius: 17px; background: rgba(255, 255, 255, 0.38); cursor: pointer; transition: transform 220ms var(--ease), box-shadow 220ms ease, background 220ms ease; }
.date-strip button:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.72); }
.date-strip span { font-size: 11px; }
.date-strip strong { color: var(--ink); font-size: 18px; }
.date-strip .is-today { color: #fff0eb; background: var(--accent); box-shadow: 0 12px 26px rgba(207, 80, 61, 0.23); }
.date-strip .is-today strong { color: white; }

.conversation { display: grid; gap: var(--space-xl); }
#conversation-feed { display: grid; gap: var(--space-xl); }
.message { display: flex; gap: 12px; align-items: flex-start; animation: enter 260ms var(--ease) both; }
.agent-orb { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; color: white; border-radius: 12px; background: var(--ink); box-shadow: 0 9px 24px rgba(34, 31, 27, 0.16); }
.message-body { max-width: min(620px, calc(100% - 46px)); padding: 15px 17px; border: 1px solid rgba(255,255,255,.76); border-radius: 8px 20px 20px; background: rgba(255,255,255,.66); box-shadow: 0 10px 32px rgba(72,53,39,.06); }
.message-body strong { font-size: 13px; }
.message-body p { margin: 7px 0 0; color: #504a44; font-size: 14px; line-height: 1.65; }
.user-message { justify-content: flex-end; }
.user-message .message-body { color: white; border-radius: 20px 8px 20px 20px; background: var(--sage); }
.user-message .message-body p { margin: 0; color: white; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.suggestions button { padding: 8px 11px; color: var(--accent-dark); border: 1px solid rgba(206, 89, 70, 0.16); border-radius: 999px; background: var(--accent-soft); cursor: pointer; transition: transform 180ms ease, background 180ms ease; }
.suggestions button:hover { transform: translateY(-2px); background: #ffd3c8; }

.responsibility-suggestion-card { width: min(610px, calc(100vw - 48px)); margin-top: var(--space-sm); padding: 17px; border: 1px solid rgba(255,255,255,.85); border-radius: 22px; background: rgba(255,253,250,.9); box-shadow: var(--shadow); }
.responsibility-suggestion-card h3 { margin: 0; font-size: 17px; }
.responsibility-suggestion-card dl { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px 12px; margin: 14px 0; font-size: 10px; }
.responsibility-suggestion-card dt { color: var(--muted); }
.responsibility-suggestion-card dd { margin: 0; line-height: 1.5; }

.draft-card { width: min(610px, calc(100vw - 48px)); margin-top: var(--space-sm); overflow: hidden; border: 1px solid rgba(255,255,255,.85); border-radius: 22px; background: rgba(255,253,250,.9); box-shadow: var(--shadow); }
.draft-top { display: flex; justify-content: space-between; gap: 16px; padding: 18px; border-bottom: 1px solid var(--line); }
.draft-label { display: inline-flex; gap: 6px; align-items: center; color: var(--accent-dark); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.draft-card h3 { margin: 8px 0 0; font-size: 20px; }
.draft-time { color: var(--muted); font-size: 12px; text-align: right; }
.draft-time strong { display: block; color: var(--ink); font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.draft-details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.draft-detail { min-width: 0; padding: 14px 16px; background: rgba(255,255,255,.76); }
.draft-detail span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.draft-detail strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.draft-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 13px; }
.draft-actions button { padding: 9px 14px; border-radius: 12px; cursor: pointer; }
.edit-draft { color: var(--muted); border: 1px solid var(--line); background: transparent; }
.confirm-draft { color: white; border: 0; background: var(--ink); box-shadow: 0 8px 20px rgba(32,29,26,.18); }
.confirm-draft:hover { background: var(--accent-dark); }

.composer { position: absolute; right: 0; bottom: 24px; left: 0; z-index: 10; padding: 10px; border-radius: 24px; transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms var(--ease); }
.composer:focus-within { border-color: rgba(238,115,93,.34); box-shadow: 0 0 0 3px rgba(238,115,93,.14), var(--shadow-raised); transform: translateY(-2px); }
.composer textarea { display: block; width: 100%; max-height: 112px; resize: none; padding: 8px 11px 3px; color: var(--ink); border: 0; outline: 0; background: transparent; line-height: 1.5; }
.composer textarea::placeholder { color: #989087; }
.composer-actions { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.input-modes { display: flex; gap: 6px; }
.icon-button, .voice-message-button, .send-button { border: 0; cursor: pointer; transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: #f0ebe4; }
.voice-message-button { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; color: var(--accent-dark); border-radius: 12px; background: var(--accent-soft); font-size: 12px; font-weight: 700; }
.icon-button:hover, .voice-message-button:hover, .send-button:hover { transform: translateY(-2px); }
.composer-hint { margin-left: auto; color: var(--muted); font-size: 10px; }
.send-button { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; color: white; border-radius: 13px; background: var(--ink); font-size: 12px; font-weight: 700; }
.send-button span:last-child { font-size: 18px; }
.voice-state { display: flex; align-items: center; gap: 10px; margin: 0 3px 7px; padding: 9px 12px; color: var(--accent-dark); border-radius: 14px; background: #fff0eb; font-size: 12px; }
.voice-state button { margin-left: auto; color: var(--accent-dark); border: 0; background: transparent; cursor: pointer; font-weight: 750; }
.wave { display: flex; align-items: center; gap: 3px; height: 18px; }
.wave i { width: 3px; height: 6px; border-radius: 3px; background: var(--accent); animation: wave 760ms ease-in-out infinite alternate; }
.wave i:nth-child(2), .wave i:nth-child(4) { animation-delay: -240ms; }
.wave i:nth-child(3) { animation-delay: -440ms; }

.agenda-rail { position: sticky; top: 24px; display: grid; align-self: start; gap: 16px; }
.agenda-card, .people-card { padding: 20px; border-radius: var(--radius-lg); }
.lift-card { transition: transform 250ms ease, box-shadow 250ms ease; }
.lift-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-raised); }
.agenda-card header, .people-card header { display: flex; align-items: flex-start; justify-content: space-between; }
.agenda-card h2, .people-card h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 20px; font-weight: 500; }
.count { display: grid; width: 28px; height: 28px; place-items: center; color: var(--accent-dark); border-radius: 50%; background: var(--accent-soft); font-size: 12px; font-weight: 800; }
.timeline { position: relative; display: grid; gap: 20px; margin-top: 22px; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 51px; width: 1px; background: var(--line); }
.timeline-event { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 22px; align-items: start; }
.timeline-event::before { content: ""; position: absolute; top: 5px; left: 47px; width: 7px; height: 7px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px rgba(195,78,61,.18); }
.timeline-event time { color: var(--accent-dark); font-family: Georgia, serif; font-size: 13px; }
.timeline-event strong, .timeline-event span { display: block; }
.timeline-event strong { font-size: 13px; }
.timeline-event span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.muted-event::before { background: #9db0a5; }
.muted-event time { color: var(--sage); }

.people-list { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; }
.people-list li { display: grid; grid-template-columns: 34px 1fr 8px; gap: 10px; align-items: center; }
.person-avatar { display: block; width: 34px; height: 34px; padding: 3px; border-radius: 12px; background: #f6f0e9; object-fit: contain; }
.people-list strong, .people-list small { display: block; }
.people-list strong { font-size: 12px; }
.people-list small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.people-list i { width: 7px; height: 7px; border-radius: 50%; background: #d7d1ca; }
.people-list i.online { background: #75a987; box-shadow: 0 0 0 4px rgba(117,169,135,.12); }
.privacy-note { margin: 18px 0 0; padding-top: 13px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; line-height: 1.5; }
.receipt-card { display: flex; gap: 12px; align-items: center; padding: 15px; border-radius: 20px; animation: enter 260ms var(--ease) both; }
.success-mark { display: grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; color: white; border-radius: 50%; background: var(--sage); }
.receipt-card strong { font-size: 12px; }
.receipt-card p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }

.app-view { min-width: 0; }
#agent-view { position: relative; min-height: calc(100vh - 48px); }
.app-shell[data-active-view="schedule"] .workspace,
.app-shell[data-active-view="people"] .workspace { grid-column: 2 / 4; }
.app-shell[data-active-view="schedule"] .agenda-rail,
.app-shell[data-active-view="people"] .agenda-rail { display: none; }
.detail-view { animation: enter 220ms var(--ease) both; }
.page-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; padding: 0 6px; }
.page-header h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(31px, 4vw, 48px); font-weight: 500; letter-spacing: -0.04em; text-wrap: balance; }
.page-header h1[tabindex="-1"]:focus { outline: none; }
.page-header p:last-child { max-width: 620px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; text-wrap: pretty; }
.primary-page-action { display: flex; flex: 0 0 auto; align-items: center; gap: 12px; min-height: 43px; padding: 0 17px; color: white; border: 0; border-radius: 18px; background: var(--ink); box-shadow: 0 10px 26px rgba(32,29,26,.14); cursor: pointer; font-size: 12px; font-weight: 750; transition: transform 180ms ease, background 180ms ease; }
.primary-page-action:hover { transform: translateY(-2px); background: var(--accent-dark); }
.primary-page-action:active { transform: scale(.96); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin: var(--space-xl) 0 var(--space-lg); }
.summary-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 20px 24px; border-radius: 24px; }
.summary-card > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.summary-card strong { grid-row: 1 / 3; grid-column: 2; color: var(--accent-dark); font-family: Georgia, serif; font-size: 30px; font-variant-numeric: tabular-nums; font-weight: 500; }
.summary-card small { color: var(--muted); font-size: 9px; }
.schedule-panel, .people-panel, .receipts-panel { border-radius: 28px; }
.schedule-panel { padding: 28px; }
.filter-bar { display: grid; grid-template-columns: minmax(190px, .6fr) minmax(0, 1.4fr); gap: var(--space-lg); align-items: end; padding-bottom: var(--space-lg); border-bottom: 1px solid var(--line); }
.filter-bar label, .member-filter { display: grid; gap: 8px; }
.filter-bar label > span, .member-filter > span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.filter-bar select { width: 100%; min-height: 42px; padding: 0 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.78); transition: border-color 150ms ease, background-color 150ms ease; }
.filter-bar select:hover { border-color: rgba(74,65,55,.24); background: rgba(255,255,255,.94); }
.member-filter > div { display: flex; flex-wrap: wrap; gap: 6px; }
.member-filter button { min-height: 38px; padding: 0 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.54); cursor: pointer; font-size: 10px; font-weight: 700; transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease, color 150ms ease; }
.member-filter button:hover { border-color: rgba(90,123,106,.38); background: rgba(255,255,255,.88); }
.member-filter button:active { transform: scale(.96); }
.member-filter button[aria-pressed="true"] { color: white; border-color: var(--sage); background: var(--sage); }
.schedule-event-list { display: grid; gap: var(--space-sm); margin-top: var(--space-lg); }
.schedule-event { display: grid; grid-template-columns: 88px 56px minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; min-height: 76px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.52); transition: border-color 150ms ease, background-color 150ms ease, box-shadow 180ms ease; }
.schedule-event:hover { border-color: rgba(90,123,106,.2); background: rgba(255,255,255,.82); box-shadow: 0 6px 8px rgba(80,57,38,.06); }
.schedule-event .event-day { color: var(--muted); font-size: 10px; }
.schedule-event time { color: var(--accent-dark); font-family: Georgia, serif; font-size: 17px; font-variant-numeric: tabular-nums; }
.schedule-event strong, .schedule-event small { display: block; }
.schedule-event strong { font-size: 13px; }
.schedule-event small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.schedule-event .event-members { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.schedule-event .event-members span { padding: 5px 8px; color: var(--sage); border-radius: 999px; background: #e8f0eb; font-size: 9px; }
.empty-state { padding: 32px 20px; color: var(--muted); border: 1px dashed rgba(74,65,55,.2); border-radius: 22px; text-align: center; }
.empty-state strong { display: block; color: var(--ink); font-size: 14px; }
.empty-state p { margin: 7px 0 14px; font-size: 11px; }
.empty-state button { color: var(--accent-dark); border: 0; background: transparent; cursor: pointer; font-size: 11px; font-weight: 750; }
.demo-truth { display: flex; gap: var(--space-md); align-items: center; margin: var(--space-xl) 0 var(--space-lg); padding: 20px 24px; border-radius: 24px; }
.demo-truth > span { display: grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; color: #8a6731; border-radius: 50%; background: #fae7bd; font-family: Georgia, serif; font-weight: 700; }
.demo-truth strong { font-size: 11px; }
.demo-truth p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.people-layout { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr); gap: var(--space-lg); }
.people-panel, .receipts-panel { padding: 28px; }
.people-panel > header, .receipts-panel > header { display: flex; justify-content: space-between; align-items: flex-start; }
.people-panel h2, .receipts-panel h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 500; }
.people-panel > header > span, .receipts-panel > header > span { padding: 5px 8px; color: var(--muted); border-radius: 999px; background: rgba(255,255,255,.68); font-size: 9px; }
.people-member-list, .notification-receipt-list { display: grid; gap: var(--space-sm); margin-top: var(--space-lg); }
.member-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: center; min-height: 64px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.5); transition: border-color 150ms ease, background-color 150ms ease, box-shadow 180ms ease; }
.member-row:hover { border-color: rgba(90,123,106,.2); background: rgba(255,255,255,.82); box-shadow: 0 6px 8px rgba(80,57,38,.06); }
.member-row .person-avatar { width: 38px; height: 38px; }
.member-row strong, .member-row small { display: block; }
.member-row strong { font-size: 12px; }
.member-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.route-state { text-align: right; }
.route-state span, .route-state small { display: block; }
.route-state span { color: var(--sage); font-size: 9px; font-weight: 750; }
.route-state .unavailable { color: var(--muted); }
.receipt-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; color: var(--muted); font-size: 9px; }
.receipt-legend span { display: flex; align-items: center; gap: 5px; }
.receipt-legend i { width: 7px; height: 7px; border-radius: 50%; }
.receipt-legend .queued, .receipt-status.queued { background: #e7a744; }
.receipt-legend .accepted, .receipt-status.accepted { background: #75a987; }
.receipt-legend .failed, .receipt-status.failed { background: #cb6757; }
.notification-receipt { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: var(--space-sm); align-items: start; min-height: 76px; padding: 17px 20px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.5); transition: border-color 150ms ease, background-color 150ms ease, box-shadow 180ms ease; }
.notification-receipt:hover { border-color: rgba(90,123,106,.2); background: rgba(255,255,255,.82); box-shadow: 0 6px 8px rgba(80,57,38,.06); }
.receipt-status { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; }
.notification-receipt strong, .notification-receipt small { display: block; }
.notification-receipt strong { font-size: 11px; }
.notification-receipt small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.notification-receipt time { color: var(--muted); font-size: 9px; white-space: nowrap; }
.evidence-note { margin-top: 6px; color: #8a6731 !important; }

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(238,115,93,.38); outline-offset: 3px; }
.composer textarea:focus-visible { outline: none; }

.mobile-nav { display: none; }
.integrations-dialog { width: min(1080px, calc(100vw - 40px)); max-width: none; max-height: calc(100vh - 40px); padding: 0; overflow: hidden; color: var(--ink); border: 0; border-radius: 28px; background: transparent; box-shadow: 0 34px 100px rgba(45, 33, 25, 0.28); }
.integrations-dialog[open] { animation: dialog-in 280ms var(--ease) both; }
.integrations-dialog::backdrop { background: rgba(32, 29, 26, 0.46); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.integrations-shell { max-height: calc(100vh - 40px); padding: 26px; overflow: auto; background: rgba(249, 245, 239, 0.97); }
.integrations-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.integrations-header h2 { max-width: 720px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(26px, 3.4vw, 42px); font-weight: 500; letter-spacing: -0.035em; }
.integrations-header > div > p:last-child { max-width: 660px; margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.dialog-close { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.68); cursor: pointer; font-size: 23px; transition: transform 180ms ease, color 180ms ease, background 180ms ease; }
.dialog-close:hover { transform: rotate(5deg); color: var(--ink); background: white; }
.connection-summary { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 22px 0 16px; padding: 11px 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, 0.54); font-size: 11px; }
.connection-summary span:first-child { color: var(--ink); font-weight: 700; }
.connection-summary i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #e5a744; box-shadow: 0 0 0 4px rgba(229, 167, 68, 0.13); }
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.channel-card { padding: 17px; border: 1px solid rgba(72, 61, 51, 0.1); border-radius: 20px; background: rgba(255, 255, 255, 0.68); box-shadow: 0 10px 30px rgba(70, 52, 38, 0.05); transition: transform 230ms var(--ease), box-shadow 230ms ease, border-color 230ms ease; }
.channel-card:hover { transform: translateY(-4px); border-color: rgba(72, 61, 51, 0.16); box-shadow: 0 18px 42px rgba(70, 52, 38, 0.1); }
.channel-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; align-items: center; }
.channel-heading h3, .channel-heading p { margin: 0; }
.channel-heading h3 { font-size: 15px; }
.channel-heading p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.channel-logo { display: grid; width: 42px; height: 42px; place-items: center; color: white; border-radius: 14px; font-size: 14px; font-weight: 800; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.wecom-logo { background: #42b985; }
.feishu-logo { background: #3370ff; }
.dingtalk-logo { background: #168bff; }
.bot-logo { background: var(--ink); font-size: 10px; letter-spacing: .04em; }
.connection-state { padding: 5px 8px; color: #8a6731; border-radius: 999px; background: #fae7bd; font-size: 9px; font-weight: 700; white-space: nowrap; }
.connection-state.ready { color: #476659; background: #dcebe2; }
.bot-card .connection-state { color: #476659; background: #dcebe2; }
.clawbot-logo { width: 39px; color: #266c52; background: #d9eee4; font-size: 8px; letter-spacing: -0.02em; }
.channel-copy { min-height: 42px; margin: 14px 0 12px; color: #5f5851; font-size: 11px; line-height: 1.65; }
.capability-row { display: flex; flex-wrap: wrap; gap: 6px; }
.capability-row span { padding: 5px 8px; color: var(--sage); border-radius: 999px; background: #edf3ee; font-size: 9px; }
.capability-row span.blocked { color: #9a4d3d; background: #fce4de; }
.channel-action { display: flex; justify-content: space-between; width: 100%; margin-top: 13px; padding: 10px 0 0; color: var(--ink); border: 0; border-top: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; font-size: 11px; font-weight: 750; }
.channel-action span { color: var(--accent-dark); transition: transform 180ms ease; }
.channel-action[aria-expanded="true"] span { transform: rotate(90deg); }
.channel-detail { margin-top: 11px; padding: 11px; color: var(--muted); border-radius: 13px; background: rgba(244, 239, 232, 0.86); font-size: 10px; line-height: 1.6; animation: enter 200ms var(--ease) both; }
.channel-detail strong { color: var(--ink); }
.channel-detail p { margin: 4px 0 0; }
.endpoint-preview { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 12px 0; padding: 9px 10px; border-radius: 11px; background: #292622; }
.endpoint-preview span { flex: 0 0 auto; color: #ffc5b8; font-size: 9px; font-weight: 800; }
.endpoint-preview code { min-width: 0; overflow: hidden; color: #f4efe8; font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.routing-strip { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; margin-top: 14px; padding: 15px; border-radius: 19px; background: #26231f; }
.routing-strip > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; color: white; }
.routing-strip div > span { grid-row: 1 / 3; display: grid; width: 29px; height: 29px; place-items: center; color: #ffc5b8; border: 1px solid rgba(255,255,255,.13); border-radius: 10px; font-size: 9px; }
.routing-strip strong { font-size: 10px; }
.routing-strip small { color: #aaa29a; font-size: 8px; }
.routing-strip > i { color: #777068; font-style: normal; }
.integrations-footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 14px; padding: 0 2px; }
.integrations-footer p { margin: 0; color: var(--muted); font-size: 10px; }
.integrations-footer a { flex: 0 0 auto; color: var(--accent-dark); font-size: 10px; font-weight: 750; text-decoration: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 30; max-width: min(360px, calc(100vw - 32px)); padding: 12px 15px; color: white; border-radius: 14px; background: #292521; box-shadow: var(--shadow-raised); font-size: 12px; animation: enter 220ms var(--ease) both; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes wave { from { height: 5px; } to { height: 17px; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes brand-intro-exit {
  0%, 72% { opacity: 1; visibility: visible; }
  88%, 99.9% { opacity: 0; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (min-width: 961px) {
  .app-shell[data-active-view="agent"] .workspace { height: calc(100vh - 48px); min-height: 0; padding: 14px 0 0; overflow: hidden; }
  #agent-view { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-height: 0; }
  #agent-view .conversation { min-height: 0; padding: 0 6px var(--space-lg); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
  #agent-view .composer { position: static; }
}

@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr) 264px; gap: 20px; }
  .identity-rail { align-items: center; padding-inline: 11px; }
  .brand { width: 62px; }
  .brand-logo-viewport { width: 62px; }
  .brand-logo { width: 62px; }
  .profile > div:last-child, .nav-item > span:last-child, .rail-note { display: none; }
  .profile { margin: 22px 0 28px; }
  .nav-item { justify-content: center; padding: 12px; }
  .people-layout { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .app-shell { display: block; width: min(calc(100% - 32px), 840px); padding: 16px 0 calc(108px + env(safe-area-inset-bottom)); }
  .identity-rail, .agenda-rail { display: none; }
  .workspace { min-height: calc(100vh - 124px); padding-top: 6px; padding-bottom: 150px; }
  #agent-view { min-height: calc(100vh - 124px); }
  .app-shell[data-active-view="schedule"] .workspace,
  .app-shell[data-active-view="people"] .workspace { grid-column: auto; }
  .composer { position: fixed; right: 14px; bottom: calc(82px + env(safe-area-inset-bottom)); left: 14px; }
  .mobile-nav { position: fixed; right: 14px; bottom: max(12px, env(safe-area-inset-bottom)); left: 14px; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border-radius: 20px; }
  .mobile-nav button { display: grid; gap: 2px; place-items: center; padding: 5px; color: var(--muted); border: 0; border-radius: 13px; background: transparent; }
  .mobile-nav button.is-active { color: var(--accent-dark); background: var(--accent-soft); }
  .mobile-nav span { font-size: 17px; }
  .mobile-nav small { font-size: 9px; }
  .detail-view { padding-bottom: 10px; }
  .schedule-event { grid-template-columns: 68px 48px minmax(0, 1fr); }
  .schedule-event .event-members { grid-column: 3; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .app-shell { width: calc(100% - 24px); padding-top: 12px; }
  .workspace-header { display: block; padding: 0 2px; }
  .workspace-header h1 { font-size: 31px; }
  .workspace-header p:last-child { max-width: 320px; font-size: 12px; line-height: 1.55; }
  .family-badge { position: absolute; top: 4px; right: 0; padding: 7px; }
  .family-badge > span:last-child { display: none; }
  .date-strip { gap: 4px; margin: 24px 0 24px; }
  .date-strip button { min-height: 58px; border-radius: 14px; }
  .date-strip strong { font-size: 16px; }
  .intro-message .message-body { max-width: calc(100% - 44px); }
  .message-body { padding: 13px 14px; }
  .message-body p { font-size: 13px; }
  .suggestions { display: grid; }
  .responsibility-suggestion-card { width: calc(100vw - 56px); }
  .draft-card { width: calc(100vw - 56px); }
  .draft-top { padding: 15px; }
  .draft-card h3 { font-size: 17px; }
  .draft-time strong { font-size: 21px; }
  .draft-details { grid-template-columns: 1fr; }
  .draft-detail { display: grid; grid-template-columns: 72px minmax(0,1fr); align-items: center; padding: 10px 14px; }
  .draft-detail span { margin: 0; }
  .composer-hint { display: none; }
  .send-button { margin-left: auto; }
  .composer { bottom: calc(82px + env(safe-area-inset-bottom)); }
  .toast { right: 16px; bottom: calc(150px + env(safe-area-inset-bottom)); }
  .page-header { display: grid; gap: 15px; align-items: start; padding: 0 2px; }
  .page-header h1 { font-size: 32px; }
  .page-header p:last-child { font-size: 11px; }
  .primary-page-action { width: 100%; justify-content: space-between; }
  .summary-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
  .summary-card { padding: 16px 18px; }
  .summary-card strong { font-size: 25px; }
  .schedule-panel, .people-panel, .receipts-panel { padding: 20px; border-radius: 26px; }
  .filter-bar { grid-template-columns: 1fr; gap: 14px; }
  .member-filter > div { flex-wrap: nowrap; margin: 0 -2px; padding: 2px 2px 7px; overflow-x: auto; scrollbar-width: thin; }
  .member-filter button { flex: 0 0 auto; }
  .schedule-event { grid-template-columns: 55px minmax(0, 1fr); gap: 8px 12px; min-height: 0; padding: 16px; }
  .schedule-event .event-day { grid-column: 1; }
  .schedule-event time { grid-column: 1; grid-row: 2; }
  .schedule-event .event-copy { grid-column: 2; grid-row: 1 / 3; }
  .schedule-event .event-members { grid-column: 2; }
  .demo-truth { align-items: flex-start; margin-top: 20px; padding: 16px; }
  .people-layout { grid-template-columns: minmax(0, 1fr); }
  .notification-receipt { grid-template-columns: 9px minmax(0, 1fr); }
  .notification-receipt time { grid-column: 2; }
  .integrations-dialog { width: 100%; max-height: calc(100vh - 18px); margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .integrations-shell { max-height: calc(100vh - 18px); padding: 20px 14px 26px; }
  .integrations-header { gap: 12px; }
  .integrations-header h2 { font-size: 28px; }
  .integrations-header > div > p:last-child { font-size: 11px; }
  .connection-summary span:last-child { flex-basis: 100%; }
  .channel-grid { grid-template-columns: 1fr; }
  .channel-card { padding: 15px; }
  .channel-copy { min-height: 0; }
  .routing-strip { grid-template-columns: 1fr; }
  .routing-strip > i { display: none; }
  .integrations-footer { display: block; }
  .integrations-footer a { display: inline-block; margin-top: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-intro { display: none; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
