/* video model lab. Theme comes from kynship-ui; the accent is repointed to
   cyan here (Tailwind tokens are overridden in base.html). */
:root {
  --grn: #00F7FF;
  --grn-deep: #00C6CC;
  --cyn: #00F7FF;
  --accent-ink: #04191b;
}
.btn-accent:hover { background: #7ffbff; color: var(--accent-ink); }

/* Option chips (single or multi select) */
.opt {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--fg-dim);
  cursor: pointer; user-select: none;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.opt:hover { border-color: #3a4150; color: var(--fg); }
.opt.on {
  color: var(--accent-ink); background: var(--grn); border-color: var(--grn);
}
.opt-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Smart sentence: selects styled as inline words */
.sentence { font-size: 15px; line-height: 2.5; color: var(--fg-dim); }
.sentence .w { color: var(--fg); }
.sentence select, .sentence input {
  display: inline-block; vertical-align: baseline;
  font-size: 14px; font-weight: 600; color: var(--grn);
  background: color-mix(in srgb, var(--grn) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--grn) 30%, transparent);
  border-radius: 7px; padding: 2px 8px; margin: 4px 3px;
  max-width: 100%; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--grn) 50%),
                    linear-gradient(135deg, var(--grn) 50%, transparent 50%);
  background-position: calc(100% - 11px) 55%, calc(100% - 7px) 55%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
  padding-right: 22px;
}
.sentence input { background-image: none; padding-right: 8px; cursor: text; min-width: 140px; }
.sentence input::placeholder { color: color-mix(in srgb, var(--grn) 55%, transparent); font-weight: 500; }

.lbl { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
       color: var(--fg-faint); font-weight: 600; }

textarea.ta { width: 100%; font-size: 13px; padding: 9px 11px; line-height: 1.5;
              resize: vertical; font-family: inherit; }
textarea.ta.prompt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
                     font-size: 12px; color: var(--fg-dim); }
textarea.ta.prompt.editing { color: var(--fg); }

/* Segmented setting controls */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px;
       overflow: hidden; background: var(--panel-2); }
.seg button { font-size: 12px; font-weight: 600; padding: 6px 11px; color: var(--fg-dim);
              border: 0; background: transparent; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--grn); color: var(--accent-ink); }
.seg button:disabled { opacity: 0.4; cursor: not-allowed; }

.toggle { display: inline-flex; align-items: center; gap: 7px; font-size: 12px;
          color: var(--fg-dim); cursor: pointer; }

/* Compare cards */
.mcard { position: relative; padding: 14px 16px; border-radius: 12px;
         border: 1px solid var(--line); background: var(--panel-2);
         transition: border-color 0.12s ease, opacity 0.12s ease; }
.mcard.on { border-color: color-mix(in srgb, var(--grn) 45%, transparent); }
.mcard.off { opacity: 0.55; }
.mcard.unsupported { opacity: 0.5; }
.price { font-family: Poppins, sans-serif; font-weight: 700; font-size: 26px;
         letter-spacing: -0.02em; line-height: 1; }
.price small { font-size: 12px; font-weight: 500; color: var(--fg-faint); letter-spacing: 0; }

/* History + assets */
.gcard { border-radius: 12px; border: 1px solid var(--line); background: var(--panel);
         overflow: hidden; display: flex; flex-direction: column; }
.gcard .media { background: #000; aspect-ratio: 9 / 16; max-height: 360px;
                display: flex; align-items: center; justify-content: center;
                position: relative; }
.gcard .media.wide { aspect-ratio: 16 / 9; }
.gcard .media video, .gcard .media img { width: 100%; height: 100%; object-fit: contain; }
.gcard .media .ph { color: var(--fg-faint); font-size: 12px; text-align: center; padding: 20px; }
.gcard .media .ph.err { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 8px;
                        align-items: stretch; text-align: left; padding: 14px; }
.gcard .media .errbody { flex: 1; min-height: 0; overflow-y: auto; font-size: 11px; line-height: 1.5;
                         color: var(--fg-dim); white-space: pre-wrap; word-break: break-word;
                         user-select: text; }
.gcard .body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.gcard .prompt { font-size: 11px; color: var(--fg-dim); line-height: 1.45;
                 display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
                 overflow: hidden; cursor: pointer; }
.gcard .prompt.open { -webkit-line-clamp: unset; }
.acard { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
         border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.acard.sel { border-color: var(--grn); }
.thumb { width: 44px; height: 44px; border-radius: 7px; background: #000; overflow: hidden;
         flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb .ico { font-size: 18px; }
.inthumb { position: relative; width: 64px; height: 64px; border-radius: 9px; overflow: hidden;
           background: #000; border: 1px solid var(--line); }
.inthumb img, .inthumb video { width: 100%; height: 100%; object-fit: cover; }
.inthumb .x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
              border-radius: 50%; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px;
              display: flex; align-items: center; justify-content: center; cursor: pointer; }
.inthumb .tag { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px;
                background: rgba(0,0,0,0.65); color: var(--grn); text-align: center; padding: 1px; }

/* Brand identity */
.swatch { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--fg-dim); }
.swatch i { width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line); display: inline-block; }
.brand-logo { height: 36px; max-width: 120px; object-fit: contain; border-radius: 6px; background: #fff; padding: 3px; }
.bline { font-size: 12px; line-height: 1.5; color: var(--fg-dim); }
.bline b { color: var(--fg); font-weight: 600; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px;
           max-height: 292px; overflow-y: auto; padding: 2px; }
.cat { position: relative; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #0b0d11;
       aspect-ratio: 1; cursor: pointer; transition: border-color 0.12s ease, transform 0.12s ease; }
.cat:hover { border-color: #3a4150; transform: translateY(-1px); }
.cat.on { border-color: var(--grn); box-shadow: 0 0 0 1px var(--grn) inset; }
.cat img { width: 100%; height: 100%; object-fit: cover; }
.cat .t { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; line-height: 1.2; padding: 3px 5px;
          background: linear-gradient(transparent, rgba(0,0,0,0.85)); color: #eee; white-space: nowrap;
          overflow: hidden; text-overflow: ellipsis; }
.cat .on-tag { position: absolute; top: 4px; right: 4px; font-size: 9px; font-weight: 700; padding: 1px 5px;
               border-radius: 999px; background: var(--grn); color: var(--accent-ink); }
.cat.busy { opacity: 0.5; pointer-events: none; }
.swap { transition: opacity 0.22s ease, transform 0.22s ease; }
.swap.fading { opacity: 0; transform: translateY(8px); }
.clist { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }
.crow { display: flex; align-items: flex-start; gap: 10px; padding: 7px 10px; border-radius: 9px;
        border: 1px solid var(--line); background: var(--panel-2); }
.crow .ct { font-size: 12px; font-weight: 600; color: var(--fg); }
.crow .ch { font-size: 12px; color: var(--fg-dim); font-style: italic; }
.crow .cm { font-size: 10px; color: var(--fg-faint); margin-top: 2px; }
.crow.on { border-color: var(--grn); }
.endgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; max-height: 150px; overflow-y: auto; padding: 2px; }
.endgrid .cat { aspect-ratio: 1; }
.inthumb .role { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; font-weight: 700; text-align: center;
                  padding: 2px 0; cursor: pointer; background: rgba(0,0,0,0.7); color: var(--fg-dim); letter-spacing: 0.04em; }
.inthumb .role.first, .inthumb .role.last { background: var(--grn); color: var(--accent-ink); }
.inthumb .role:hover { filter: brightness(1.15); }
.inthumb .idx { position: absolute; top: 2px; left: 2px; font-size: 9px; font-weight: 700; padding: 0 5px;
                border-radius: 999px; background: var(--grn); color: var(--accent-ink); }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
         max-width: min(720px, 90vw); max-height: 40vh; overflow-y: auto; white-space: pre-wrap;
         word-break: break-word; cursor: pointer; line-height: 1.5;
         background: var(--panel-3); border: 1px solid var(--line); color: var(--fg);
         font-size: 13px; padding: 10px 16px; border-radius: 10px; z-index: 200;
         box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.toast.err { border-color: rgba(251,113,133,0.5); color: #fb7185; }

.dropzone.drag { outline: 2px dashed var(--grn); outline-offset: 4px; }
input[type="range"] { width: 100%; }

.enh[hidden] { display: none; }
.enh.busy { opacity: 0.6; pointer-events: none; }
