/* lastai.app/chat (api/platform-chat.rs) — the chat list in the Discover look. */
.chat-main { width: min(100%, 860px); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.discover-main .chat-head h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 750; }
.discover-home .chat-download { display: inline-flex; align-items: center; min-height: 44px; color: var(--dh-accent-text); font-size: 14px; font-weight: 650; }
.discover-home .chat-choose { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 16px 0 18px; border-radius: 14px; background: var(--dh-lime); color: #131517; font-size: 16px; font-weight: 720; }
.chat-choose .discover-icon { width: 18px; height: 18px; }
.chat-search { position: relative; display: flex; align-items: center; margin-top: 12px; }
.chat-search > .discover-icon { position: absolute; left: 15px; width: 19px; height: 19px; color: var(--dh-muted); pointer-events: none; }
.chat-search label { flex: 1; }
.chat-search input { width: 100%; min-height: 48px; padding: 0 14px 0 44px; border: 1px solid var(--dh-line); border-radius: 12px; background: var(--dh-surface); color: var(--dh-text); font: inherit; font-size: 16px; }
.chat-search input::placeholder { color: var(--dh-muted); }
.chat-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.chat-filters { display: flex; gap: 6px; margin-top: 14px; }
.discover-home .chat-filters a { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; padding: 0 14px; border: 1px solid var(--dh-line); border-radius: 999px; color: var(--dh-muted); font-size: 14px; font-weight: 650; }
.discover-home .chat-filters a[aria-current="page"] { border-color: transparent; background: var(--dh-selected); color: var(--dh-accent-text); }
.chat-filters .discover-icon { width: 15px; height: 15px; }
.chat-filters span { font-variant-numeric: tabular-nums; }
.chat-list { list-style: none; margin: 10px 0 0; padding: 0; }
.chat-list li + li .chat-row { border-top: 1px solid var(--dh-divider); }
.discover-home .chat-row { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 14px; min-height: 76px; padding: 12px 4px; }
.chat-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: #fff; }
.chat-avatar.is-initial { display: grid; place-items: center; background: var(--dh-surface); color: var(--dh-text); font-weight: 750; }
.chat-row-body { display: grid; gap: 3px; min-width: 0; }
.chat-row-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; }
.chat-tag { flex: none; padding: 1px 7px; border: 1px solid var(--dh-line); border-radius: 999px; color: var(--dh-muted); font-size: 12px; font-weight: 650; }
.chat-tag.is-mine { border-color: transparent; background: var(--dh-selected); color: var(--dh-accent-text); }
.chat-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dh-muted); font-size: 14px; }
.chat-row-side { display: grid; justify-items: end; gap: 6px; color: var(--dh-muted); font-size: 12px; white-space: nowrap; }
.chat-pin { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.chat-row > .discover-icon { width: 18px; height: 18px; color: var(--dh-muted); }
.chat-guest-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--dh-line); border-radius: 12px; background: var(--dh-surface); }
.chat-guest-note .discover-icon { width: 20px; height: 20px; color: var(--dh-accent-text); }
.chat-guest-note p { flex: 1; margin: 0; color: var(--dh-hero-copy); font-size: 14px; line-height: 1.5; word-break: keep-all; }
.discover-home .chat-guest-note a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--dh-lime); color: #131517; font-size: 14px; font-weight: 720; }
.chat-empty { display: grid; justify-items: center; gap: 16px; padding: 56px 12px; text-align: center; color: var(--dh-hero-copy); }
.chat-empty p { margin: 0; word-break: keep-all; }
.discover-home .chat-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--dh-lime); color: #131517; font-weight: 720; }
.chat-pill .discover-icon { width: 18px; height: 18px; }
.chat-note { margin: 28px 0 0; color: var(--dh-muted); text-align: center; }
@media (hover: hover) {
  .discover-home .chat-row:hover { background: var(--dh-hover); border-radius: 12px; }
  .discover-home .chat-choose:hover, .discover-home .chat-pill:hover { background: #e0ff5b; }
  .discover-home .chat-filters a:not([aria-current="page"]):hover { color: var(--dh-text); background: var(--dh-hover); }
}
@media (min-width: 700px) {
  .chat-main { padding-bottom: 64px; }
  .discover-main .chat-head h1 { font-size: 43px; }
  .discover-home .chat-row { padding-inline: 10px; }
}
.discover-home .chat-add { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--dh-lime); color: #131517; font-size: 14px; font-weight: 720; }
.chat-add .discover-icon { width: 17px; height: 17px; }
.chat-subtabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--dh-line); border-radius: 14px; background: var(--dh-surface); }
.discover-home .chat-subtabs a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; border-radius: 10px; color: var(--dh-muted); font-size: 14px; font-weight: 650; text-align: center; }
.discover-home .chat-subtabs a[aria-current="page"] { background: var(--dh-lime); color: #131517; }
.chat-section { margin-top: 22px; }
.chat-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; }
.discover-main .chat-section-head h2 { margin: 0; font-size: 15px; font-weight: 720; }
.chat-section-head span { color: var(--dh-muted); font-size: 13px; }
.chat-section .chat-list { margin-top: 4px; }
.chat-status { flex: none; display: inline-flex; align-items: center; gap: 6px; color: var(--dh-muted); font-size: 12px; font-weight: 650; white-space: nowrap; }
.chat-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dh-line); }
.chat-status.is-ready::before { background: var(--dh-lime); }
@media (hover: hover) { .discover-home .chat-subtabs a:not([aria-current="page"]):hover, .discover-home .chat-add:hover { filter: brightness(1.05); } }
/* 친구 추가 · 친구 소개 */
.discover-home .chat-back { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 10px; color: var(--dh-text); }
.chat-head:has(.chat-back) { justify-content: flex-start; }
.chat-head:has(.chat-cta) { justify-content: space-between; }
.chat-row.is-split { display: flex; align-items: center; gap: 10px; }
.discover-home .chat-row-link { display: grid; grid-template-columns: 48px minmax(0,1fr); align-items: center; gap: 14px; flex: 1; min-width: 0; }
.chat-row.is-split form { margin: 0; flex: none; }
.discover-home .chat-add-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 64px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--dh-lime); color: #131517; font: inherit; font-size: 14px; font-weight: 720; cursor: pointer; white-space: nowrap; }
.discover-home .chat-add-btn.is-done { background: var(--dh-selected); color: var(--dh-accent-text); }
.discover-home .chat-add-btn.is-off { background: transparent; border: 1px solid var(--dh-line); color: var(--dh-muted); }
.chat-add-btn .discover-icon { width: 15px; height: 15px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.discover-home .chat-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--dh-line); border-radius: 999px; color: var(--dh-muted); font-size: 13px; font-weight: 650; }
.discover-home a.chat-chip[aria-current="page"] { border-color: transparent; background: var(--dh-selected); color: var(--dh-accent-text); }
.chat-notice { margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--dh-line); border-radius: 12px; background: var(--dh-surface); color: var(--dh-text); font-size: 14px; line-height: 1.5; }
.chat-cta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.chat-cta form { margin: 0; }
.discover-home .chat-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border: 1px solid var(--dh-line); border-radius: 12px; background: var(--dh-surface); color: var(--dh-text); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.discover-home .chat-btn.is-primary { border-color: transparent; background: var(--dh-lime); color: #131517; }
.chat-added { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--dh-accent-text); font-weight: 700; }
.chat-added .discover-icon { width: 16px; height: 16px; }
.chat-profile { display: grid; gap: 16px; margin-top: 8px; }
.chat-profile-top { display: flex; align-items: center; gap: 18px; }
.chat-profile-top .chat-avatar { width: 88px; height: 88px; font-size: 30px; }
.discover-main .chat-profile-top h1 { margin: 0 0 4px; font-size: 30px; line-height: 1.15; font-weight: 750; }
.chat-profile-top p { margin: 0; color: var(--dh-muted); font-size: 14px; }
.chat-profile-text, .chat-card p, .chat-details p { margin: 0; color: var(--dh-hero-copy); line-height: 1.6; word-break: keep-all; }
.chat-card { display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--dh-line); border-radius: 14px; background: var(--dh-surface); }
.discover-main .chat-card h2 { margin: 0; font-size: 15px; font-weight: 720; }
.chat-details { border: 1px solid var(--dh-line); border-radius: 14px; }
.chat-details summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-weight: 700; cursor: pointer; list-style: none; }
.chat-details summary::-webkit-details-marker { display: none; }
.chat-details summary span { color: var(--dh-accent-text); }
.chat-details > div { display: grid; gap: 12px; padding: 0 16px 16px; }
.discover-home .chat-mini { display: inline-flex; align-items: center; gap: 5px; justify-self: start; min-height: 40px; padding: 0 12px; border: 1px solid var(--dh-line); border-radius: 10px; background: transparent; color: var(--dh-text); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.chat-mini .discover-icon { width: 14px; height: 14px; }
.chat-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }
.chat-toggle button { min-width: 64px; min-height: 36px; border: 1px solid var(--dh-line); border-radius: 999px; background: var(--dh-bg); color: var(--dh-muted); font: inherit; font-weight: 700; cursor: pointer; }
.chat-toggle button[aria-checked="true"] { border-color: transparent; background: var(--dh-lime); color: #131517; }
.chat-rating { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chat-rating > div { display: grid; justify-items: end; }
.chat-rating b { font-size: 28px; }
.chat-rating span { color: var(--dh-muted); font-size: 13px; }
.chat-stars { display: grid; gap: 10px; margin: 0; }
.chat-stars fieldset { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.chat-stars legend { margin-bottom: 6px; color: var(--dh-muted); font-size: 13px; }
.chat-stars label { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 10px; border: 1px solid var(--dh-line); border-radius: 10px; color: #f6c445; cursor: pointer; }
.chat-stars label:has(input:checked) { border-color: var(--dh-accent-text); background: var(--dh-selected); }
.chat-stars input { accent-color: var(--dh-lime); }
.chat-remove { display: grid; gap: 8px; margin: 8px 0 0; padding-top: 16px; border-top: 1px solid var(--dh-divider); color: var(--dh-muted); font-size: 14px; }
@media (max-width: 520px) {
  .chat-head:has(.chat-cta) { flex-direction: column; align-items: stretch; }
  .chat-cta { justify-content: stretch; }
  .chat-cta > *, .chat-cta form, .chat-cta .chat-btn { flex: 1; width: 100%; }
}
