/* 필로소피 AI - 시네마틱 다크 테마 */
:root { --gold:#d4af37; --navy:#0a0e1a; --panel:#1a2138; }

* { scrollbar-width: thin; scrollbar-color: #2a3450 #12172a; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: #12172a; }
*::-webkit-scrollbar-thumb { background: #2a3450; border-radius: 4px; }

body { background: radial-gradient(ellipse at top, #141a30 0%, #0a0e1a 60%); min-height: 100vh; }

.card { background: linear-gradient(145deg, #1a2138, #151a2e); border: 1px solid #232c47; border-radius: 14px; }
.card:hover { border-color: #3a4568; }
.glass { background: rgba(26,33,56,.7); backdrop-filter: blur(12px); border: 1px solid rgba(212,175,55,.15); }

.btn { transition: all .18s ease; font-weight: 600; }
.btn-gold { background: linear-gradient(135deg, #d4af37, #b8941f); color: #0a0e1a; }
.btn-gold:hover { box-shadow: 0 4px 20px rgba(212,175,55,.4); transform: translateY(-1px); }
.btn-ghost { background: #232c47; color: #e5e7eb; }
.btn-ghost:hover { background: #2d3858; }
.btn-purple { background: linear-gradient(135deg, #7c5cff, #5b3fd6); color: #fff; }
.btn-purple:hover { box-shadow: 0 4px 20px rgba(124,92,255,.4); transform: translateY(-1px); }

.nav-item { transition: all .15s; border-left: 3px solid transparent; }
.nav-item:hover { background: #1f2740; }
.nav-item.active { background: linear-gradient(90deg, rgba(212,175,55,.15), transparent); border-left-color: var(--gold); color: var(--gold); }

.input { background:#0f1424; border:1px solid #2a3450; border-radius:9px; padding:.6rem .85rem; color:#e5e7eb; width:100%; transition:border .15s; }
.input:focus { outline:none; border-color:var(--gold); }
.input::placeholder { color:#5a6580; }
label.field { display:block; font-size:.8rem; color:#9aa5c0; margin-bottom:.3rem; }

.badge { font-size:.7rem; padding:.15rem .55rem; border-radius:999px; font-weight:600; }
.badge-gold{background:rgba(212,175,55,.15);color:#e8c75a;}
.badge-blue{background:rgba(59,130,246,.15);color:#60a5fa;}
.badge-green{background:rgba(34,197,94,.15);color:#4ade80;}
.badge-red{background:rgba(239,68,68,.15);color:#f87171;}
.badge-gray{background:rgba(148,163,184,.15);color:#94a3b8;}
.badge-purple{background:rgba(139,92,246,.15);color:#a78bfa;}

.toast { animation: slideIn .3s ease; }
@keyframes slideIn { from{transform:translateX(100%);opacity:0;} to{transform:translateX(0);opacity:1;} }
.fade-in { animation: fadeIn .4s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} }

.modal-overlay { background: rgba(5,8,16,.8); backdrop-filter: blur(4px); }

/* 로딩 스켈레톤 shimmer */
.skel { position: relative; overflow: hidden; background: #1a2138; border-radius: 8px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.palette-item:hover { background: rgba(212,175,55,.08); }
/* 반응형 표: 좁은 화면 가로 스크롤 + 터치 타깃 확대 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 640px) { .btn { min-height: 40px; } table.data th, table.data td { white-space: nowrap; } }

table.data { width:100%; border-collapse:collapse; }
table.data th { text-align:left; font-size:.75rem; color:#8a94b0; padding:.6rem .75rem; border-bottom:1px solid #232c47; }
table.data td { padding:.7rem .75rem; border-bottom:1px solid #1a2138; font-size:.875rem; }
table.data tr:hover td { background:#1c2440; }

.stage-pill { transition:all .15s; cursor:pointer; }
.stage-pill:hover { background:#232c47; }
.stage-pill.active { background:linear-gradient(135deg,#d4af37,#b8941f); color:#0a0e1a; }

.gradient-text { background:linear-gradient(135deg,#e8c75a,#d4af37,#8b5cf6); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* ===== 11차: 턴어라운드 디자인 페이지 ===== */
.card-soft { border: 1px solid #232c47; }
.turn-subject-btn { border: 2px solid transparent; color: #cbd5e1; }
.turn-subject-btn:hover { background: #1e2740; }
.turn-subject-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,.1); }
.turn-view-btn { border: 1.5px solid #2a3658; color: #94a3b8; }
.turn-view-btn:hover { border-color: #3b4d7a; }
.turn-view-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,.12); }
.turn-mini { transition: transform .15s, box-shadow .15s; }
.turn-mini:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.turn-zoom-wrap { max-height: 70vh; }
.turn-zoom-wrap img { min-width: 100%; }

/* 15차: 스토리보드 컨택트 시트 미리보기 */
.sb-sheet { max-height: 65vh; overflow: auto; }
.sb-head { font-size: 16px; font-weight: 800; margin-bottom: 10px; border-bottom: 2px solid #111; padding-bottom: 6px; }
.sb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sb-cell { border: 1px solid #ccc; border-radius: 6px; overflow: hidden; position: relative; background: #fafafa; }
.sb-no { position: absolute; top: 4px; left: 4px; background: #111; color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; z-index: 2; }
.sb-img { width: 100%; height: 120px; object-fit: cover; display: block; background: #eee; }
.sb-cap { padding: 6px 8px; font-size: 11px; line-height: 1.3; }
.sb-cap b { display: block; color: #111; }
.sb-cap span { color: #555; font-size: 10px; }
@media (max-width: 640px) { .sb-grid { grid-template-columns: repeat(2, 1fr); } }
