body.desktop-app { background: #edf1f5; }
.desktop-only { display: none !important; }
.desktop-app .desktop-only { display: block !important; }
.desktop-app .desktop-only.hidden { display: none !important; }
body.desktop-app::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 260px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% -20%, rgba(41, 91, 255, .13), transparent 68%);
}
.desktop-app header { backdrop-filter: blur(18px); background: rgba(255,255,255,.86); }
.desktop-app .app-shell { max-width: 1500px; }
.desktop-app .settings-card,
.desktop-app .preview-card,
.desktop-app .result-card { box-shadow: 0 18px 48px rgba(21,34,50,.07); }
.desktop-app .brand::after {
  content: "WINDOWS";
  margin-inline-start: 10px;
  padding: 4px 7px;
  border: 1px solid rgba(45,91,255,.22);
  border-radius: 6px;
  color: #2d5bff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}
.desktop-app.dark { background: #0d1117; }
.desktop-app.dark header { background: rgba(16,20,27,.88); }
@media (max-width: 1050px) {
  .desktop-app .brand::after { display: none; }
}
.presenter-tools {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--border, #dfe4ea);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card, #fff) 94%, #2d5bff 6%);
}
.presenter-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.presenter-title h3 { margin: 0 0 3px; font-size: 15px; }
.presenter-title small, .tool-toggle small { display: block; color: var(--muted, #667085); font-size: 11px; line-height: 1.45; }
.hotkey { direction: ltr; white-space: nowrap; padding: 5px 7px; border: 1px solid var(--border, #dfe4ea); border-radius: 7px; background: rgba(127,127,127,.07); color: var(--muted, #667085); font: 700 9px/1.2 monospace; }
.tool-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 50px; border-top: 1px solid var(--border, #dfe4ea); cursor: pointer; }
.tool-toggle span { min-width: 0; }
.tool-toggle b { display: block; margin-bottom: 2px; font-size: 13px; }
.tool-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.tool-toggle i { position: relative; flex: 0 0 38px; height: 22px; border-radius: 999px; background: #aeb7c4; transition: .2s ease; }
.tool-toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: .2s ease; }
.tool-toggle input:checked + i { background: #2d5bff; }
.tool-toggle input:checked + i::after { transform: translateX(16px); }
[dir="rtl"] .tool-toggle input:checked + i::after { transform: translateX(-16px); }
[dir="rtl"] .tool-toggle i::after { left: auto; right: 3px; }
.zoom-level { margin-top: 10px; }
.recording-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.mode-card { min-height: 68px; padding: 11px 12px; text-align: start; border: 1px solid var(--border, #dfe4ea); border-radius: 12px; background: transparent; color: inherit; cursor: pointer; transition: .18s ease; }
.mode-card:hover { border-color: rgba(45,91,255,.48); transform: translateY(-1px); }
.mode-card.active { border-color: #2d5bff; background: rgba(45,91,255,.08); box-shadow: inset 0 0 0 1px #2d5bff; }
.mode-card b, .mode-card small { display: block; }
.mode-card b { margin-bottom: 3px; font-size: 12px; }
.mode-card small { color: var(--muted, #667085); font-size: 10px; line-height: 1.35; }
.screen-source-field { margin: 14px 0; }
.source-picker-row { display: flex; align-items: center; gap: 8px; }
.source-picker-row select { min-width: 0; flex: 1; }
.source-picker-row button { flex: 0 0 auto; }
.camera-shortcuts { margin: 10px 0 0; padding: 9px 10px; border-radius: 9px; background: rgba(45,91,255,.08); color: var(--muted, #667085); font-size: 10px; line-height: 1.5; }
/* Keep media sources composited while the recorder is behind another window. */
.desktop-app .stage > video {
  display: block;
  position: absolute;
  width: 2px;
  height: 2px;
  inset: 0;
  opacity: .001;
  pointer-events: none;
  z-index: -1;
}

.save-name-field { display:grid; gap:7px; max-width:520px; margin-top:18px; }
.save-name-field label { font-size:11px; font-weight:600; color:var(--muted); }
.save-name-field input { width:100%; min-height:42px; border:1px solid var(--line); border-radius:9px; padding:0 12px; background:var(--surface-2); color:var(--text); }

.license-gate { position:fixed; inset:0; z-index:10000; display:grid!important; place-items:center; padding:24px; background:rgba(8,12,20,.82); backdrop-filter:blur(18px); }
.license-gate.hidden { display:none!important; }
.license-panel { width:min(540px,100%); padding:34px; border-radius:22px; background:var(--surface); color:var(--text); border:1px solid var(--line); box-shadow:0 30px 100px rgba(0,0,0,.38); }
.license-logo { display:block; width:70px; height:70px; object-fit:contain; margin:0 auto 15px; }
.license-languages { display:flex; justify-content:center; gap:5px; margin:-4px 0 14px; }
.license-languages button { min-width:38px; min-height:30px; border:1px solid var(--line); border-radius:8px; background:var(--surface-2); color:var(--muted); cursor:pointer; font-size:11px; font-weight:700; }
.license-kicker { margin:0 0 8px; color:var(--accent); text-align:center; font-size:11px; font-weight:700; letter-spacing:.13em; }
.license-panel h1 { margin:0; text-align:center; font-size:28px; }
.license-copy { margin:12px auto 24px; max-width:440px; text-align:center; color:var(--muted); font-size:13px; line-height:1.65; }
.license-panel>label { display:block; margin:14px 0 7px; color:var(--muted); font-size:11px; font-weight:700; }
.license-device-row { display:flex; gap:8px; }
.license-panel input,.license-panel textarea { width:100%; border:1px solid var(--line); border-radius:10px; padding:11px 12px; background:var(--surface-2); color:var(--text); outline:none; }
.license-panel textarea { resize:vertical; min-height:88px; direction:ltr; text-align:left; font-family:ui-monospace,Consolas,monospace; font-size:11px; }
.license-device-row input { direction:ltr; text-align:left; font-family:ui-monospace,Consolas,monospace; }
.license-device-row button,.license-file-button { min-width:82px; display:grid; place-items:center; border:1px solid var(--line); border-radius:10px; padding:0 13px; background:var(--surface-2); color:var(--text); cursor:pointer; font-size:12px; }
.license-file-row { margin-top:10px; }
.license-file-row input { position:absolute; width:1px; height:1px; opacity:0; }
.license-file-button { min-height:38px; display:inline-grid; }
.license-message { min-height:20px; margin:14px 0 8px; color:var(--danger); font-size:12px; }
.license-message.success { color:var(--success); }
.license-activate { width:100%; min-height:46px; border:0; border-radius:11px; background:var(--accent); color:#fff; font-weight:700; cursor:pointer; }
.license-continue { width:100%; min-height:42px; margin-top:9px; border:1px solid var(--line); border-radius:11px; background:var(--surface-2); color:var(--text); font-weight:700; cursor:pointer; }
.license-help { margin:15px 0 0; color:var(--muted); text-align:center; font-size:10px; line-height:1.5; }
.license-status-badge { display:inline-flex; align-items:center; min-height:30px; padding:0 10px; border:0; border-radius:8px; font-size:10px; font-weight:700; white-space:nowrap; cursor:pointer; }
.license-status-badge.trial { background:#eaf0ff; color:#3159bb; }
.license-status-badge.warning { background:#fff2cf; color:#805e00; }
.license-status-badge.danger { background:#ffe5e8; color:#aa2735; }
.license-status-badge.owner { background:#e5f7ee; color:#187349; }

/* Mobile-specific overrides */
@media (max-width: 768px) {
  .recording-modes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mode-card { min-height: 56px; padding: 10px; }
  .mode-card b { font-size: 11px; }
  .mode-card small { font-size: 9px; }
  .presenter-tools { padding: 14px; margin-top: 14px; border-radius: 13px; }
  .tool-toggle { min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
  .presenter-title h3 { font-size: 14px; }
  .hotkey { display: none; }
  .save-name-field { max-width: 100%; }
  .save-name-field input { min-height: 46px; font-size: 16px; }
}
@media (max-width: 480px) {
  .recording-modes { grid-template-columns: 1fr; }
  .mode-card { min-height: 48px; }
  .presenter-tools { padding: 12px; }
  .source-picker-row { flex-direction: column; align-items: stretch; }
  .source-picker-row select { width: 100%; }
}
