/* Focused interaction system for the existing ONRAI studio. */
.active-job-banner {
  position:sticky;
  top:12px;
  z-index:20;
  display:flex;
  align-items:center;
  gap:13px;
  width:min(calc(100% - 40px),760px);
  margin:12px auto -2px;
  padding:11px 12px 11px 16px;
  border:1px solid #647a3f;
  border-radius:10px;
  background:#20281b;
  box-shadow:0 12px 35px rgba(0,0,0,.32);
}
.active-job-banner[hidden] {display:none}
.active-job-banner>div {display:grid;gap:2px;min-width:0}
.active-job-banner strong {font:700 13px/1.3 'Manrope',Arial,sans-serif;color:#f3f6eb}
.active-job-banner div span {font-size:12px;line-height:1.35;color:#bfc8b5}
.active-job-indicator {width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#cbfb48;animation:onrai-pulse 1.7s ease-in-out infinite}
.active-job-banner.finished .active-job-indicator {animation:none}
.active-job-banner .btn {margin-left:auto;min-height:38px;padding:8px 12px;white-space:nowrap;font-size:12px}
.panel .btn,
.auth-simple-form .auth-primary {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  min-height:48px;
  padding:12px 19px;
  border-radius:9px;
  font:750 14px/1.2 'Manrope',Arial,sans-serif;
  letter-spacing:-.015em;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.32),0 3px 0 rgba(0,0,0,.2);
  transition:background-color .18s,border-color .18s,box-shadow .18s,transform .18s;
}
.panel .btn:not(:disabled):hover,
.auth-simple-form .auth-primary:not(:disabled):hover {
  transform:translateY(-2px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.42),0 7px 17px rgba(0,0,0,.22);
}
.panel .btn:not(:disabled):active,
.auth-simple-form .auth-primary:not(:disabled):active {
  transform:translateY(1px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
}
.panel .btn.secondary {box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 3px 0 rgba(0,0,0,.18)}
.panel .btn.secondary:not(:disabled):hover {box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 7px 17px rgba(0,0,0,.22)}
.panel .btn:disabled {cursor:not-allowed;opacity:.48;transform:none;box-shadow:none}
.panel .btn[data-busy="true"],
.auth-simple-form .auth-primary[data-busy="true"] {
  cursor:progress;
  opacity:1;
  transform:none;
  background:#bce84a;
  border-color:#bce84a;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25);
}
.panel .btn[data-busy="true"]::before,
.auth-simple-form .auth-primary[data-busy="true"]::before {
  content:"";
  display:block;
  width:15px;
  height:15px;
  flex:0 0 15px;
  border:2px solid rgba(20,29,8,.26);
  border-top-color:#18210c;
  border-radius:50%;
  animation:onrai-spin .8s linear infinite;
}
#generate-dataset {min-width:190px}
.target-photo-field {max-width:520px}
.target-dropzone {position:relative;display:grid;place-items:center;width:min(100%,360px);aspect-ratio:1;overflow:hidden;border:2px dashed #789247;border-radius:17px;background:#1a2019;cursor:pointer;transition:border-color .18s,background-color .18s,transform .18s}
.target-dropzone:hover,.target-dropzone.drag-over {border-color:#cbfb48;background:#222d1c;transform:translateY(-2px)}
.target-dropzone:focus-visible {outline:3px solid #cbfb48;outline-offset:4px}
#target-input.target-file-input,#scene-photo-input.target-file-input {position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;padding:0;border:0;pointer-events:none;clip-path:inset(50%)}
.target-empty {display:grid;justify-items:center;gap:8px;padding:22px;text-align:center;pointer-events:none}
.target-empty strong {color:#f2f5ec;font-size:17px;line-height:1.25}
.target-empty span:not(.target-upload-icon) {color:#c8d0c1;font-size:14px;line-height:1.45}
.target-empty small {color:#a6b29c;font-size:12px}
.target-upload-icon {display:grid;place-items:center;width:54px;height:54px;margin-bottom:7px;border:1px solid #6e8f3e;border-radius:13px;background:#344423;color:#d8ff83;font-size:31px;font-weight:350;line-height:1}
.target-empty[hidden],#target-preview[hidden],#scene-photo-preview[hidden],#target-file-name[hidden],#scene-photo-name[hidden]{display:none}
#scene-photo-preview {width:100%;height:100%;object-fit:contain;display:block;background:#111512}
#target-dropzone:has(> #target-preview:not([hidden])) {
  display:block;
  width:fit-content;
  max-width:min(100%,360px);
  aspect-ratio:auto;
  padding:6px;
  background:#111512;
}
#target-preview {display:block;width:auto;height:auto;max-width:100%;max-height:min(65vh,560px);object-fit:contain}
.target-file-name {max-width:360px;margin:8px 0 0;color:#d6e3ce;font-size:13px;overflow-wrap:anywhere}
.target-photo-hint {max-width:520px;margin:14px 0 5px;font-size:14px;line-height:1.55;color:#c6d0c0}
#dataset .identity-create-card {width:min(100%,860px);padding:clamp(20px,3vw,34px);background:#17191f;border:1px solid #3b3d43;border-radius:14px}
#dataset .identity-create-card>.field:first-child {max-width:660px;margin-bottom:25px}
.identity-reference-hint {max-width:730px;margin:0 0 16px;padding:11px 14px;border:1px solid #485539;border-radius:9px;background:#1e2619;color:#e5eddf;font-size:14px;line-height:1.5}
.identity-reference-hint strong {color:#d8ff83}
.identity-photo-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:730px}
.identity-photo-grid .field {min-width:0;margin:0}
.identity-photo-grid label {display:block;margin-bottom:10px;font-size:15px;color:#f1f3ed}
.identity-recommended {color:#b9c7a7;font-weight:500}
#dataset input.identity-file-input {position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;padding:0;border:0;opacity:0;cursor:pointer}
#dataset input.identity-file-input::file-selector-button {width:100%;height:100%;margin:0}
#dataset input.identity-file-input:disabled {cursor:default}
#dataset .identity-photo-frame:focus-within > .identity-photo-zone {outline:3px solid #cbfb48;outline-offset:4px}
#dataset .identity-photo-remove {z-index:2}
.identity-photo-frame {position:relative;width:100%}
.identity-photo-zone {display:grid;place-items:center;width:100%;aspect-ratio:1;overflow:hidden;border:2px dashed #788b56;border-radius:15px;background:#1a2019;cursor:pointer;transition:border-color .18s,background-color .18s,transform .18s}
.identity-photo-zone:hover,.identity-photo-zone.drag-over {border-color:#cbfb48;background:#222d1c;transform:translateY(-2px)}
.identity-photo-zone:focus-visible {outline:3px solid #cbfb48;outline-offset:4px}
.identity-photo-empty {display:grid;justify-items:center;gap:9px;padding:16px;text-align:center;pointer-events:none}
.identity-photo-empty>span {display:grid;place-items:center;width:52px;height:52px;margin-bottom:8px;border:1px solid #6e8f3e;border-radius:13px;background:#344423;color:#d8ff83;font-size:31px;font-weight:350;line-height:1}
.identity-photo-empty strong {color:#f2f5ec;font-size:17px}
.identity-photo-empty small {color:#b4c0a8;font-size:13px}
.identity-photo-zone img {display:block;width:100%;height:100%;object-fit:contain;background:#111512}
.identity-photo-zone img[hidden],.identity-photo-empty[hidden],.identity-photo-remove[hidden],#dataset-model[hidden],#generate-dataset[hidden],#dataset-generation-actions[hidden]{display:none!important}
.identity-photo-remove {position:absolute;z-index:1;top:10px;right:10px;width:38px;height:38px;border:1px solid #676c63;border-radius:50%;background:#191d1bdc;color:#fff;font-size:25px;line-height:1;cursor:pointer}
.identity-photo-grid .reference-prep-link {display:inline-flex;align-items:center;min-height:42px;margin-top:6px;font-size:14px}
.identity-photo-grid .reference-prep-link:disabled {opacity:.55;cursor:default}
#dataset #save-model {min-width:215px;min-height:56px;font-size:16px}
#dataset #save-model:disabled {cursor:not-allowed;opacity:.5}
#dataset .identity-create-card .form-actions {margin-top:28px}
#dataset #storage-help {font-size:13px;line-height:1.4}
@media(max-width:650px){.identity-photo-grid {grid-template-columns:1fr;max-width:360px;gap:24px}#dataset #save-model {width:100%}}
.generation-status {font-size:14px;line-height:1.55;color:#b8bdb8;max-width:680px}
.task-progress {
  max-width:680px;
  margin:17px 0 4px;
  padding:18px 19px 15px;
  border:1px solid #414a3b;
  border-radius:10px;
  background:#1b211b;
}
.task-progress[hidden] {display:none}
.task-progress-top {display:flex;align-items:center;gap:11px;min-width:0}
.task-progress-top strong {font:700 14px/1.3 'Manrope',Arial,sans-serif;color:#f1f5e9}
.task-progress-count {margin-left:auto;color:#d8f89c;font:600 13px/1.2 'DM Mono',monospace;font-variant-numeric:tabular-nums}
.task-progress-pulse {width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#cbfb48;animation:onrai-pulse 1.7s ease-in-out infinite}
.task-progress-track {height:4px;overflow:hidden;margin-top:17px;border-radius:99px;background:#3d4636}
.task-progress-fill {display:block;width:36%;height:100%;border-radius:inherit;background:#cbfb48;animation:onrai-travel 1.8s ease-in-out infinite}
.task-progress.measured .task-progress-fill {animation:none;transition:width .3s ease}
.task-progress-detail {margin:12px 0 0;color:#aeb7a9;font-size:13px;line-height:1.45}
/* A quieter floating follow-up, outside the work area it points to. */
#active-job-banner {
  position:fixed;top:auto;right:24px;bottom:24px;left:auto;
  width:min(480px,calc(100vw - 48px));margin:0;padding:16px 17px;
  border:1px solid #7c9551;border-radius:16px;background:#222a1e;
  box-shadow:0 20px 60px #000a,inset 0 1px 0 #ffffff17;
}
#main-content:has(#dataset.active) > #active-job-banner[data-kind="dataset"] {display:none}
#main-content:has(> #active-job-banner:not([hidden])) {padding-bottom:120px}
#active-job-banner .active-job-indicator {width:10px;height:10px;flex-basis:10px}
#active-job-banner strong {font-size:15px;line-height:1.3}
#active-job-banner div span {font-size:13px;line-height:1.4}
#active-job-banner .btn {
  min-height:50px;margin-left:auto;padding:11px 16px;border:1px solid #dcff83;
  border-radius:11px;background:#cbfb48;color:#17200b;font:800 14px/1.2 'Manrope',Arial,sans-serif;
  box-shadow:inset 0 1px 0 #fff9,0 5px 15px #9dd33230;
}
#active-job-banner .btn:hover {background:#dcff78;transform:translateY(-2px)}
#dataset #dataset-generation-actions {
  width:min(100%,860px);padding:clamp(22px,3vw,34px);
  border:1px solid #4d5943;border-radius:18px;background:#171b18;
}
#dataset .dataset-work-kicker {display:block;margin-bottom:9px;color:#c5f65d;font:750 12px/1.4 'DM Mono',monospace;letter-spacing:.08em}
#dataset .dataset-work-head h2 {margin:0;color:#f5f6f0;font-size:clamp(25px,3vw,34px);letter-spacing:-.05em}
#dataset .dataset-work-head p {margin:9px 0 0;color:#bdc7b7;font-size:15px;line-height:1.5}
#dataset #dataset-generation-status {margin:18px 0 0;font-size:15px}
#dataset #dataset-progress {
  max-width:none;margin:20px 0 24px;padding:clamp(20px,3vw,28px);
  border:1px solid #62774e;border-radius:16px;background:#20291e;
  box-shadow:inset 0 1px 0 #ffffff18,0 12px 32px #0003;
}
#dataset #dataset-progress .task-progress-top {align-items:center;gap:15px}
#dataset #dataset-progress .task-progress-pulse {width:12px;height:12px;flex-basis:12px;box-shadow:0 0 0 6px #cbfb4819}
#dataset .dataset-progress-title {display:grid;gap:3px;min-width:0}
#dataset .dataset-progress-title span {color:#c5f65d;font:750 11px/1.4 'DM Mono',monospace;letter-spacing:.11em}
#dataset #dataset-progress .dataset-progress-title strong {color:#f4f7ee;font-size:18px;line-height:1.25;letter-spacing:-.025em}
#dataset .dataset-progress-numbers {display:grid;justify-items:end;gap:3px;margin-left:auto;white-space:nowrap}
#dataset #dataset-progress .task-progress-count {margin:0;color:#d4ff70;font:800 clamp(23px,3vw,33px)/1 'Manrope',Arial,sans-serif;letter-spacing:-.05em;font-variant-numeric:tabular-nums}
#dataset .dataset-progress-numbers small {color:#aebeaa;font:700 10px/1.3 'DM Mono',monospace;letter-spacing:.08em}
#dataset #dataset-progress .task-progress-track {height:12px;margin-top:27px;border-radius:999px;background:#3b4935;box-shadow:inset 0 2px 4px #0005}
#dataset #dataset-progress .task-progress-fill {background:linear-gradient(90deg,#aee835,#d8ff71);box-shadow:0 0 14px #bdfa5370}
#dataset #dataset-progress:not(.measured) .task-progress-fill {width:22%;opacity:.5}
#dataset .dataset-progress-scale {display:flex;justify-content:space-between;gap:12px;margin-top:11px;color:#b5c0ad;font-size:13px}
#dataset .dataset-progress-scale strong {color:#d7ff7e;font-size:14px;font-variant-numeric:tabular-nums}
#dataset #dataset-progress .task-progress-detail {margin:22px 0 0;padding-top:17px;border-top:1px solid #45543f;color:#c4d0bb;font-size:14px;line-height:1.5}
#dataset #save-model:not(:disabled),#dataset #generate-dataset:not(:disabled),#dataset #dataset-export:not(:disabled) {
  min-height:62px;padding:16px 25px;border:1px solid #e1ff8d;border-radius:13px;
  background:linear-gradient(135deg,#e3ff86,#cbfb48 64%,#b3ea36);color:#1a250e;
  font-size:16px;font-weight:850;box-shadow:inset 0 1px 0 #fffd,inset 0 -2px 0 #8db82d,0 9px 25px #8fc82a30;
}
#dataset #save-model:not(:disabled):hover,#dataset #generate-dataset:not(:disabled):hover,#dataset #dataset-export:not(:disabled):hover {box-shadow:inset 0 1px 0 #fff,inset 0 -2px 0 #8db82d,0 14px 27px #a8dc3f55}
#dataset .dataset-library-action {min-height:55px;margin-top:9px;padding:13px 21px;border-radius:12px;font-size:15px;font-weight:800;background:#2b3528;border-color:#697c55;color:#eef5e8}
#dataset .dataset-library-action:hover {border-color:#cbfb48;background:#35442c}
@keyframes onrai-spin {to {transform:rotate(360deg)}}
@keyframes onrai-pulse {50% {opacity:.38;transform:scale(.78)}}
@keyframes onrai-travel {0% {transform:translateX(-110%)} 100% {transform:translateX(290%)}}
@media (max-width:650px) {
  #generate-dataset {width:100%;min-height:52px}
  .task-progress {padding:16px;margin-top:15px}
  #active-job-banner {right:12px;bottom:12px;width:calc(100% - 24px);gap:11px;flex-wrap:wrap}
  #active-job-banner .btn {width:100%;margin-left:0}
  #main-content:has(> #active-job-banner:not([hidden])) {padding-bottom:170px}
  #dataset #dataset-progress .task-progress-top {gap:10px;align-items:start}
  #dataset #dataset-progress .dataset-progress-title strong {font-size:16px}
  #dataset #dataset-progress .task-progress-count {font-size:23px}
  #dataset .dataset-progress-numbers small {font-size:9px}
  #dataset .dataset-library-action {width:100%}
}
@media (prefers-reduced-motion:reduce) {
  .panel .btn,.auth-simple-form .auth-primary,.task-progress-fill {transition:none}
  .panel .btn[data-busy="true"]::before,.auth-simple-form .auth-primary[data-busy="true"]::before,.task-progress-pulse,.task-progress-fill,.active-job-indicator {animation:none}
  .task-progress:not(.measured) .task-progress-fill {width:100%;opacity:.65}
}
.delete-identity-dialog{
  width:min(460px,calc(100% - 32px));max-height:calc(100dvh - 32px);overflow-y:auto;
  border:1px solid #69474a;border-radius:18px;padding:30px;
  background:#191a1d;color:#f6f4f2;box-shadow:0 30px 100px #000c;
}
.delete-identity-dialog::backdrop{background:#060708d9;backdrop-filter:blur(5px)}
.delete-identity-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:#47272b;color:#ffb9b9;font-size:25px;font-weight:800}
.delete-identity-kicker{margin:20px 0 8px;color:#e8a2a2;font-size:12px;font-weight:760;letter-spacing:.13em}
.delete-identity-dialog h2{margin:0 0 12px;font-size:clamp(23px,5vw,29px);line-height:1.15;letter-spacing:-.04em}
.delete-identity-dialog #delete-identity-description,.delete-identity-dialog #delete-photo-description{margin:0 0 22px;color:#d0cfcc;font-size:15px;line-height:1.55;overflow-wrap:anywhere}
.delete-identity-warning{padding:13px 15px;margin:22px 0;color:#ffcece;background:#322024;border:1px solid #674249;border-radius:9px;font-size:14px;line-height:1.5}
.delete-identity-actions{display:flex;flex-wrap:wrap;gap:10px}
.delete-identity-actions .btn{min-height:45px;flex:1 1 170px;font-size:14px}
.delete-identity-actions .btn.danger{background:#a13d4c;border-color:#b94d5e;color:#fff}
.delete-identity-actions .btn.danger:hover{background:#b64959}

/* Make the entire identity card the native picker on desktop and touch. */
.target-identity-field {container-type:inline-size}
.target-identity-picker {
  --picker-inset:16px;
  --portrait-width:60px;
  --name-left:calc(var(--picker-inset) + var(--portrait-width) + 16px);
  position:relative;
  display:flex;
  align-items:center;
  min-height:100px;
  color:#f5f7ef;
  background:#24291f;
  border:1px solid #76884e;
  border-radius:16px;
}
.target-identity-picker:hover {background:#2a3023;border-color:#b2d475}
.target-identity-picker:focus-within {outline:3px solid #ccfa60;outline-offset:3px}
.target-identity-avatar {
  position:absolute;
  inset-inline-start:var(--picker-inset);
  width:var(--portrait-width);
  height:70px;
  overflow:hidden;
  display:grid;
  place-items:center;
  color:#d4ecac;
  background:#353e2c;
  border:1px solid #616f4e;
  border-radius:10px;
}
.target-identity-avatar svg,.target-identity-action svg {
  fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round
}
.target-identity-avatar svg {width:32px;height:32px}
.target-identity-portrait,.target-identity-portrait img {position:absolute;inset:0;width:100%;height:100%}
.target-identity-portrait img {object-fit:cover;object-position:50% 32%}
#identity .target-identity-picker > label {
  position:absolute;left:var(--name-left);top:17px;
  margin:0;font:600 .875rem/1.2 'Manrope',sans-serif;color:#c2cfb1;
}
#identity .target-identity-picker > select {
  position:absolute;z-index:1;inset:0;
  width:100%;height:100%;max-width:none;box-sizing:border-box;
  padding:25px 76px 0 var(--name-left);
  appearance:none;cursor:pointer;
  color:inherit;background:transparent;border:0;border-radius:inherit;outline:none;box-shadow:none;
  text-overflow:ellipsis;white-space:nowrap;
  font:750 clamp(1.1rem,2.2vw,1.55rem)/1.2 'Manrope',sans-serif;letter-spacing:-.035em;
}
#identity .target-identity-picker > select:valid {padding-right:132px}
#identity .target-identity-picker > select:disabled {cursor:default}
.target-identity-picker option {background:#20241e;color:#f5f7ef}
.target-identity-action {
  position:absolute;right:var(--picker-inset);pointer-events:none;
  display:inline-flex;align-items:center;justify-content:center;gap:9px;
  height:44px;min-width:44px;padding:0 13px;box-sizing:border-box;
  border-radius:10px;background:#d1fa68;color:#1c2712;
  font:750 .9rem/1 'Manrope',sans-serif;
}
.target-identity-action svg {width:18px;height:18px;transform:rotate(90deg)}
.target-identity-picker select:invalid + .target-identity-action span {display:none}
.target-identity-picker select:disabled + .target-identity-action {opacity:.55}
@container (max-width:440px) {
  .target-identity-picker {--picker-inset:12px;--portrait-width:48px;--name-left:72px;min-height:86px}
  .target-identity-avatar {height:58px}
  #identity .target-identity-picker > label {top:13px}
  #identity .target-identity-picker > select {padding-top:23px}
  #identity .target-identity-picker > select:valid {padding-right:114px}
  .target-identity-action {padding:0 10px;gap:5px}
}
@container (max-width:325px) {
  .target-identity-action span {display:none}
  #identity .target-identity-picker > select,#identity .target-identity-picker > select:valid {padding-right:60px;font-size:1.05rem}
}
@media (forced-colors:active) {
  .target-identity-picker,.target-identity-action {border:1px solid ButtonText}
  .target-identity-picker:focus-within {outline-color:Highlight}
}

.dataset-appearance-settings {min-width:0;margin:24px 0 0;padding:14px 16px 16px;border:1px solid #3b4539;border-radius:12px;background:#151912}
.dataset-appearance-settings>legend {padding:0 6px;color:#f1f3ed;font-size:16px;font-weight:800}
.dataset-appearance-group {min-width:0;margin:0;padding:0;border:0}
.dataset-appearance-group+.dataset-appearance-group {margin-top:14px}
.dataset-appearance-group>legend {padding:0;margin-bottom:7px;color:#f1f3ed;font-size:14px;font-weight:700}
.dataset-appearance-options {display:flex;flex-wrap:wrap;gap:6px}
.dataset-appearance-options label {position:relative;margin:0;cursor:pointer}
.dataset-appearance-options input {position:absolute;width:1px;height:1px;opacity:0}
.dataset-appearance-options span {display:flex;align-items:center;min-height:38px;padding:6px 11px;border:1px solid #4b5548;border-radius:8px;background:#20261d;color:#edf1e9;font-size:14px;line-height:1.2}
.dataset-appearance-options label:hover span {border-color:#9bb76b}
.dataset-appearance-options input:checked+span {border-color:#cbfb48;background:#cbfb48;color:#151c0d;font-weight:750}
.dataset-appearance-options input:focus-visible+span {outline:2px solid #cbfb48;outline-offset:2px}
.dataset-appearance-options input:disabled+span {opacity:.58;cursor:default}
@media(pointer:coarse){.dataset-appearance-options span {min-height:44px}}

#retry-dataset-settings {margin-top:16px}
.library-portrait-actions {display:flex;flex-wrap:wrap;gap:8px 16px}
.library-portrait-actions select {max-width:100%;padding:6px 8px;border:1px solid #4c534a;border-radius:6px;background:#111513;color:#f1f3ed;font:inherit}
