:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-solid: #ffffff;
  --border: rgba(55, 53, 47, 0.09);
  --text: #37352f;
  --muted: #787774;
  --blue: #2765f6;
  --blue-soft: rgba(39, 101, 246, 0.1);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  --panel-edge: rgba(55, 53, 47, 0.05);
  --soft-fill: rgba(55, 53, 47, 0.03);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: Inter, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px 268px minmax(0, 1fr) 276px;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns 0.18s ease;
  position: relative;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 268px 0 minmax(0, 1fr) 276px;
}

.app-shell.projects-collapsed {
  grid-template-columns: 0 268px minmax(0, 1fr) 276px;
}

.app-shell.inspector-collapsed {
  grid-template-columns: 268px 268px minmax(0, 1fr) 0;
}

.app-shell.sidebar-collapsed.projects-collapsed {
  grid-template-columns: 0 0 minmax(0, 1fr) 276px;
}

.app-shell.projects-collapsed.inspector-collapsed {
  grid-template-columns: 0 268px minmax(0, 1fr) 0;
}

.app-shell.sidebar-collapsed.inspector-collapsed {
  grid-template-columns: 268px 0 minmax(0, 1fr) 0;
}

.app-shell.sidebar-collapsed.projects-collapsed.inspector-collapsed {
  grid-template-columns: 0 0 minmax(0, 1fr) 0;
}

.sidebar,
.projects-sidebar,
.inspector {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--border);
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.sidebar {
  min-width: 0;
  transition: opacity 0.16s ease, transform 0.16s ease, padding 0.16s ease;
}

.projects-sidebar {
  min-width: 0;
  transition: opacity 0.16s ease, transform 0.16s ease, padding 0.16s ease;
}

.inspector {
  border-right: 0;
  border-left: 1px solid var(--border);
  min-width: 0;
  transition: opacity 0.16s ease, transform 0.16s ease, padding 0.16s ease;
}

.inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
}

.sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
}

.sidebar-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.sidebar-head .section-title,
.inspector-head .section-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.collapse-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon-button.collapse-button {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.icon-button.collapse-button:hover {
  background: rgba(55, 53, 47, 0.06);
}

.collapse-glyph {
  width: 14px;
  height: 14px;
  display: block;
}

.collapse-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
}

.sidebar-head h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
}

.app-shell.sidebar-collapsed .sidebar {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
  border-right: 0;
  transform: translateX(-8px);
}

.app-shell.projects-collapsed .projects-sidebar {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
  border-right: 0;
  transform: translateX(-8px);
}

.app-shell.inspector-collapsed .inspector {
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  padding-left: 0;
  padding-right: 0;
  border-left: 0;
  transform: translateX(8px);
}

.icon-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inspector .panel-section {
  gap: 14px;
  padding-bottom: 0;
}

.inspector .panel-section:not(.hidden) + .panel-section:not(.hidden) {
  padding-top: 16px;
  border-top: 1px solid rgba(55, 53, 47, 0.05);
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
  line-height: 1.4;
  margin: 0;
}

.layer-list,
.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
}

.history-section {
  min-height: 0;
  flex: 1;
}

.history-section .section-title {
  margin-bottom: 2px;
}

.layer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  text-align: left;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
}

.layer-item.active {
  border-color: rgba(39, 101, 246, 0.5);
  background: rgba(39, 101, 246, 0.09);
  box-shadow: inset 0 0 0 1px rgba(39, 101, 246, 0.14);
}

.layer-item.is-hidden {
  opacity: 0.64;
}

.layer-item.is-background {
  cursor: default;
}

.layer-item.is-background .layer-name-input {
  pointer-events: none;
}

.layer-item.is-background .layer-visibility {
  opacity: 0.3;
  cursor: default;
}

.layer-item.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.42) 45%, transparent 70%);
  transform: translateX(-130%);
  animation: shimmer-sweep 1.25s linear infinite;
  pointer-events: none;
}

.layer-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f7f7f5;
  border: 1px solid rgba(55, 53, 47, 0.06);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  position: relative;
}

.layer-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.layer-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #7dd3fc, #3b82f6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

.layer-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}

.layer-copy .layer-name-input,
.layer-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-name-input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.layer-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.layer-name-input:focus {
  color: #2765f6;
}

.layer-visibility {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.layer-visibility:hover {
  background: rgba(55, 53, 47, 0.06);
  color: #111827;
}

.layer-visibility svg {
  width: 15px;
  height: 15px;
  display: block;
}

.layer-item.is-hidden .layer-visibility {
  color: #9ca3af;
}

.layer-item.is-loading .layer-thumb {
  background: rgba(241, 245, 249, 0.9);
}

.layer-item.is-loading .layer-swatch {
  opacity: 0.35;
}

.layer-item.is-loading .layer-copy strong,
.layer-item.is-loading .layer-copy small {
  color: #6b7280;
}

.workspace-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 10px;
  gap: 10px;
  overflow: hidden;
}

.top-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 0 0 auto;
  padding-right: 18px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: block;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(55, 53, 47, 0.08);
  background: #f3f4f6;
}

.project-title-input {
  min-width: 0;
  width: 220px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.toolbar-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  justify-self: center;
}

.toolbar-spacer {
  min-width: 1px;
}

.export-menu {
  position: relative;
}

.toolbar-button,
.mini-tool {
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: var(--panel-solid);
  padding: 0 11px;
  color: var(--text);
  font-size: 11px;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toolbar-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toolbar-button.active,
.mini-tool.active {
  background: var(--blue-soft);
  color: #2765f6;
}

.toolbar-button.primary {
  background: var(--blue);
  color: #fff;
}

.toolbar-button.primary:hover {
  background: #1f59e6;
}

.export-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.export-caret {
  font-size: 10px;
  line-height: 1;
}

.export-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 124px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 20;
}

.export-option {
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 10px;
  font-size: 12px;
}

.export-option:hover {
  background: rgba(55, 53, 47, 0.06);
}

.canvas-stage {
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr;
}

.canvas-wrap {
  min-height: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  overflow: hidden;
}

.canvas-viewport {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-top: 10px;
  padding-bottom: 88px;
  box-sizing: border-box;
  border-radius: 0;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  position: relative;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.canvas-viewport.drag-over {
  background: rgba(39, 101, 246, 0.05);
  box-shadow: inset 0 0 0 2px rgba(39, 101, 246, 0.3);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-align: center;
  max-width: 360px;
  margin: auto;
}

.empty-state h2 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
}

.empty-state p {
  margin: 0;
  line-height: 1.5;
  font-size: 13px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 30px;
  background: rgba(255, 255, 255, 0.86);
}

.upload-icon-button {
  cursor: pointer;
  color: #6b7280;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.upload-icon-button:hover {
  border-color: rgba(39, 101, 246, 0.28);
  color: #2765f6;
  background: rgba(255, 255, 255, 0.98);
}

.upload-glyph {
  line-height: 1;
  transform: translateY(-1px);
  font-size: 34px;
}

.image-stage {
  position: relative;
  user-select: none;
  flex: 0 0 auto;
}

.image-stage.hidden,
.hidden {
  display: none !important;
}

#stageImage {
  display: block;
  max-width: none;
}

.selection-overlay,
.layer-preview-stage,
.drawing-box,
.brush-canvas {
  position: absolute;
  inset: 0;
}

.layer-preview-stage {
  pointer-events: none;
}

.layer-preview {
  position: absolute;
  display: block;
  max-width: none;
  user-select: none;
  pointer-events: none;
}

.layer-preview.active {
  filter: saturate(1.04);
}

.brush-canvas {
  pointer-events: none;
  opacity: 0.5;
}

.selection-box {
  position: absolute;
  overflow: visible;
}

.selection-box.hit-area {
  pointer-events: auto;
}

.selection-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid rgba(96, 165, 250, 0.76);
  background: rgba(39, 101, 246, 0.06);
  box-shadow: none;
  pointer-events: none;
}

.selection-visual.active {
  background: rgba(39, 101, 246, 0.1);
}

.selection-visual.brush-shape {
  border: 0;
  background: transparent;
}

.selection-visual.is-loading {
  background: rgba(39, 101, 246, 0.08);
}

.selection-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.32) 45%, transparent 68%);
  transform: translateX(-140%);
  animation: shimmer-sweep 1.1s linear infinite;
  pointer-events: none;
}

.selection-visual.brush-shape .selection-shimmer {
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.22) 45%, transparent 68%);
}

.selection-delete {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(71, 85, 105, 0.58);
  color: transparent;
  display: block;
  padding: 0;
  font-size: 0;
  line-height: 0;
  text-align: left;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(4px);
  z-index: 3;
}

.selection-delete::before {
  content: "×";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  transform: translateY(-0.5px);
  font-family: Inter, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

.selection-delete:hover {
  background: rgba(51, 65, 85, 0.72);
}

@keyframes shimmer-sweep {
  from {
    transform: translateX(-140%);
  }

  to {
    transform: translateX(140%);
  }
}

.resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--blue);
  background: #fff;
}

.mask-ghost {
  position: absolute;
  inset: 0;
  background: rgba(39, 101, 246, 0.12);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
  filter: none;
}

.selection-visual.brush-shape.active .mask-ghost {
  background: rgba(39, 101, 246, 0.16);
  filter: none;
}

.drawing-box {
  border: 2px dashed var(--blue);
  background: rgba(39, 101, 246, 0.08);
}

.bottom-toolbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 25;
}

.sidebar-fab {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #4b5563;
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
  z-index: 30;
}

.projects-fab {
  left: 18px;
}

.layer-fab {
  left: 56px;
}

.sidebar-fab.is-docked {
  transform: none;
  left: 280px;
  bottom: 18px;
}

.app-shell.sidebar-collapsed:not(.projects-collapsed) #sidebarToggleFab.is-docked,
.app-shell.projects-collapsed:not(.sidebar-collapsed) #projectsToggleFab.is-docked {
  left: 280px;
}

.inspector-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: #4b5563;
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
  z-index: 30;
}

.inspector-fab svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.sidebar-fab svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.sidebar-fab:hover,
.inspector-fab:hover {
  color: var(--blue);
}

.zoom-readout {
  min-width: 52px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.range-field {
  gap: 5px;
}

.field > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.field textarea {
  height: auto;
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

.field input[type="range"] {
  padding: 0;
  height: 18px;
  margin: 0;
}

.field input[type="color"] {
  padding: 4px;
}

.field > strong {
  display: block;
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: #4b5563;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.layer-name-input:focus,
.project-title-input:focus {
  outline: none;
  border-color: rgba(39, 101, 246, 0.28);
  box-shadow: 0 0 0 3px rgba(39, 101, 246, 0.1);
}

.text-layer-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.text-style-grid {
  align-items: end;
  gap: 12px;
}

.coord-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.inspector-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.inspector-fields > .field > .coord-grid,
.text-layer-fields > .coord-grid {
  margin-top: 0;
}

.coord-grid .field {
  gap: 6px;
}

.inspector-empty,
.result-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.inspector-fields > .field,
.inspector-fields > .text-layer-fields,
.inspector-fields > .inspector-empty {
  margin: 0;
}

.sidebar::-webkit-scrollbar,
.inspector::-webkit-scrollbar,
.history-list::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-thumb,
.inspector::-webkit-scrollbar-thumb,
.history-list::-webkit-scrollbar-thumb {
  background: rgba(55, 53, 47, 0.14);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track,
.inspector::-webkit-scrollbar-track,
.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.history-entry {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 24px;
  gap: 10px;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid rgba(55, 53, 47, 0.06);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

.history-entry.active {
  background: rgba(39, 101, 246, 0.1);
}

.history-list {
  gap: 0;
}

.history-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(55, 53, 47, 0.04);
  border: 1px solid rgba(55, 53, 47, 0.06);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.history-copy {
  min-width: 0;
}

.history-entry strong,
.history-entry small {
  display: block;
}

.history-entry strong {
  margin-bottom: 4px;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-entry small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.history-delete {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
  margin-top: 2px;
}

.history-delete:hover {
  background: rgba(55, 53, 47, 0.06);
  color: var(--text);
}

.history-delete svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1480px) {
  .app-shell {
    grid-template-columns: 240px 240px minmax(0, 1fr) 250px;
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 240px 0 minmax(0, 1fr) 250px;
  }

  .app-shell.projects-collapsed {
    grid-template-columns: 0 240px minmax(0, 1fr) 250px;
  }

  .app-shell.inspector-collapsed {
    grid-template-columns: 240px 240px minmax(0, 1fr) 0;
  }

  .app-shell.sidebar-collapsed.projects-collapsed {
    grid-template-columns: 0 0 minmax(0, 1fr) 250px;
  }

  .app-shell.projects-collapsed.inspector-collapsed {
    grid-template-columns: 0 240px minmax(0, 1fr) 0;
  }

  .app-shell.sidebar-collapsed.inspector-collapsed {
    grid-template-columns: 240px 0 minmax(0, 1fr) 0;
  }

  .app-shell.sidebar-collapsed.projects-collapsed.inspector-collapsed {
    grid-template-columns: 0 0 minmax(0, 1fr) 0;
  }

  .sidebar-fab.is-docked,
  .app-shell.sidebar-collapsed:not(.projects-collapsed) #sidebarToggleFab.is-docked,
  .app-shell.projects-collapsed:not(.sidebar-collapsed) #projectsToggleFab.is-docked {
    left: 252px;
  }
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 220px 220px minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed {
    grid-template-columns: 220px 0 minmax(0, 1fr);
  }

  .app-shell.projects-collapsed {
    grid-template-columns: 0 220px minmax(0, 1fr);
  }

  .app-shell.sidebar-collapsed.projects-collapsed {
    grid-template-columns: 0 0 minmax(0, 1fr);
  }

  .inspector {
    display: none;
  }

  .inspector-fab {
    display: none;
  }

  .sidebar-fab.is-docked,
  .app-shell.sidebar-collapsed:not(.projects-collapsed) #sidebarToggleFab.is-docked,
  .app-shell.projects-collapsed:not(.sidebar-collapsed) #projectsToggleFab.is-docked {
    left: 232px;
  }
}

@media (max-width: 960px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .sidebar,
  .projects-sidebar,
  .inspector,
  .workspace-shell {
    border: 0;
  }

  .workspace-shell {
    min-height: 720px;
  }
}
