:root {
  --bg: #efe7da;
  --card: rgba(255, 251, 245, 0.94);
  --card-strong: #fffaf3;
  --accent: #0b8e73;
  --accent-strong: #0c5e4d;
  --text: #22312d;
  --muted: #6c7a76;
  --border: rgba(17, 79, 60, 0.12);
  --user: #dff6ef;
  --bot: #fff8ed;
  --shadow: 0 20px 60px rgba(56, 53, 45, 0.1);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Segoe UI", "SF Pro Text", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(11, 142, 115, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 208, 122, 0.18), transparent 24%),
    linear-gradient(180deg, #f3ecdf 0%, #ebdfcf 100%);
}

.shell {
  width: min(960px, 100%);
  margin: 0 auto;
  min-height: 100vh;
  padding: 18px 14px 28px;
}

.topbar,
.status-card,
.panel,
.message {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar {
  padding: 22px 20px;
}

.topbar-copy {
  max-width: 680px;
}

.eyebrow,
.panel-kicker,
.message-author,
.section-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.02;
}

.topbar-note {
  margin: 12px 0 0;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.45;
}

.status-card {
  margin-top: 14px;
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.4;
}

.messages {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.message {
  padding: 16px;
}

.message.user {
  background: var(--user);
}

.message.assistant {
  background: var(--bot);
}

.message-author {
  margin-bottom: 10px;
}

.message-content {
  display: grid;
  gap: 12px;
}

.message-text {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.subscription-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card-strong);
}

.instruction-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(11, 142, 115, 0.06);
}

.subscription-primary {
  display: grid;
  gap: 8px;
}

.subscription-url {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(11, 142, 115, 0.08);
  border: 1px solid rgba(11, 142, 115, 0.1);
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.subscription-actions,
.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 600;
}

.action-link.secondary {
  color: var(--accent-strong);
  background: transparent;
}

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

.server-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.server-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.server-url {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.composer-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  display: grid;
  gap: 12px;
  padding: 18px 16px;
}

.panel-head {
  display: grid;
  gap: 6px;
}

.panel-kicker {
  color: var(--muted);
}

h2 {
  font-size: 22px;
  line-height: 1.15;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
button {
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 13px 14px;
  font: inherit;
}

input {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

button {
  cursor: pointer;
  color: white;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

button.ghost {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.65);
}

.hidden {
  display: none;
}

@media (min-width: 840px) {
  .composer-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

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

@media (max-width: 640px) {
  .shell {
    padding: 12px 10px 22px;
  }

  .topbar,
  .status-card,
  .panel,
  .message {
    border-radius: 20px;
  }

  .topbar {
    padding: 18px 16px;
  }

  .status-card,
  .message,
  .panel {
    padding-left: 14px;
    padding-right: 14px;
  }

  .subscription-card,
  .server-item {
    padding: 12px;
  }

  .action-link {
    width: 100%;
  }
}
