/* Just Chat — webpage experience (desktop + website + widget)
 * Sandy Sunset — unified with Command Center brand
 */
.just-chat-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 12% -8%, #3d2232 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #261624 0%, var(--s7-void) 52%);
  color: var(--text);
}

.jc-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.1rem 1.15rem 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.jc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.jc-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.jc-brand img {
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(244, 201, 123, .28);
}
.jc-brand h1 {
  margin: 0;
  font-size: 1.55rem;
  letter-spacing: .14em;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--s7-bright);
}
.jc-sub {
  margin: .15rem 0 0;
  font-size: .8rem;
  color: var(--muted);
}
.jc-top-actions {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  align-items: center;
}

.jc-covenant {
  margin: 0;
  padding: .65rem .9rem;
  font-size: .82rem;
  font-style: italic;
  color: var(--s7-text-soft);
  background: linear-gradient(90deg, rgba(232, 165, 117, .14), transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.jc-section-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--s7-gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: .04em;
}
.jc-hint {
  margin: .2rem 0 .55rem;
  font-size: .8rem;
  color: var(--muted);
}

/* Level cards */
.jc-levels {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: .5rem;
}
.level-card {
  text-align: left;
  background: linear-gradient(165deg, var(--s7-raised) 0%, var(--s7-deep) 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .65rem;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  transition: border-color .15s, transform .12s, box-shadow .15s;
  min-height: 96px;
}
.level-card:hover {
  border-color: var(--s7-border-w);
  transform: translateY(-1px);
}
.level-card.active {
  border-color: var(--s7-gold);
  box-shadow: 0 0 0 1px rgba(244, 201, 123, .35), 0 8px 20px rgba(0, 0, 0, .28);
}
.level-card .lv-emoji {
  font-size: 1.35rem;
  display: block;
  margin-bottom: .25rem;
}
.level-card .lv-label {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--s7-bright);
  letter-spacing: .02em;
}
.level-card .lv-tag {
  display: block;
  margin-top: .2rem;
  font-size: .68rem;
  color: var(--muted);
  line-height: 1.25;
}

.jc-level-detail {
  margin-top: .55rem;
  padding: .7rem .85rem;
  background: var(--s7-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .84rem;
  color: var(--s7-text-soft);
  line-height: 1.45;
}
.jc-level-detail strong {
  color: var(--s7-gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
}
.jc-level-detail .when {
  margin-top: .35rem;
  font-size: .78rem;
  color: var(--muted);
}

/* Persona chips */
.jc-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}
.jc-personas {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.persona-chip {
  border: 1px solid var(--line);
  background: var(--s7-deep);
  color: var(--muted);
  border-radius: 999px;
  padding: .35rem .85rem;
  font: inherit;
  font-size: .82rem;
  cursor: pointer;
}
.persona-chip:hover { color: var(--text); border-color: var(--s7-border-w); }
.persona-chip.active {
  background: var(--s7-raised);
  color: var(--s7-gold);
  border-color: var(--s7-gold);
  font-weight: 600;
}
.jc-core-toggle {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
  flex-direction: row;
}

/* Main chat column */
.jc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: .65rem;
}
.jc-log {
  flex: 1;
  min-height: 260px;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  padding: .85rem 1rem;
  background: rgba(26, 15, 28, .72);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(244, 201, 123, .06);
}
.bubble {
  margin: .55rem 0;
  padding: .7rem .9rem;
  border-radius: 10px;
  max-width: 92%;
  line-height: 1.5;
  font-size: .93rem;
}
.bubble.user {
  margin-left: auto;
  background: var(--s7-raised);
  border: 1px solid var(--line);
  color: var(--s7-bright);
}
.bubble.bot {
  background: var(--s7-deep);
  border: 1px solid var(--s7-border-w);
  color: var(--s7-text-soft);
}
.bubble .who {
  font-size: .7rem;
  color: var(--s7-gold);
  margin-bottom: .28rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: .06em;
}
.bubble .meta {
  margin-top: .4rem;
  font-size: .68rem;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
.bubble.welcome {
  max-width: 100%;
  border-style: dashed;
}

.jc-composer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
}
.jc-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 2.6rem;
  margin-bottom: .5rem;
  border-radius: 6px;
}
.jc-composer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.jc-level-badge {
  font-size: .72rem;
  color: var(--s7-gold);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  border: 1px solid var(--s7-border-w);
  border-radius: 4px;
  padding: .2rem .5rem;
}

.jc-foot {
  text-align: left;
  margin-top: .35rem;
}
.jc-foot.metrics-footer {
  margin-top: .5rem;
}
body.embed .jc-foot .mf-line { font-size: .65rem; }
body.embed .jc-foot .mf-title { font-size: .85rem; }
body.embed .jc-foot .mf-grid {
  grid-template-columns: 1fr;
  gap: .5rem;
}

/* Embed / widget: denser, no chrome links */
body.embed .jc-page {
  max-width: none;
  padding: .55rem .65rem .85rem;
  min-height: 100vh;
}
body.embed .top-links { display: none; }
body.embed .jc-covenant { font-size: .75rem; padding: .45rem .65rem; }
body.embed .jc-levels {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
body.embed .level-card {
  min-height: 78px;
  padding: .5rem .45rem;
}
body.embed .jc-log {
  max-height: none;
  flex: 1;
  min-height: 180px;
}
body.embed .jc-section-head h2 { font-size: .95rem; }
body.embed .jc-hint { display: none; }
body.embed .jc-foot { font-size: .65rem; }

@media (max-width: 520px) {
  .jc-levels { grid-template-columns: repeat(2, 1fr); }
  .jc-brand h1 { font-size: 1.3rem; }
}
