/* ChatGPT-style Thumbnail Studio — premium HD */

.tc-app{
  max-width:1180px;margin:0 auto;padding:1rem 1.1rem 2.5rem;
  display:grid;grid-template-columns:340px 1fr;gap:1.1rem;min-height:72vh;
}

@media (max-width:860px){
  .tc-app{
    grid-template-columns:1fr;
    padding:.85rem .75rem calc(3rem + env(safe-area-inset-bottom,0));
    gap:.75rem;min-height:0;
  }
  .tc-side,.tc-chat{border-radius:18px;padding:.9rem}
  .tc-side h1{font-size:clamp(1.35rem,5.5vw,1.6rem);margin:.25rem 0}
  .tc-side label{font-size:.78rem;margin:.55rem 0}
  .tc-side input,.tc-side select{
    min-height:46px;padding:.7rem .75rem;font-size:16px;border-radius:12px;
  }
  .tc-side .th-btn{
    width:100%;min-height:48px;justify-content:center;
    font-size:.9rem!important;border-radius:14px!important;
  }
  .tc-chat{min-height:420px}
  .tc-bubble{font-size:.9rem;padding:.7rem .85rem;border-radius:14px;max-width:96%}
  .tc-composer{gap:.45rem}
  .tc-composer textarea{
    min-height:64px;font-size:16px;border-radius:14px;padding:.7rem .8rem;
  }
  .tc-composer .th-btn{
    min-height:48px;width:100%;justify-content:center;border-radius:14px!important;
  }
  .tc-chips{gap:.4rem}
  .tc-chips button{font-size:.72rem;padding:.4rem .65rem}
}

@media (max-width:600px){
  .tc-composer{flex-direction:column;align-items:stretch}
  .tc-preview-wrap{border-radius:12px;margin:.75rem 0}
}

.tc-side,.tc-chat{
  background:rgba(12,18,28,.78);border:1px solid var(--th-line,rgba(255,255,255,.08));
  border-radius:22px;padding:1.15rem;backdrop-filter:blur(12px);
  box-shadow:0 18px 50px rgba(0,0,0,.22);
}

.tc-side h1{margin:.35rem 0;font-size:1.55rem;letter-spacing:-.02em}
.tc-lead{margin:0 0 .75rem;font-size:.88rem;line-height:1.45;color:var(--th-muted,#8b97a8)}

.tc-side label{display:block;margin:.7rem 0;font-size:.82rem;color:var(--th-muted,#8b97a8)}

.tc-side input,.tc-side select{
  width:100%;margin-top:.3rem;border-radius:12px;border:1px solid var(--th-line);
  background:rgba(0,0,0,.28);color:inherit;padding:.6rem .75rem;font:inherit;
}

.tc-preview-wrap{
  margin:1.1rem 0;aspect-ratio:16/9;border-radius:16px;overflow:hidden;
  background:linear-gradient(145deg,#0a0f18,#121a28);
  border:1px solid var(--th-line);display:grid;place-items:center;
  padding:.75rem;box-sizing:border-box;
}

.tc-preview-wrap img{
  width:100%;height:100%;object-fit:cover;border-radius:10px;
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 12px 36px rgba(0,0,0,.35);
}

.tc-side-actions{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center}
.tc-hd-badge{
  font-size:.72rem;font-weight:800;letter-spacing:.04em;
  color:#ffb070;background:rgba(255,138,43,.12);
  border:1px solid rgba(255,138,43,.35);border-radius:999px;padding:.35rem .7rem;
}

.tc-chat{display:flex;flex-direction:column;min-height:560px}

.tc-messages{flex:1;overflow-y:auto;padding:.35rem;display:flex;flex-direction:column;gap:.75rem}

.tc-bubble{
  max-width:92%;padding:.8rem .95rem;border-radius:16px;line-height:1.5;font-size:.95rem;
  white-space:pre-wrap;
}
.tc-bubble.bot{align-self:flex-start;background:rgba(255,255,255,.06);border:1px solid var(--th-line)}
.tc-bubble.user{
  align-self:flex-end;
  background:linear-gradient(135deg,#ff8a2b,#e25500);color:#fff;
  box-shadow:0 8px 24px rgba(226,85,0,.25);
}

.tc-chips{
  display:flex;flex-wrap:wrap;gap:.45rem;
  padding:.55rem 0 .15rem;border-top:1px solid var(--th-line);margin-top:.35rem;
}
.tc-chips button{
  appearance:none;border:1px solid rgba(255,255,255,.1);background:rgba(255,255,255,.05);
  color:inherit;border-radius:999px;padding:.45rem .75rem;font:inherit;font-size:.78rem;
  cursor:pointer;transition:background .15s,border-color .15s;
}
.tc-chips button:hover{
  background:rgba(255,138,43,.15);border-color:rgba(255,138,43,.4);
}

.tc-composer{
  display:flex;gap:.55rem;margin-top:.55rem;align-items:flex-end;
  border-top:1px solid var(--th-line);padding-top:.75rem;
}

.tc-composer textarea{
  flex:1;border-radius:16px;border:1px solid var(--th-line);background:rgba(0,0,0,.28);
  color:inherit;padding:.75rem .9rem;font:inherit;resize:vertical;min-height:72px;
  line-height:1.45;
}
.tc-composer textarea:focus{
  outline:none;border-color:rgba(255,138,43,.55);
  box-shadow:0 0 0 3px rgba(255,138,43,.15);
}
