:root{--bg: #202124;--surface: #2d2e31;--surface-2: #3c4043;--border: #4a4d51;--text: #e8eaed;--muted: #9aa0a6;--accent: #8ab4f8;--accent-ink: #202124;--ok: #81c995;--warn: #fdd663;--error: #f28b82;--radius: 20px;--radius-sm: 12px;--font: "Segoe UI", "Noto Naskh Arabic", "Noto Sans Arabic", Tahoma, system-ui, -apple-system, sans-serif;color-scheme:dark}*,*:before,*:after{box-sizing:border-box}[hidden]{display:none!important}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}a{color:inherit;text-decoration:none}h1,h2{margin:0;font-weight:500}button,input,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.app{min-height:100%;display:flex;flex-direction:column}.main{flex:1;width:100%;max-width:1200px;margin:0 auto;padding:8px 16px 32px}.header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border)}.brand{display:flex;align-items:center;gap:12px;color:var(--accent);min-width:0}.brand-logo{width:34px;height:34px;flex:none}.brand-name{font-size:1.25rem;font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header-actions,.user-chip{display:flex;align-items:center;gap:8px}.user-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem}.avatar{width:32px;height:32px;border-radius:50%}.workspace{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px;align-items:stretch}.collect .workspace{align-items:start}.card{background:var(--surface);border-radius:var(--radius);padding:16px}.icon-btn{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:50%;border:0;background:transparent;color:var(--muted)}.icon-btn:hover:not(:disabled){background:var(--surface-2);color:var(--text)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 20px;border-radius:999px;border:1px solid transparent;background:transparent;font-weight:500}.btn-primary{background:var(--accent);color:var(--accent-ink)}.btn-primary:hover:not(:disabled){filter:brightness(1.08)}.btn-tonal{background:var(--surface-2)}.btn-tonal:hover:not(:disabled){background:#4a4d51}.btn-outline{border-color:var(--border);color:var(--accent)}.btn-outline:hover:not(:disabled){background:#8ab4f814}.btn-ghost{color:var(--muted)}.btn-ghost:hover:not(:disabled){background:var(--surface-2);color:var(--text)}.btn-large{min-height:56px;padding:0 32px;font-size:1.1rem}.camera-card{padding:12px}.camera-frame{position:relative;width:100%;border-radius:var(--radius-sm);overflow:hidden;background:#111214;min-height:200px}.camera-inner{position:absolute;top:0;right:0;bottom:0;left:0;transform:scaleX(-1)}.camera-inner video{width:100%;height:100%;display:block;object-fit:fill}.camera-overlay{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%}.camera-overlay line{stroke:var(--accent);stroke-width:2.5;stroke-linecap:round;vector-effect:non-scaling-stroke}.camera-overlay circle{fill:#fff}.camera-placeholder{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px;text-align:center;color:var(--muted)}.camera-placeholder p{margin:0}.camera-error{color:var(--error);max-width:420px}.camera-toggle{position:absolute;inset-block-end:10px;inset-inline-end:10px;background:#202124b3;color:var(--text)}.spinner{width:40px;height:40px;border-radius:50%;border:4px solid var(--surface-2);border-top-color:var(--accent);animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spinner{animation-duration:3s}}.status-badge{position:absolute;inset-block-start:10px;inset-inline-start:10px;display:inline-flex;align-items:center;gap:8px;padding:6px 14px;border-radius:999px;background:#202124d1;font-size:.9rem;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.status-dot{width:10px;height:10px;border-radius:50%;background:var(--muted)}.status-badge[data-tone=ok] .status-dot{background:var(--accent)}.status-badge[data-tone=busy] .status-dot{background:var(--warn)}.status-badge[data-tone=success] .status-dot{background:var(--ok)}.status-badge[data-tone=error] .status-dot{background:var(--error)}.notice{margin:10px 4px 2px;padding:10px 14px;border-radius:var(--radius-sm);background:var(--surface-2);font-size:.92rem}.notice[data-tone=error]{color:var(--error)}.notice[data-tone=warn]{color:var(--warn)}.notice[data-tone=ok]{color:var(--ok)}.text-card{display:flex;flex-direction:column;gap:12px;min-height:320px}.card-label{color:var(--muted);font-size:.9rem}.text-output{flex:1;font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.5;word-break:break-word}.text-output[data-empty=true]{font-size:1.1rem;color:var(--muted)}.text-actions{display:flex;gap:8px;flex-wrap:wrap}.hint{color:var(--muted);font-size:.88rem;margin:0}.mode-bar{position:sticky;inset-block-end:12px;margin:20px auto 0;width:fit-content;max-width:100%;display:flex;gap:10px;padding:8px;border-radius:28px;background:var(--surface);box-shadow:0 6px 24px #00000059}.mode-btn{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:110px;padding:10px 18px;border:0;border-radius:20px;background:transparent;color:var(--muted);font-size:.9rem}.mode-btn:hover{background:var(--surface-2);color:var(--text)}.mode-btn[aria-pressed=true]{background:#8ab4f82e;color:var(--accent)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0000008c;display:grid;place-items:center;padding:16px;z-index:10}.modal{width:min(420px,100%);background:var(--surface);border-radius:var(--radius);padding:20px;display:flex;flex-direction:column;gap:16px}.modal-head{display:flex;align-items:center;justify-content:space-between}.field{display:flex;flex-direction:column;gap:6px}.field-row{flex-direction:row;align-items:center;gap:10px}.field label{color:var(--muted);font-size:.9rem}input[type=text],input:not([type]),select{min-height:44px;padding:0 14px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--bg)}input[type=checkbox]{width:20px;height:20px;accent-color:var(--accent)}input[type=range]{accent-color:var(--accent)}.page-title{font-size:1.5rem;margin-top:12px}.collect .hint{margin-top:4px}.collect-panel{display:flex;flex-direction:column;gap:14px}.row{display:flex;gap:10px;flex-wrap:wrap}.stack{display:flex;flex-direction:column;gap:10px}.segmented{display:flex;background:var(--bg);border-radius:999px;padding:4px}.segmented button{flex:1;min-height:40px;border:0;border-radius:999px;background:transparent;color:var(--muted)}.segmented button[aria-selected=true]{background:var(--surface-2);color:var(--text)}.gesture-list{list-style:none;margin:0;padding:0;display:grid;gap:8px;max-height:280px;overflow:auto}.gesture-item{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--border);border-radius:var(--radius-sm);background:transparent;text-align:start}.gesture-item[aria-pressed=true]{border-color:var(--accent);background:#8ab4f81f}.gesture-name{font-size:1.1rem}.gesture-meta{color:var(--muted);font-size:.8rem;white-space:nowrap}.countdown{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;font-size:6rem;font-weight:700;background:#00000059;pointer-events:none}.rec-badge{position:absolute;inset-block-start:10px;inset-inline-end:10px;padding:6px 14px;border-radius:999px;background:#f28b82e6;color:#202124;font-weight:600}.gate{display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:32px;text-align:center}@media (max-width: 800px){.workspace{grid-template-columns:1fr}.text-card{min-height:220px}.user-name{display:none}.brand-name{font-size:1.05rem}}@media (max-width: 480px){.header{flex-wrap:wrap;padding:10px;row-gap:6px}.brand{flex:1 1 100%}.brand-name{white-space:normal}.header-actions{flex:1 1 100%;justify-content:flex-end}.header-actions .btn{white-space:nowrap}.main{padding-inline:10px}.mode-bar{width:100%;gap:4px}.mode-btn{flex:1;min-width:0;padding:10px 6px;font-size:.8rem}.btn-large{padding:0 20px}}
