:root {
  color-scheme: light;
  --navy: #26367f;
  --navy-deep: #1d2968;
  --navy-line: #d8e0f5;
  --navy-soft: #eef3ff;
  --page: #f5f7fc;
  --surface: #ffffff;
  --surface-muted: #f7f9ff;
  --green: #11b56b;
  --green-deep: #0e9c5d;
  --green-soft: #e8f8ef;
  --text: #213172;
  --text-soft: #6d79a5;
  --shadow: 0 16px 36px rgba(29, 41, 104, 0.07);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
  overflow: hidden;
}

button,
textarea {
  font: inherit;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px 18px 20px;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: rgba(255, 255, 255, 0.92);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 8px 10px 2px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 1.32em;
  right: 0.08em;
  top: 0.42em;
  height: 0.08em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.brand-subtitle {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.45;
}

.sidebar-panel {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.06rem;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.sidebar-note-copy,
.support-list,
.context-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.eyebrow,
.context-label {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar .eyebrow,
.sidebar .context-label {
  color: rgba(255, 255, 255, 0.62);
}

.support-list {
  padding-left: 18px;
}

.support-list li + li {
  margin-top: 10px;
}

.session-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.memory-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.memory-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: -18px;
  z-index: 2;
  margin: -18px -18px 0;
  padding: 18px 18px 12px;
  background: linear-gradient(180deg, rgba(36, 51, 121, 0.98) 0%, rgba(36, 51, 121, 0.92) 100%);
  backdrop-filter: blur(8px);
  border-radius: 22px 22px 0 0;
}

.sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(17, 181, 107, 0.18);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

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

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

.snapshot-type-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.snapshot-type-tab,
.snapshot-submit {
  border: none;
  border-radius: 999px;
  font-weight: 700;
}

.snapshot-type-tab {
  padding: 8px 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

.snapshot-type-tab.is-active {
  background: rgba(17, 181, 107, 0.18);
  color: #ffffff;
}

.snapshot-input,
.snapshot-textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(15, 23, 67, 0.22);
  color: #ffffff;
}

.snapshot-input::placeholder,
.snapshot-textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.snapshot-textarea {
  resize: vertical;
  min-height: 110px;
}

.snapshot-form-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.snapshot-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
  font-size: 0.86rem;
}

.snapshot-submit {
  padding: 10px 14px;
  cursor: pointer;
  background: #ffffff;
  color: var(--navy);
}

.snapshot-submit:disabled,
.snapshot-type-tab:disabled {
  opacity: 0.7;
  cursor: wait;
}

.snapshot-status-message {
  min-height: 1.2em;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.snapshot-status-message.is-success {
  color: #bff0d3;
}

.snapshot-status-message.is-error {
  color: #ffd6d6;
}

.memory-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.memory-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.memory-item strong {
  color: #ffffff;
  line-height: 1.4;
}

.memory-item p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
}

.memory-status,
.memory-meta {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.memory-status {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.memory-status.is-done,
.memory-status.is-fresh {
  background: rgba(17, 181, 107, 0.18);
  color: #bff0d3;
}

.memory-status.is-stale {
  background: rgba(255, 208, 102, 0.18);
  color: #ffe8a3;
}

.memory-meta {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.5);
}

.memory-action {
  margin-top: 10px;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

.memory-action.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}

.task-panel {
  gap: 14px;
}

#action-item-list {
  max-height: 20.5rem;
  overflow-y: auto;
  padding-right: 4px;
}

.task-item {
  background: rgba(255, 255, 255, 0.09);
  padding: 10px 12px;
}

.task-item.is-clickable {
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.task-item.is-clickable:hover,
.task-item.is-clickable:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(17, 181, 107, 0.32);
  outline: none;
}

.task-item.is-done {
  opacity: 0.9;
}

.task-item p {
  display: none;
}

.task-item strong {
  font-size: 0.9rem;
  line-height: 1.35;
}

.task-source {
  margin-top: 6px;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-actions .memory-action {
  margin-top: 8px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.session-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: -18px;
  z-index: 3;
  margin: -18px -18px 0;
  padding: 18px 18px 12px;
  background: linear-gradient(180deg, rgba(36, 51, 121, 0.99) 0%, rgba(36, 51, 121, 0.93) 100%);
  backdrop-filter: blur(8px);
  border-radius: 22px 22px 0 0;
}

.new-chat-button {
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease;
}

.new-chat-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.2);
}

.new-chat-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.session-list {
  display: grid;
  gap: 10px;
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 4px;
}

.session-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.session-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
}

.session-item.is-active {
  background: rgba(17, 181, 107, 0.18);
  border-color: rgba(17, 181, 107, 0.42);
}

.session-item-title {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.session-item-meta {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.session-list::-webkit-scrollbar,
#action-item-list::-webkit-scrollbar {
  width: 8px;
}

.session-list::-webkit-scrollbar-thumb,
#action-item-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.context-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.context-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.context-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 800;
}

.context-grid {
  display: grid;
  gap: 10px;
}

.context-stat {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.context-stat strong {
  display: block;
  color: #ffffff;
  line-height: 1.45;
  word-break: break-word;
}

.context-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 34px 18px;
  border-bottom: 1px solid var(--navy-line);
  background: rgba(255, 255, 255, 0.95);
}

.chat-header h2 {
  margin: 0;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}

.chat-shell > .chat-header .eyebrow,
.status-pill,
.followup-label,
.followup-tray .eyebrow,
.empty-state .eyebrow,
.citation-meta span {
  color: var(--green-deep);
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  border: 1px solid #c8ecd8;
  font-size: 0.92rem;
  font-weight: 800;
}

.status-pill.is-busy::before,
.pending-dots span {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.secondary-button,
.ghost-button,
#send-button,
.followup-chip,
.citation-chip {
  border-radius: 999px;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.secondary-button,
#send-button {
  border: none;
  cursor: pointer;
  padding: 12px 18px;
}

.secondary-button {
  background: var(--surface);
  border: 1px solid #d0d9ef;
  color: var(--text);
}

#send-button {
  background: var(--green);
  color: #ffffff;
}

.secondary-button:hover,
#send-button:hover,
.followup-chip:hover,
.citation-chip:hover {
  transform: translateY(-1px);
}

#send-button:disabled,
.secondary-button:disabled,
.followup-chip:disabled,
.citation-chip:disabled {
  cursor: wait;
  opacity: 0.7;
}

.chat-scroll-region {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: linear-gradient(180deg, #fbfcff 0%, #ffffff 14%);
  scroll-behavior: smooth;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 34px 30px;
}

.empty-state {
  border: 1px dashed var(--navy-line);
  border-radius: 22px;
  padding: 18px 20px;
  background: var(--surface-muted);
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 1.24rem;
  letter-spacing: -0.04em;
}

.message {
  border: 1px solid var(--navy-line);
  border-radius: 24px;
  padding: 18px 20px;
  background: var(--surface);
}

.message[data-role="user"] {
  align-self: flex-end;
  width: min(700px, 86%);
  background: var(--navy-soft);
}

.message[data-role="assistant"],
.message[data-role="pending"] {
  width: min(820px, 100%);
}

.message[data-role="pending"] {
  background: linear-gradient(90deg, #f5f8ff, #ffffff, #f5f8ff);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

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

.message-meta {
  color: var(--navy);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-body {
  white-space: pre-wrap;
  line-height: 1.65;
  color: var(--text);
}

.artifact-host {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.artifact-card {
  border: 1px solid #d8e0f5;
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #fefefe 100%);
}

.artifact-card-head h3 {
  margin: 2px 0 6px;
  font-size: 1.04rem;
  letter-spacing: -0.03em;
}

.artifact-kicker {
  margin: 0;
  color: var(--green-deep);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.artifact-summary {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.artifact-sections {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.artifact-section {
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e1e8f7;
}

.artifact-section h4 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}

.artifact-section p {
  margin: 0;
  white-space: pre-wrap;
  color: var(--text-soft);
  line-height: 1.55;
}

.artifact-provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.artifact-provenance-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.artifact-action {
  border: 1px solid #d0daf2;
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--navy);
  cursor: pointer;
  font-weight: 700;
}

.artifact-action.primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.pending-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--green-deep);
}

.pending-dots span {
  animation: bounce 1.15s infinite ease-in-out;
}

.pending-dots span:nth-child(2) {
  animation-delay: 0.14s;
}

.pending-dots span:nth-child(3) {
  animation-delay: 0.28s;
}

.citation-list,
.followup-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.citation-card {
  border: 1px solid var(--navy-line);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-muted);
}

.result-card {
  border: 1px solid var(--navy-line);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  box-shadow: 0 10px 24px rgba(38, 54, 127, 0.05);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.result-card:hover {
  transform: translateY(-1px);
  border-color: #bfd0f3;
  box-shadow: 0 14px 28px rgba(38, 54, 127, 0.08);
}

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

.result-card-type,
.result-card-timing {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.result-card-type {
  background: var(--green-soft);
  color: var(--green-deep);
}

.result-card-timing {
  background: var(--navy-soft);
  color: var(--navy);
}

.result-card-title {
  display: inline-flex;
  width: fit-content;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
  text-align: left;
  cursor: pointer;
}

.result-card-title:hover {
  color: var(--green-deep);
}

.result-card-summary,
.result-card-fit {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.62;
}

.result-card-fit strong {
  color: var(--text);
}

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

.result-card-action {
  border: 1px solid #d0daf2;
  border-radius: 999px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.result-card-action:hover {
  transform: translateY(-1px);
}

.result-card-action.primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.citation-card h3 {
  margin: 0 0 8px;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
}

.citation-description {
  color: var(--text-soft);
  line-height: 1.58;
}

.citation-description p,
.citation-description ul,
.citation-description ol {
  margin: 0 0 8px;
}

.citation-description p:last-child,
.citation-description ul:last-child,
.citation-description ol:last-child {
  margin-bottom: 0;
}

.citation-description ul,
.citation-description ol {
  padding-left: 20px;
}

.citation-description a {
  color: var(--green-deep);
  font-weight: 600;
}

.citation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.citation-meta span {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--navy-line);
  font-size: 0.8rem;
  font-weight: 700;
}

.citation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.followup-chip,
.citation-chip {
  cursor: pointer;
  border: 1px solid #d0daf2;
  padding: 10px 14px;
}

.followup-chip {
  background: var(--green-soft);
  color: var(--green-deep);
}

.citation-chip {
  background: #ffffff;
  color: var(--navy);
}

.followup-list {
  border-top: 1px solid var(--navy-line);
  padding-top: 16px;
}

.followup-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-bottom-dock {
  border-top: 1px solid var(--navy-line);
  padding: 18px 28px 22px;
  background: #ffffff;
}

.followup-tray {
  margin-bottom: 14px;
  border: 1px solid var(--navy-line);
  border-radius: 20px;
  padding: 16px;
  background: var(--surface-muted);
}

.followup-tray.is-hidden {
  display: none;
}

.followup-tray-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ghost-button {
  border: none;
  background: transparent;
  color: var(--text-soft);
  padding: 2px 0;
  cursor: pointer;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chat-form {
  display: block;
}

.composer-shell {
  border: 1px solid #d2dbf2;
  border-radius: 28px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(38, 54, 127, 0.06);
}

#message-input {
  width: 100%;
  min-height: 60px;
  max-height: 220px;
  resize: none;
  border: none;
  outline: none;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  line-height: 1.55;
}

#message-input::placeholder {
  color: #8792b9;
}

.composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 8px 4px;
}

.muted {
  color: var(--text-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0.72);
    opacity: 0.45;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .sidebar {
    height: auto;
  }

  .chat-shell {
    min-height: 100dvh;
  }
}

@media (max-width: 900px) {
  .chat-header,
  .composer-meta,
  .snapshot-form-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-header-actions {
    justify-content: space-between;
  }

  #send-button,
  .secondary-button,
  .snapshot-submit {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 20px 14px 16px;
  }

  .brand-mark {
    font-size: 2.5rem;
  }

  .chat-header,
  .chat-log,
  .chat-bottom-dock {
    padding-left: 16px;
    padding-right: 16px;
  }

  .message[data-role="user"],
  .message[data-role="assistant"],
  .message[data-role="pending"] {
    width: 100%;
  }
}

/* Redirection Page Styles */
.redirect-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 20px;
  background: radial-gradient(circle at top right, #1d2968 0%, #26367f 100%);
  color: #ffffff;
}

.redirect-card {
  width: 100%;
  max-width: 500px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo-section {
  padding: 40px 40px 30px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-section .brand-mark {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.info-section {
  padding: 40px;
  text-align: center;
}

.status-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.info-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.info-section p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.primary-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.primary-cta:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 15px 20px -3px rgba(37, 99, 235, 0.4);
}

.url-hint {
  margin-top: 24px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

.url-hint code {
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}
