:root {
  --ink: #1c1c1e; --muted: #6e6e73; --line: #e5e5ea; --bg: #f5f5f7; --card: #fff;
  --blue: #0a66ff; --danger: #d70015; --success: #1f9d55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Cairo, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 10px; padding: 8px 14px; background: var(--blue); color: #fff; cursor: pointer; }
button.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
textarea { width: 100%; min-height: 70px; }
a { color: var(--blue); }

.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
nav { background: var(--card); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 6px; }
nav .brand { font-weight: 700; font-size: 18px; margin-bottom: 14px; }
nav a { text-decoration: none; color: var(--ink); padding: 8px 10px; border-radius: 8px; }
nav a.active { background: var(--bg); font-weight: 600; }
nav .spacer { flex: 1; }
nav select { width: 100%; margin-bottom: 10px; }
main { padding: 28px 32px; max-width: 1200px; }
h1 { font-size: 24px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 22px 0 10px; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); margin: 10px 0; }
.ok { color: var(--success); margin: 10px 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.list .card { margin-bottom: 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.grid video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 10px; object-fit: contain; }
.pill { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.pill.approved { background: #e3f6ea; color: var(--success); }
.pill.changes { background: #fde8ea; color: var(--danger); }

.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.plan { display: flex; flex-direction: column; gap: 8px; }
.plan h2 { margin: 0; }
.plan.current { border-color: var(--blue); }
.plan .price { font-size: 28px; font-weight: 700; }
.plan ul { margin: 0; padding-left: 18px; flex: 1; font-size: 14px; line-height: 1.7; }

.signin { max-width: 380px; margin: 12vh auto; display: flex; flex-direction: column; gap: 12px; }
.signin details { font-size: 14px; color: var(--muted); }

.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 120px; }
.msg { max-width: 760px; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-color: var(--blue); }
.composer { position: fixed; bottom: 0; left: 220px; right: 0; background: var(--bg); padding: 14px 32px; border-top: 1px solid var(--line); }
.composer form { display: flex; gap: 10px; max-width: 1136px; }
.composer input { flex: 1; }
.concept { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.concept p { white-space: pre-wrap; margin: 4px 0; font-size: 14px; }
.concept .line { cursor: pointer; border-radius: 4px; }
.concept .line:hover { background: #e8f0ff; }
.gif-icon { width: 28px; height: 28px; vertical-align: middle; margin-right: 6px; border-radius: 6px; }
.concept .cast-line { white-space: normal; }
.askable { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.slash { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; max-width: 520px; margin-bottom: 8px; padding: 4px; }
.slash button { text-align: left; border: 0; color: var(--ink); }
.slash button:hover { background: var(--bg); }
.focus { margin-bottom: 8px; }

.review { max-width: 520px; margin: 4vh auto; padding: 0 16px; display: flex; flex-direction: column; gap: 14px; }
.review video { width: 100%; max-height: 70vh; background: #000; border-radius: 14px; }

@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .composer { left: 0; }
}
