/* 고객센터(P3, RM-108). 색·글꼴은 site.css 토큰(--surface · --line · --text · --muted · --brand · --ok · --pending · --danger · --off)만.
   폰 폭 기준 한 단 · 큰 단추 · 입력 칸은 화면 아래 고정 안 함(게임 안 창 키보드에 안 가리게). */
.cs { max-width: 720px; margin: 0 auto; padding: 8px 0 40px; display: flex; flex-direction: column; gap: 14px; }
.cs-title { font-size: 1.5rem; margin: 6px 0 0; }
.cs h2 { font-size: 1.12rem; margin: 0; }
.cs h3 { font-size: 1rem; margin: 0; }
.cs [hidden] { display: none !important; }   /* grid·flex 가 hidden 을 덮지 않게 */
#cs-root { display: flex; flex-direction: column; gap: 14px; }
.cs-sub { color: var(--text-2); margin: 0; }
.cs-hint { color: var(--muted); font-size: 0.88rem; margin: 0; }
.cs-ok, .cs-warn, .cs-err { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 0.92rem; }
.cs-ok { background: var(--ok-soft); color: var(--text); border: 1px solid var(--ok); }
.cs-warn { background: var(--pending-soft); color: var(--text); border: 1px solid var(--pending); }
.cs-err { background: var(--danger-soft); color: var(--text); border: 1px solid var(--danger); }
.cs-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.cs-form { display: flex; flex-direction: column; gap: 12px; }
.cs-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; color: var(--text-2); }
.cs-form input, .cs-form select, .cs-form textarea {
  font: inherit; font-size: 16px; /* 16px 미만이면 iOS 가 확대해 버린다 */
  color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px;
}
.cs-form textarea { resize: vertical; min-height: 7.5em; line-height: 1.55; }
.cs-form input:focus, .cs-form select:focus, .cs-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn-main, .btn-sub {
  font: inherit; font-weight: 600; border-radius: var(--radius-sm); padding: 12px 16px; min-height: 46px; cursor: pointer;
  border: 1px solid var(--brand); touch-action: manipulation;
}
.btn-main { background: var(--brand); color: var(--surface); }
.btn-sub { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-main:disabled, .btn-sub:disabled { opacity: 0.55; cursor: default; }
.btn-main:focus-visible, .btn-sub:focus-visible, .cs-cat:focus-visible, .cs-link-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.cs-link-btn { font: inherit; font-size: 0.9rem; background: none; border: 0; padding: 2px 4px; color: var(--brand-strong); text-decoration: underline; cursor: pointer; }
.cs-back { color: var(--text-2); text-decoration: none; font-size: 0.92rem; }

.cs-who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 0.95rem; }
.cs-who-text { font-weight: 600; }
.pill { display: inline-flex; align-items: center; font-size: 0.78rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; border: 1px solid currentColor; white-space: nowrap; }
.st-ok { color: var(--ok); background: var(--ok-soft); }
.st-wait { color: var(--pending); background: var(--pending-soft); }
.st-prog { color: var(--brand-strong); background: var(--brand-soft); }
.st-off { color: var(--off); background: var(--off-soft); }

.cs-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cs-cat {
  font: inherit; font-weight: 600; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius); padding: 16px 14px; min-height: 64px; cursor: pointer; touch-action: manipulation;
}
.cs-cat-main { font-size: 1.02rem; }
.cs-cats-more .cs-cat { min-height: 52px; padding: 12px; font-size: 0.95rem; }
@media (min-width: 640px) { .cs-cats { grid-template-columns: repeat(4, 1fr); } .cs-cats-more { grid-template-columns: repeat(3, 1fr); } }

.cs-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.cs-row {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px;
}
.cs-row-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cs-row-meta { grid-column: 2; color: var(--muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.cs-draft { border-style: dashed; }
.cs-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: 1px; }

.cs-att-wrap { display: flex; flex-direction: column; gap: 14px; }
.cs-att-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-att-bar .btn-sub { min-height: 42px; padding: 8px 14px; }
.cs-atts { display: flex; flex-wrap: wrap; gap: 10px; }
.cs-atts:empty { display: none; }
.cs-att { position: relative; width: 104px; display: flex; flex-direction: column; gap: 4px; }
.cs-att img, .cs-att-icon {
  width: 104px; height: 104px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--muted);
}
.cs-att-x {
  position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--text); color: var(--surface); font-size: 1rem; line-height: 28px; padding: 0;
}
.cs-att-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cs-att-label { font-size: 0.76rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cs-att-label.is-bad { color: var(--danger); }
/* RM-149: 앱이 넘긴 게임 화면 첨부 이름 */
.cs-att-cap { display: block; font-size: 0.76rem; font-weight: 600; color: var(--text); }
.cs-bar { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.cs-bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width 0.2s; }
.cs-info { font-size: 0.84rem; color: var(--muted); margin: 0; }

.cs-thread-head { display: flex; flex-direction: column; gap: 6px; }
.cs-thread-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); font-size: 0.86rem; }
.cs-promise { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--pending-soft); border: 1px solid var(--pending); font-size: 0.92rem; }
.cs-msgs { display: flex; flex-direction: column; gap: 10px; }
.cs-msg { max-width: 88%; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.cs-msg-user { align-self: flex-end; background: var(--brand-soft); border: 1px solid var(--line); }
.cs-msg-staff, .cs-msg-ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-strong); }
.cs-msg-system { align-self: center; max-width: 100%; background: var(--surface-2); color: var(--text-2); font-size: 0.9rem; }
.cs-msg-who { font-size: 0.76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-msg-body { white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.6; }
.cs-msg-atts { display: flex; flex-wrap: wrap; gap: 6px; }
.cs-msg-att img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; display: block; }
.cs-msg-video { width: 100%; max-width: 360px; max-height: 60vh; border-radius: 10px; background: #000; }
.cs-att-wait { font-size: 0.84rem; color: var(--text-2); padding: 8px 10px; border: 1px dashed var(--line-strong); border-radius: 10px; }
.cs-actions { display: flex; flex-direction: column; gap: 10px; }
.cs-actions:empty { display: none; }
.cs-ask { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-ask p { width: 100%; margin: 0; font-weight: 600; }
.cs-handoff-code { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.cs-handoff-code strong { font-size: 1.8rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.cs-handoff-url { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-url { font-size: 0.95rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.cs-code-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.cs-code-row label { flex: 1 1 160px; }
#cs-code, #cs-hcode { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
/* AI 상담(RM-109): 관련 글 링크 · 쓰는 중 표시 · 사람에게 넘기기 */
.cs-msg-links { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--line); }
.cs-msg-links-h { font-size: 0.76rem; color: var(--muted); }
.cs-msg-links a { color: var(--brand-strong); font-size: 0.92rem; text-decoration: underline; overflow-wrap: anywhere; }
.cs-typing { color: var(--text-2); }
.cs-typing::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: cs-dots 1.2s steps(4, end) infinite; }
@keyframes cs-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.cs-human { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cs-human p { flex: 1 1 200px; }
@media (prefers-reduced-motion: reduce) { .cs-bar i { transition: none; } .cs-typing::after { animation: none; content: "..."; } }
