:root {
  --bg: #fff8f2;
  --panel: rgba(255, 252, 249, 0.86);
  --panel-strong: #fffefb;
  --ink: #402a33;
  --muted: #805e69;
  --accent: #f27d9b;
  --accent-strong: #e34f7d;
  --accent-soft: #ffe0e6;
  --mint: #cdeedf;
  --line: rgba(147, 94, 110, 0.18);
  --shadow: 0 20px 60px rgba(181, 111, 136, 0.18);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 209, 220, 0.8), transparent 32%),
    radial-gradient(circle at right 20%, rgba(205, 238, 223, 0.85), transparent 24%),
    linear-gradient(180deg, #fff7ef 0%, #ffecec 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

body::before {
  top: -120px;
  right: -60px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

body::after {
  bottom: -160px;
  left: -80px;
  background: radial-gradient(circle, rgba(242, 125, 155, 0.18), rgba(242, 125, 155, 0));
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.hero-card,
.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.hero-card {
  display: grid;
  grid-template-columns: 1.5fr minmax(220px, 0.8fr);
  gap: 24px;
  padding: 28px;
  border-radius: 32px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

h1,
h2 {
  font-family: "ZCOOL KuaiLe", cursive;
  margin: 0;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
}

.lead {
  max-width: 54ch;
  margin: 14px 0 0;
  font-size: 1.03rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-badge {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
}

.badge-lace {
  position: absolute;
  inset: 10px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.9) 2px, transparent 3px) 0 0 / 24px 24px,
    linear-gradient(135deg, rgba(242, 125, 155, 0.28), rgba(255, 255, 255, 0.1));
  border: 2px dashed rgba(242, 125, 155, 0.4);
}

.badge-core {
  position: relative;
  display: grid;
  gap: 6px;
  width: min(220px, 100%);
  padding: 28px 20px;
  border-radius: 22px;
  text-align: center;
  background: var(--panel-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.badge-title {
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.badge-status {
  font-family: "ZCOOL KuaiLe", cursive;
  font-size: 1.65rem;
  color: var(--accent-strong);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(300px, 0.58fr);
  gap: 24px;
  margin-top: 24px;
}

.panel {
  padding: 24px;
  border-radius: 28px;
}

.panel-chat {
  display: flex;
  flex-direction: column;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.chat-log {
  min-height: 640px;
  max-height: 74vh;
  overflow: auto;
  padding-right: 8px;
}

.message {
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.message-role {
  margin-bottom: 8px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.message-content {
  white-space: pre-wrap;
  line-height: 1.7;
}

.chat-form {
  margin-top: 18px;
}

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

.field span {
  font-size: 0.95rem;
  color: var(--muted);
}

textarea,
input {
  width: 100%;
  border: 1px solid rgba(147, 94, 110, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
  padding: 14px 16px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea {
  min-height: 132px;
  resize: vertical;
}

textarea:focus,
input:focus {
  border-color: rgba(227, 79, 125, 0.48);
  box-shadow: 0 0 0 4px rgba(242, 125, 155, 0.15);
  transform: translateY(-1px);
}

.form-row {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
}

.compact {
  flex: 1;
}

button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  padding: 14px 18px;
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  min-width: 150px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 12px 24px rgba(227, 79, 125, 0.24);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--ink);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.status-list div {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.status-list dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-list dd {
  margin: 0;
  line-height: 1.6;
}

.info-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(205, 238, 223, 0.88), rgba(255, 255, 255, 0.88));
}

.info-title {
  margin: 0 0 8px;
  font-family: "ZCOOL KuaiLe", cursive;
  font-size: 1.1rem;
}

.info-body {
  margin: 0;
  line-height: 1.7;
  color: var(--ink);
}

.settings-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.settings-form h3 {
  margin: 0;
  font-family: "ZCOOL KuaiLe", cursive;
  font-size: 1.05rem;
}

.editor-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.path-note {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .hero-card,
  .main-grid {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100% - 20px, 1180px);
    margin: 20px auto;
  }

  .panel,
  .hero-card {
    padding: 18px;
    border-radius: 24px;
  }

  .chat-log {
    min-height: 400px;
    max-height: 56vh;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 12px, 1180px);
    margin: 12px auto 18px;
  }

  .hero-card {
    gap: 14px;
    padding: 14px;
  }

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

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .chat-form {
    margin-top: 12px;
  }

  .chat-log {
    min-height: 80svh;
    max-height: 80svh;
  }

  textarea {
    min-height: 104px;
  }
}
