#browser-tabs {
  flex: 1;
  min-width: 0;
  padding: 9px;
  font-size: 12px;
  max-width: 100%;
}
:root {
  --bg: #f5f5ef;
  --ink: #20251f;
  --muted: #6b7168;
  --line: #dcded4;
  --accent: #d4fa64;
  --white: #fff;
  --error: #93382e;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 11px 16px;
  background: var(--white);
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}
button:hover {
  border-color: #818d75;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #83a32b;
  outline-offset: 3px;
}
input,
select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  font-size: 16px;
}
input:focus,
select:focus {
  outline: 2px solid #93b440;
  outline-offset: 1px;
}
input {
  padding: 13px;
  min-width: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
.topbar {
  height: 84px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1200px) / 2));
  background: #fafaf6;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 10px;
  font-size: 15px;
  padding-left: 2px;
}
main {
  max-width: 1248px;
  margin: auto;
  padding: 48px 24px 24px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--muted);
}
h1 {
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.055em;
  line-height: 1.1;
  margin: 14px 0 30px;
  font-weight: 650;
}
h1 span {
  color: #737d64;
}
label {
  font-size: 13px;
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}
.intake {
  padding-bottom: 40px;
}
.url-input {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 13px;
  box-shadow: 0 4px 18px #20251f05;
  gap: 10px;
}
.url-input > span {
  font-size: 22px;
  padding: 0 8px 0 12px;
  color: var(--muted);
}
.url-input input {
  flex: 1;
  border: 0;
  min-height: 52px;
  padding: 10px;
}
.url-input input:focus {
  outline: none;
}
.url-input:focus-within {
  border-color: #7c9454;
  box-shadow: 0 0 0 3px #cbe48c50;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--accent);
  border: 1px solid #c6e65c;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  min-height: 48px;
  border-radius: 8px;
  padding: 12px 22px;
  cursor: pointer;
  white-space: nowrap;
}
.secondary {
  background: transparent;
}
.quiet {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 500;
}
.session-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 16px 0;
  gap: 12px;
}
.session-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.session-title > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7a9351;
  flex: none;
}
.status-dot.busy {
  animation: pulse 1.5s infinite;
}
.browser-panel {
  background: #fafaf6;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.browser-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  min-height: 62px;
}
.browser-panel summary::-webkit-details-marker {
  display: none;
}
.mono {
  font:
    12px ui-monospace,
    monospace;
  color: var(--muted);
  margin-right: 16px;
}
.summary-right {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.browser-inner {
  border-top: 1px solid var(--line);
  padding: 16px;
}
.source-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.source-controls:empty {
  display: none;
}
.source-controls:not(:empty) {
  padding-bottom: 16px;
}
.source-controls button {
  padding: 9px 13px;
  font-size: 12px;
}
.source-controls button.active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}
.browser-toolbar button {
  font-size: 12px;
  padding: 8px 12px;
}
.push-right {
  margin-left: auto;
}
.screen-wrap {
  background: #e5e7df;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  position: relative;
  min-height: 120px;
}
.screen-wrap img {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
  object-fit: contain;
}
.screen-wrap.zoomed img {
  width: 1100px;
  max-width: none;
}
.screen-wrap img:not([src]) {
  visibility: hidden;
}
.screen-wrap #screen-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--muted);
}
.lower {
  margin-top: 12px;
  margin-bottom: 0;
}
.lower form {
  flex: 1;
  display: flex;
  gap: 6px;
  min-width: 0;
}
.lower input {
  width: 100%;
  min-width: 0;
  font-size: 14px;
}
.lower select {
  font-size: 12px;
  max-width: 110px;
  padding: 6px;
}
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 34px 0 22px;
}
.results-header h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
  margin: 6px 0 0;
  font-weight: 650;
}
.results-header h2 span {
  font:
    13px ui-monospace,
    monospace;
  color: var(--muted);
  margin-left: 6px;
}
.filter-label {
  margin: 0;
}
.filter-label select {
  font-size: 13px;
  padding: 10px 30px 10px 12px;
  max-width: 170px;
  background: transparent;
}
.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.video-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}
.card-top {
  display: flex;
  gap: 16px;
  padding: 20px;
}
.video-symbol {
  background: #f0f2e9;
  min-width: 60px;
  width: 60px;
  height: 68px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 24px;
  color: #687456;
}
.video-symbol small {
  position: absolute;
  bottom: 5px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 8px;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.card-title {
  min-width: 0;
  flex: 1;
}
.card-title h3 {
  font-size: 15px;
  line-height: 1.45;
  margin: 2px 0 6px;
  overflow-wrap: anywhere;
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.metadata {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 10px;
  padding: 0 20px 20px;
}
.metadata dt {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.metadata dd {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}
.metadata dd small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #eceee6;
  background: #fdfdfa;
}
.card-actions button,
.card-actions a {
  flex: 1;
  font-size: 13px;
  min-height: 44px;
}
.card-actions .play {
  flex: 0 0 44px;
  padding: 10px 15px;
  min-width: 82px;
}
.job-status {
  padding: 0 20px 14px;
  font-size: 12px;
  color: var(--muted);
  background: #fdfdfa;
}
.job-status progress {
  display: block;
  width: 100%;
  height: 4px;
  margin: 2px 0 9px;
  accent-color: #86a03f;
}
.job-status.error {
  color: var(--error);
}
.empty {
  border: 1px dashed #cdd2c0;
  border-radius: 12px;
  padding: 48px 20px;
  text-align: center;
}
.empty-icon {
  font-size: 44px;
  color: #8c977a;
}
.empty h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 10px 0;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}
.initial-state {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 58px 12px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.outline-play {
  font-size: 48px;
  color: #9ba58d;
}
.initial-state h2 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 9px;
}
.initial-state p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #92998a;
  font-size: 11px;
  gap: 20px;
  padding: 28px 0;
}
footer > span:first-child {
  font-weight: 600;
}
.notice,
.alert {
  font-size: 13px;
  line-height: 1.6;
  padding: 14px 18px;
  border: 1px solid #e3d7b5;
  border-radius: 8px;
  background: #faf6e8;
  margin-bottom: 18px;
}
.alert {
  color: var(--error);
  background: #fff1eb;
  border-color: #edc8bb;
}
.login {
  max-width: 620px;
  margin: 45px auto;
}
.login .input-row {
  display: flex;
  gap: 10px;
}
.login input {
  flex: 1;
}
#login-error {
  color: var(--error);
  font-size: 13px;
}
dialog {
  width: min(900px, calc(100vw - 24px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafaf6;
  max-height: 90dvh;
}
dialog::backdrop {
  background: #10180ee0;
  backdrop-filter: blur(4px);
}
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}
.preview-header h2 {
  font-size: 17px;
  margin: 0;
  line-height: 1.5;
}
.preview-header button {
  font-size: 20px;
  padding: 5px 14px;
}
#preview-video {
  display: block;
  width: 100%;
  max-height: 60dvh;
  background: #111;
  border-radius: 8px;
}
#preview-video:not([src]) {
  display: none;
}
#preview-status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
#preview-save {
  width: 100%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}
@media (max-width: 720px) {
  .topbar {
    height: 68px;
    padding: 0 20px;
  }
  .brand {
    font-size: 11px;
    gap: 9px;
  }
  .mark {
    width: 32px;
    height: 32px;
  }
  main {
    padding: 30px 16px 20px;
  }
  h1 {
    font-size: 39px;
    margin: 14px 0 28px;
  }
  .intake {
    padding-bottom: 28px;
  }
  .url-input {
    flex-wrap: wrap;
    gap: 3px;
    padding: 7px;
  }
  .url-input > span {
    padding: 0 6px;
  }
  .url-input input {
    width: calc(100% - 48px);
    flex: 1;
    min-height: 46px;
  }
  .url-input .primary {
    width: 100%;
    margin-top: 4px;
    justify-content: space-between;
  }
  .session-line .quiet {
    font-size: 11px;
    padding: 7px;
    white-space: nowrap;
  }
  .session-title {
    font-size: 12px;
    max-width: 65%;
  }
  .browser-panel summary {
    padding: 16px;
    font-size: 13px;
  }
  .summary-right {
    font-size: 10px;
  }
  .browser-inner {
    padding: 10px;
  }
  .browser-toolbar {
    flex-wrap: wrap;
    gap: 5px;
  }
  .browser-toolbar button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .browser-toolbar .push-right {
    margin-left: 0;
  }
  .lower form {
    order: 4;
    flex-basis: 100%;
  }
  .lower select {
    margin-left: auto;
    max-width: none;
    font-size: 13px;
  }
  .results {
    grid-template-columns: 1fr;
  }
  .results-header {
    margin-top: 28px;
  }
  .results-header h2 {
    font-size: 21px;
  }
  .filter-label select {
    font-size: 11px;
    max-width: 135px;
    padding-left: 9px;
  }
  .card-top {
    padding: 18px;
  }
  .metadata {
    padding: 0 18px 18px;
  }
  .card-actions {
    padding: 12px 18px;
  }
  .initial-state {
    padding: 42px 8px;
    gap: 18px;
  }
  .initial-state h2 {
    font-size: 15px;
    line-height: 1.5;
  }
  .initial-state p {
    font-size: 10px;
    line-height: 1.8;
  }
  .outline-play {
    font-size: 38px;
  }
  footer {
    align-items: flex-start;
    font-size: 10px;
    gap: 24px;
    line-height: 1.7;
  }
  footer > span:last-child {
    text-align: right;
    max-width: 220px;
  }
  .login {
    margin-top: 20px;
  }
  .login .input-row {
    flex-direction: column;
  }
  dialog {
    padding: 14px;
  }
  .preview-header h2 {
    font-size: 15px;
  }
}
