:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9e9ed; background: #101012; font-synthesis: none; letter-spacing: 0;
  --surface: #1a1a1e; --raised: #222227; --line: #303036; --muted: #a1a1ad;
  --green: #9ce6d3; --amber: #e7bd78; --red: #f49a9e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; padding: 48px 20px; display: grid; place-items: start center; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; }
button, a, input, select, .dropzone { transition: background .18s, border-color .18s, color .18s, opacity .18s; }
button:disabled { opacity: .48; cursor: not-allowed; }
:is(button,a,input,select,summary):focus-visible, .dropzone:focus-within { outline: 2px solid var(--green); outline-offset: 3px; }
svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 1.7; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 17px; font-weight: 650; }
h2 { font-size: 14px; font-weight: 600; }
h3 { font-size: 12px; color: var(--muted); font-weight: 500; margin: 24px 0 14px; }
label { font-size: 12px; color: #c4c4cf; font-weight: 500; }
.studio { width: 100%; max-width: 584px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 24px 64px #0004; animation: enter .3s ease-out; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 18px; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: inherit; text-decoration: none; border-radius: 6px; }
.brand:hover .brand-icon { background: #30463f; border-color: var(--green); }
#closeSettings, #closeUsers, #cancelLicense, #resetUser { color: var(--red); }
#closeSettings:hover, #closeUsers:hover, #cancelLicense:hover, #resetUser:hover { color: #ffd2d4; background: #442c32; }
.brand-icon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; color: var(--green); border: 1px solid #3c5550; background: #23332f; border-radius: 8px; }
.brand-icon svg { width: 22px; height: 22px; }
.subtitle { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.header-actions, .activity-actions { display: flex; align-items: center; gap: 4px; }
.header-actions form { margin: 0; }
.icon-button, .pipeline-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border-radius: 6px; background: transparent; color: var(--muted); text-decoration: none; }
.icon-button:hover, .pipeline-link:hover { background: #333339; color: #f4f4f7; }
.icon-button[aria-expanded="true"] { color: var(--green); background: #293b35; }
.account-bar { display: flex; align-items: center; gap: 7px; padding: 0 24px 18px; border-bottom: 1px solid var(--line); }
#accountEmail { min-width: 0; overflow-wrap: anywhere; }
.account-marker { display: flex; color: #81818e; }
.account-marker svg { width: 13px; height: 13px; }
.workspace-label { margin-left: auto; color: #81818e; font-size: 10px; white-space: nowrap; }
.composer { padding: 24px; }
.topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.segments { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #121215; }
.segments button { min-width: 103px; height: 36px; padding: 0 14px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 600; border-radius: 4px; }
.segments button:hover { color: #e9e9ed; }
.segments button[aria-pressed="true"] { background: #333339; color: #f5f5f7; box-shadow: 0 1px 3px #0004; }
.segments button[data-tech="Flutter"][aria-pressed="true"] svg { color: #86cce9; }
.segments button[data-tech="Unity"][aria-pressed="true"] svg { color: var(--green); }
.segments svg { width: 16px; height: 16px; }
.demo-switch { display: flex; align-items: center; gap: 7px; position: relative; cursor: pointer; font-size: 11px; color: var(--muted); }
.demo-switch input { position: absolute; opacity: 0; width: 30px; height: 20px; margin: 0; }
.switch { display: block; position: relative; width: 28px; height: 16px; background: #45454f; border-radius: 12px; pointer-events: none; }
.switch::after { content: ""; width: 10px; height: 10px; position: absolute; left: 3px; top: 3px; background: #c0c0c9; border-radius: 50%; transition: transform .2s; }
input:checked + .switch { background: #77603d; }
input:checked + .switch::after { transform: translateX(12px); background: #ffe0a8; }
input:focus-visible + .switch { outline: 2px solid var(--green); outline-offset: 3px; }
.composer-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.section-caption { font-size: 10px; color: var(--muted); }
.field { display: grid; gap: 8px; min-width: 0; }
#unityLaunchFields { display: grid; gap: 18px; }
input:not([type="checkbox"]):not([type="file"]), select { width: 100%; min-width: 0; height: 43px; background: #121215; color: #eeeef3; border: 1px solid #3b3b44; border-radius: 6px; padding: 10px 12px; font-size: 13px; }
input:not([type="checkbox"]):not([type="file"]):hover, select:hover { border-color: #595965; }
input::placeholder { color: #787885; }
input[readonly] { color: var(--muted) !important; }
.input-with-icon { position: relative; }
.input-with-icon > svg { position: absolute; left: 13px; top: 13px; width: 17px; height: 17px; color: #8d8d9b; pointer-events: none; }
.input-with-icon input:not([type="checkbox"]):not([type="file"]) { padding-left: 40px; }
.source-line { display: flex; align-items: flex-start; gap: 7px; margin-top: -7px; color: #8c8c9b; }
.source-line svg { width: 13px; height: 13px; margin-top: 2px; }
#unitySource { overflow-wrap: anywhere; font-size: 10px; }
.hint { font-size: 11px; color: var(--muted); line-height: 1.6; }
.label-line { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.label-line span { color: var(--muted); font-size: 11px; }
.submit-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; }
.submit-line .hint { font-size: 11px; }
.primary { min-height: 40px; padding: 10px 22px; border-radius: 6px; background: var(--green); color: #17382f; font-size: 12px; font-weight: 650; }
.primary:hover { background: #b5efdf; }
.primary svg { width: 15px; height: 15px; }
#buildButton { min-width: 130px; }
#message, #settingsMessage, #usersMessage { font-size: 12px; line-height: 1.6; color: var(--green); padding: 12px 0 0; overflow-wrap: anywhere; }
#message.error, .auth-error { color: var(--red); }
.dropzone { position: relative; display: flex; align-items: center; gap: 14px; border: 1px dashed #4c4c59; border-radius: 6px; margin-top: 16px; padding: 22px 16px; min-height: 100px; cursor: pointer; background: #202025; }
.dropzone:hover, .dropzone.dragging { background: #272d2b; border-color: var(--green); }
.upload-icon { display: grid; place-items: center; width: 36px; height: 40px; flex-shrink: 0; color: var(--green); }
.upload-icon svg { width: 24px; height: 24px; }
.file-copy { display: grid; gap: 6px; flex: 1; min-width: 0; }
.file-copy strong { font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.file-copy > span { font-size: 11px; color: var(--muted); }
#archive { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.inspection { font-size: 11px; color: var(--muted); line-height: 1.7; padding-top: 12px; overflow-wrap: anywhere; }
.activity, .monitor { padding: 18px 24px 0; border-top: 1px solid var(--line); background: #17171b; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.activity .section-heading { margin-bottom: 4px; }
.count { display: inline-block; min-width: 20px; padding: 2px 5px; margin-left: 5px; text-align: center; font-size: 10px; font-weight: 500; background: #2b2b32; color: #b6b6c3; border-radius: 4px; vertical-align: middle; }
#unityRuns { max-height: 480px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #45454f transparent; }
.build-filters { display: grid; grid-template-columns: minmax(0,1fr) 140px; gap: 8px; margin: 12px 0; }
.search-field { position: relative; min-width: 0; }
.search-field svg { position: absolute; left: 10px; top: 12px; width: 15px; height: 15px; color: var(--muted); }
.search-field input:not([type="checkbox"]):not([type="file"]) { padding-left: 32px; }
.build-filters input:not([type="checkbox"]):not([type="file"]), .build-filters select { width: 100%; min-width: 0; height: 38px; font-size: 11px; }
.run-identity { display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 5px 0; font-size: 11px; }
.run-bundle { color: #c6c6d2; overflow-wrap: anywhere; }
.run-version { color: #86c9b3; white-space: nowrap; }
.run-timing { margin: 3px 0 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.run-timing dt { font-size: 9px; color: var(--muted); margin-bottom: 4px; }
.run-timing dd { margin: 0; font-size: 10px; color: #b9b9c7; line-height: 1.5; font-variant-numeric: tabular-nums; }
.artifact-link { color: #86c9b3; }
@media(max-width:420px) { .build-filters { grid-template-columns: minmax(0,1fr); } .run-timing { grid-template-columns: 1fr; gap: 3px; } .run-timing > div { display:flex; justify-content:space-between; gap:8px; } }
.unity-run { display: grid; grid-template-columns: 28px minmax(0,1fr) 34px; align-items: start; gap: 10px; padding: 17px 0; border-top: 1px solid var(--line); }
.unity-run:first-child { border-top: 0; }
#kotlinRuns .unity-run { grid-template-columns: minmax(0,1fr) auto; }
#kotlinRuns .run-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#kotlinRuns .run-actions { display: flex; flex-direction: column; align-items: end; gap: 10px; }
#kotlinRuns .run-content { overflow-wrap: anywhere; }
#kotlinRuns .run-actions .link { display: inline-flex; align-items: center; gap: 5px; }
#kotlinRuns .run-actions svg { width: 16px; height: 16px; }
#kotlinForm { display: grid; gap: 14px; }
#kotlinForm[hidden] { display: none; }
#kotlinForm .form-actions { flex-wrap: wrap; }
#kotlinForm .signing-toggle { display: flex; align-items: center; gap: 8px; }
#kotlinForm .signing-toggle input { width: 16px; height: 16px; }
#kotlinSigningFields { margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); display: grid; gap: 12px; min-width: 0; }
#kotlinSigningFields[hidden] { display: none; }
#kotlinSigningFields label { display: grid; gap: 6px; min-width: 0; }
#kotlinKeystore { max-width: 100%; font-size: 12px; }
#kotlinKeystore::file-selector-button { padding: 8px 10px; margin-right: 8px; border: 1px solid var(--line); border-radius: 4px; background: #27272c; color: #eeeef3; cursor: pointer; }
.run-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #292930; color: var(--muted); }
.run-mark svg { width: 14px; height: 14px; }
.success .run-mark { background: #223b32; color: var(--green); }
.error .run-mark { background: #442c32; color: var(--red); }
.running .run-mark { background: #35332c; color: var(--amber); }
.running .run-mark svg { animation: spin 2.5s linear infinite; }
.run-content { display: grid; gap: 5px; min-width: 0; padding-top: 3px; }
.run-name { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.5; }
.run-repo { color: var(--muted); font-size: 10px; overflow-wrap: anywhere; line-height: 1.6; }
.run-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 2px; }
.run-status { font-size: 10px; color: #b6b6c3; line-height: 1.6; }
.success .run-status { color: var(--green); }
.error .run-status, .run-error { color: var(--red); }
.running .run-status { color: var(--amber); }
.run-branch, .run-sha { font-size: 10px; color: #90909e; overflow-wrap: anywhere; }
.run-branch::before { content: "\00b7"; margin-right: 8px; }
.run-error { font-size: 10px; overflow-wrap: anywhere; line-height: 1.6; }
.pipeline-link { justify-self: end; border: 1px solid #383840; }
.pipeline-link svg { color: #eaa084; width: 17px; height: 17px; }
.pipeline-link:hover { border-color: #73737e; }
.run-queue-controls { display: grid; gap: 2px; justify-items: end; }
.run-queue-controls button { width: 30px; height: 28px; padding: 4px; }
.run-queue-controls .run-destructive { color: #ef777f; }
.run-queue-controls .run-destructive:hover { color: #ffb1b6; background: #43262c; }
.activity-empty { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 86px; color: #92929f; font-size: 12px; }
.activity-empty svg { width: 17px; height: 17px; }
.settings-panel { padding: 24px; animation: enter .2s ease-out; }
.settings-panel > .section-heading h2 { font-size: 16px; }
.versions { display: grid; grid-template-columns: minmax(0,1fr) 110px 34px; gap: 12px; align-items: end; margin-bottom: 28px; }
.versions label { display: grid; gap: 8px; min-width: 0; }
.versions .icon-button { margin-bottom: 4px; }
.license-row, .user-row { display: flex; align-items: center; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.license-copy, .user-row > div { display: grid; gap: 5px; flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.license-row select { width: 65px; height: 36px; flex-shrink: 0; }
.user-row small { font-size: 10px; line-height: 1.6; color: var(--muted); }
.license-caption { color: var(--muted); font-size: 11px; line-height: 1.6; margin-bottom: 12px; }
#licenseForm, #userForm { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; }
#licenseForm label, #userForm > label { display: grid; gap: 8px; }
.form-actions { display: flex; align-items: center; justify-content: end; gap: 8px; }
.user-flags { display: flex; gap: 18px; flex-wrap: wrap; }
.user-flags label { display: flex; align-items: center; gap: 7px; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.slot-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; max-height: 330px; overflow: auto; }
.slot { padding: 13px; border: 1px solid #383840; border-radius: 6px; background: #222227; min-width: 0; }
.slot-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.slot-state { display: flex; align-items: center; gap: 5px; }
.slot-state::before { content: ""; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: #8b8b99; }
.slot.busy { border-color: #4c6a61; }
.slot.busy .slot-state::before { background: var(--green); animation: pulse 2s infinite; }
.slot.quarantined { border-color: #806044; }
.slot.quarantined .slot-state::before { background: var(--amber); }
.slot-name { font-size: 12px; font-weight: 500; height: 34px; margin-top: 12px; line-height: 17px; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.slot-detail { font-size: 10px; color: var(--muted); margin-top: 5px; }
.track { height: 3px; background: #37373f; border-radius: 2px; margin-top: 10px; overflow: hidden; }
.track > span { display: block; height: 100%; background: var(--green); transition: width .7s linear; }
.track.indeterminate > span { width: 35%; animation: slide 1.5s infinite; }
.status-meta { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 9px; padding: 3px 6px; border: 1px solid #685536; border-radius: 3px; color: var(--amber); }
.badge.live { color: var(--green); border-color: #3d6157; }
.queue-heading { margin-top: 22px; }
.queue, #recent { max-height: 210px; overflow: auto; }
.queue-row, .recent-row { display: flex; align-items: center; gap: 8px; padding: 13px 0; border-top: 1px solid var(--line); font-size: 11px; min-width: 0; transition: background .15s; }
.position { width: 20px; color: var(--muted); flex-shrink: 0; }
.row-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-status { color: var(--muted); font-size: 10px; max-width: 38%; text-align: right; overflow-wrap: anywhere; }
.recent-row .row-status { color: var(--green); }
.queue-row .icon-button { width: 26px; height: 30px; flex-basis: 26px; }
.queue-row svg { width: 14px; }
.drag-handle { touch-action: none; cursor: grab; }
.queue-row.drag-source { opacity: .5; }
.queue-row.drop-target { background: #2d3a36; box-shadow: inset 0 2px var(--green); }
.empty { font-size: 12px; color: var(--muted); padding: 24px 16px; text-align: center; }
details { border-top: 1px solid var(--line); margin-top: 12px; }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); padding: 17px 0; }
summary::-webkit-details-marker { display: none; }
summary svg { margin-left: auto; width: 14px; height: 14px; transition: transform .2s; }
details[open] summary svg { transform: rotate(180deg); }
.stale { opacity: .55; }
.link { color: var(--green); }
footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); color: #9393a0; font-size: 10px; line-height: 1.5; }
footer > span:first-child { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
footer > span:last-child { text-align: right; }
.tiny-square { width: 5px; height: 5px; border-radius: 50%; background: #9f9fad; }
.login { max-width: 400px; padding: 36px; display: grid; gap: 22px; text-align: center; }
.login .badge { justify-self: center; }
.google-login { display: flex; justify-content: center; text-decoration: none; }
.auth-error { font-size: 12px; line-height: 1.6; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .4; } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(400%); } }
@media (max-width: 480px) {
  body { padding: 16px 10px; }
  .header { padding: 18px 18px 14px; gap: 8px; }
  .header-actions { gap: 0; }
  .account-bar { padding: 0 18px 15px; }
  .workspace-label { display: none; }
  .composer, .settings-panel { padding: 20px 18px; }
  .activity, .monitor { padding: 16px 18px 0; }
  .segments button { min-width: 87px; padding: 0 10px; }
  .topline { gap: 10px; margin-bottom: 22px; }
  .submit-line { gap: 10px; }
  #buildButton { min-width: 112px; padding: 10px 14px; }
  .versions { grid-template-columns: minmax(0,1fr) 90px 30px; gap: 8px; }
  .slot-grid { gap: 8px; }
  .slot { padding: 10px; }
  .slot-top { font-size: 9px; }
  .queue-row { gap: 4px; }
  .queue-row .row-status { max-width: 26%; }
  footer { padding: 13px 18px; font-size: 9px; }
  .activity-actions .hint { font-size: 10px; }
}
@media (max-width: 360px) {
  .brand-icon { width: 30px; height: 32px; }
  .brand { gap: 8px; }
  h1 { font-size: 15px; }
  .subtitle { font-size: 10px; }
  .header-actions .icon-button { width: 30px; flex-basis: 30px; }
  .submit-line { align-items: stretch; flex-direction: column; }
  .activity-actions .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
