/* BlurReeler — every screen (docs/SITE.md "The stylesheet", docs/BRAND.md).
   Dark always: a video is judged against black, and an editor is looked at
   for hours. Scoped under .re-app. Every control states its background,
   colour, border and radius together, because BlurPager's baseline `button`
   rule paints color: #fff (CLAUDE.md §6). */

.re-app {
  --re-bg: #0d0f14;
  --re-panel: #151922;
  --re-line: #252b38;
  --re-text: #e8ebf1;
  --re-muted: #8a93a6;
  --re-teal: #00c6cf;
  --re-teal-dark: #00a7af;
  --re-danger: #f0516a;
  --re-radius: 10px;
  min-height: 100vh;
  background: var(--re-bg);
  color: var(--re-text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body:has(.re-app) { background: #0d0f14; margin: 0; }
.re-app *, .re-app *::before, .re-app *::after { box-sizing: border-box; }
.re-app a { color: var(--re-teal); }
.re-app h1 { font-size: 22px; margin: 0 0 12px; }
.re-app h2 { font-size: 15px; margin: 0 0 10px; color: var(--re-text); }
.re-app h3 { font-size: 13px; margin: 14px 0 4px; color: var(--re-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.re-muted { color: var(--re-muted); }

/* -- controls -------------------------------------------------------------- */
.re-app input, .re-app select, .re-app textarea {
  background: #0f1219; color: var(--re-text); border: 1px solid var(--re-line); border-radius: 8px;
  padding: 7px 9px; font: inherit; min-width: 0;
}
.re-app input:focus, .re-app select:focus, .re-app textarea:focus { outline: 2px solid var(--re-teal); outline-offset: 0; border-color: transparent; }
.re-app input[type="color"] { padding: 2px; height: 34px; width: 52px; }
.re-app input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--re-teal); }
.re-app input[type="range"] { accent-color: var(--re-teal); padding: 0; border: 0; background: transparent; }
.re-button, .re-quiet, .re-chip, .re-icon, .re-danger {
  font: inherit; cursor: pointer; border-radius: 8px; line-height: 1.2; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.re-button { background: var(--re-teal); color: #04161a; border: 1px solid var(--re-teal); padding: 8px 16px; font-weight: 700; }
.re-button:hover { background: var(--re-teal-dark); border-color: var(--re-teal-dark); color: #04161a; }
.re-quiet { background: transparent; color: var(--re-text); border: 1px solid var(--re-line); padding: 7px 12px; }
.re-quiet:hover { border-color: var(--re-teal); color: var(--re-text); background: transparent; }
.re-quiet:disabled { opacity: 0.55; cursor: default; }
.re-chip { background: #1c2230; color: var(--re-text); border: 1px solid var(--re-line); padding: 3px 8px; font-size: 13px; }
.re-chip:hover { border-color: var(--re-teal); background: #1c2230; color: var(--re-text); }
.re-icon { background: transparent; color: var(--re-muted); border: 1px solid transparent; padding: 2px 6px; font-size: 13px; }
.re-icon:hover { color: var(--re-text); border-color: var(--re-line); background: transparent; }
.re-danger { background: transparent; color: var(--re-danger); border: 1px solid #5a2430; padding: 7px 12px; }
.re-danger:hover { border-color: var(--re-danger); color: var(--re-danger); background: transparent; }
.re-inline { display: inline; margin: 0; }

/* -- frame ------------------------------------------------------------------ */
.re-bar { display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--re-line); background: var(--re-panel); }
.re-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--re-text) !important; text-decoration: none; font-size: 18px; }
.re-brand b { color: var(--re-teal); }
.re-mark { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.re-nav { display: flex; gap: 14px; flex: 1; }
.re-nav a { color: var(--re-text); text-decoration: none; }
.re-who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.re-main { padding: 18px; }
.re-center { display: grid; place-items: center; padding: 24px 16px; }
.re-card { background: var(--re-panel); border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 18px; }
.re-login { width: min(400px, 100%); }
.re-login .re-brand { font-size: 22px; margin-bottom: 18px; }
.re-login .re-mark { width: 34px; height: 34px; }
.re-form { display: grid; gap: 12px; }
.re-form label { display: grid; gap: 5px; font-size: 13px; color: var(--re-muted); }
.re-row { grid-template-columns: 1fr auto auto; align-items: end; }
.re-grow { min-width: 0; }

/* -- projects ----------------------------------------------------------------- */
.re-projects { display: grid; gap: 18px; max-width: 1200px; margin: 0 auto; }
.re-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.re-project { display: grid; gap: 8px; align-content: space-between; }
.re-project-link { color: var(--re-text) !important; text-decoration: none; display: grid; gap: 4px; }
.re-project-link:hover h2 { color: var(--re-teal); }
.re-project h2 { margin: 0; font-size: 17px; }
.re-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--re-muted); margin: 0; }
.re-empty { grid-column: 1 / -1; }

/* -- editor -------------------------------------------------------------------- */
.re-editor { display: grid; gap: 12px; }
.re-ed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.re-ed-name { flex: 1 1 220px; font-size: 18px !important; font-weight: 600; }
.re-save { font-size: 13px; color: var(--re-muted); min-width: 90px; }
.re-save[data-state="error"] { color: var(--re-danger); }
.re-save[data-state="saved"] { color: #22c38e; }
.re-error { margin: 0; padding: 9px 12px; border-radius: 8px; background: #2a1419; border: 1px solid #5a2430; color: #ffd3da; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.re-error[data-kind="note"] { background: #0f2427; border-color: #11545a; color: #c9f6f8; }
.re-ed-body { display: grid; grid-template-columns: 260px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.re-panel { background: var(--re-panel); border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 14px; min-width: 0; }
.re-center-col { display: grid; gap: 10px; min-width: 0; justify-items: center; }
.re-stage { position: relative; width: 100%; max-width: 100%; background: #000; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--re-line); }
.re-stage canvas { display: block; width: 100%; height: 100%; }
.re-boxes { position: absolute; inset: 0; }
.re-box { position: absolute; border: 1px dashed rgba(255, 255, 255, 0.35); cursor: move; touch-action: none; }
.re-box:hover { border-color: rgba(0, 198, 207, 0.8); }
.re-box.re-on { border: 2px solid var(--re-teal); }
.re-box-tag { position: absolute; top: -20px; left: -1px; font-size: 11px; background: var(--re-teal); color: #04161a; padding: 1px 5px; border-radius: 4px 4px 0 0; display: none; }
.re-box.re-on .re-box-tag { display: block; }
.re-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--re-teal); border-radius: 3px; cursor: nwse-resize; display: none; }
.re-box.re-on .re-handle { display: block; }
.re-transport { display: flex; align-items: center; gap: 10px; width: 100%; }
.re-transport input[type="range"] { flex: 1; }
.re-time { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--re-muted); min-width: 110px; text-align: right; }
.re-scenes { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; width: 100%; padding-bottom: 4px; }
.re-scene { flex: 0 0 150px; background: var(--re-panel); border: 1px solid var(--re-line); border-radius: 8px; padding: 8px; cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: 13px; }
.re-scene.re-on { border-color: var(--re-teal); box-shadow: 0 0 0 1px var(--re-teal); }
.re-scene-n { font-weight: 700; color: var(--re-teal); }
.re-scene-t { color: var(--re-muted); text-align: right; }
.re-scene-x { grid-column: 1 / -1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.2em; }
.re-scene-tools { grid-column: 1 / -1; display: flex; gap: 2px; justify-content: flex-end; }
.re-add { display: flex; flex-wrap: wrap; gap: 8px; }
.re-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.re-field { display: grid; gap: 4px; font-size: 12px; color: var(--re-muted); align-content: start; min-width: 0; }
.re-field input:not([type="checkbox"]):not([type="color"]), .re-field select, .re-field textarea { width: 100%; }
.re-wide { grid-column: 1 / -1; }
.re-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.re-layers { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.re-upload { display: block; border: 1px dashed var(--re-line); border-radius: 8px; padding: 12px; text-align: center; cursor: pointer; color: var(--re-text); }
.re-upload:hover { border-color: var(--re-teal); }
.re-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.re-media, .re-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.re-media-item, .re-track, .re-job { display: grid; gap: 5px; padding: 8px; border: 1px solid var(--re-line); border-radius: 8px; font-size: 13px; }
.re-track { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: end; }
.re-track .re-media-name { grid-column: 1 / -1; }
.re-media-name { font-weight: 600; overflow-wrap: anywhere; }
.re-media-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.re-job { grid-template-columns: 1fr; }
.re-job-failed { border-color: #5a2430; }
.re-job-done { border-color: #1d4d43; }
.re-thumb { max-width: 100%; max-height: 160px; border-radius: 6px; display: block; }
.re-error-text { color: #ffb4c0; font-size: 12px; overflow-wrap: anywhere; }
.re-lower { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

@media (max-width: 1100px) {
  .re-ed-body { grid-template-columns: minmax(0, 1fr); }
  .re-ed-body > .re-library { order: 2; }
  .re-ed-body > .re-inspector { order: 3; }
  .re-lower { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .re-bar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .re-main { padding: 12px; }
  .re-row { grid-template-columns: minmax(0, 1fr); }
  .re-who .re-muted { display: none; }
  .re-track { grid-template-columns: 1fr 1fr; }
}

/* -- templates (RE-5) ---------------------------------------------------------- */
.re-templates h2 { margin-bottom: 8px; }
.re-chips { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.re-chip-row { display: inline-flex; align-items: center; gap: 6px; background: #1c2230; border: 1px solid var(--re-line); border-radius: 8px; padding: 4px 6px 4px 10px; font-size: 14px; }

/* -- caption words (RE-6) ---------------------------------------------------------- */
.re-words { display: flex; flex-wrap: wrap; gap: 4px; max-height: 240px; overflow: auto; padding: 2px; }
.re-app input.re-word { width: auto; padding: 2px 6px; font-size: 13px; border-radius: 6px; }
.re-app input.re-word.re-now { border-color: var(--re-teal); background: #0f2427; }
.re-app input.re-word.re-on { outline: 2px solid var(--re-teal); outline-offset: 0; }

/* -- a series at once (RE-9) --------------------------------------------------------- */
.re-series { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--re-line); }
.re-series h3 { margin-top: 0; }
.re-series-row { grid-template-columns: auto auto 1fr; }
.re-check { display: flex !important; flex-direction: row; align-items: center; gap: 8px; }
.re-series-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.re-series-list li[data-state="done"] .re-muted { color: #22c38e; }
.re-series-list li[data-state="failed"] .re-muted { color: var(--re-danger); }
@media (max-width: 640px) { .re-series-row { grid-template-columns: minmax(0, 1fr); } }

/* -- notes at a moment (RE-14) ------------------------------------------------------- */
.re-note { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--re-line); font-size: 14px; }
.re-note-body { overflow-wrap: anywhere; }
.re-note-reply { grid-column: 2 / 3; font-size: 13px; }
.re-note-done .re-note-body { color: var(--re-muted); text-decoration: line-through; }
.re-note-new { display: grid; gap: 6px; }
.re-notes-count { color: #04161a; background: var(--re-teal); border-radius: 6px; padding: 0 6px; font-weight: 600; }
.re-lower { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1400px) { .re-lower { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .re-lower { grid-template-columns: minmax(0, 1fr); } }
