:root {
  --bg: #f7f1e8;
  --bg-soft: #fcf8f3;
  --panel: #fffdf9;
  --line: rgba(112, 88, 56, 0.16);
  --text: #241d16;
  --muted: #6c6051;
  --accent: #a17641;
  --accent-dark: #76552d;
  --accent-soft: rgba(161, 118, 65, 0.12);
  --shadow: 0 20px 48px rgba(44, 28, 8, 0.09);
  --chat-header-offset: 64px;
  --font-ui: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "Prata", "Cormorant Garamond", "Georgia", serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  height: 100%;
  font-size: 100%;
}

body {
  margin: 0;
  min-height: var(--app-height, 100dvh);
  background:
    radial-gradient(780px 320px at 100% 0%, rgba(161, 118, 65, 0.12), transparent 66%),
    linear-gradient(180deg, #f8f3eb 0%, #efe7db 100%);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-variant-numeric: proportional-nums lining-nums;
  font-feature-settings: "tnum" 0, "lnum" 1;
}

body.chat-layout-active {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.button,
.axon-toolbar-button,
.message-menu-action,
.step-back-button,
.admin-user-action,
.admin-user-fixed,
.status-pill {
  white-space: normal;
  text-align: center;
}

.page-title,
.auth-card h1,
.panel h2,
.section-head h2,
.detail-panel h3,
.module-copy strong,
.homework-card-head strong,
.admin-user-head strong,
.axon-history-head strong,
.chat-notice-open strong,
.chat-notice-body strong {
  overflow-wrap: anywhere;
}

.auth-field,
.textarea-field,
.composer,
.composer-editbar,
.composer-replybar,
.composer-filebar,
.composer-replycopy,
.composer-filecopy,
.homework-sheet-head,
.homework-sheet-block,
.homework-submit-panel,
.homework-sheet-meta,
.homework-answer-field,
.homework-reply,
.review-submission,
.review-answer-block,
.review-form {
  min-width: 0;
  max-width: 100%;
}

.auth-field input,
.admin-select,
.textarea-field textarea,
.composer textarea {
  min-width: 0;
  max-width: 100%;
}

.composer-replycopy span,
.composer-filecopy strong,
.composer-filecopy span,
.homework-form-note,
.homework-note,
.homework-copy,
.homework-reply p,
.review-submission p,
.review-answer-block p {
  overflow-wrap: anywhere;
}

.page {
  width: min(100% - 24px, 860px);
  margin: 0 auto;
  min-height: var(--app-height, 100dvh);
  padding: max(12px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom));
}

body.chat-layout-active .page {
  height: var(--app-height, 100dvh);
  overflow: hidden;
  padding-bottom: 0;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 32px);
}

.auth-card {
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 252, 246, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.1rem);
  line-height: 1.02;
  font-weight: 400;
}

.auth-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field span {
  font-size: 0.875rem;
  font-weight: 800;
}

.auth-field small {
  color: rgba(101, 90, 77, 0.74);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.auth-field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(108, 84, 51, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: max(16px, 1rem);
}

.auth-field input:focus,
.composer textarea:focus {
  outline: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--accent);
  color: #fffaf1;
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
}

.button[disabled] {
  opacity: 0.72;
  cursor: wait;
}

.button.secondary {
  background: rgba(255, 252, 247, 0.96);
  color: var(--accent-dark);
  border-color: rgba(161, 118, 65, 0.22);
  box-shadow: 0 8px 18px rgba(44, 28, 8, 0.04);
}

.button.ghost {
  background: rgba(255, 250, 242, 0.74);
  color: rgba(78, 66, 53, 0.9);
  border-color: rgba(108, 84, 51, 0.12);
}

.auth-status {
  min-height: 20px;
  margin: 0;
  color: #9a4d34;
  font-size: 0.875rem;
  line-height: 1.4;
}

.app-shell {
  min-height: var(--app-height, 100dvh);
}

.app-shell.route-chat,
.app-shell.route-axon,
.app-shell.route-admin-chat {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.app-shell.route-chat,
.app-shell.route-axon,
.app-shell.route-admin-chat {
  padding-top: 0;
}

.app-shell.route-axon .app-header {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(12px, calc(50vw - 430px));
  right: max(12px, calc(50vw - 430px));
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 8px 14px 8px 18px;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.route-chat .app-header,
.app-shell.route-admin-chat .app-header {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: max(12px, calc(50vw - 430px));
  right: max(12px, calc(50vw - 430px));
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 8px 14px 8px 18px;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.route-chat .header-copy,
.app-shell.route-admin-chat .header-copy {
  justify-self: auto;
  width: auto;
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.route-axon .header-copy {
  justify-self: auto;
  width: auto;
  max-width: none;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.route-axon .header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.app-shell.route-axon .header-actions .axon-toolbar-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.75rem;
  border-color: rgba(191, 168, 133, 0.24);
  background: rgba(255, 250, 242, 0.72);
  color: rgba(89, 74, 57, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.app-shell.route-axon .page-subtitle,
.app-shell.route-chat .page-subtitle,
.app-shell.route-admin-chat .page-subtitle {
  margin-top: 1px;
  line-height: 1.25;
  color: rgba(101, 90, 77, 0.68);
}

.app-shell.route-axon .page-title,
.app-shell.route-chat .page-title,
.app-shell.route-admin-chat .page-title {
  font-size: clamp(0.84rem, 2.4vw, 0.96rem);
  font-weight: 700;
  line-height: 1.05;
}

.app-shell.route-axon .app-header::before,
.app-shell.route-chat .app-header::before,
.app-shell.route-admin-chat .app-header::before {
  display: block;
  inset: 0;
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.94);
  backdrop-filter: blur(14px);
  box-shadow:
    0 16px 34px rgba(44, 28, 8, 0.1),
    0 4px 12px rgba(44, 28, 8, 0.04),
    inset 0 0 0 1px rgba(191, 168, 133, 0.28);
}

.app-shell.route-axon .burger-button,
.app-shell.route-chat .burger-button,
.app-shell.route-admin-chat .burger-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell.route-chat .burger-button,
.app-shell.route-admin-chat .burger-button {
  width: 40px;
  height: 40px;
}

.app-shell.route-chat .chat-screen.chat-screen-v2 {
  padding-top: 0;
}

.app-shell.route-admin-chat .chat-screen.chat-screen-v2 {
  padding-top: 0;
}

.app-header {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 14px 8px 18px;
  border-radius: 28px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.94);
  backdrop-filter: blur(14px);
  box-shadow:
    0 16px 34px rgba(44, 28, 8, 0.1),
    0 4px 12px rgba(44, 28, 8, 0.04),
    inset 0 0 0 1px rgba(191, 168, 133, 0.28);
  z-index: -1;
}

.header-copy {
  min-width: 0;
}

.page-title {
  margin: 0;
  font-size: clamp(0.84rem, 2.4vw, 0.96rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.page-subtitle {
  margin: 1px 0 0;
  color: rgba(101, 90, 77, 0.68);
  font-size: 0.75rem;
  line-height: 1.25;
}

.burger-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  cursor: pointer;
}

.burger-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: rgba(33, 26, 20, 0.82);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: transparent;
}

.burger-panel {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 58px);
  left: 8px;
  right: 8px;
  z-index: 30;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(191, 168, 133, 0.26);
  border-radius: 28px;
  background: rgba(255, 250, 243, 0.95);
  box-shadow:
    0 24px 52px rgba(44, 28, 8, 0.11),
    0 8px 20px rgba(44, 28, 8, 0.05);
  backdrop-filter: blur(20px);
  max-height: calc(100dvh - env(safe-area-inset-top) - 72px);
  overflow-y: auto;
}

.menu-meta {
  display: grid;
  gap: 2px;
  padding: 6px 14px 2px;
}

.menu-meta strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.menu-meta span {
  color: rgba(101, 90, 77, 0.64);
  font-size: 0.71875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.burger-nav {
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(191, 168, 133, 0.18);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.burger-link,
.menu-logout {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(33, 26, 20, 0.9);
  font-size: 0.84375rem;
  font-weight: 760;
  cursor: pointer;
}

.burger-link.active {
  background: linear-gradient(180deg, rgba(247, 238, 223, 0.96) 0%, rgba(242, 230, 211, 0.92) 100%);
  border-color: rgba(191, 168, 133, 0.24);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.32),
    0 10px 20px rgba(44, 28, 8, 0.05);
  color: var(--accent-dark);
}

.burger-link.placeholder {
  color: rgba(101, 90, 77, 0.56);
}

.menu-push-control {
  display: grid;
  gap: 6px;
  padding: 0;
}

.menu-push-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(191, 168, 133, 0.22);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.82);
  color: rgba(33, 26, 20, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(44, 28, 8, 0.04);
  cursor: pointer;
}

.menu-push-toggle-copy {
  display: grid;
  gap: 1px;
  justify-items: start;
  min-width: 0;
}

.menu-push-toggle-copy strong {
  font-size: 0.84375rem;
  font-weight: 800;
}

.menu-push-toggle.is-disabled {
  cursor: default;
  opacity: 0.78;
}

.menu-push-toggle.is-pending {
  opacity: 0.8;
}

.menu-push-switch {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(191, 168, 133, 0.34);
  transition: background 160ms ease;
}

.menu-push-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 2px 6px rgba(44, 28, 8, 0.12);
  transition: transform 160ms ease;
}

.menu-push-toggle.is-on .menu-push-switch {
  background: linear-gradient(180deg, #a67b43 0%, #8f6735 100%);
}

.menu-push-toggle.is-on .menu-push-switch::after {
  transform: translateX(18px);
}

.menu-push-note,
.menu-status-note {
  padding: 0 16px;
  font-size: 0.65625rem;
  font-weight: 700;
  color: rgba(101, 90, 77, 0.64);
}

.burger-link-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #9b7240;
  color: #fffaf1;
  font-size: 0.75rem;
  font-weight: 800;
}

.menu-logout {
  margin-top: 0;
  min-height: 40px;
  border: 1px solid rgba(191, 168, 133, 0.16);
  border-radius: 18px;
  background: rgba(255, 248, 244, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  color: #8f4e34;
}

.simple-stack {
  display: grid;
  gap: 10px;
}

.chat-notice {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 14px);
  z-index: 32;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 14px 32px rgba(44, 28, 8, 0.12);
  backdrop-filter: blur(14px);
}

.chat-notice-open {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-notice-body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-notice-label {
  color: rgba(101, 90, 77, 0.72);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-notice-open strong,
.chat-notice-body strong {
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.9375rem;
  font-weight: 800;
}

.chat-notice-open span:last-child,
.chat-notice-body span:last-child {
  color: rgba(78, 66, 53, 0.78);
  font-size: 0.875rem;
  line-height: 1.4;
}

.chat-notice-action.pending {
  border-color: rgba(157, 118, 65, 0.16);
  background: rgba(255, 249, 241, 0.97);
}

.chat-notice-action.accepted {
  border-color: rgba(74, 130, 88, 0.18);
  background: rgba(246, 252, 247, 0.97);
}

.chat-notice-action.revision {
  border-color: rgba(154, 77, 52, 0.16);
  background: rgba(255, 248, 246, 0.97);
}

.chat-notice-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(108, 84, 51, 0.06);
  color: rgba(78, 66, 53, 0.86);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}

.chat-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: var(--chat-screen-height, 100%);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.chat-screen.chat-screen-v2 {
  gap: 0;
}

.chat-screen.chat-screen-v2 > [data-main-chat-v2] {
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}

.axon-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.axon-toolbar-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.axon-toolbar-copy strong {
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.9375rem;
  font-weight: 800;
}

.axon-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.axon-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(191, 168, 133, 0.22);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.9);
  color: rgba(89, 74, 57, 0.92);
  font-size: 0.8125rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

.axon-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(23, 16, 10, 0.24);
}

.axon-history-panel {
  position: fixed;
  left: max(12px, calc(50vw - 430px));
  right: max(12px, calc(50vw - 430px));
  top: max(76px, env(safe-area-inset-top) + 16px);
  bottom: max(12px, env(safe-area-inset-bottom) + 12px);
  z-index: 31;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.995);
  box-shadow: 0 18px 36px rgba(44, 28, 8, 0.12);
}

.axon-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.axon-history-head strong {
  color: rgba(33, 26, 20, 0.94);
  font-size: 1.125rem;
  font-weight: 800;
}

.axon-history-head button {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(108, 84, 51, 0.06);
  color: rgba(78, 66, 53, 0.9);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.axon-history-search {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 16px;
  background: rgba(249, 245, 239, 0.85);
  color: rgba(33, 26, 20, 0.94);
  font-size: max(16px, 1rem);
}

.axon-history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
}

.axon-history-item {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  min-height: 0;
  padding: 11px 0;
  border: 0;
  border-bottom: 1px solid rgba(108, 84, 51, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.axon-history-item:focus-visible {
  outline: none;
}

.axon-history-item:last-child {
  border-bottom: 0;
}

.axon-history-item.active {
  background: transparent;
}

.axon-history-item-copy {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.9375rem;
  font-weight: 800;
}

.axon-history-item.active .axon-history-item-copy {
  color: rgba(64, 92, 121, 0.96);
}

.axon-history-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.axon-history-item-meta span {
  flex: 0 0 auto;
  color: rgba(101, 90, 77, 0.7);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.axon-history-item.active .axon-history-item-meta span {
  color: rgba(84, 104, 126, 0.88);
}

.axon-history-item-pin {
  font-size: 0.6875rem;
  line-height: 1;
  opacity: 0.72;
}

.axon-history-empty {
  color: rgba(101, 90, 77, 0.82);
  font-size: 0.875rem;
  line-height: 1.35;
}

.axon-history-empty {
  padding: 18px 6px;
  text-align: center;
}

.axon-history-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(22, 16, 10, 0.22);
  backdrop-filter: blur(3px);
}

.axon-history-menu-sheet {
  width: min(320px, calc(100vw - 32px));
  display: grid;
  gap: 0;
  padding: 0;
}

.axon-history-menu-copy {
  padding: 0 4px;
}

.axon-history-menu-copy strong {
  display: block;
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.axon-history-menu-actions {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.985);
  box-shadow: 0 20px 40px rgba(44, 28, 8, 0.16);
}

.axon-history-menu-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  width: 100%;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.9rem;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.axon-history-menu-action + .axon-history-menu-action {
  border-top: 1px solid rgba(108, 84, 51, 0.08);
}

.axon-history-menu-action.danger {
  background: rgba(255, 246, 242, 0.98);
  color: #9c4a35;
}

.axon-history-confirm-sheet {
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 253, 249, 0.99);
  box-shadow: 0 24px 52px rgba(44, 28, 8, 0.18);
}

.axon-history-confirm-copy {
  display: grid;
  gap: 6px;
}

.axon-history-confirm-copy strong {
  color: rgba(33, 26, 20, 0.96);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.axon-history-confirm-copy p {
  margin: 0;
  color: rgba(78, 66, 53, 0.82);
  font-size: 0.875rem;
  line-height: 1.42;
}

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

.axon-history-confirm-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: rgba(245, 239, 231, 0.98);
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.875rem;
  font-weight: 780;
  cursor: pointer;
}

.axon-history-confirm-action.muted {
  color: rgba(78, 66, 53, 0.86);
}

.axon-history-confirm-action.danger {
  background: rgba(255, 241, 235, 0.98);
  color: #a34d37;
  box-shadow: inset 0 0 0 1px rgba(191, 105, 75, 0.16);
}

.axon-history-confirm-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.axon-rename-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(22, 16, 10, 0.22);
  backdrop-filter: blur(3px);
}

.axon-rename-sheet {
  width: min(360px, calc(100vw - 32px));
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 253, 249, 0.99);
  box-shadow: 0 24px 52px rgba(44, 28, 8, 0.18);
}

.axon-rename-form {
  display: grid;
  gap: 10px;
}

.axon-rename-label {
  color: rgba(78, 66, 53, 0.86);
  font-size: 0.875rem;
  font-weight: 700;
}

.axon-rename-input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 16px;
  background: rgba(249, 245, 239, 0.85);
  color: rgba(33, 26, 20, 0.94);
  font-size: max(16px, 1rem);
}

.axon-rename-caption {
  margin: -2px 0 0;
  color: rgba(101, 90, 77, 0.76);
  font-size: 0.8125rem;
  line-height: 1.35;
}

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

.axon-rename-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: rgba(245, 239, 231, 0.98);
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.875rem;
  font-weight: 780;
  cursor: pointer;
}

.axon-rename-action.muted {
  color: rgba(78, 66, 53, 0.86);
}

.axon-rename-action.primary {
  background: linear-gradient(180deg, #a67b43 0%, #8f6735 100%);
  color: #fffaf1;
  box-shadow: 0 10px 24px rgba(109, 82, 48, 0.18);
}

.axon-rename-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.chat-pinned {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(108, 84, 51, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.chat-pinned-label {
  color: rgba(101, 90, 77, 0.72);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-pinned-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.chat-pinned-copy strong {
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.875rem;
  font-weight: 800;
}

.chat-pinned-copy span {
  color: rgba(78, 66, 53, 0.78);
  font-size: 0.875rem;
  line-height: 1.4;
}

.chat-feed-wrap,
.chat-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.day-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 2px 0 4px;
}

.day-separator::before,
.day-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(108, 84, 51, 0.1);
}

.day-separator span {
  color: rgba(101, 90, 77, 0.72);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.unread-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.unread-separator span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(143, 103, 53, 0.1);
  color: #8f6735;
  font-size: 0.75rem;
  font-weight: 800;
}

.chat-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 2px 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scroll-padding-bottom: calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 18px);
  touch-action: pan-y;
}

.app-shell.route-axon .chat-feed {
  scroll-padding-bottom: calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 8px + var(--chat-bottom-offset, 0px));
}

.app-shell.route-axon .axon-screen.axon-screen-ios-gap-compact .chat-feed {
  scroll-padding-bottom: calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 28px + var(--chat-bottom-offset, 0px));
}

.chat-feed,
.chat-feed *,
.chat-pinned,
.chat-pinned * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.page.app-shell.route-chat .app-header,
.page.app-shell.route-chat .app-header *,
.page.app-shell.route-chat .composer,
.page.app-shell.route-chat .composer *,
.page.app-shell.route-axon .app-header,
.page.app-shell.route-axon .app-header *,
.page.app-shell.route-axon .composer,
.page.app-shell.route-axon .composer *,
.page.app-shell.route-admin-chat .app-header,
.page.app-shell.route-admin-chat .app-header *,
.message-menu-backdrop,
.message-menu-backdrop *,
.axon-rename-backdrop,
.axon-rename-backdrop *,
.axon-history-panel,
.axon-history-panel *,
.axon-history-menu-backdrop,
.axon-history-menu-backdrop * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.page.app-shell.route-chat input,
.page.app-shell.route-chat textarea,
.page.app-shell.route-axon input,
.page.app-shell.route-axon textarea,
.page.app-shell.route-admin-chat input,
.page.app-shell.route-admin-chat textarea {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.page.app-shell.route-axon .message-row.axon-selectable,
.page.app-shell.route-axon .message.axon-selectable {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
}

.page.app-shell.route-axon .message-body.axon-selectable,
.page.app-shell.route-axon .message-body.axon-selectable * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.chat-feed-end-spacer {
  flex: 0 0 calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 18px);
  width: 100%;
  pointer-events: none;
}

.app-shell.route-axon .chat-feed-end-spacer {
  flex-basis: calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 8px + var(--chat-bottom-offset, 0px));
}

.chat-feed-end-spacer-compact {
  flex-basis: calc((var(--composer-height, 60px) + env(safe-area-inset-bottom) + 18px) / 2);
}

.app-shell.route-axon .chat-feed-end-spacer.chat-feed-end-spacer-compact {
  flex-basis: calc((var(--composer-height, 60px) + env(safe-area-inset-bottom) + 18px) / 2 + var(--chat-bottom-offset, 0px));
}

.app-shell.route-axon .axon-screen.axon-screen-ios-gap-compact .chat-feed-end-spacer.chat-feed-end-spacer-compact {
  flex-basis: calc((var(--composer-height, 60px) + env(safe-area-inset-bottom) + 18px) / 2 + 10px + var(--chat-bottom-offset, 0px));
}

.app-shell.route-axon .chat-jump-button {
  bottom: calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 24px + var(--chat-bottom-offset, 0px));
}

.chat-feed-start-spacer {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  pointer-events: none;
}

.chat-jump-button {
  position: absolute;
  right: 18px;
  bottom: calc(var(--composer-height, 60px) + env(safe-area-inset-bottom) + 24px);
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(44, 28, 8, 0.08);
  color: rgba(78, 66, 53, 0.86);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.chat-jump-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.message-row {
  display: flex;
  align-items: end;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.message-row.mine {
  justify-content: flex-end;
}

.message-row-highlight .message {
  box-shadow: 0 0 0 2px rgba(166, 123, 67, 0.18), 0 8px 18px rgba(44, 28, 8, 0.04);
}

.message-row-search-current .message {
  box-shadow: 0 0 0 2px rgba(115, 145, 175, 0.22), 0 8px 18px rgba(44, 28, 8, 0.04);
}

.message {
  display: grid;
  max-width: min(620px, 100%);
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(108, 84, 51, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(44, 28, 8, 0.04);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message.mine {
  background: rgba(214, 228, 241, 0.96);
  border-color: rgba(112, 141, 170, 0.24);
}

.message.pending {
  opacity: 0.72;
}

.message-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.message-head strong {
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.1;
}

.message-head span {
  color: rgba(101, 90, 77, 0.78);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.message-body {
  color: rgba(33, 26, 20, 0.92);
  line-height: 1.34;
  word-break: break-word;
}

.message-body p,
.message-body ul,
.message-body ol,
.message-body blockquote,
.message-body pre {
  margin: 0;
}

.message-body p + p,
.message-body p + ul,
.message-body p + ol,
.message-body ul + p,
.message-body ol + p,
.message-body ul + ul,
.message-body ol + ol,
.message-body blockquote + p,
.message-body pre + p {
  margin-top: 6px;
}

.message-body ul,
.message-body ol {
  padding-left: 17px;
}

.message-body li + li {
  margin-top: 2px;
}

.message-body a {
  color: #8f6735;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-body code {
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(108, 84, 51, 0.08);
  font-size: 0.92em;
}

.message-body pre {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(108, 84, 51, 0.06);
  overflow-x: auto;
  white-space: pre-wrap;
}

.message-body blockquote {
  padding-left: 12px;
  border-left: 3px solid rgba(166, 123, 67, 0.22);
  color: rgba(78, 66, 53, 0.86);
}

.chat-search-mark {
  padding: 0 0.16em;
  border-radius: 0.42em;
  background: rgba(241, 214, 111, 0.42);
  color: inherit;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  justify-self: start;
}

.message.mine .message-reactions {
  justify-self: end;
}

.message-actions {
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  margin-top: 5px;
  justify-self: start;
}

.message.mine .message-actions {
  justify-self: end;
}

.message-reply-preview {
  display: grid;
  gap: 2px;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px 10px;
  border: 0;
  border-left: 3px solid rgba(166, 123, 67, 0.22);
  border-radius: 14px;
  background: rgba(108, 84, 51, 0.06);
  text-align: left;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message-reply-preview strong {
  color: rgba(78, 66, 53, 0.9);
  font-size: 0.8125rem;
  font-weight: 800;
}

.message-reply-preview span {
  display: block;
  color: rgba(78, 66, 53, 0.76);
  font-size: 0.8125rem;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-attachment {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  color: inherit;
  text-decoration: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message-attachment-image {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(108, 84, 51, 0.08);
  background: rgba(108, 84, 51, 0.05);
}

.message-attachment-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 280px;
  object-fit: cover;
}

.message-attachment-image span {
  padding: 0 12px 12px;
  color: rgba(78, 66, 53, 0.82);
  font-size: 0.8125rem;
  font-weight: 700;
}

.message-attachment-file {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(108, 84, 51, 0.08);
  background: rgba(108, 84, 51, 0.05);
}

.message-attachment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(78, 66, 53, 0.86);
  font-size: 0.75rem;
  font-weight: 800;
}

.message-attachment-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.message-attachment-copy strong {
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.875rem;
  font-weight: 800;
  word-break: break-word;
}

.message-attachment-copy small {
  color: rgba(101, 90, 77, 0.74);
  font-size: 0.75rem;
  font-weight: 700;
}

.message-reaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(78, 66, 53, 0.9);
  font-size: 0.75rem;
  font-weight: 700;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message-reaction.active {
  border-color: rgba(112, 141, 170, 0.22);
  background: rgba(221, 233, 245, 0.96);
}

.message-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(108, 84, 51, 0.08);
  border-radius: 12px;
  background: rgba(249, 245, 239, 0.92);
  color: rgba(101, 90, 77, 0.86);
  cursor: pointer;
}

.message-copy-button.copied {
  border-color: rgba(112, 141, 170, 0.22);
  background: rgba(221, 233, 245, 0.96);
  color: rgba(58, 83, 108, 0.92);
}

.message-copy-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  position: fixed;
  left: max(12px, calc(50vw - 430px));
  right: max(12px, calc(50vw - 430px));
  bottom: calc(var(--chat-bottom-offset, 0px) + 2px);
  z-index: 24;
  width: auto;
  margin: 0;
  padding: 8px 8px 8px 14px;
  border: 1px solid rgba(108, 84, 51, 0.14);
  border-radius: 22px;
  background: rgba(255, 253, 249, 0.97);
  box-shadow: 0 12px 28px rgba(44, 28, 8, 0.07);
}

.axon-composer {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  padding: 6px 6px 6px 18px;
  border-radius: 24px;
}

.app-shell.route-axon .composer textarea {
  min-height: 40px;
  padding: 8px 4px 8px 0;
}

.app-shell.route-axon .composer-end-actions,
.app-shell.route-axon .send-button {
  width: 46px;
  height: 46px;
}

.app-shell.route-axon .composer-end-actions {
  align-self: center;
}

.app-shell.route-axon .send-button {
  border-radius: 16px;
}

.app-shell.route-axon .send-button.ready {
  box-shadow: 0 12px 26px rgba(109, 82, 48, 0.22);
}

.app-shell.route-axon .send-button svg {
  width: 24px;
  height: 24px;
  transform: translateX(1px);
}

.composer.search-mode {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-left: 14px;
}

.composer-status {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0 4px;
  color: #9a5f4a;
  font-size: 0.8125rem;
  font-weight: 700;
}

.composer-search-status {
  color: rgba(101, 90, 77, 0.82);
}

.composer-search-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.composer-search-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.composer-search-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(108, 84, 51, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(78, 66, 53, 0.88);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
}

.composer-search-step:disabled {
  opacity: 0.42;
}

.composer-editbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
  color: rgba(101, 90, 77, 0.86);
  font-size: 0.8125rem;
  font-weight: 700;
}

.composer-replybar {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.composer-replycopy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.composer-replycopy strong {
  color: rgba(78, 66, 53, 0.9);
  font-size: 0.8125rem;
  font-weight: 800;
}

.composer-replycopy span {
  color: rgba(101, 90, 77, 0.82);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.composer-filebar {
  grid-column: 1 / -1;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.composer-filecopy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.composer-filecopy strong {
  color: rgba(78, 66, 53, 0.9);
  font-size: 0.8125rem;
  font-weight: 800;
  word-break: break-word;
}

.composer-filecopy span {
  color: rgba(101, 90, 77, 0.82);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.composer-edit-cancel {
  border: 0;
  background: transparent;
  color: #8f6735;
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
}

.attach-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(249, 239, 225, 0.92);
  color: #8f6735;
  cursor: pointer;
}

.attach-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attach-input {
  display: none;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  max-height: 180px;
  padding: 10px 4px 10px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: max(16px, 1rem);
  line-height: 1.4;
  resize: none;
  overflow-y: hidden;
}

.composer textarea::placeholder {
  color: rgba(101, 90, 77, 0.62);
}

.composer-end-actions {
  position: relative;
  align-self: end;
  width: 44px;
  height: 44px;
}

.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(197, 179, 153, 0.62);
  box-shadow: none;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.composer-end-actions .send-button {
  position: absolute;
  inset: 0;
}

.send-button.ready {
  background: linear-gradient(180deg, #a67b43 0%, #8f6735 100%);
  box-shadow: 0 10px 24px rgba(109, 82, 48, 0.2);
}

.send-button svg {
  width: 20px;
  height: 20px;
  fill: #fffaf1;
}

.send-button:disabled {
  cursor: default;
}

.send-button.utility {
  background: rgba(249, 239, 225, 0.92);
  color: #8f6735;
}

.send-button.utility svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.send-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.92);
}

.chat-search-empty {
  padding: 18px 4px 6px;
  color: rgba(101, 90, 77, 0.78);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}

.message-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 12px 12px calc(var(--chat-bottom-offset, 0px) + env(safe-area-inset-bottom) + 10px);
  background: rgba(22, 16, 10, 0.16);
}

.message-menu-sheet {
  width: min(340px, 100%);
  display: grid;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.message-menu-action-group {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 38px rgba(44, 28, 8, 0.14);
}

.message-menu-action {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(33, 26, 20, 0.94);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.message-menu-action + .message-menu-action {
  border-top: 1px solid rgba(108, 84, 51, 0.08);
}

.message-menu-action.danger {
  background: rgba(154, 77, 52, 0.1);
  color: #8f4330;
}

.message-menu-action.muted {
  background: rgba(108, 84, 51, 0.07);
  color: rgba(78, 66, 53, 0.86);
}

.message-menu-reactions {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 42px;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 18px 38px rgba(44, 28, 8, 0.14);
}

.message-menu-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(33, 26, 20, 0.94);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.message-menu-reaction:active {
  transform: translateY(1px);
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.92);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.08;
}

.panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head > *,
.homework-card-head > *,
.homework-card-foot > *,
.homework-topbar > *,
.admin-user-head > *,
.admin-user-meta > * {
  min-width: 0;
}

.section-head.compact {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  font-weight: 400;
}

.section-head p {
  margin: 0;
  max-width: 420px;
}

.section-panel {
  padding: 18px;
}

.section-panel-flat {
  display: grid;
  gap: 14px;
}

.page-section-meta {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.page-section-meta .status-pill {
  justify-self: center;
}

.page-section-note {
  margin: 0;
  max-width: 680px;
  color: rgba(101, 90, 77, 0.76);
  font-size: 0.875rem;
  line-height: 1.55;
}

.page-section-reply {
  width: min(100%, 760px);
  justify-self: stretch;
}

.modules-list {
  display: grid;
  gap: 12px;
}

.section-head.section-head-page {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.section-head.section-head-page h2 {
  justify-self: center;
  width: 100%;
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.02;
}

.section-head-page-spacer {
  width: 42px;
  height: 42px;
}

.page-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(191, 168, 133, 0.22);
  background: rgba(255, 250, 242, 0.78);
  color: rgba(79, 60, 38, 0.92);
  box-shadow:
    0 10px 22px rgba(44, 28, 8, 0.05),
    inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.page-back-button svg {
  width: 20px;
  height: 20px;
}

.admin-chat-screen {
  gap: 0;
}

.admin-chat-stream-shell {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  padding: 84px 0 8px;
}

.admin-chat-stream-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.admin-chat-stream-tabs::-webkit-scrollbar {
  display: none;
}

.admin-chat-stream-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(191, 168, 133, 0.22);
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.9);
  color: rgba(89, 74, 57, 0.92);
  font-size: 0.8125rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  text-decoration: none;
}

.admin-chat-stream-tab.active {
  background: rgba(247, 239, 227, 0.98);
  color: rgba(93, 63, 29, 0.94);
  border-color: rgba(191, 168, 133, 0.32);
}

.admin-chat-v2-root {
  flex: 1 1 auto;
  min-height: 0;
}

.admin-chat-status {
  position: relative;
  z-index: 3;
  margin: 0 12px 8px;
}

.admin-chat-empty {
  display: grid;
  place-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 120px 24px 120px;
  color: rgba(101, 90, 77, 0.82);
  text-align: center;
}

.admin-chat-empty strong {
  color: rgba(33, 26, 20, 0.94);
  font-size: 1rem;
  font-weight: 800;
}

.admin-chat-empty p {
  margin: 0;
  max-width: 28rem;
}

.module-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
  min-height: 72px;
  padding: 14px 18px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.9);
  box-shadow: 0 10px 22px rgba(44, 28, 8, 0.05);
  color: rgba(33, 26, 20, 0.94);
  text-align: left;
  cursor: pointer;
}

.module-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.module-copy strong {
  display: block;
  font-size: 1.0625rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.module-copy .soft-digits {
  font-weight: 620;
  letter-spacing: 0;
  font-variant-numeric: proportional-nums lining-nums;
  font-feature-settings: "tnum" 0, "lnum" 1;
}

.module-copy small {
  display: block;
  color: rgba(78, 66, 53, 0.72);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.module-arrow {
  color: rgba(101, 90, 77, 0.42);
  font-size: 1.125rem;
  font-weight: 700;
}

.module-button:disabled {
  cursor: default;
  opacity: 1;
}

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

.textarea-field textarea {
  width: 100%;
  min-height: 140px;
  padding: 14px 16px;
  border: 1px solid rgba(108, 84, 51, 0.12);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.9);
  color: var(--text);
  font-size: max(16px, 1rem);
  line-height: 1.55;
  resize: vertical;
}

.textarea-field textarea:focus,
.admin-select:focus {
  outline: none;
}

.homework-form-note {
  margin: -4px 0 0;
  color: rgba(101, 90, 77, 0.82);
  font-size: 0.875rem;
  line-height: 1.5;
}

.homework-list,
.review-list {
  display: grid;
  gap: 10px;
}

.homework-card,
.review-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.9);
  box-shadow: 0 10px 22px rgba(44, 28, 8, 0.05);
}

.homework-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.homework-card-head strong {
  font-size: 1rem;
  font-weight: 800;
}

.review-card-copy {
  display: grid;
  gap: 2px;
}

.review-card-copy span {
  color: rgba(78, 66, 53, 0.72);
  font-size: 0.8125rem;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  max-width: 100%;
  font-size: 0.75rem;
  font-weight: 800;
}

.status-pill.pending {
  background: rgba(157, 118, 65, 0.12);
  color: #8f6735;
}

.status-pill.draft {
  background: rgba(108, 84, 51, 0.1);
  color: #5f5143;
}

.status-pill.revision {
  background: rgba(154, 77, 52, 0.1);
  color: #8f4330;
}

.status-pill.accepted {
  background: rgba(74, 130, 88, 0.12);
  color: #416f4d;
}

.status-pill.empty {
  background: rgba(108, 84, 51, 0.08);
  color: rgba(78, 66, 53, 0.7);
}

.homework-copy,
.review-submission p,
.homework-reply p {
  margin: 0;
  color: rgba(33, 26, 20, 0.9);
  line-height: 1.65;
  white-space: pre-wrap;
}

.homework-copy.muted {
  color: rgba(101, 90, 77, 0.72);
}

.homework-reply,
.review-submission {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(108, 84, 51, 0.05);
}

.homework-reply strong,
.review-submission strong {
  font-size: 0.8125rem;
  font-weight: 800;
  color: rgba(78, 66, 53, 0.9);
}

.homework-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(101, 90, 77, 0.72);
  font-size: 0.8125rem;
  font-weight: 700;
}

.homework-modules-list {
  gap: 12px;
}

.homework-module-button {
  align-items: flex-start;
}

.homework-module-preview {
  color: rgba(78, 66, 53, 0.74);
  overflow-wrap: anywhere;
}

.homework-module-meta {
  display: grid;
  justify-items: end;
  gap: 10px;
  flex: 0 0 auto;
}

.homework-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.step-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(44, 28, 8, 0.04);
  color: rgba(47, 37, 29, 0.9);
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}

.step-back-button:active {
  transform: translateY(1px);
}

.homework-sheet-block {
  gap: 16px;
}

.homework-sheet-head,
.homework-submit-panel {
  gap: 16px;
}

.homework-sheet-meta {
  display: grid;
  gap: 14px;
}

.homework-richtext {
  display: grid;
  gap: 12px;
  color: rgba(33, 26, 20, 0.92);
  line-height: 1.7;
}

.homework-richtext > * {
  margin: 0;
}

.homework-richtext ul,
.homework-richtext ol {
  margin: 0;
  padding-left: 20px;
}

.homework-richtext blockquote {
  margin: 0;
  padding: 14px 16px;
  border-left: 3px solid rgba(157, 118, 65, 0.34);
  border-radius: 0 16px 16px 0;
  background: rgba(157, 118, 65, 0.08);
  color: rgba(48, 38, 29, 0.9);
}

.homework-answer-field {
  gap: 10px;
}

.homework-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.homework-file-button {
  position: relative;
  overflow: hidden;
}

.homework-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.homework-file-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid rgba(108, 84, 51, 0.1);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.9);
  color: inherit;
  text-decoration: none;
}

.homework-file-card.pending {
  border-style: dashed;
  background: rgba(255, 252, 247, 0.74);
}

.homework-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(157, 118, 65, 0.12);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.homework-file-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.homework-file-copy strong,
.homework-file-copy small {
  overflow-wrap: anywhere;
}

.homework-file-copy strong {
  color: rgba(33, 26, 20, 0.92);
}

.homework-file-copy small {
  color: rgba(101, 90, 77, 0.78);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.homework-sheet-actions {
  display: grid;
  gap: 14px;
  color: rgba(101, 90, 77, 0.72);
  font-size: 0.8125rem;
  font-weight: 700;
}

.homework-sheet-status {
  display: grid;
  gap: 4px;
}

.homework-sheet-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.homework-sheet-buttons .button,
.homework-sheet-buttons .button.secondary {
  width: 100%;
}

.homework-checklist,
.review-worksheet {
  display: grid;
  gap: 14px;
}

.homework-checklist-group,
.review-answer-block,
.review-checklist {
  display: grid;
  gap: 10px;
}

.homework-checklist-group h3,
.review-answer-block h4,
.review-checklist h4 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
}

.homework-checklist-items {
  display: grid;
  gap: 10px;
}

.homework-check-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(108, 84, 51, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.homework-check-item input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.homework-check-item.checked,
.homework-check-item.readonly.checked {
  border-color: rgba(157, 118, 65, 0.24);
  background: rgba(157, 118, 65, 0.08);
}

.homework-check-item.readonly {
  grid-template-columns: 20px minmax(0, 1fr);
}

.homework-check-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(108, 84, 51, 0.18);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 900;
}

.homework-note {
  margin: 0;
  color: rgba(101, 90, 77, 0.8);
  font-size: 0.875rem;
  line-height: 1.55;
}

.review-answer-block p {
  margin: 0;
  color: rgba(33, 26, 20, 0.92);
  line-height: 1.65;
  white-space: pre-wrap;
}

.admin-form-grid {
  display: grid;
  gap: 12px;
}

.admin-form-status {
  margin: -2px 0 0;
}

.admin-select,
.admin-form-grid input[type="file"] {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(108, 84, 51, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font-size: max(16px, 1rem);
}

.admin-form-grid input[type="file"] {
  padding-top: 14px;
}

.admin-result-card {
  background: rgba(249, 239, 225, 0.76);
}

.admin-result-grid {
  display: grid;
  gap: 12px;
}

.admin-result-grid div {
  display: grid;
  gap: 4px;
}

.admin-result-grid span {
  color: rgba(101, 90, 77, 0.72);
  font-size: 0.8125rem;
  font-weight: 700;
}

.admin-result-grid strong {
  font-size: 1rem;
  font-weight: 800;
  word-break: break-word;
}

.admin-user-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(108, 84, 51, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(44, 28, 8, 0.04);
}

.admin-user-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-user-head strong {
  font-size: 1.0625rem;
  font-weight: 800;
}

.admin-role {
  color: rgba(101, 90, 77, 0.78);
  font-size: 0.8125rem;
  font-weight: 700;
}

.admin-user-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: rgba(101, 90, 77, 0.82);
  font-size: 0.875rem;
}

.admin-status {
  font-weight: 800;
}

.admin-status.enabled {
  color: #376b43;
}

.admin-status.disabled {
  color: #9a4d34;
}

.admin-user-action,
.admin-user-fixed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 0.875rem;
  font-weight: 800;
}

.admin-user-action {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.admin-user-actions {
  display: grid;
  gap: 8px;
}

.admin-user-action.success {
  background: rgba(60, 122, 78, 0.14);
  color: #2f6440;
}

.admin-user-action.danger {
  background: rgba(154, 77, 52, 0.12);
  color: #8f4330;
}

.admin-user-action.soft {
  background: rgba(108, 84, 51, 0.08);
  color: rgba(78, 66, 53, 0.9);
}

.admin-user-action[disabled] {
  opacity: 0.72;
  cursor: wait;
}

.admin-user-fixed {
  border: 1px solid rgba(108, 84, 51, 0.08);
  background: rgba(249, 239, 225, 0.78);
  color: rgba(101, 90, 77, 0.88);
}

.admin-material-group {
  display: grid;
  gap: 10px;
}

.admin-material-group + .admin-material-group {
  margin-top: 18px;
}

.admin-material-group-head strong {
  font-size: 1rem;
  font-weight: 800;
}

.admin-material-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-material-group-head small {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(128, 99, 63, 0.78);
  letter-spacing: 0.02em;
}

.admin-material-list {
  display: grid;
  gap: 8px;
}

.admin-material-item {
  display: grid;
  gap: 8px;
}

.admin-axon-thread {
  display: flex;
  flex-direction: column;
  height: clamp(320px, 68dvh, 760px);
  min-height: 320px;
  overflow: hidden;
}

.admin-axon-feed {
  flex: 1 1 auto;
  min-height: 0;
  padding: 2px 2px 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-padding-bottom: 8px;
}

.detail-panel {
  margin-top: 4px;
}

.detail-panel h3 {
  margin: 0;
  font-size: 1.375rem;
  line-height: 1.15;
}

.detail-panel p {
  margin: 12px 0 0;
}

.placeholder-card {
  text-align: left;
}

.placeholder-card p:last-child {
  margin-top: 16px;
  color: var(--accent-dark);
  font-weight: 700;
}

.app-loading {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 24px);
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .burger-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: auto;
    right: 0;
    width: 276px;
    max-height: calc(100dvh - 88px);
  }

  .chat-notice {
    left: auto;
    right: 18px;
    width: min(420px, calc(100vw - 36px));
  }
}

@media (max-width: 720px) {
  .page {
    width: calc(100% - 16px);
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .app-header {
    top: max(8px, env(safe-area-inset-top));
    gap: 8px;
    padding: 7px 12px 7px 16px;
    border-radius: 22px;
  }

  .app-shell.route-chat .app-header,
  .app-shell.route-admin-chat .app-header {
    top: max(8px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    gap: 8px;
    padding: 7px 12px 7px 16px;
    border-radius: 26px;
  }

  .app-shell.route-axon .app-header {
    top: max(8px, env(safe-area-inset-top));
    left: 12px;
    right: 12px;
    gap: 8px;
    padding: 7px 12px 7px 16px;
    border-radius: 26px;
  }

  .app-shell.route-axon .header-actions {
    gap: 6px;
  }

  .app-shell.route-axon .header-actions .axon-toolbar-button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 0.6875rem;
  }

  .app-shell.route-axon .axon-composer {
    gap: 6px;
    padding: 6px 6px 6px 16px;
    border-radius: 22px;
  }

  .app-shell.route-axon .composer textarea {
    min-height: 38px;
    padding: 7px 4px 7px 0;
  }

  .app-shell.route-axon .composer-end-actions,
  .app-shell.route-axon .send-button {
    width: 42px;
    height: 42px;
  }

  .app-shell.route-axon .send-button svg {
    width: 22px;
    height: 22px;
  }

  .app-shell.route-chat .chat-screen.chat-screen-v2 {
    padding-top: 0;
  }

  .app-shell.route-admin-chat .chat-screen.chat-screen-v2 {
    padding-top: 0;
  }

  .app-header::before {
    inset: 0;
    border-radius: 26px;
  }

  .burger-button,
  .app-shell.route-chat .burger-button,
  .app-shell.route-admin-chat .burger-button {
    width: 40px;
    height: 40px;
  }

  .page-title {
    font-size: 1rem;
  }

  .page-subtitle {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .auth-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .auth-card h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .panel {
    padding: 16px;
    border-radius: 20px;
  }

  .section-head {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
  }

  .section-panel-flat {
    gap: 12px;
  }

  .page-section-meta {
    gap: 8px;
  }

  .page-section-note {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .section-head h2 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
    line-height: 1.08;
  }

  .section-head.section-head-page {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
    margin-bottom: 0;
  }

  .section-head.section-head-page h2 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .section-head-page-spacer,
  .page-back-button {
    width: 38px;
    height: 38px;
  }

  .page-back-button svg {
    width: 18px;
    height: 18px;
  }

  .admin-chat-stream-shell {
    padding-top: 76px;
    padding-bottom: 6px;
  }

  .admin-chat-stream-tabs {
    gap: 6px;
  }

  .admin-chat-stream-tab {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.75rem;
  }

  .homework-list-head h2 {
    font-size: clamp(1.2rem, 6vw, 1.55rem);
  }

  .section-head p {
    max-width: none;
    font-size: 0.875rem;
    line-height: 1.5;
  }

  .module-button {
    align-items: flex-start;
    min-height: 68px;
    padding: 14px;
    border-radius: 18px;
  }

  .homework-module-button,
  .review-student-button,
  .review-module-button {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .module-copy strong {
    font-size: 1rem;
  }

  .module-copy small {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  .chat-feed {
    gap: 7px;
  }

  .message {
    padding: 11px 12px;
    border-radius: 17px;
  }

  .message-head {
    gap: 7px;
    margin-bottom: 3px;
  }

  .message-head strong {
    font-size: 0.8125rem;
  }

  .message-head span {
    font-size: 0.6875rem;
  }

  .message-body {
    line-height: 1.3;
  }

  .message-body p + p,
  .message-body p + ul,
  .message-body p + ol,
  .message-body ul + p,
  .message-body ol + p,
  .message-body ul + ul,
  .message-body ol + ol,
  .message-body blockquote + p,
  .message-body pre + p {
    margin-top: 5px;
  }

  .message-reply-preview {
    margin-bottom: 5px;
    padding: 7px 8px;
  }

  .message-attachment {
    margin-top: 5px;
  }

  .message-attachment-file {
    gap: 9px;
    padding: 9px 11px;
    border-radius: 15px;
  }

  .message-reactions {
    gap: 4px;
    margin-top: 4px;
  }

  .message-actions {
    margin-top: 4px;
  }

  .message-reaction {
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.6875rem;
  }

  .message-copy-button {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
  }

  .message-menu-reactions {
    grid-auto-columns: 40px;
    gap: 5px;
    padding: 6px 7px;
  }

  .message-menu-reaction {
    min-height: 38px;
    border-radius: 12px;
    font-size: 1.22rem;
  }

  .message-menu-action {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .axon-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .axon-toolbar-actions {
    justify-content: flex-end;
    gap: 6px;
  }

  .axon-toolbar-button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.6875rem;
  }

  .axon-history-panel {
    left: 8px;
    right: 8px;
    top: max(68px, env(safe-area-inset-top) + 10px);
    bottom: max(8px, env(safe-area-inset-bottom) + 8px);
    padding: 16px;
    border-radius: 22px;
  }

  .axon-history-head strong {
    font-size: 1rem;
  }

  .axon-history-search {
    min-height: 44px;
    font-size: 1rem;
  }

  .axon-history-item {
    gap: 10px;
    padding: 10px 0;
  }

  .axon-history-item-copy {
    font-size: 0.875rem;
  }

  .axon-history-item-meta {
    gap: 4px;
  }

  .axon-history-item-meta span {
    font-size: 0.6875rem;
  }

  .axon-history-empty {
    font-size: 0.8125rem;
  }

  .axon-history-menu-sheet {
    width: min(304px, calc(100vw - 24px));
  }

  .axon-history-menu-action {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .axon-history-confirm-sheet {
    width: min(320px, calc(100vw - 24px));
    padding: 16px;
    gap: 12px;
  }

  .axon-history-confirm-action {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .axon-rename-sheet {
    width: min(320px, calc(100vw - 24px));
    padding: 16px;
  }

  .axon-rename-action {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .axon-rename-input {
    min-height: 44px;
  }

  .composer-end-actions {
    width: 42px;
    height: 42px;
  }

  .homework-sheet-head,
  .homework-sheet-block,
  .homework-submit-panel {
    gap: 14px;
  }

  .homework-module-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }

  .homework-module-meta .status-pill {
    flex: 0 1 auto;
  }

  .homework-module-meta .module-arrow {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .homework-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .homework-topbar .status-pill {
    width: fit-content;
  }

  .homework-card-head,
  .homework-card-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .homework-card-head .status-pill,
  .homework-card-foot .status-pill,
  .admin-role,
  .admin-status {
    width: fit-content;
  }

  .step-back-button {
    width: 100%;
    min-height: 46px;
    justify-content: flex-start;
    padding: 0 14px;
    border-radius: 14px;
    text-align: left;
  }

  .homework-sheet-meta {
    gap: 12px;
  }

  .homework-note,
  .homework-sheet-actions,
  .homework-card-foot {
    font-size: 0.75rem;
    line-height: 1.45;
  }

  .homework-richtext {
    gap: 10px;
    font-size: 0.9375rem;
    line-height: 1.58;
  }

  .homework-richtext ul,
  .homework-richtext ol {
    padding-left: 18px;
  }

  .homework-richtext blockquote {
    padding: 12px 14px;
    border-radius: 0 14px 14px 0;
  }

  .textarea-field textarea {
    min-height: 124px;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .homework-answer-field {
    gap: 8px;
  }

  .homework-answer-field textarea,
  .review-form textarea {
    min-height: 132px;
  }

  .homework-file-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .homework-file-icon {
    width: fit-content;
    min-width: 0;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 12px;
  }

  .homework-file-copy small {
    font-size: 0.75rem;
  }

  .homework-checklist,
  .review-worksheet {
    gap: 12px;
  }

  .homework-checklist-group,
  .review-answer-block,
  .review-checklist {
    gap: 8px;
  }

  .homework-checklist-group h3,
  .review-answer-block h4,
  .review-checklist h4 {
    font-size: 0.875rem;
  }

  .homework-check-item {
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.45;
  }

  .homework-check-item input {
    width: 16px;
    height: 16px;
  }

  .review-card,
  .homework-card {
    padding: 14px;
    border-radius: 18px;
  }

  .admin-axon-thread {
    height: clamp(260px, 60dvh, 620px);
    min-height: 260px;
  }

  .admin-user-head,
  .admin-user-meta {
    display: grid;
    gap: 6px;
    justify-content: flex-start;
  }

  .homework-topbar,
  .homework-sheet-buttons,
  .homework-card-foot,
  .homework-file-actions {
    display: grid;
    gap: 10px;
  }

  .homework-sheet-buttons .button,
  .homework-sheet-buttons .button.secondary,
  .homework-file-actions .button,
  .review-form .button,
  .homework-file-button {
    width: 100%;
  }

  .message-attachment-image img {
    max-height: 220px;
  }
}
