/* cutroom online. Same palette as the editor; laid out for a phone first. */
:root {
  --bg: #09090a; --panel: #101012; --panel2: #16161a; --raise: #1d1d22; --line: #232328; --line2: #2e2e35;
  --text: #ececf1; --muted: #8d8d97; --faint: #5d5d68;
  --accent: #ffd36b; --blue: #6cb6ff; --good: #5fd38a; --warn: #ffb454; --bad: #ff6b6b;
  --r: 12px;
  --sans: -apple-system, "SF Pro Text", Inter, system-ui, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: var(--raise); border: 1px solid var(--line2); border-radius: 9px; padding: 9px 14px; cursor: pointer; }
button:hover { border-color: var(--faint); }
button.primary { background: var(--accent); color: #141414; border-color: var(--accent); font-weight: 600; }
button.ghost { background: transparent; }
button:disabled { opacity: .5; cursor: default; }
input, textarea, select { background: var(--panel2); border: 1px solid var(--line2); border-radius: 9px; padding: 10px 12px; width: 100%; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
@media (max-width: 899px) { .wide-only { display: none !important; } }
.logo { width: 18px; height: 18px; border-radius: 5px; background: conic-gradient(from 200deg, #ff6b6b, #ffd36b, #5fd38a, #6cb6ff, #b69cff, #ff6b6b); display: inline-block; vertical-align: -3px; margin-right: 8px; }
header.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(9,9,10,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
header.top .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 9px; }
.spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--faint); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; display: grid; gap: 12px; }
.login h1 { font-size: 22px; margin: 0 0 6px; }
.err { color: var(--bad); font-size: 14px; min-height: 1.2em; }

/* projects */
.proj { display: block; color: var(--text); }
.proj:hover { border-color: var(--line2); }
.proj .name { font-weight: 600; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.crumbs a { color: var(--muted); }
.folders { display: grid; gap: 6px; max-height: 46vh; overflow: auto; margin: 10px 0; }
.folders button { text-align: left; background: var(--panel2); }

/* project */
.project { display: grid; grid-template-columns: minmax(0, 1fr); }
.stage { padding: 12px 16px 0; }
.stage video { width: 100%; max-height: 62vh; background: #000; border-radius: var(--r); display: block; }
.cuts { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.cuts button { flex: none; font-size: 13px; padding: 6px 11px; border-radius: 99px; }
.cuts button.on { border-color: var(--accent); color: var(--accent); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
.acts button { font-size: 13px; padding: 7px 12px; }
.chat { display: flex; flex-direction: column; min-height: 50vh; }
.msgs { flex: 1; padding: 12px 16px 120px; display: grid; gap: 10px; align-content: start; }
.msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.you { justify-self: end; background: #2a2414; border: 1px solid #4a3d18; }
.msg.claude { justify-self: start; background: var(--panel); border: 1px solid var(--line); }
.msg.claude code { background: var(--raise); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.msg.tool { justify-self: start; padding: 2px 4px; color: var(--muted); font-size: 13px; }
.msg.tool::before { content: "› "; color: var(--accent); }
.msg.sys { justify-self: center; color: var(--faint); font-size: 12px; padding: 2px; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 4; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(9,9,10,.94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { resize: none; min-height: 44px; max-height: 40vh; }
.composer button { height: 44px; }
.attach { width: 44px; padding: 0; font-size: 20px; }
@media (min-width: 980px) {
  body.p { overflow: hidden; }
  .project { grid-template-columns: minmax(0, 1fr) 440px; height: calc(100vh - 53px); }
  .stage { overflow: auto; padding: 16px; }
  .stage video { max-height: 70vh; }
  .chat { border-left: 1px solid var(--line); min-height: 0; position: relative; }
  .msgs { overflow: auto; padding-bottom: 16px; }
  .composer { position: static; }
}
