/* Live-app additions on top of the prototype styles: sign-in, loading and empty states,
   inline editors, support banner, server artwork. */

.art img, .art .art-fallback { display: block; width: 100%; height: 100%; object-fit: cover; }
.art .art-fallback svg { width: 100%; height: 100%; display: block; }
.preview-phone .art img { aspect-ratio: inherit; }

/* sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--paper); }
.auth-side { background: var(--night); color: var(--on-night); padding: 40px max(32px, env(safe-area-inset-left, 0px)); display: grid; align-content: space-between; gap: 28px; position: relative; overflow: hidden; }
.auth-side img { height: 34px; width: auto; }
.auth-side h1 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.12; max-width: 16ch; }
.auth-side p { color: var(--on-night-2); max-width: 46ch; font-size: 15px; }
.auth-side .promise { color: var(--lime); font-size: 15px; }
.auth-points { display: grid; gap: 10px; }
.auth-points span { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--on-night); }
.auth-points svg { width: 18px; height: 18px; color: var(--lime); flex: none; }
.auth-glow { position: absolute; width: 420px; height: 420px; right: -140px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgb(140 198 63 / 0.28), transparent 65%); pointer-events: none; }
.auth-main { display: grid; place-items: center; padding: 32px max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); }
.auth-card { width: min(420px, 100%); display: grid; gap: 16px; }
.auth-card h2 { font-size: 1.45rem; }
.auth-card form { display: grid; gap: 12px; }
.auth-card .btn.primary { padding: 11px 14px; font-size: 14.5px; }
.auth-switch { font-size: 13.5px; color: var(--ink-2); }
.auth-switch button { background: none; border: 0; color: var(--green); font-weight: 650; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.demo-box { border: 1px dashed var(--mk-line); background: var(--mk-tint); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; font-size: 13px; }
.demo-box .row { justify-content: space-between; }
.demo-box code { font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.form-err { color: var(--bad); font-size: 13px; font-weight: 600; min-height: 1em; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 28px max(18px, env(safe-area-inset-left, 0px)) 28px max(18px, env(safe-area-inset-right, 0px)); }
  .auth-side .auth-points { display: none; }
}

/* loading, empty and not-yet-built states */
.loading { display: grid; gap: 14px; }
.skel { height: 96px; border-radius: var(--r); background: linear-gradient(90deg, var(--line-2), var(--surface-2), var(--line-2)); background-size: 200% 100%; animation: skel 1.4s ease-in-out infinite; }
.skel.sm { height: 44px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.soon { border: 1px dashed var(--line); background: var(--surface-2); border-radius: var(--r); padding: 28px 20px; text-align: center; display: grid; gap: 8px; justify-items: center; color: var(--ink-2); }
.soon svg { width: 28px; height: 28px; color: var(--mk); }
.soon b { color: var(--ink); font-family: var(--font-display); font-size: 15px; }
.err-box { border: 1px solid color-mix(in srgb, var(--bad) 30%, var(--line)); background: var(--bad-tint); color: var(--ink); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; }

/* banners */
.banner.support { background: var(--lime); color: #0c3a22; }
.banner.support .btn { margin-left: auto; }
.banner.task { background: var(--ai-tint); color: var(--ink); border-bottom: 1px solid var(--ai-line); }
.banner.task svg { color: var(--ai); }

/* workspace switcher */
.ws-switch { display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent; padding: 4px 6px 4px 0; border-radius: 10px; cursor: pointer; text-align: left; color: inherit; }
.ws-switch:hover { background: var(--line-2); }
.ws-switch .caret { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.ws-list { display: grid; gap: 6px; }
.ws-list button { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 10px 12px; cursor: pointer; text-align: left; color: var(--ink); }
.ws-list button[aria-current="true"] { border-color: var(--green); background: var(--mk-tint); }
.user-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--ink); cursor: pointer; flex: none; }

/* inline editors */
.chips-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-edit .chip button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 13px; line-height: 1; opacity: 0.7; }
.chips-edit .chip button:hover { opacity: 1; }
.add-row { display: flex; gap: 6px; margin-top: 8px; }
.add-row input { flex: 1; min-width: 0; padding: 7px 10px; }
.add-row .btn { flex: none; }
.faq-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.icon-x { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-x svg { width: 14px; height: 14px; }
.icon-x:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.month-nav { display: inline-flex; align-items: center; gap: 4px; }
.month-nav b { min-width: 9.5em; text-align: center; font-family: var(--font-display); font-size: 14px; }
.check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.check-row input { margin-top: 3px; }
.music-note { font-size: 12px; color: var(--ink-3); }
.task-steps { display: grid; gap: 6px; }
.found { display: grid; gap: 6px; font-size: 13px; }
.tiny { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--green); font-weight: 600; cursor: pointer; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mini-q .thumb, .li .thumb, .wcard .art, td .thumb { overflow: hidden; }
.audit .a > span { min-width: 0; overflow-wrap: anywhere; }
.li > div, .msg .txt, .ttl, .sub, .caption, .bubble { overflow-wrap: anywhere; }
.card-head h2 svg, .card-head h3 svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--mk); }
.mode-pill { text-decoration: none; }
.mode-pill:hover { border-color: var(--ink-3); }

/* Video panels and the photo and clip library */
.vidbox { display: grid; gap: 10px; }
.vid { width: 100%; max-width: 320px; aspect-ratio: 9 / 16; border-radius: 14px; background: #000; display: block; }
.vid-empty { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; align-items: start; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.vid-empty > svg { width: 20px; height: 20px; color: var(--ai); margin-top: 2px; }
.vid-empty div { display: grid; gap: 3px; }
.vid-empty b { font-size: 13.5px; }
.vid-empty span { font-size: 12.5px; color: var(--ink-3); }
.vid-empty .btn, .vid-empty .meter { grid-column: 1 / -1; justify-self: start; }
.vid-empty .meter { width: 100%; }
.vid-empty.bad > svg { color: var(--bad); }
.vid-run { width: 35% !important; animation: vidrun 1.4s ease-in-out infinite alternate; }
@keyframes vidrun { from { margin-left: 0; } to { margin-left: 65%; } }
@media (prefers-reduced-motion: reduce) { .vid-run { animation: none; width: 100% !important; opacity: 0.5; } }
.vid-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.vid-meta svg { width: 14px; height: 14px; color: var(--ok); vertical-align: -2px; }
.lib-up { justify-self: start; cursor: pointer; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.lib-item { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line-2); }
.lib-item img, .lib-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgb(0 0 0 / 0.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lib-del svg { width: 14px; height: 14px; }
.lib-badge { position: absolute; left: 6px; bottom: 6px; display: inline-flex; gap: 4px; align-items: center; font-size: 11px; font-weight: 700; color: #fff; background: rgb(0 0 0 / 0.55); border-radius: 6px; padding: 1px 6px; }
.lib-badge svg { width: 12px; height: 12px; }
