/* 말로 고치기 시연 16판(무리·타자·훑는 줄·초록 고침) — 레퍼런스 수치(폰 촬영 0.1초 간격): 선 1.5px #3B7BFF·흰 모서리 점 6px·크기 꼬리표는 상자 아래 가운데,
   자리 판 #5B6470 불투명, 빨간 상자 #FF453A 한 번, 커서 15px 네 색·꼬리 3, 깨진 글자는 흰색·45ms. 위치·투명도는 edit.js 가 매 프레임 정한다. */

/* 무대: PC 는 사이트 화면 + 대화 칸 340 */
.nx-tile .trydemo{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start;width:min(1400px,calc(100% - 32px))}
.trydemo .td-chat{margin:0;width:auto;height:auto;min-height:0;padding:22px;font-size:15px;align-self:center}
.trydemo .td-h{font-size:18px}
.trydemo .td-try{margin:8px 0 0;font-size:14px;font-weight:600;color:#18181B}
.trydemo .td-chips{gap:7px;margin-top:12px}
.trydemo .td-chips button{font-size:14.5px;padding:8px 13px}
.trydemo .td-chips button:not([aria-pressed=true]){border-color:#D4D4D8;color:#18181B}
.trydemo .td-chips button:disabled:not([aria-pressed=true]){opacity:1;color:#52525B}
.trydemo .td-log{flex:none;height:318px!important;overflow:hidden;margin-top:6px}   /* 높이 고정 — 단계가 바뀌어도 출렁이지 않게 */
.trydemo .td-me{font-size:19px;line-height:1.45;font-weight:700;padding:13px 17px;margin:16px auto 14px 0;max-width:100%;min-height:0;border-radius:16px 16px 16px 5px}
.td-st{display:flex;align-items:center;gap:8px;margin:0;font-size:16px;font-weight:700;line-height:1.6}
.td-stt.now{color:#52525B}
.td-stt.ok{color:#047857}
.trydemo .td-mark{width:17px;height:17px;margin:0}
.td-ba{margin-top:10px;padding:11px 13px;border-radius:10px;background:#F4F4F5;font-size:15px;line-height:1.45}
.td-ba p{display:flex;gap:10px;margin:0;border-left:3px solid transparent;margin-left:-13px;padding-left:10px;transition:border-color .3s,background-color .3s}
.td-ba p+p{margin-top:7px}
.td-ba b{flex:none;width:22px;padding-top:2px;font-size:13px;color:#18181B;font-weight:800}
.td-ba p:first-child span{color:#3F3F46}
.td-ba .af span{font-size:16.5px;line-height:1.4;font-weight:800;color:#0B0B0C}
.td-ba .af.hot{border-left-color:#3B7BFF}
.td-ba .af.hot b{color:#3B7BFF}
.td-ba .th{display:inline-block;width:56px;height:32px;margin-right:9px;border-radius:4px;vertical-align:middle;object-fit:cover;object-position:30% 40%}
.td-ba .af span:has(.th){display:flex;align-items:center}
.trydemo .td-ans{font-size:14.5px;line-height:1.55;margin-top:10px;color:#3F3F46}
.trydemo .td-undo{font-size:13.5px}
.trydemo .td-note{grid-column:1/-1;margin:0;max-width:none;font-size:13px;color:#A1A1AA}
.td-b{transition:none!important}
.td-screen{overflow:hidden;background:#0C0D10}
.td-cam{position:absolute;left:0;top:0;width:100%;height:100%}
.td-try.auto{color:#18181B}
.td-try.auto b{font-weight:800;text-decoration:underline;text-underline-offset:3px}
.td-play{display:inline-block;vertical-align:1px;margin-right:7px;width:8px;height:8px;border-radius:50%;background:#22C55E;box-shadow:0 0 0 0 rgba(34,197,94,.5);animation:td-pulse 1.4s ease-out infinite}
@keyframes td-pulse{to{box-shadow:0 0 0 7px rgba(34,197,94,0)}}
.td-auto{height:2px;margin-top:10px;background:#E4E4E7;border-radius:2px;overflow:hidden}
.td-auto i{display:block;height:100%;background:#18181B;transform-origin:0 50%;transform:scaleX(0)}

/* 덧칠 층 — 레퍼런스 수치: 선 1.5px #3B7BFF·흰 모서리 점 6px·꼬리표 상자 아래 가운데 파란 알약, 회색 칸은 반투명(밑글 비침) */
.trydemo .ag{position:absolute;inset:0;z-index:4;pointer-events:none;overflow:hidden}
.trydemo .ag>div{position:absolute}
.trydemo .ag-win{overflow:hidden}
.trydemo .ag-win.blr{backdrop-filter:blur(9px) brightness(.55);-webkit-backdrop-filter:blur(9px) brightness(.55)}
.trydemo .ag-win img{position:absolute;max-width:none;display:block}
.trydemo .ag-red{box-sizing:border-box;border:2px solid #FF453A;box-shadow:inset 0 0 0 1px rgba(255,69,58,.35)}
.trydemo .ag-g{background:rgba(70,135,255,.85)}
.trydemo .ag-g.v{top:0;bottom:0;width:1px}
.trydemo .ag-g.h{left:0;right:0;height:1px}
.trydemo .ag-tx{position:absolute;transform:translateY(-50%);color:#fff;line-height:1.15;white-space:nowrap;font-family:"Pretendard Variable",Pretendard,sans-serif;text-shadow:0 3px 18px rgba(0,0,0,.3)}
.trydemo .ag-tx .sx{color:#E8F0FF;background:rgba(59,123,255,.5);text-shadow:-5px 0 4px rgba(140,180,255,.75),5px 0 4px rgba(140,180,255,.4)}
.trydemo .ag-box{box-sizing:border-box;border:1.5px solid #3B7BFF}
.trydemo .ag-box i{position:absolute;width:6px;height:6px;margin:-3.5px 0 0 -3.5px;background:#fff;border:1px solid #3B7BFF;box-sizing:border-box}
.trydemo .ag-box i:nth-child(1){left:0;top:0}.trydemo .ag-box i:nth-child(2){left:100%;top:0}.trydemo .ag-box i:nth-child(3){left:0;top:100%}.trydemo .ag-box i:nth-child(4){left:100%;top:100%}
.trydemo .ag-tag{position:absolute;left:50%;top:100%;margin-top:6px;transform:translateX(-50%);padding:1px 5px;border-radius:2px;background:#3B7BFF;color:#fff;font:600 10.5px/1.35 "Pretendard Variable",Pretendard,sans-serif;white-space:nowrap;font-variant-numeric:tabular-nums}
.trydemo .ag-box:not(.main) .ag-tag{display:none}
.trydemo .ag-box.main{border-width:2px}
.trydemo .ag-box.crowd{border-width:1px}
.trydemo .ag-box.slab{background:rgba(148,163,184,.42);border-width:1px}
.trydemo .ag-box.slab i{width:5px;height:5px;margin:-3px 0 0 -3px}
/* 커서: 작은 색 화살표·십자(잔상 꼬리) + AI 하나 */
.trydemo .ag-c{position:absolute;left:0;top:0;will-change:transform}
.trydemo .ag-c.mw{width:17px;height:21px;margin:-1px 0 0 -1px}
.trydemo .ag-c.cw{width:10px;height:12px;margin:-1px 0 0 -1px}
.trydemo .ag-c.pw{width:9px;height:9px;margin:-4.5px 0 0 -4.5px}
.trydemo .ag-c svg{display:block;width:100%;height:100%;filter:drop-shadow(0 0 1px rgba(0,0,0,.8))}
.trydemo .ag-c.gh svg{filter:none}
.trydemo .ag-lab{position:absolute;left:0;top:0;padding:1px 7px;border-radius:4px;background:#fff;color:#0B0B0C;font:800 12px/1.45 "Pretendard Variable",Pretendard,sans-serif;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.4);will-change:transform}
/* 진행 상태: 화면 안 아래 가운데 알약(레퍼런스 아래 도구 막대 자리) */
.trydemo .ag-st{position:absolute;left:50%;bottom:12px;z-index:6;display:flex;align-items:center;gap:8px;padding:6px 14px 6px 11px;border-radius:999px;background:rgba(11,11,12,.86);box-shadow:0 0 0 1px rgba(255,255,255,.14),0 8px 24px rgba(0,0,0,.4);color:#fff;font:700 14px/1.3 "Pretendard Variable",Pretendard,sans-serif;white-space:nowrap;transform:translateX(-50%);pointer-events:none}
.trydemo .ag-st:not(.live):not(.ok){display:none}
.trydemo .ag-dots{display:flex;gap:3px}
.trydemo .ag-dots i{width:6px;height:6px;border-radius:50%}
.trydemo .ag-dots i:nth-child(1){background:#4ADE80}.trydemo .ag-dots i:nth-child(2){background:#F472B6}.trydemo .ag-dots i:nth-child(3){background:#FACC15}.trydemo .ag-dots i:nth-child(4){background:#38BDF8}
.trydemo .ag-st.ok .ag-dots{display:none}
.trydemo .ag-st.ok::before{content:"";width:16px;height:16px;border-radius:50%;background:#22C55E url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.3l2 2 4-4.6' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat}
.td-ba{visibility:hidden}.td-ba.on{visibility:visible}

@media (max-width:960px){
  .nx-tile .trydemo{grid-template-columns:1fr;gap:10px;width:auto;margin-left:-14px;margin-right:-14px}
  .trydemo .td-chat{margin:0 6px;padding:14px 16px}
}
/* 폰: 모바일판 사이트(390×520)를 크게, 대화 칸은 낮고 높이 고정 */
@media (max-width:600px){
  .trydemo.td-m .td-screen{aspect-ratio:390/470}
  .trydemo.td-m .td-cam{height:auto;aspect-ratio:390/520}
  .trydemo .ag-c.mw{width:16px;height:20px}
  .trydemo .ag-c.cw{width:9px;height:11px}
  .trydemo .ag-st{bottom:10px;left:auto;right:10px;transform:none;font-size:13px;padding:5px 12px 5px 9px}
  .td-bar{height:22px}.td-bar span{padding:1px 10px;font-size:10px}
  .trydemo .td-h,.trydemo .td-ans,.trydemo .td-undo{display:none}
  .trydemo .td-try{margin-top:2px;font-size:13px}
  .trydemo .td-chips{margin-top:8px}
  .trydemo .td-chips{flex-wrap:nowrap;gap:5px}
  .trydemo .td-chips button{font-size:12.5px;padding:6px 9px;white-space:nowrap}
  .trydemo .td-try{font-size:12.5px}
  .td-auto{margin-top:8px}
  .trydemo .td-log{height:168px!important;margin-top:4px}
  .trydemo .td-me{margin:8px 0 6px auto;font-size:14px;padding:7px 12px}
  .td-st{font-size:14px}
  .td-ba{margin-top:6px;padding:8px 10px;font-size:13.5px}
  .td-ba p{margin-left:-10px;padding-left:7px}
  .td-ba span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .td-ba .af span{font-size:15px}
  .trydemo .ag-tag{font-size:10px}
}
.frozen *,.frozen *::before,.frozen *::after{transition:none!important;animation:none!important}
.trydemo .td-undo[hidden]{display:block;visibility:hidden}   /* 자리 미리 잡기 — 끝나도 칸 높이 그대로 */
@media (max-width:600px){.trydemo .td-undo[hidden]{display:none}}
