:root {
  --bg: #0b0b0d;
  --surface: #131316;
  --surface-raised: #19191d;
  --surface-soft: #202025;
  --line: #29292f;
  --line-strong: #3a393f;
  --text: #f5f2eb;
  --muted: #9d9aa2;
  --muted-2: #74727a;
  --gold: #d6b778;
  --gold-soft: #ead8ae;
  --gold-ink: #1c160a;
  --safe: #8fd0a4;
  --warning: #e1b56f;
  --danger: #ef7e86;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --header-height: 60px;
  --nav-height: 70px;
  --viewport-height: 100dvh;
  --content-max: 980px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(214, 183, 120, 0.09), transparent 27rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button,
a,
input,
textarea,
select {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.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;
}

.network-banner,
.update-banner {
  position: fixed;
  z-index: 100;
  top: env(safe-area-inset-top, 0);
  left: 50%;
  width: min(calc(100% - 24px), 640px);
  min-height: 44px;
  padding: 9px 10px 9px 16px;
  border: 1px solid #574a34;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
  color: #f3dfb7;
  background: rgba(45, 37, 24, 0.97);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.update-banner {
  border-color: #4c4b39;
  color: var(--text);
  background: rgba(28, 28, 24, 0.98);
}

.network-banner button,
.update-banner button {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 9px;
  color: var(--gold-ink);
  background: var(--gold);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.login-screen {
  min-height: var(--viewport-height);
  padding:
    calc(52px + env(safe-area-inset-top, 0))
    18px
    calc(34px + env(safe-area-inset-bottom, 0));
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.login-glow {
  position: absolute;
  top: -15vw;
  left: 50%;
  width: min(90vw, 720px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 183, 120, 0.13), transparent 65%);
  pointer-events: none;
}

.login-card {
  width: min(100%, 620px);
  position: relative;
  padding: clamp(26px, 7vw, 48px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(145deg, rgba(24, 24, 28, 0.96), rgba(13, 13, 15, 0.98));
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.38);
}

.login-logo {
  width: 136px;
  height: auto;
  margin-bottom: 36px;
  object-fit: contain;
}

.kicker,
.screen-kicker,
.section-label {
  color: var(--gold);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.login-card h1 {
  max-width: 500px;
  margin: 11px 0 20px;
  font-size: clamp(40px, 10vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-copy {
  max-width: 510px;
  margin-bottom: 34px;
  color: #c6c2bc;
  font-size: clamp(15px, 3.5vw, 18px);
  line-height: 1.7;
}

#login-form label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.login-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
}

.login-fields input,
.decision-dialog input,
.decision-dialog textarea {
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  background: #0c0c0f;
}

.login-fields input {
  padding: 0 15px;
}

.login-fields button,
#decision-submit {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  color: var(--gold-ink);
  background: var(--gold);
  font-weight: 800;
}

.manual-bridge-banner {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 208, 164, 0.26);
  border-radius: 14px;
  background: rgba(58, 104, 72, 0.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manual-bridge-banner strong {
  margin: 4px 0 3px;
  display: block;
  font-size: 12px;
}

.manual-bridge-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.manual-bridge-state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(143, 208, 164, 0.32);
  border-radius: 999px;
  color: var(--safe);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.manual-bridge-state.needs-input {
  border-color: rgba(225, 181, 111, 0.35);
  color: var(--warning);
}

.manual-bridge-state.complete {
  color: var(--gold-soft);
}

.manual-processing-card {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-raised);
}

.manual-processing-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manual-processing-card strong {
  font-size: 11px;
}

.manual-processing-card time {
  color: var(--muted-2);
  font-size: 9px;
}

.manual-processing-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.manual-processing-card[data-display-state="需要你补充信息"] {
  border-color: rgba(225, 181, 111, 0.34);
}

.manual-processing-card[data-display-state="处理完成"] {
  border-color: rgba(143, 208, 164, 0.34);
}

.presence-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(214, 183, 120, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(30, 27, 22, 0.96), rgba(17, 17, 21, 0.98));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.presence-heading,
.manual-transcript-actions,
.setting-subheading,
.voice-output-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.presence-heading h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.presence-state,
.module-status {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(143, 208, 164, 0.35);
  border-radius: 999px;
  color: var(--safe);
  background: rgba(48, 99, 65, 0.11);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.presence-state.disabled,
.module-status.disabled {
  border-color: var(--line-strong);
  color: var(--muted);
  background: var(--surface);
}

.presence-state.listening {
  border-color: rgba(239, 126, 134, 0.5);
  color: #ffb1b7;
  background: rgba(111, 39, 46, 0.18);
  box-shadow: 0 0 0 4px rgba(239, 126, 134, 0.06);
}

.presence-state.quiet,
.presence-state.dormant {
  border-color: rgba(225, 181, 111, 0.35);
  color: var(--warning);
}

.presence-boundary {
  margin: 10px 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.voice-wake-panel {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 10, 13, 0.72);
}

.voice-wake-button {
  width: 100%;
  min-height: 62px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text);
  text-align: left;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  gap: 13px;
}

.voice-wake-button:not(:disabled):hover {
  border-color: var(--gold);
}

.voice-wake-button strong,
.voice-wake-button small {
  display: block;
}

.voice-wake-button strong {
  font-size: 13px;
}

.voice-wake-button small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.voice-wake-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(214, 183, 120, 0.44);
  border-radius: 50%;
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 9px;
}

.listening-controls {
  min-height: 62px;
  padding: 9px 12px;
  border: 1px solid rgba(239, 126, 134, 0.38);
  border-radius: 13px;
  background: rgba(87, 31, 37, 0.13);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.listening-controls strong,
.listening-controls time {
  display: block;
}

.listening-controls strong {
  color: #ffd0d4;
  font-size: 12px;
}

.listening-controls time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.listening-controls button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(239, 126, 134, 0.38);
  border-radius: 10px;
  color: #ffd0d4;
  background: rgba(112, 38, 46, 0.18);
  font-size: 10px;
}

.listening-signal {
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.listening-signal i {
  width: 3px;
  height: 11px;
  border-radius: 999px;
  background: var(--danger);
  animation: voice-level 0.8s ease-in-out infinite alternate;
}

.listening-signal i:nth-child(2) {
  height: 24px;
  animation-delay: 0.18s;
}

.listening-signal i:nth-child(3) {
  height: 16px;
  animation-delay: 0.34s;
}

@keyframes voice-level {
  to {
    transform: scaleY(0.45);
    opacity: 0.55;
  }
}

.voice-privacy-note {
  margin: 9px 1px 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.5;
}

.third-party-voice-boundary {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 9px;
  line-height: 1.5;
}

.third-party-voice-boundary input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--gold);
}

.manual-transcript {
  margin-top: 11px;
}

.manual-transcript label,
.attention-window-form label,
.life-constitution-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.manual-transcript textarea,
.attention-window-form input,
.attention-window-form select,
.role-correction select,
.role-create-form input,
.role-create-form select,
.life-constitution-form input,
.life-constitution-form textarea,
.setting-row select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--text);
  background: #0c0c0f;
}

.manual-transcript textarea,
.life-constitution-form textarea {
  min-height: 76px;
  padding: 11px 12px;
  resize: vertical;
  line-height: 1.55;
}

.manual-transcript-actions {
  margin-top: 8px;
}

.manual-transcript-actions span {
  color: var(--muted-2);
  font-size: 9px;
}

.manual-transcript-actions button,
.attention-window-form button,
.role-correction button,
.role-create-form button,
.life-constitution-form button,
.voice-output-actions button,
.presence-action-row button,
.life-actions button,
.setting-subheading button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 750;
}

.manual-transcript-actions button,
.attention-window-form button,
.life-constitution-form button {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: var(--gold);
}

.attention-window-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  align-items: end;
  gap: 8px;
}

.attention-window-form input,
.attention-window-form select,
.life-constitution-form input,
.role-create-form input,
.role-create-form select,
.setting-row select {
  min-height: 42px;
  padding: 0 11px;
}

.duration-field span {
  display: block;
}

.attention-window-state {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.presence-context-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.presence-context-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(17, 17, 21, 0.8);
}

.presence-context-grid article > span,
.life-summary span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.presence-context-grid article > strong {
  margin-top: 7px;
  display: block;
  font-size: 12px;
}

.presence-context-grid ul {
  margin: 7px 0 0;
  padding-left: 15px;
  color: #ccc8c0;
  font-size: 10px;
  line-height: 1.55;
}

.role-correction {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.role-correction select {
  min-width: 0;
  min-height: 36px;
  padding: 0 8px;
  font-size: 10px;
}

.presence-action-row,
.voice-output-actions,
.life-actions {
  padding: 11px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.select-setting select {
  width: min(190px, 46%);
}

.range-setting input {
  width: min(190px, 46%);
  accent-color: var(--gold);
}

.voice-output-actions {
  justify-content: flex-end;
}

.setting-subsection {
  padding: 15px 16px;
  border-top: 1px solid var(--line);
}

.setting-subsection > strong,
.setting-subheading strong {
  font-size: 12px;
}

.setting-subsection p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.setting-subheading button {
  min-height: 30px;
  padding: 0 9px;
}

.presence-history {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.presence-history p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.presence-history-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101013;
}

.presence-history-item > div {
  display: flex;
  justify-content: space-between;
  gap: 9px;
}

.presence-history-item strong {
  font-size: 10px;
}

.presence-history-item time {
  color: var(--muted-2);
  font-size: 9px;
}

.presence-history-item small {
  margin-top: 5px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.presence-history-item .presence-forget-action {
  margin-top: 8px;
  min-height: 30px;
  padding: 0 9px;
  border-color: rgba(255, 128, 128, 0.35);
  color: #ffc5c5;
  font-size: 9px;
}

.module-empty,
.module-reason {
  margin: 0;
  padding: 15px 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.role-list {
  display: grid;
}

.role-list article {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.role-list article:last-child {
  border-bottom: 0;
}

.role-list article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.role-list h3 {
  margin: 0;
  font-size: 12px;
}

.role-list p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.role-list span {
  color: var(--gold);
  font-size: 9px;
  font-weight: 750;
}

.role-create-form {
  margin-top: 9px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.role-create-form label {
  margin: 0 0 6px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.role-create-form > div {
  min-width: 0;
}

.role-create-form input,
.role-create-form select {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
}

.role-create-form button {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: var(--gold);
}

.life-summary {
  padding: 15px 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.life-summary > div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101013;
}

.life-summary strong {
  margin-top: 6px;
  display: block;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.life-constitution-form {
  padding: 15px 16px;
  border-top: 1px solid var(--line);
}

.life-constitution-form input,
.life-constitution-form textarea {
  margin-bottom: 11px;
}

.life-constitution-form button {
  width: 100%;
}

.life-actions button[data-life-action="terminate"] {
  border-color: rgba(239, 126, 134, 0.38);
  color: #ffb1b7;
}

.life-actions button[data-life-action="delete_data"],
.life-actions button[data-life-action="finalize_termination"] {
  border-color: rgba(239, 126, 134, 0.38);
  color: #ffb1b7;
}

.control-room-link {
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.form-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.boundary-strip {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.boundary-strip span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 10px;
}

.app-shell {
  min-height: var(--viewport-height);
}

.app-header {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + env(safe-area-inset-top, 0));
  padding:
    env(safe-area-inset-top, 0)
    max(16px, env(safe-area-inset-right, 0))
    0
    max(16px, env(safe-area-inset-left, 0));
  border-bottom: 1px solid rgba(41, 41, 47, 0.8);
  background: rgba(11, 11, 13, 0.88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-button {
  min-height: 44px;
  padding: 0;
  color: var(--text);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-button img {
  width: 48px;
  height: 27px;
  object-fit: contain;
}

.brand-button strong {
  font-size: 12px;
  letter-spacing: 0.16em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(23, 23, 27, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
}

.status-pill i,
.composer-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 10px currentColor;
}

.status-pill.online i,
.composer-state i {
  color: var(--safe);
  background: var(--safe);
}

.status-pill.paused i {
  color: var(--danger);
  background: var(--danger);
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  display: grid;
  place-items: center;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.app-main {
  min-height: var(--viewport-height);
  padding:
    calc(var(--header-height) + env(safe-area-inset-top, 0))
    0
    calc(var(--nav-height) + env(safe-area-inset-bottom, 0));
}

.screen {
  display: none;
  min-height: calc(var(--viewport-height) - var(--header-height) - var(--nav-height));
}

.screen.active {
  display: block;
}

.screen-inner {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 30px 16px 58px;
}

.now-hero {
  padding: 12px 2px 30px;
}

.date-line {
  margin-bottom: 9px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 750;
}

.now-hero h1,
.page-header h1,
.talk-header h1,
.profile-header h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 8vw, 54px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.now-hero > p:last-child,
.page-header > div > p:last-child,
.profile-header > div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.focus-card {
  padding: 22px;
  border: 1px solid #403a2c;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(214, 183, 120, 0.13), transparent 15rem),
    linear-gradient(145deg, #1c1a17, #151518 72%);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.text-button,
.subtle-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #d1cec8;
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.text-button {
  border-color: transparent;
  color: var(--gold-soft);
  background: transparent;
}

.focus-list {
  display: grid;
  gap: 10px;
}

.focus-item {
  padding: 15px 16px;
  border: 1px solid rgba(214, 183, 120, 0.18);
  border-radius: 14px;
  background: rgba(7, 7, 8, 0.24);
}

.focus-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.focus-item p {
  margin: 0;
  color: #aaa69e;
  font-size: 12px;
  line-height: 1.55;
}

.daily-stats {
  margin: 14px 0 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.daily-stats > * {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.daily-stats span {
  color: var(--muted);
  font-size: 10px;
}

.daily-stats strong {
  font-size: 20px;
}

.content-section,
.settings-group,
.audit-summary {
  margin-top: 34px;
}

.quiet-indicator,
.count-badge {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
}

.card-stack {
  display: grid;
  gap: 11px;
}

.empty-card,
.data-card,
.suggestion-card,
.task-card,
.approval-card,
.memory-card,
.reflection-card,
.session-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty-card {
  min-height: 92px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 12px;
}

.card-topline {
  margin-bottom: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-eyebrow,
.status-chip,
.source-chip {
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.status-chip,
.source-chip {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  letter-spacing: 0;
}

.status-chip.active,
.status-chip.confirmed {
  color: var(--safe);
  border-color: rgba(143, 208, 164, 0.3);
}

.status-chip.pending,
.status-chip.candidate,
.status-chip.draft {
  color: var(--warning);
  border-color: rgba(225, 181, 111, 0.3);
}

.card-stack h3 {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.45;
}

.card-stack p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.reflection-card.historical {
  border-style: dashed;
  background: #101013;
}

.reflection-card.historical h3 {
  color: #c0bdb7;
}

.reflection-card.historical .status-chip {
  color: var(--muted);
}

.card-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--muted-2);
  background: var(--surface-soft);
  font-size: 9px;
}

.card-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #d5d2cc;
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 700;
}

.card-actions button.primary {
  border-color: transparent;
  color: var(--gold-ink);
  background: var(--gold);
}

.card-actions button.danger {
  color: var(--danger);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-grid button {
  min-height: 126px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  text-align: left;
  display: flex;
  flex-direction: column;
}

.quick-icon {
  width: 30px;
  height: 30px;
  margin-bottom: 18px;
  border-radius: 9px;
  color: var(--gold);
  background: rgba(214, 183, 120, 0.11);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 850;
}

.quick-grid strong {
  margin-bottom: 6px;
  font-size: 13px;
}

.quick-grid small {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

.talk-screen.active {
  height: calc(var(--viewport-height) - var(--header-height) - var(--nav-height) - env(safe-area-inset-top, 0) - env(safe-area-inset-bottom, 0));
  overflow: hidden;
}

.talk-layout {
  width: min(100%, var(--content-max));
  height: 100%;
  margin: 0 auto;
  padding: 22px 16px 12px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.talk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 14px;
}

.talk-header h1 {
  margin: 4px 0 4px;
  font-size: clamp(26px, 7vw, 42px);
}

.talk-header p:last-child {
  margin-bottom: 0;
  color: var(--muted-2);
  font-size: 10px;
}

.prompt-chips {
  min-width: 0;
  padding: 0 0 12px;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.prompt-chips::-webkit-scrollbar {
  display: none;
}

.prompt-chips button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b5b1aa;
  background: var(--surface);
  font-size: 10px;
  white-space: nowrap;
}

.conversation {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 18px 2px 26px;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.conversation-empty {
  min-height: 100%;
  padding: 44px 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.conversation-empty img {
  width: 128px;
  margin-bottom: 26px;
  opacity: 0.74;
}

.conversation-empty h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.conversation-empty p {
  max-width: 340px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.message {
  width: fit-content;
  max-width: min(86%, 720px);
  margin-bottom: 19px;
}

.message.user {
  margin-left: auto;
  padding: 13px 15px;
  border-radius: 17px 17px 4px 17px;
  background: #28272b;
}

.message.nowhere {
  margin-right: auto;
}

.message-author {
  margin-bottom: 7px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.15em;
}

.message.user .message-author {
  display: none;
}

.message > p {
  margin: 0;
  color: #e0ddd7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.7;
}

.message-card {
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-color: var(--gold);
  border-radius: 5px 13px 13px 5px;
  background: var(--surface);
}

.message-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.message-card p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.55;
}

.message-actions {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.message-actions button {
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #d6d2cc;
  background: var(--surface-raised);
  text-align: left;
  font-size: 11px;
}

.message-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-explain {
  margin-top: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(19, 19, 22, 0.72);
  font-size: 10px;
}

.message-explain summary {
  min-height: 40px;
  color: #bcb8b1;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-weight: 700;
  list-style: none;
}

.message-explain summary::-webkit-details-marker {
  display: none;
}

.message-explain summary::after {
  content: "＋";
  margin-left: auto;
  color: var(--gold);
}

.message-explain[open] summary::after {
  content: "－";
}

.message-explain p {
  margin: 0 0 10px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.6;
}

.understanding-section {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.understanding-section strong {
  display: block;
  margin-bottom: 7px;
  color: #d7d2ca;
  font-size: 10px;
}

.understanding-section ul {
  margin: 0;
  padding-left: 17px;
  color: var(--muted);
  line-height: 1.65;
}

.understanding-section button {
  min-height: 34px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--gold-soft);
  background: var(--surface-raised);
  font-size: 10px;
}

.message-safety {
  color: var(--muted-2);
  font-size: 9px;
}

.feedback-group {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.feedback-group button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted-2);
  background: transparent;
  font-size: 13px;
}

.feedback-group button:hover {
  border-color: var(--line);
  color: var(--text);
}

.thinking-message {
  padding: 8px 0;
}

.thinking-dots {
  display: flex;
  gap: 5px;
}

.thinking-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: thinking 1s ease-in-out infinite;
}

.thinking-dots i:nth-child(2) {
  animation-delay: 140ms;
}

.thinking-dots i:nth-child(3) {
  animation-delay: 280ms;
}

@keyframes thinking {
  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.send-error {
  margin: 0 0 8px;
  padding: 9px 10px 9px 13px;
  border: 1px solid rgba(239, 126, 134, 0.3);
  border-radius: 11px;
  color: #eeb2b7;
  background: rgba(73, 28, 32, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.send-error button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text);
  background: #4e292e;
  font-size: 10px;
}

.composer {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #101012;
  box-shadow: 0 -14px 34px rgba(11, 11, 13, 0.38);
  overflow: hidden;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  max-height: 160px;
  padding: 14px 15px 8px;
  resize: none;
  border: 0;
  color: var(--text);
  background: transparent;
  line-height: 1.5;
}

.composer textarea::placeholder {
  color: #6f6d74;
}

.composer-row {
  min-height: 48px;
  padding: 5px 6px 5px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-state {
  min-width: 0;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
}

.composer-state span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#send-button {
  min-width: 76px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 11px;
  color: var(--gold-ink);
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 850;
}

#send-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.page-header {
  padding: 11px 2px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-header h1 {
  margin: 5px 0 8px;
}

.task-filter {
  margin: -3px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0e0e10;
  display: flex;
  gap: 4px;
}

.task-filter button {
  min-height: 34px;
  flex: 1;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.task-filter button.active {
  color: var(--text);
  background: var(--surface-soft);
}

.task-progress {
  height: 4px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.task-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.section-note {
  margin: -7px 0 15px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.65;
}

.memory-summary {
  margin: 20px 0 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.memory-summary > div {
  min-height: 76px;
  padding: 12px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.memory-summary > div:last-child {
  border-right: 0;
}

.memory-summary span {
  color: var(--muted);
  font-size: 9px;
}

.memory-summary strong {
  font-size: 16px;
}

.evidence-list {
  margin: 13px 0 0;
  padding: 12px;
  border-radius: 11px;
  background: #0e0e10;
}

.evidence-list strong {
  display: block;
  margin-bottom: 7px;
  color: #c8c4bd;
  font-size: 10px;
}

.evidence-list ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.profile-header {
  padding: 11px 2px 16px;
  display: flex;
  align-items: center;
  gap: 17px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 1px solid rgba(214, 183, 120, 0.36);
  border-radius: 21px;
  color: var(--gold);
  background: rgba(214, 183, 120, 0.09);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
}

.profile-header h1 {
  margin: 4px 0 4px;
  font-size: 30px;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.setting-row,
.setting-action {
  width: 100%;
  min-height: 70px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.setting-row:last-child,
.setting-action:last-child {
  border-bottom: 0;
}

.setting-row > span:first-child,
.setting-action > span:first-child {
  min-width: 0;
}

.setting-row strong,
.setting-action strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.setting-row small,
.setting-action small {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.4;
}

.setting-row input[type="checkbox"] {
  width: 46px;
  height: 27px;
  flex: 0 0 auto;
  margin: 0;
  appearance: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #25252a;
  position: relative;
  transition: background 150ms ease;
}

.setting-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #8d8a91;
  transition: transform 150ms ease, background 150ms ease;
}

.setting-row input[type="checkbox"]:checked {
  border-color: var(--gold);
  background: var(--gold);
}

.setting-row input[type="checkbox"]:checked::after {
  background: #211c13;
  transform: translateX(19px);
}

.safe-value {
  flex: 0 0 auto;
  color: var(--safe);
  font-size: 10px;
  font-weight: 800;
}

.setting-action > span:last-child {
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 24px;
  font-weight: 300;
}

.danger-text strong,
.danger-text > span:last-child {
  color: var(--danger);
}

.connection-list:empty {
  display: none;
}

.connection-row {
  min-height: 50px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.connection-row span {
  color: var(--muted);
  font-size: 11px;
}

.connection-row strong {
  color: var(--warning);
  font-size: 9px;
}

.connection-row strong[data-live="true"] {
  color: var(--safe);
}

.audit-summary {
  padding-bottom: 30px;
}

.audit-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.audit-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--safe);
}

.audit-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
}

.audit-item small {
  color: var(--muted-2);
  font-size: 9px;
}

.version-row {
  padding: 18px 0 0;
  color: var(--muted-2);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
}

.version-row strong {
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0));
  padding:
    6px
    max(8px, env(safe-area-inset-right, 0))
    env(safe-area-inset-bottom, 0)
    max(8px, env(safe-area-inset-left, 0));
  border-top: 1px solid rgba(41, 41, 47, 0.88);
  background: rgba(13, 13, 15, 0.93);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bottom-nav button {
  min-width: 0;
  min-height: 56px;
  padding: 4px;
  border-radius: 13px;
  color: var(--muted-2);
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.bottom-nav button.active {
  color: var(--gold);
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav span {
  font-size: 9px;
  font-weight: 700;
}

.nav-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 8px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--bg);
  border-radius: 999px;
  color: white !important;
  background: #9d3942;
  display: grid;
  place-items: center;
  font-size: 8px !important;
}

dialog {
  color: var(--text);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.67);
  backdrop-filter: blur(4px);
}

.sheet-dialog {
  width: min(100%, 680px);
  max-height: min(82dvh, 760px);
  margin: auto auto 0;
  padding: 8px 0 calc(16px + env(safe-area-inset-bottom, 0));
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  background: #111114;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 11px;
  border-radius: 99px;
  background: var(--line-strong);
}

.sheet-dialog header,
.decision-dialog header {
  padding: 10px 18px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.sheet-dialog h2,
.decision-dialog h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.sheet-body {
  max-height: 62dvh;
  padding: 14px 16px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
}

.decision-dialog,
.confirm-dialog {
  width: min(calc(100% - 28px), 520px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #121215;
}

.decision-dialog form,
.confirm-dialog form {
  padding: 0 18px 18px;
}

.decision-dialog header {
  margin: 0 -18px 16px;
}

.decision-dialog > form > p,
.confirm-dialog p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.decision-dialog label {
  display: block;
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 10px;
}

.decision-dialog textarea,
.decision-dialog input {
  width: 100%;
  padding: 12px;
  resize: vertical;
}

.confirm-dialog form {
  padding-top: 22px;
}

.confirm-dialog h2 {
  font-size: 20px;
}

.dialog-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.dialog-actions button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 750;
}

.danger-button {
  color: white;
  background: #8d3840;
}

.toast-region {
  position: fixed;
  z-index: 150;
  left: 50%;
  bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0) + 18px);
  width: min(calc(100% - 28px), 440px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: rgba(32, 32, 37, 0.96);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.34);
  font-size: 11px;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-color: rgba(239, 126, 134, 0.42);
  color: #f3b7bc;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.top-progress {
  position: fixed;
  z-index: 200;
  top: 0;
  left: 0;
  width: 42%;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 14px var(--gold);
  animation: progress 1.1s ease-in-out infinite;
}

@keyframes progress {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(340%);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #242329;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.3s infinite;
}

.skeleton-line {
  width: 100%;
  height: 45px;
}

.skeleton-line.short {
  width: 68%;
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

body.keyboard-open .bottom-nav {
  display: none;
}

body.keyboard-open .app-main {
  padding-bottom: 0;
}

body.keyboard-open .talk-screen.active {
  height: calc(var(--viewport-height) - var(--header-height) - env(safe-area-inset-top, 0));
}

body.keyboard-open .toast-region {
  bottom: 16px;
}

@media (min-width: 720px) {
  :root {
    --header-height: 68px;
    --nav-height: 76px;
  }

  .app-header {
    padding-left: 28px;
    padding-right: 28px;
  }

  .brand-button img {
    width: 58px;
    height: 32px;
  }

  .screen-inner {
    padding: 46px 28px 80px;
  }

  .focus-card {
    padding: 28px;
  }

  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .talk-layout {
    padding: 32px 28px 20px;
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    bottom: 14px;
    width: min(calc(100% - 32px), 580px);
    height: var(--nav-height);
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 22px;
    transform: translateX(-50%);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  }

  .toast-region {
    bottom: calc(var(--nav-height) + 28px);
  }
}

@media (max-width: 560px) {
  .login-fields {
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .login-fields button {
    width: 100%;
  }

  .status-pill {
    max-width: 108px;
  }

  .status-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .page-header {
    align-items: flex-end;
  }

  .page-header > div > p:last-child {
    max-width: 270px;
  }

  .message {
    max-width: 92%;
  }

  .card-actions button {
    flex: 1 1 auto;
  }

  .composer-state {
    max-width: 185px;
  }

  .manual-bridge-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .attention-window-form {
    grid-template-columns: 1fr 108px;
  }

  .attention-window-form > button {
    grid-column: 1 / -1;
  }

  .presence-context-grid {
    grid-template-columns: 1fr;
  }

  .listening-controls {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .listening-controls button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .manual-transcript-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-transcript-actions button {
    width: 100%;
  }

  .life-summary {
    grid-template-columns: 1fr;
  }

  .role-create-form {
    grid-template-columns: 1fr;
  }

  .select-setting,
  .range-setting {
    align-items: flex-start;
    flex-direction: column;
  }

  .select-setting select,
  .range-setting input {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .screen-inner,
  .talk-layout {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
