/*
 * 槿榕AI · Spatial Film Stage workspace
 * Approved visual target: cinematic preview stage + prompt console + inspector.
 * This file is intentionally loaded last so it can reskin the existing,
 * production-tested workspace without replacing any business controls.
 */

body.jr-authenticated {
  --stage-accent: #168b69;
  --stage-accent-strong: #087657;
  --stage-accent-rgb: 22, 139, 105;
  --stage-cyan: #2998a8;
  --stage-canvas: #eef3f2;
  --stage-panel: rgba(248, 251, 250, .78);
  --stage-panel-strong: rgba(251, 253, 252, .9);
  --stage-line: rgba(17, 61, 51, .12);
  --stage-line-strong: rgba(17, 61, 51, .2);
  --stage-text: #10211d;
  --stage-text-soft: #5e706b;
  --stage-text-faint: #82918d;
  --stage-shadow: 0 24px 70px rgba(35, 71, 61, .12), 0 2px 10px rgba(35, 71, 61, .06);
  --stage-highlight: inset 0 1px 0 rgba(255, 255, 255, .82);
  min-height: 100dvh;
  background:
    radial-gradient(80% 58% at 50% 104%, rgba(59, 169, 142, .14), transparent 67%),
    linear-gradient(180deg, #f5f8f7 0%, var(--stage-canvas) 100%) !important;
  color: var(--stage-text);
}

:root[data-theme="dark"] body.jr-authenticated {
  --stage-accent: #50d5a9;
  --stage-accent-strong: #2ebf90;
  --stage-accent-rgb: 80, 213, 169;
  --stage-cyan: #51bfca;
  --stage-canvas: #07100f;
  --stage-panel: rgba(7, 20, 18, .76);
  --stage-panel-strong: rgba(8, 22, 20, .9);
  --stage-line: rgba(139, 231, 202, .13);
  --stage-line-strong: rgba(139, 231, 202, .24);
  --stage-text: #edf8f4;
  --stage-text-soft: #a7bbb5;
  --stage-text-faint: #728a83;
  --stage-shadow: 0 28px 90px rgba(0, 0, 0, .45), 0 2px 12px rgba(0, 0, 0, .24);
  --stage-highlight: inset 0 1px 0 rgba(226, 255, 245, .09);
  background:
    radial-gradient(72% 62% at 50% 108%, rgba(22, 148, 111, .2), transparent 70%),
    linear-gradient(180deg, #050c0c 0%, var(--stage-canvas) 100%) !important;
}

body.jr-authenticated::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(238, 247, 244, .34), rgba(238, 247, 244, .78)),
    url("../../assets/workspace-stage.jpg") center 46% / cover no-repeat;
  content: "";
  filter: blur(18px) saturate(.72);
  opacity: .2;
  transform: scale(1.07);
  pointer-events: none;
}

:root[data-theme="dark"] body.jr-authenticated::before {
  background:
    linear-gradient(180deg, rgba(2, 9, 8, .42), rgba(2, 9, 8, .82)),
    url("../../assets/workspace-stage.jpg") center 46% / cover no-repeat;
  filter: blur(18px) saturate(.78);
  opacity: .42;
}

body.jr-authenticated #app,
body.jr-authenticated #app.show {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  color: var(--stage-text);
  background: transparent !important;
}

body.jr-authenticated #app > .tech-bg {
  opacity: .18;
  pointer-events: none;
}

/* Floating top control bar */
body.jr-authenticated header {
  position: relative !important;
  z-index: 120 !important;
  width: min(calc(100% - 24px), 1920px) !important;
  height: 60px !important;
  margin: 10px auto 0 !important;
  padding: 0 14px !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 18px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), transparent 52%),
    var(--stage-panel) !important;
  box-shadow: var(--stage-shadow), var(--stage-highlight) !important;
  backdrop-filter: blur(24px) saturate(1.18) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.18) !important;
}

:root[data-theme="dark"] body.jr-authenticated header {
  background:
    linear-gradient(180deg, rgba(207, 255, 241, .055), transparent 52%),
    var(--stage-panel) !important;
}

body.jr-authenticated .logo-img {
  width: 34px !important;
  height: 34px !important;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 9px !important;
  box-shadow: 0 7px 20px rgba(var(--stage-accent-rgb), .17) !important;
}

body.jr-authenticated .logo-wrap { gap: 9px !important; }
body.jr-authenticated .logo-main {
  color: var(--stage-text) !important;
  font-size: 15px !important;
  font-weight: 760 !important;
}
body.jr-authenticated .logo-sub {
  color: var(--stage-text-faint) !important;
  font-size: 8px !important;
  letter-spacing: .08em !important;
}

body.jr-authenticated .hd-right {
  gap: 7px !important;
}

body.jr-authenticated .model-switcher { order: 1; }
body.jr-authenticated #acct-badge { order: 2; }
body.jr-authenticated #lang-toggle { order: 3; }
body.jr-authenticated header .jr-theme-toggle { order: 4; }

body.jr-authenticated .model-switch-button,
body.jr-authenticated .lang-toggle,
body.jr-authenticated header .jr-theme-toggle {
  min-height: 36px !important;
  border: 1px solid var(--stage-line) !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 88%, transparent) !important;
  color: var(--stage-text-soft) !important;
  box-shadow: var(--stage-highlight) !important;
}

body.jr-authenticated header button:focus-visible {
  outline: 2px solid rgba(var(--stage-accent-rgb), .62) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(var(--stage-accent-rgb), .14), var(--stage-highlight) !important;
}

body.jr-authenticated .model-switch-button {
  min-width: 132px !important;
  border-radius: 999px !important;
}

body.jr-authenticated .model-switch-button .dot {
  background: var(--stage-accent) !important;
  box-shadow: 0 0 0 4px rgba(var(--stage-accent-rgb), .12), 0 0 18px rgba(var(--stage-accent-rgb), .2);
}

body.jr-authenticated #acct-badge {
  --workspace-points-progress: 0deg;
  position: relative;
  display: grid !important;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px !important;
  padding: 0 !important;
  overflow: visible;
  border: 0 !important;
  border-radius: 50% !important;
  background:
    radial-gradient(circle at center, var(--stage-panel-strong) 58%, transparent 60%),
    conic-gradient(var(--stage-accent) var(--workspace-points-progress), color-mix(in srgb, var(--stage-line-strong) 72%, transparent) 0) !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: 0 0 0 1px var(--stage-line), 0 0 22px rgba(var(--stage-accent-rgb), .14), var(--stage-highlight) !important;
}

body.jr-authenticated #acct-badge::before {
  color: var(--stage-text);
  content: attr(data-points-label);
  font-size: 10px;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

body.jr-authenticated #acct-badge[data-points-ready="false"]::before { opacity: .5; }

body.jr-authenticated .model-switch-menu {
  border-color: var(--stage-line) !important;
  background: var(--stage-panel-strong) !important;
  box-shadow: var(--stage-shadow), var(--stage-highlight) !important;
  backdrop-filter: blur(26px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.15) !important;
}

/* Spatial workspace shell */
body.jr-authenticated .layout.jr-workspace {
  display: grid !important;
  width: min(calc(100% - 24px), 1920px) !important;
  height: calc(100dvh - 92px);
  min-height: 650px;
  margin: 10px auto 12px !important;
  grid-template-columns: 62px minmax(0, 1fr) minmax(278px, 318px) !important;
  gap: 10px !important;
  overflow: hidden;
}

body.jr-authenticated .workspace-rail,
body.jr-authenticated .workspace-main > .panel-left,
body.jr-authenticated .workspace-main > .panel-right,
body.jr-authenticated .workspace-inspector {
  border: 1px solid var(--stage-line) !important;
  background: var(--stage-panel) !important;
  box-shadow: var(--stage-shadow), var(--stage-highlight) !important;
  backdrop-filter: blur(22px) saturate(1.12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.12) !important;
}

:root[data-theme="dark"] body.jr-authenticated .workspace-rail,
:root[data-theme="dark"] body.jr-authenticated .workspace-main > .panel-left,
:root[data-theme="dark"] body.jr-authenticated .workspace-main > .panel-right,
:root[data-theme="dark"] body.jr-authenticated .workspace-inspector {
  background:
    linear-gradient(180deg, rgba(218, 255, 244, .035), transparent 36%),
    var(--stage-panel) !important;
}

/* Narrow create / history dock */
body.jr-authenticated .workspace-rail {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px !important;
  min-width: 0;
  padding: 10px 6px !important;
  border-radius: 20px !important;
}

body.jr-authenticated .workspace-rail-button {
  display: grid;
  place-items: center;
  width: 48px;
  min-height: 58px;
  padding: 7px 4px !important;
  border: 1px solid transparent !important;
  border-radius: 15px !important;
  background: transparent !important;
  color: var(--stage-text-faint) !important;
}

body.jr-authenticated .workspace-rail-button strong {
  min-width: 25px;
  min-height: 25px;
  border: 1px solid var(--stage-line);
  border-radius: 9px;
  color: currentColor;
  font-size: 13px;
  font-weight: 760;
}

body.jr-authenticated .workspace-rail-button span {
  margin-top: 4px;
  font-size: 10px;
}

body.jr-authenticated .workspace-rail-button:hover,
body.jr-authenticated .workspace-rail-button.active {
  border-color: var(--stage-line) !important;
  background: rgba(var(--stage-accent-rgb), .095) !important;
  color: var(--stage-accent-strong) !important;
  box-shadow: var(--stage-highlight) !important;
  transform: translateY(-1px);
}

/* Center: cinematic stage first, prompt console second */
body.jr-authenticated .workspace-main {
  display: grid !important;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(360px, 1fr) minmax(238px, auto) !important;
  gap: 10px !important;
}

body.jr-authenticated .workspace-main > .panel-right {
  position: relative;
  grid-row: 1;
  overflow: hidden !important;
  border-radius: 22px !important;
  background: #091210 !important;
  isolation: isolate;
}

body.jr-authenticated .workspace-main > .panel-right::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 11, 10, .08), rgba(3, 11, 10, .28)),
    url("../../assets/workspace-stage.jpg") center 54% / cover no-repeat;
  content: "";
  transform: scale(1.015);
  transition: transform 8s cubic-bezier(.2, .72, .2, 1);
}

body.jr-authenticated .workspace-main > .panel-right:hover::before {
  transform: scale(1.035);
}

body.jr-authenticated .result-head {
  position: absolute !important;
  z-index: 8;
  top: 12px;
  right: 12px;
  left: 12px;
  min-height: 54px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(218, 255, 244, .13) !important;
  border-radius: 16px !important;
  background: rgba(4, 16, 14, .62) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 30px rgba(0, 0, 0, .18) !important;
  color: #effcf7 !important;
  backdrop-filter: blur(18px) saturate(1.15) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.15) !important;
}

body.jr-authenticated .result-title h2 {
  color: #edf9f5 !important;
  font-size: 13px !important;
  font-weight: 720 !important;
}

body.jr-authenticated .result-tabs {
  border-color: rgba(218, 255, 244, .1) !important;
  background: rgba(255, 255, 255, .055) !important;
}

body.jr-authenticated .result-tab { color: rgba(228, 245, 239, .68) !important; }
body.jr-authenticated .result-tab.active {
  background: rgba(91, 226, 181, .15) !important;
  color: #79e3bd !important;
  box-shadow: inset 0 0 0 1px rgba(91, 226, 181, .16) !important;
}

body.jr-authenticated .conc-badge {
  border-color: rgba(218, 255, 244, .12) !important;
  background: rgba(255, 255, 255, .055) !important;
  color: rgba(228, 245, 239, .76) !important;
}

body.jr-authenticated .result-scroll {
  position: relative;
  z-index: 1;
  display: grid !important;
  height: 100%;
  min-height: 0;
  padding: 78px 14px 14px !important;
  gap: 12px;
  overflow: auto !important;
  background:
    linear-gradient(180deg, transparent 52%, rgba(1, 8, 7, .58) 100%),
    linear-gradient(90deg, rgba(1, 8, 7, .16), transparent 30%, transparent 72%, rgba(1, 8, 7, .16));
}

body.jr-authenticated .idle-hint {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  width: min(410px, calc(100% - 36px)) !important;
  margin: 0 !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(218, 255, 244, .14) !important;
  border-radius: 18px !important;
  background: rgba(3, 15, 13, .58) !important;
  color: #eef9f5 !important;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 44px rgba(0, 0, 0, .26) !important;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

body.jr-authenticated .idle-hint .ih-ico { display: none !important; }
body.jr-authenticated .idle-hint h3 {
  margin: 0 0 6px !important;
  color: #f1fbf7 !important;
  font-size: 16px !important;
}
body.jr-authenticated .idle-hint p {
  margin: 0 !important;
  color: rgba(226, 243, 237, .7) !important;
  font-size: 11px !important;
  line-height: 1.6 !important;
}
body.jr-authenticated .idle-steps {
  justify-content: flex-start;
  margin-top: 10px !important;
}
body.jr-authenticated .idle-steps span {
  min-height: 27px;
  border-color: rgba(218, 255, 244, .1) !important;
  background: rgba(255, 255, 255, .055) !important;
  color: rgba(226, 243, 237, .68) !important;
  font-size: 9px;
}

/* Real task cards remain operational and become a horizontal film queue. */
body.jr-authenticated .result-scroll:has(.task-card) {
  grid-auto-flow: column;
  grid-auto-columns: minmax(340px, 56%);
  align-items: end;
  align-content: end;
  padding-top: 84px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x proximity;
}

body.jr-authenticated .result-scroll > .task-card {
  max-height: calc(100% - 2px);
  overflow: auto;
  border-color: rgba(220, 255, 244, .15) !important;
  border-radius: 18px !important;
  background: rgba(4, 15, 13, .78) !important;
  color: #eef9f5 !important;
  box-shadow: 0 20px 44px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  scroll-snap-align: start;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.jr-authenticated .result-scroll > .task-card:first-of-type {
  grid-column: span 2;
  min-width: min(640px, 68vw);
}

body.jr-authenticated .result-scroll .tc-vtitle,
body.jr-authenticated .result-scroll .tc-stage,
body.jr-authenticated .result-scroll .ring-num { color: #effaf6 !important; }
body.jr-authenticated .result-scroll .tc-vmeta,
body.jr-authenticated .result-scroll .tc-prompt,
body.jr-authenticated .result-scroll .tc-elapsed { color: rgba(224, 242, 236, .66) !important; }
body.jr-authenticated .result-scroll .tc-vinfo {
  border-color: rgba(220, 255, 244, .1) !important;
  background: rgba(4, 15, 13, .88) !important;
  color: #eef9f5 !important;
}
body.jr-authenticated .result-scroll .tc-taskbar {
  border-color: rgba(220, 255, 244, .1) !important;
  background: rgba(255, 255, 255, .04) !important;
}
body.jr-authenticated .result-scroll .tc-action {
  border-color: rgba(220, 255, 244, .12) !important;
  background: rgba(255, 255, 255, .055) !important;
  color: rgba(230, 246, 240, .78) !important;
}
body.jr-authenticated .result-scroll .tc-action.primary {
  background: var(--stage-accent-strong) !important;
  color: #fff !important;
}

/* Prompt console */
body.jr-authenticated .workspace-main > .panel-left {
  position: relative;
  grid-row: 2;
  overflow: hidden !important;
  border-radius: 22px !important;
}

body.jr-authenticated .workspace-main > .panel-left .panel-title {
  display: none !important;
}

body.jr-authenticated .workspace-main > .panel-left .form-body {
  display: grid !important;
  height: 100% !important;
  min-height: 0;
  padding: 12px !important;
  grid-template-columns: minmax(0, 1fr) 166px 162px !important;
  grid-template-areas:
    "tabs tabs actions"
    "prompt material actions"
    "camera style actions";
  grid-template-rows: auto minmax(112px, 1fr) auto;
  gap: 9px 10px !important;
  overflow: auto !important;
}

body.jr-authenticated .workspace-main .creator-tabs {
  grid-area: tabs !important;
  justify-self: start;
  width: auto;
  min-width: 280px;
  min-height: 34px;
  padding: 3px !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 12px !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 66%, transparent) !important;
}

body.jr-authenticated .workspace-main .creator-tab {
  min-height: 28px !important;
  padding: 5px 14px !important;
  border-radius: 9px !important;
  color: var(--stage-text-soft) !important;
  font-size: 11px !important;
}

body.jr-authenticated .workspace-main .creator-tab.active {
  background: rgba(var(--stage-accent-rgb), .12) !important;
  color: var(--stage-accent-strong) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--stage-accent-rgb), .13) !important;
}

body.jr-authenticated .workspace-main .field:has(#prompt) { grid-area: prompt !important; }
body.jr-authenticated .workspace-main .field:has(#camera-controls) { grid-area: camera !important; }
body.jr-authenticated .workspace-main .field:has(#style-controls) { grid-area: style !important; }
body.jr-authenticated .workspace-main .material-section { grid-area: material !important; }
body.jr-authenticated .workspace-prompt-actions { grid-area: actions !important; }

body.jr-authenticated .workspace-main .field:has(#prompt),
body.jr-authenticated .workspace-main .field:has(#camera-controls),
body.jr-authenticated .workspace-main .field:has(#style-controls),
body.jr-authenticated .workspace-main .material-section {
  min-width: 0;
  margin: 0 !important;
}

body.jr-authenticated .workspace-main .prompt-label-row,
body.jr-authenticated .workspace-main .material-head {
  min-height: 24px;
  margin-bottom: 5px !important;
}

body.jr-authenticated .workspace-main .material-head b,
body.jr-authenticated .workspace-main .field > label,
body.jr-authenticated .workspace-main .prompt-label-row label {
  color: var(--stage-text-soft) !important;
  font-size: 10px !important;
  font-weight: 680 !important;
}

body.jr-authenticated .workspace-main .material-head span { display: none; }

body.jr-authenticated .workspace-main textarea.prompt-box {
  min-height: 102px !important;
  height: 100% !important;
  max-height: 150px !important;
  padding: 12px 13px 28px !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 74%, transparent) !important;
  color: var(--stage-text) !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}

body.jr-authenticated .workspace-main textarea.prompt-box:focus {
  border-color: rgba(var(--stage-accent-rgb), .48) !important;
  box-shadow: 0 0 0 4px rgba(var(--stage-accent-rgb), .1), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
}

body.jr-authenticated .workspace-main .prompt-examples {
  display: flex;
  max-width: 100%;
  margin-top: 6px !important;
  overflow-x: auto;
  scrollbar-width: none;
}
body.jr-authenticated .workspace-main .prompt-examples::-webkit-scrollbar { display: none; }

body.jr-authenticated .workspace-main .quick-chip {
  min-height: 28px !important;
  padding: 5px 9px !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 68%, transparent) !important;
  color: var(--stage-text-soft) !important;
  font-size: 9px !important;
  white-space: nowrap;
}

body.jr-authenticated .workspace-main .quick-chip.active {
  background: rgba(var(--stage-accent-rgb), .11) !important;
  color: var(--stage-accent-strong) !important;
}

body.jr-authenticated .workspace-main .prompt-controls {
  display: flex;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
body.jr-authenticated .workspace-main .prompt-controls::-webkit-scrollbar { display: none; }

body.jr-authenticated .workspace-main .material-grid {
  display: grid;
  height: calc(100% - 28px);
  min-height: 76px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px !important;
}

body.jr-authenticated .workspace-main .upload-card {
  min-height: 76px !important;
  height: 100%;
  border: 1px dashed var(--stage-line-strong) !important;
  border-radius: 13px !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 62%, transparent) !important;
  box-shadow: none !important;
}
body.jr-authenticated .workspace-main .upload-empty {
  color: var(--stage-text-faint) !important;
  font-size: 8px !important;
  line-height: 1.45;
}
body.jr-authenticated .workspace-main .upload-plus {
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  background: rgba(var(--stage-accent-rgb), .1) !important;
  color: var(--stage-accent-strong) !important;
}

body.jr-authenticated .workspace-prompt-actions {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--stage-line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--stage-panel-strong) 64%, transparent);
  box-shadow: var(--stage-highlight);
}

body.jr-authenticated .workspace-prompt-actions .submit-btn {
  min-height: 46px !important;
  margin: 0 !important;
  border: 1px solid rgba(var(--stage-accent-rgb), .26) !important;
  border-radius: 13px !important;
  background: var(--stage-accent-strong) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px rgba(var(--stage-accent-rgb), .23), inset 0 1px 0 rgba(255, 255, 255, .2) !important;
  font-size: 13px !important;
  font-weight: 760 !important;
}

body.jr-authenticated .workspace-prompt-actions .submit-btn:hover:not(:disabled) {
  background: var(--stage-accent) !important;
  transform: translateY(-1px);
}

body.jr-authenticated .workspace-prompt-actions .submit-sub {
  margin: 7px 2px 0 !important;
  color: var(--stage-text-faint) !important;
  font-size: 8px !important;
  line-height: 1.35;
  text-align: center;
}

/* Continuous inspector */
body.jr-authenticated .workspace-inspector {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 22px !important;
}

body.jr-authenticated .workspace-inspector-header {
  min-height: 58px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--stage-line) !important;
}

body.jr-authenticated .workspace-inspector-title b {
  color: var(--stage-text) !important;
  font-size: 14px !important;
}
body.jr-authenticated .workspace-inspector-title span {
  color: var(--stage-text-faint) !important;
  font-size: 9px !important;
}

body.jr-authenticated .workspace-inspector-scroll {
  padding: 10px !important;
}

body.jr-authenticated .workspace-inspector .section-divider {
  margin: 0 2px 8px !important;
  color: var(--stage-text-faint) !important;
  font-size: 9px !important;
}

body.jr-authenticated .workspace-inspector .settings-block {
  margin: 0 0 8px !important;
  padding: 10px !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 60%, transparent) !important;
  box-shadow: var(--stage-highlight) !important;
}

body.jr-authenticated .workspace-inspector .settings-title {
  margin-bottom: 7px !important;
  color: var(--stage-text-soft) !important;
  font-size: 10px !important;
}

body.jr-authenticated .workspace-inspector .choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px !important;
}

body.jr-authenticated .workspace-inspector .choice-btn {
  min-width: 0;
  min-height: 32px !important;
  padding: 5px 4px !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 82%, transparent) !important;
  color: var(--stage-text-soft) !important;
  font-size: 9px !important;
  white-space: nowrap;
}

body.jr-authenticated .workspace-inspector .choice-btn.active {
  border-color: rgba(var(--stage-accent-rgb), .25) !important;
  background: rgba(var(--stage-accent-rgb), .12) !important;
  color: var(--stage-accent-strong) !important;
  box-shadow: inset 0 0 0 1px rgba(var(--stage-accent-rgb), .08) !important;
}

body.jr-authenticated .inspector-actions {
  padding: 10px !important;
  border-top: 1px solid var(--stage-line) !important;
  background: color-mix(in srgb, var(--stage-panel-strong) 76%, transparent) !important;
}

body.jr-authenticated .inspector-actions .cost-card {
  min-height: 56px !important;
  margin: 0 !important;
  border: 1px solid var(--stage-line) !important;
  border-radius: 14px !important;
  background: rgba(var(--stage-accent-rgb), .08) !important;
  box-shadow: var(--stage-highlight) !important;
}

body.jr-authenticated .inspector-actions .cost-copy b,
body.jr-authenticated .inspector-actions .cost-balance {
  color: var(--stage-accent-strong) !important;
}

body.jr-authenticated .inspector-actions .cost-copy span {
  color: var(--stage-text-faint) !important;
  font-size: 8px !important;
}

body.jr-authenticated .site-icp-footer {
  position: fixed;
  z-index: 26;
  right: auto;
  bottom: max(4px, env(safe-area-inset-bottom));
  left: 50%;
  display: block !important;
  width: max-content;
  max-width: calc(100% - 160px);
  min-height: 22px;
  padding: 3px 10px !important;
  overflow: hidden;
  border: 1px solid var(--stage-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--stage-panel-strong) 76%, transparent);
  color: var(--stage-text-faint);
  font-size: 9px !important;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
  box-shadow: var(--stage-highlight);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
}

/* Inspector and prompt console become the approved mobile workbench. */
@media (max-width: 1100px) {
  body.jr-authenticated #app.show {
    height: auto !important;
    min-height: 100dvh;
  }

  body.jr-authenticated header {
    position: sticky !important;
    top: max(8px, env(safe-area-inset-top));
  }

  body.jr-authenticated .layout.jr-workspace {
    display: block !important;
    width: min(calc(100% - 24px), 980px) !important;
    height: auto;
    min-height: 0;
    margin-bottom: calc(148px + env(safe-area-inset-bottom)) !important;
    overflow: visible;
  }

  body.jr-authenticated .workspace-rail { display: none !important; }

  body.jr-authenticated .workspace-main {
    display: grid !important;
    grid-template-rows: minmax(480px, 66dvh) auto !important;
    overflow: visible;
  }

  body.jr-authenticated .workspace-main > .panel-right { grid-row: 1; }
  body.jr-authenticated .workspace-main > .panel-left { grid-row: 2; }

  body.jr-authenticated .workspace-inspector {
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    max-height: min(84dvh, 760px) !important;
    border-radius: 26px !important;
    background: var(--stage-panel-strong) !important;
  }

  body.jr-authenticated .mobile-parameter-trigger {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    min-height: 46px;
    border-color: rgba(var(--stage-accent-rgb), .26) !important;
    background: var(--stage-accent-strong) !important;
    box-shadow: 0 14px 34px rgba(var(--stage-accent-rgb), .27), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
  }

  body.jr-authenticated .mobile-bottom-nav {
    border-color: var(--stage-line) !important;
    background: var(--stage-panel-strong) !important;
    box-shadow: var(--stage-shadow), var(--stage-highlight) !important;
  }
}

@media (max-width: 720px) {
  body.jr-authenticated header {
    display: grid !important;
    width: calc(100% - 16px) !important;
    min-height: 58px;
    margin-top: max(8px, env(safe-area-inset-top)) !important;
    padding: 8px 9px !important;
    grid-template-columns: auto minmax(0, 1fr);
    border-radius: 17px !important;
  }

  body.jr-authenticated .logo-img {
    width: 36px !important;
    height: 36px !important;
  }
  body.jr-authenticated .logo-names { display: block !important; }
  body.jr-authenticated .logo-main { font-size: 13px !important; }
  body.jr-authenticated .logo-sub { display: none; }

  body.jr-authenticated .hd-right {
    display: flex !important;
    justify-content: flex-end;
    min-width: 0;
    gap: 4px !important;
  }

  body.jr-authenticated .model-switcher { min-width: 0; }
  body.jr-authenticated .model-switch-button {
    min-width: 118px !important;
    width: 118px !important;
    max-width: 118px;
    height: 44px;
    padding: 7px 9px !important;
  }
  body.jr-authenticated #active-model-badge {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.jr-authenticated #active-model-badge {
    font-size: 10px !important;
    font-weight: 680;
    letter-spacing: 0;
  }
  body.jr-authenticated #acct-badge {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }
  body.jr-authenticated #lang-toggle,
  body.jr-authenticated header .jr-theme-toggle {
    display: grid !important;
    place-items: center;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    font-size: 11px !important;
  }

  body.jr-authenticated .layout.jr-workspace {
    width: calc(100% - 16px) !important;
    margin-top: 8px !important;
    margin-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }

  body.jr-authenticated .workspace-main {
    display: flex !important;
    flex-direction: column;
    gap: 8px !important;
  }

  body.jr-authenticated .workspace-main > .panel-right {
    order: 1;
    min-height: 440px !important;
    border-radius: 20px !important;
  }
  body.jr-authenticated .workspace-main > .panel-left {
    order: 2;
    min-height: 0;
    border-radius: 20px !important;
  }

  body.jr-authenticated .result-head {
    top: 9px;
    right: 9px;
    left: 9px;
    display: grid !important;
    min-height: 82px !important;
    padding: 9px !important;
    grid-template-columns: 1fr auto;
    gap: 7px !important;
  }
  body.jr-authenticated .result-tabs {
    grid-column: 1 / -1;
    order: 3;
    width: 100%;
  }
  body.jr-authenticated .result-tab {
    flex: 1 0 auto;
    min-height: 28px !important;
    padding: 4px 6px !important;
    font-size: 9px !important;
  }
  body.jr-authenticated .result-scroll { padding: 104px 9px 9px !important; }

  body.jr-authenticated .idle-hint {
    right: 10px;
    bottom: 10px;
    width: calc(100% - 20px) !important;
    padding: 13px 14px !important;
  }
  body.jr-authenticated .idle-hint p { display: none; }
  body.jr-authenticated .idle-steps { flex-wrap: nowrap; overflow-x: auto; }

  body.jr-authenticated .result-scroll:has(.task-card) {
    grid-auto-columns: minmax(290px, 88%);
    padding-top: 106px !important;
  }
  body.jr-authenticated .result-scroll > .task-card:first-of-type {
    grid-column: auto;
    min-width: 290px;
  }

  body.jr-authenticated .workspace-main > .panel-left .form-body {
    display: grid !important;
    padding: 10px !important;
    grid-template-columns: minmax(0, 1fr) 96px !important;
    grid-template-areas:
      "tabs tabs"
      "prompt prompt"
      "material actions"
      "camera camera"
      "style style";
    grid-template-rows: auto auto 94px auto auto;
    gap: 8px !important;
    overflow: visible !important;
  }

  body.jr-authenticated .workspace-main .creator-tabs {
    width: 100%;
    min-width: 0;
  }
  body.jr-authenticated .workspace-main .creator-tab {
    flex: 1;
    padding: 5px 7px !important;
  }
  body.jr-authenticated .workspace-main textarea.prompt-box {
    min-height: 124px !important;
    max-height: 180px !important;
    font-size: 16px !important;
  }
  body.jr-authenticated .workspace-main .prompt-examples { display: none; }
  body.jr-authenticated .workspace-main .prompt-controls { padding-bottom: 2px; }
  body.jr-authenticated .workspace-main .material-grid { min-height: 64px; }
  body.jr-authenticated .workspace-main .upload-card { min-height: 64px !important; }

  body.jr-authenticated .workspace-prompt-actions {
    min-height: 94px;
    padding: 6px;
  }
  body.jr-authenticated .workspace-prompt-actions .submit-btn {
    min-height: 44px !important;
    padding: 8px !important;
    font-size: 11px !important;
  }
  body.jr-authenticated .workspace-prompt-actions .submit-sub { display: none; }

  body.jr-authenticated .mobile-bottom-nav {
    display: none !important;
  }
  body.jr-authenticated .mobile-parameter-trigger {
    right: 13px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    min-height: 44px;
    padding: 8px 13px;
    font-size: 11px;
  }

  body.jr-authenticated .site-icp-footer {
    max-width: calc(100% - 128px);
  }
}

@media (max-width: 390px) {
  body.jr-authenticated .logo-names { display: none !important; }
  body.jr-authenticated .model-switch-button {
    width: 132px !important;
    min-width: 132px !important;
    max-width: 132px;
  }
  body.jr-authenticated .workspace-main > .panel-right { min-height: 410px !important; }
  body.jr-authenticated .idle-steps span:last-child { display: none; }
}

@media (min-width: 1600px) {
  body.jr-authenticated .layout.jr-workspace {
    grid-template-columns: 66px minmax(0, 1fr) 330px !important;
  }
  body.jr-authenticated .workspace-main {
    grid-template-rows: minmax(420px, 1fr) minmax(250px, auto) !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body.jr-authenticated header,
  body.jr-authenticated .workspace-rail,
  body.jr-authenticated .workspace-main > .panel-left,
  body.jr-authenticated .workspace-inspector,
  body.jr-authenticated .mobile-bottom-nav {
    background: var(--stage-panel-strong) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.jr-authenticated .workspace-main > .panel-right::before,
  body.jr-authenticated .workspace-rail-button,
  body.jr-authenticated .workspace-prompt-actions .submit-btn {
    transition: none !important;
    transform: none !important;
  }
}
