@charset "UTF-8";
/* Casper - Bot settings panel, part 3: Media vault, photo picker, Playground. */

/* ---------- media vault ---------- */
.pn-legend-c { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 0 0 16px; }
.pn-lc { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.pn-lc b { font-size: 14px; }
.pn-lc p { margin: 3px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.pn-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; margin-top: 12px; text-align: center; border: 2px dashed var(--border-2); border-radius: 18px; background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.pn-drop:hover, .pn-drop.over { border-color: var(--sky); background: var(--pn-tile); }
.pn-drop .pn-ic { width: 28px; height: 28px; color: var(--sky); }
.pn-drop small { color: var(--muted); max-width: 52ch; }
.pn-drop.is-full { opacity: .5; pointer-events: none; }
.pn-ups { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.pn-ups li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; min-width: 0; }
.pn-ups .pn-up-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-ups small { color: var(--muted); }
.pn-ups .pn-up-ic { width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.pn-ups .pn-up-ic .pn-ic { width: 18px; height: 18px; }
.pn-ups .up-done .pn-ic { color: var(--pn-ok); } .pn-ups .up-error .pn-ic { color: var(--pn-bad); } .pn-ups .up-error small { color: var(--pn-bad); }
.pn-vault-status { min-height: 18px; margin-top: 8px; font-size: 13px; color: var(--muted); } .pn-vault-status.bad { color: var(--pn-bad); }
.pn-vault-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 22px; }
.pn-vault-count { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.pn-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 6px; }
.pn-mc { display: flex; flex-direction: column; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); overflow: hidden; min-width: 0; }
.pn-thumb { position: relative; aspect-ratio: 4 / 5; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.pn-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pn-thumb.sk { background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface) 50%, var(--surface-2) 70%); background-size: 200% 100%; animation: pnsk 1.3s linear infinite; }
@keyframes pnsk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .pn-thumb.sk { animation: none; } }
.pn-thumb.bad { color: var(--muted); font-size: 13px; padding: 10px; text-align: center; }
.pn-mc-b { display: grid; gap: 8px; padding: 12px; }
.pn-rcs { display: flex; flex-wrap: wrap; gap: 4px; }
.pn-rc { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--pn-field); color: var(--muted); font: 600 12px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.pn-rc:hover { color: var(--text); }
.pn-rc.on { background: var(--sky); border-color: var(--sky); color: #04131c; }
@media (prefers-color-scheme: light) { .pn-rc.on { color: #fff; } }
.pn-rcs-t .pn-rc { flex: 1; text-align: center; border-radius: 9px; }
.pn-mc .co-input { padding: 8px 10px; font-size: 14px; }
.pn-sugg { display: flex; flex-wrap: wrap; gap: 4px; }
.pn-mc-f { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.pn-mc-st { flex: 1; font-size: 12px; color: var(--pn-ok); min-width: 0; } .pn-mc-st.bad { color: var(--pn-bad); }
.pn-mc-del { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.pn-mc-del small { color: var(--pn-bad); font-size: 12px; }
.pn-yes { background: #b3261e; color: #fff; border-color: #b3261e; padding: 6px 12px; font-size: 12.5px; }

/* picker dialog + opener photo row */
.pn-dlg { width: min(640px, calc(100% - 24px)); max-height: min(80vh, 640px); padding: 0; border: 1px solid var(--border-2); border-radius: 20px; background: var(--bg-2); color: var(--text); overflow: hidden; }
.pn-dlg[open] { display: flex; flex-direction: column; }
.pn-dlg::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.pn-dlg-h, .pn-dlg-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pn-dlg-f { border-top: 1px solid var(--border); border-bottom: 0; justify-content: flex-end; }
.pn-dlg-b { padding: 16px 18px; overflow-y: auto; flex: 1; }
.pn-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.pn-pick { display: flex; flex-direction: column; padding: 0; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; overflow: hidden; text-align: left; font: inherit; }
.pn-pick:hover, .pn-pick.on { border-color: var(--sky); }
.pn-pick .pn-thumb { aspect-ratio: 1; }
.pn-pick-l { display: flex; flex-direction: column; padding: 6px 8px; font-size: 12.5px; line-height: 1.25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-pick-l small { color: var(--muted); font-size: 11px; }
.pn-photo { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--border-2); flex-wrap: wrap; }
.pn-photo .pn-thumb, .pn-photo-ph { width: 52px; height: 52px; aspect-ratio: auto; border-radius: 10px; flex: none; }
.pn-photo-ph { display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.pn-photo-ph.bad { color: var(--pn-warn); }
.pn-photo-ph .pn-ic { width: 22px; height: 22px; }
.pn-photo-t { flex: 1 1 180px; display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pn-photo-t small { color: var(--muted); font-size: 12.5px; }
.pn-photo .btn { gap: 7px; } .pn-photo .btn .pn-ic { width: 15px; height: 15px; }

/* ---------- playground ---------- */
.pn-cost { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; } .pn-cost .pn-ic { width: 16px; height: 16px; flex: none; }
.pn-pset .pn-grow { flex: 1 1 280px; }
.pn-pgrid { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 20px; align-items: start; }
.pn-phone { display: flex; flex-direction: column; border-radius: 28px; border: 1px solid var(--border-2); background: var(--bg-2); overflow: hidden; box-shadow: var(--pn-shadow); position: sticky; top: 92px; }
.pn-phone-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.pn-phone-h > div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; } .pn-phone-h small { color: var(--muted); font-size: 11.5px; }
.pn-phone-h .btn { gap: 6px; } .pn-phone-h .btn .pn-ic { width: 14px; height: 14px; }
.pn-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--pn-tile); color: var(--sky); display: grid; place-items: center; } .pn-avatar .pn-ic { width: 18px; height: 18px; }
.pn-pmsgs { display: flex; flex-direction: column; gap: 6px; height: 380px; overflow-y: auto; padding: 14px 12px; scroll-behavior: smooth; }
.pn-pempty { margin: auto; text-align: center; color: var(--muted); font-size: 13.5px; max-width: 30ch; }
.pn-pb { max-width: 82%; padding: 8px 12px; border-radius: 18px; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 3px; }
.pn-pb.fan { align-self: flex-end; background: var(--sky); color: #04131c; border-bottom-right-radius: 5px; }
.pn-pb.bot { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; }
@media (prefers-color-scheme: light) { .pn-pb.fan { color: #fff; } }
.pn-tag { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--pn-ok); }
.pn-pb.typing { flex-direction: row; gap: 4px; padding: 12px 14px; }
.pn-pb.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pnt 1s infinite ease-in-out; }
.pn-pb.typing i:nth-child(2) { animation-delay: .15s; } .pn-pb.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes pnt { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .pn-pb.typing i { animation: none; opacity: .6; } }
.pn-sysb { align-self: center; max-width: 92%; padding: 7px 12px; border-radius: 12px; font-size: 12.5px; text-align: center; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.35); color: var(--text); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pn-sysb.bad { background: rgba(255,138,138,.08); border-color: var(--pn-bad); }
.pn-pstate { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 12px; font-size: 13px; color: var(--pn-bad); }
.pn-scen { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); } .pn-scen small { color: var(--muted); }
.pn-compose { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.pn-compose .co-input { flex: 1; min-width: 0; border-radius: 999px; padding: 10px 14px; }
.pn-compose .btn { gap: 6px; } .pn-compose .pn-ic { width: 15px; height: 15px; }
.pn-insp { padding: 16px 18px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); min-width: 0; }
.pn-insp .pn-h3 { margin-top: 0; }
.pn-il { margin: 0; display: grid; }
.pn-ir { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.pn-ir:last-child { border-bottom: 0; }
.pn-ir dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.pn-ir dd { margin: 0; font-size: 14px; min-width: 0; }
.pn-ir dd small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 1px; }
.pn-ir dd b + small { margin-top: 2px; }
.pn-kind { padding: 1px 9px; border-radius: 999px; font-size: 12.5px; background: var(--pn-tile); }
.pn-kind.k-ai { color: var(--sky); } .pn-kind.k-hold { background: rgba(255,138,138,.14); color: var(--pn-bad); }
.pn-kind.k-scripted-objection, .pn-kind.k-scripted-finisher { background: rgba(74,222,128,.14); color: var(--pn-ok); }
.pn-gate { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); }
.pn-warns .pn-callout { margin: 8px 0 0; }
.pn-prompt { margin-top: 12px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.pn-prompt summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pn-prompt pre { margin: 6px 0 10px; padding: 10px; border-radius: 10px; background: var(--pn-field); font: 12px/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 280px; overflow: auto; }
.pn-lbl { margin: 10px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pn-total { margin-top: 12px; }
@media (max-width: 900px) { .pn-pgrid { grid-template-columns: minmax(0, 1fr); } .pn-phone { position: static; } .pn-ir { grid-template-columns: 1fr; gap: 2px; } }
@media (max-width: 480px) { .pn-pmsgs { height: 320px; } .pn-mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pn-mc-b { padding: 8px; } .pn-rc { padding: 3px 8px; } }

.pn-prompt { padding: 0; background: transparent; }
.pn-prompt summary { padding: 10px 14px; list-style: none; display: flex; justify-content: space-between; }
.pn-prompt > :not(summary) { margin-left: 14px; margin-right: 14px; }
.pn-prompt > :last-child { margin-bottom: 12px; }
