/* Coordinates are the desktop app's 1180 × 712 logical points.
   Native screenshots supply the pixels. DOM controls supply focus, input and state. */
#pan {
  overflow:auto;
  overscroll-behavior-x:contain;
  scrollbar-width:thin;
  scrollbar-color:#595a5e #27282a;
}

#scaled {
  position:relative;
  width:1180px;
  height:712px;
  overflow:hidden;
}

#stage {
  position:absolute;
  top:0;
  left:0;
  width:1180px;
  height:712px;
  transform-origin:top left;
  font:13px -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  color:#f2f2f4;
  isolation:isolate;
}

.native-screen {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
}

#controls,.layer {
  position:absolute;
  inset:0;
  pointer-events:none;
}

#controls>*,.layer>* {
  pointer-events:auto;
}

#tabstrip {
  position:absolute;
  z-index:2;
  left:0;
  top:0;
  width:1180px;
  height:52px;
  transform-origin:top left;
  background:var(--tab-image,url(assets/boxes.png)) left top / 1180px 712px no-repeat;
}

#tabstrip button,.hit {
  position:absolute;
  display:block;
  padding:0;
  border:0;
  background:transparent;
  color:transparent;
  cursor:pointer;
  border-radius:5px;
}

#tabstrip button {
  top:7px;
  width:104px;
  height:39px;
  border-radius:18px;
}

.hit:not(:disabled):hover,#tabstrip button:hover {
  background:#ffffff0b;
}

.hit:disabled {
  cursor:default;
}

.hit:focus-visible,#tabstrip button:focus-visible {
  outline:2px solid #87b5ff;
  outline-offset:-2px;
}

.sr-only {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

.app-input {
  border:0;
  outline:0;
  border-radius:3px;
  color:#f2f2f4;
  font-size:13px;
  background:transparent;
  caret-color:#fff;
  padding:0;
}

.app-input::placeholder {
  color:transparent;
}

.app-input:focus,.app-input.filled {
  background:var(--input-bg,#2b2c2f);
}

.app-input:focus::placeholder {
  color:#b4b4b9;
}

.app-input:focus-visible {
  outline:1px solid #84adf0;
  outline-offset:3px;
}

.native-row {
  position:absolute;
  background-repeat:no-repeat;
  background-size:1180px 712px;
}

.replacement {
  background:var(--surface,#202123);
  color:#ededf0;
  display:flex;
  align-items:center;
  line-height:1.2;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.app-note {
  font-size:14px;
  color:#b2b2b8;
  text-align:center;
}

.box-memory {
  justify-content:flex-end;
  padding-right:3px;
  color:#ebebed;
  font-size:13px;
}


.file-list {
  position:absolute;
  inset:145px 0 37px 219px;
  overflow:auto;
  padding:4px 10px;
  background:#1d1e20;
}

.file-row {
  height:36px;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) 140px 106px 66px;
  align-items:center;
  text-align:left;
  border:0;
  background:none;
  color:#d8d8dc;
  padding:0 16px;
  font:12px -apple-system,BlinkMacSystemFont,sans-serif;
  border-radius:7px;
}

.file-row:hover,.nav-row:hover {
  background:#ffffff0b;
}

.file-row.selected,.nav-row.selected {
  background:#454547;
}

.file-row span:first-child {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:500;
  color:#f4f4f6;
}

.file-row span:last-child {
  text-align:right;
}

.file-icon {
  width:16px;
  height:18px;
  display:inline-block;
  flex:none;
  background-image:url(assets/files.png);
  background-size:1180px 712px;
  background-repeat:no-repeat;
  mix-blend-mode:lighten;
}

.nav-list {
  position:absolute;
  left:0;
  top:104px;
  bottom:0;
  width:218px;
  background:#26272a;
  padding:13px 10px;
  overflow:auto;
}

.nav-row {
  height:32px;
  width:100%;
  border:0;
  border-radius:6px;
  color:#f4f4f6;
  background:transparent;
  text-align:left;
  font-size:12px;
  display:flex;
  align-items:center;
  gap:9px;
}

.nav-row .twisty {
  font-size:11px;
  color:#a0a1a5;
  width:10px;
}

.crumbs {
  position:absolute;
  left:219px;
  top:677px;
  right:0;
  height:35px;
  padding-left:23px;
  display:flex;
  align-items:center;
  gap:9px;
  background:#1d1e20;
}

.crumbs button,.link-button {
  border:0;
  background:transparent;
  color:#b8c2d2;
  padding:3px;
  font-size:12px;
}

.crumbs button:hover,.link-button:hover {
  text-decoration:underline;
}

.crumbs span {
  color:#6d6d74;
}

.editor-input {
  position:absolute;
  resize:none;
  outline:none;
  border:0;
  border-radius:0;
  padding:24px 29px;
  background:transparent;
  color:transparent;
  caret-color:white;
  font:14px/17px ui-monospace,Menlo,monospace;
  white-space:pre-wrap;
}

.editor-input.edited {
  background:#202123;
  color:#f2f2f4;
}

.editor-input::selection {
  background:#47628fa6;
}

.doc-strip,.session-strip {
  display:flex;
  align-items:center;
  gap:6px;
  overflow:auto;
  scrollbar-width:thin;
  background:#2b2c2f;
  position:absolute;
}

.doc-tab,.session-tab {
  display:flex;
  align-items:center;
  gap:8px;
  background:transparent;
  border-radius:6px;
  flex:none;
  color:#dedee0;
}

.doc-tab.active,.session-tab.active {
  background:#3e3f41;
}

.doc-tab button,.session-tab button {
  padding:6px 8px;
  background:transparent;
  color:inherit;
  border:0;
  font-size:12px;
  text-align:left;
}

.doc-tab small {
  display:block;
  color:#b2b2ba;
  font-size:10px;
}

.terminal-extra {
  color:#e5e9f5;
  background:#202123;
  font:13px/16px Menlo,ui-monospace,monospace;
  overflow:auto;
  scrollbar-width:thin;
}
.term-body {position:relative;}
.term-transcript {white-space:pre;}
.term-command,.term-output {min-height:16px;}
.term-prompt .term-user {color:#a6da95;}
.term-prompt .term-at {color:#a1a1aa;}
.term-prompt .term-host {color:#75bdfb;}
.term-prompt .term-colon {color:#f28bbe;}
.term-prompt .term-cwd {color:#c6a0f6;}
.term-prompt .term-hash {color:#eed49f;}
.term-server {margin-top:32px;}
.term-path,.term-web {
  border:0;
  background:transparent;
  color:inherit;
  padding:0;
  font:inherit;
  cursor:pointer;
}
.term-path.directory,.term-web {color:#a8c7ff;}
.term-path:hover,.term-path:focus-visible,.term-web {
  text-decoration:underline;
  text-decoration-thickness:1px;
  text-underline-offset:2px;
}
.annotated-output {
  padding:24px 0 5px;
}
.term-callout {
  --callout-accent:var(--agent-accent);
  position:relative;
  display:inline-block;
  border:1px solid color-mix(in srgb,var(--callout-accent) 58%,#202123);
  border-radius:0 5px 5px 5px;
  padding:2px 6px;
  background:color-mix(in srgb,var(--callout-accent) 9%,#202123);
  text-decoration:none;
}
.term-callout.port-hint {--callout-accent:var(--repo-accent);}
.term-path.term-callout,.term-web.term-callout {
  color:color-mix(in srgb,var(--callout-accent) 24%,#fff);
}
.term-callout::before {
  content:attr(data-action);
  position:absolute;
  bottom:100%;
  left:-1px;
  padding:3px 8px;
  border-radius:5px 5px 0 0;
  background:var(--callout-accent);
  color:#121315;
  font:600 13px/15px -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  letter-spacing:-.01em;
  white-space:nowrap;
  user-select:none;
}
@keyframes callout-pulse {
  0%,100% {
    background-color:color-mix(in srgb,var(--callout-accent) 65%,#505459);
    transform:scale(1);
    box-shadow:0 0 0 0 transparent;
  }
  50% {
    background-color:color-mix(in srgb,var(--callout-accent) 78%,white);
    transform:scale(1.06);
    box-shadow:0 0 0 3px color-mix(in srgb,var(--callout-accent) 30%,transparent),0 0 14px color-mix(in srgb,var(--callout-accent) 45%,transparent);
  }
}
@media(prefers-reduced-motion:no-preference) {
  .term-callout::before {transform-origin:bottom left;animation:callout-pulse 1.8s ease-in-out infinite;}
  .term-callout.port-hint::before {animation-delay:-.9s;}
  .term-callout:hover::before,.term-callout:focus-visible::before,.term-callout[aria-expanded="true"]::before {animation:none;}
}
.term-callout:hover,.term-callout:focus-visible,.term-callout[aria-expanded="true"] {
  border-color:var(--callout-accent);
  background:color-mix(in srgb,var(--callout-accent) 17%,#202123);
  text-decoration:none;
}
.term-history {margin:0;white-space:pre-wrap;font:inherit;}
.term-line {display:flex;align-items:baseline;gap:0;}
.term-line input {
  outline:none;
  background:transparent;
  border:0;
  color:inherit;
  caret-color:#b7bdf8;
  font:inherit;
  flex:1;
  min-width:35px;
  padding:0;
}
.selected-box-label {
  display:flex;
  align-items:center;
  gap:8px;
  padding-left:5px;
  background:#2b2c2f;
  font-size:14px;
  font-weight:600;
}
.picker-chevron {color:#999ba2;font-size:14px;}
.app-overlays {
  position:absolute;
  inset:0;
  z-index:3;
  overflow:hidden;
  pointer-events:none;
}
.app-overlays > * {
  position:absolute;
  top:0;
  left:0;
  transform:scale(var(--app-scale,1));
  transform-origin:top left;
  pointer-events:auto;
}
.app-overlays > .box-sheet {
  inset:0;
  display:grid;
  place-items:center;
  transform:none;
}
.box-sheet-backdrop {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:rgb(0 0 0 / .22);
}
.box-sheet-panel {
  position:relative;
  width:min(calc(520px * var(--app-scale,1)),calc(100% - 20px));
  border-radius:4.6154% / var(--sheet-corner-y);
  background:#202123;
  box-shadow:0 2px 5px #0004,0 12px 40px #0008;
  overflow:hidden;
  outline:none;
}
.box-sheet-panel .sheet-cancel {border-radius:999px;}
.box-sheet-panel img {
  display:block;
  width:100%;
  height:auto;
  pointer-events:none;
  user-select:none;
}
.app-menu {
  min-width:182px;
  width:max-content;
  padding:5px;
  border:1px solid rgb(255 255 255 / .19);
  border-radius:10px;
  color:#f1f1f3;
  background:rgb(52 52 54 / .97);
  box-shadow:inset 0 0 0 .5px rgb(255 255 255 / .06),0 7px 22px #0006,0 2px 6px #0004;
  backdrop-filter:blur(18px);
  font:13px/1.2 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  outline:none;
}
.app-menu-item {
  display:flex;
  align-items:center;
  gap:7px;
  width:100%;
  height:24px;
  background:transparent;
  border:0;
  border-radius:5px;
  padding:0 10px;
  color:inherit;
  text-align:left;
  font:inherit;
  white-space:nowrap;
}
.app-menu-item:disabled {
  opacity:1;
  color:#e1e1e4;
  cursor:default;
}
.app-menu-item:not(:disabled):hover,
.app-menu-item:not(:disabled):focus-visible {
  background:#226bd7;
  color:white;
  outline:none;
}
.app-menu hr {
  height:1px;
  margin:4px 7px;
  border:0;
  background:rgb(255 255 255 / .14);
}
.menu-symbol {
  display:block;
  flex:none;
  width:20px;
  height:20px;
  background:currentColor;
  mask:url(assets/menu-symbols.png) var(--glyph-offset) center / 180px 20px no-repeat;
}
.box-menu .app-menu-item {padding-left:0;gap:3px;}
.app-menu-item .selection-mark {visibility:hidden;}
.app-menu-item[aria-checked=true] .selection-mark {visibility:visible;}
.running-cube {background:linear-gradient(135deg,#a1ffda,#21ad85);}
[data-menu-target]:is(.hit,.nav-row) {background-color:#ffffff14;}
@media(max-width:760px) {
  #tabstrip {
    position:relative;
    height:46px;
    transform:none!important;
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-evenly;
    padding:0 4px;
    background:#2b2c2f;
    border-bottom:1px solid #ffffff08;
  }
  #tabstrip button {
    position:relative;
    top:0;
    left:auto!important;
    height:32px;
    width:24%;
    max-width:104px;
    border-radius:17px;
  }
  #tabstrip button[aria-selected=true] {
    background:#ffffff17;
  }
  #tabstrip button .mobile-tab {
    display:block;
    width:100%;
    height:100%;
    background-image:var(--icon);
    background-position:center;
    background-size:auto 26px;
    background-repeat:no-repeat;
  }
  #stage {
    top:-39px;
  }
  #pan {
    max-height:520px;
  }
}

.file-list {
  background:#1d1f21;
}

.file-row.native-file {
  display:block;
  padding:0;
  background-image:url(assets/file-rows.png);
  background-repeat:no-repeat;
  background-size:941px auto;
  background-position:0 var(--row-offset);
  border-radius:7px;
}

.file-row.native-file.selected {
  background-color:#454547;
}

.file-row.native-file:focus-visible {
  outline-offset:-2px;
}

.native-sidebar {
  background:#26282b url(assets/folder-sidebar.png) left var(--folder-offset) / 218px auto no-repeat;
}

.native-crumbs {
  background:url(assets/folder-paths.png) left var(--path-offset) / 961px auto no-repeat;
}


@media(max-width:760px) {
  #tabstrip button .mobile-tab {
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    background:none;
    color:#f2f2f4;
    font:500 clamp(11px,3vw,13px) -apple-system,BlinkMacSystemFont,Arial,sans-serif;
  }
  .mobile-tab::before {
    content:"";
    width:18px;
    height:18px;
    background:var(--icon) center/contain no-repeat;
  }
}

@media(min-width:761px) {
  .mobile-tab {
    display:none;
  }
}

.native-sidebar {
  pointer-events:none!important;
}

#controls>.layer {
  pointer-events:none;
}

@media(hover:hover) and (pointer:fine) {
  .app-window {
    --preview-arrow:url(assets/pointer-arrow.png) 5 4, default;
    --preview-hand:url(assets/pointer-hand.png) 20 12, pointer;
    cursor:var(--preview-arrow);
  }
  @supports (cursor:image-set(url(assets/pointer-arrow.png) 1x) 5 4, default) {
    .app-window {
      --preview-arrow:image-set(url(assets/pointer-arrow.png) 1x,url(assets/pointer-arrow@2x.png) 2x) 5 4, default;
      --preview-hand:image-set(url(assets/pointer-hand.png) 1x,url(assets/pointer-hand@2x.png) 2x) 20 12, pointer;
    }
  }
  .app-window button:enabled,.app-window #tabstrip button,.app-window a[href] {cursor:var(--preview-hand);}
  .app-window button:disabled,.app-window .box-sheet-backdrop:enabled {cursor:var(--preview-arrow);}
  .app-window input,.app-window textarea {cursor:text;}
}

.approval-flash:not([hidden]) {
  display:grid;
  justify-items:start;
  gap:7px;
  position:absolute;
  z-index:2;
  left:50%;
  top:50%;
  translate:-50% -50%;
  width:min(260px,calc(100% - 32px));
  padding:20px 16px 15px;
  border:1px solid #616166;
  border-radius:23px;
  background:#1d1e20;
  color:#f1f1f3;
  box-shadow:0 12px 34px #0009,0 0 0 1px #000b;
  pointer-events:none;
  font:13px/1.35 -apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  animation:approval-brief var(--approval-duration) ease both;
}
.approval-demo-label {
  position:absolute;
  top:20px;
  right:20px;
  padding:3px 8px;
  border:1px solid #696970;
  border-radius:99px;
  color:#eeeef1;
  font-size:12px;
  font-weight:600;
  line-height:1.3;
}
.approval-flash img {width:58px;height:58px;margin:0 4px 8px;}
.approval-flash strong {font-size:14px;margin-inline:4px;}
.approval-reason {margin-inline:4px;color:#dedee0;}
@keyframes approval-brief {
  0% {opacity:0;transform:scale(.97);}
  12%,77% {opacity:1;transform:scale(1);}
  100% {opacity:0;transform:scale(1);}
}
@media(prefers-reduced-motion:reduce) {
  .approval-flash:not([hidden]) {animation:none;}
}
