* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 14px/1.45 "Studio", Arial, sans-serif;
  color: #213831;
  background: #e7ece7;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

@font-face {
  font-family: Studio;
  src: url("assets/cebc7053ec-Overpass-VariableFont_wght.ttf");
  font-weight: 100 900;
  font-display: swap;
}
button, input, select {
  font: inherit;
}

button, select {
  cursor: pointer;
}

button, .download-link {
  color: #213831;
}

button {
  background: transparent;
  border: 1px solid #dde3dc;
  border-radius: 6px;
  padding: 9px 12px;
  transition: background 0.15s, border-color 0.15s;
}

button:hover {
  background: #eaf0e6;
  border-color: #aab8a5;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid #3e7054;
  outline-offset: 3px;
}

button[aria-pressed=true] {
  background: #213831;
  color: #fff;
  border-color: #213831;
}

#sidebar {
  width: 328px;
  flex: 0 0 328px;
  height: 100%;
  background: #f8faf6;
  border-right: 1px solid #cdd6cc;
  display: flex;
  flex-direction: column;
}

.studio-header {
  padding: 26px 24px 19px;
  border-bottom: 1px solid #dde3dc;
}

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 13px;
  color: #728078;
}

h1 {
  margin: 0;
  font-size: 29px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge {
  font-size: 11px;
  letter-spacing: 0;
  padding: 5px 8px;
  border: 1px solid #bdcbb7;
  border-radius: 50%;
  font-weight: 500;
}

.studio-header p {
  margin: 6px 0 0;
  color: #728078;
  font-size: 13px;
}

.sidebar-scroll {
  overflow-y: auto;
  padding: 0 24px 18px;
  flex: 1;
  scrollbar-width: thin;
}

.intro {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #728078;
  padding: 16px 0 4px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #72a06d;
}

.section-title {
  margin: 23px 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.section-title > span {
  font-size: 10px;
  color: #9da99d;
}

.presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.preset {
  padding: 9px 7px 7px;
  background: white;
  text-align: left;
  border-radius: 6px;
  font-size: 10px;
}

.preset-swatches {
  display: flex;
  height: 16px;
  overflow: hidden;
  border-radius: 3px;
  margin-bottom: 6px;
}

.preset-swatches i {
  flex: 1;
}

.hint {
  font-size: 11px;
  line-height: 1.6;
  color: #728078;
  margin: 7px 0 12px;
}

.control-group {
  border-top: 1px solid #dde3dc;
  padding-top: 11px;
  margin-top: 13px;
}

.control-group h3 {
  font-size: 10px;
  color: #728078;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin: 0 0 4px;
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 27px 73px;
  gap: 8px;
  align-items: center;
  min-height: 37px;
}

.color-row label {
  font-size: 12px;
}

input[type=color] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #ccd4c9;
  background: transparent;
  padding: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  cursor: pointer;
}

input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type=color]::-webkit-color-swatch {
  border: 0;
  border-radius: 50%;
}

input[type=color]::-moz-color-swatch {
  border: 0;
  border-radius: 50%;
}

input[type=text] {
  width: 100%;
  border: 1px solid #dde3dc;
  border-radius: 4px;
  padding: 5px 6px;
  font-size: 11px;
  font-family: monospace;
  background: white;
  color: #59685d;
}

input[aria-invalid=true] {
  border-color: #bd493a;
}

.wide {
  width: 100%;
  text-align: center;
  font-size: 12px;
}

.pick-section {
  margin-top: 18px;
  border-top: 1px solid #dde3dc;
}

#selection {
  background: #eaf0e6;
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
}

#selection-name {
  font-size: 11px;
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}

.field-label {
  font-size: 11px;
  margin-right: 7px;
}

select {
  border: 1px solid #dde3dc;
  border-radius: 4px;
  padding: 5px;
  background: white;
  font-size: 11px;
  max-width: 175px;
}

.element-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.element-row input[type=text] {
  width: 85px;
}

.element-row button {
  padding: 5px 8px;
  font-size: 11px;
}

.files {
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid #dde3dc;
}

.button-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}

.download-link {
  display: block;
  margin-top: 17px;
  font-size: 12px;
  text-underline-offset: 4px;
}

#zip-size {
  color: #728078;
  font-size: 10px;
}

.sidebar-footer {
  border-top: 1px solid #dde3dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.sidebar-footer button {
  padding: 0;
  border: 0;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar-footer span {
  color: #728078;
  font-size: 10px;
}

.workspace {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

.toolbar {
  min-height: 58px;
  padding: 10px 18px;
  background: white;
  border-bottom: 1px solid #dde3dc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-title {
  font-size: 12px;
  white-space: nowrap;
}

.local-badge {
  font-size: 8px;
  letter-spacing: 0.1em;
  color: #7f8b80;
  padding: 3px 5px;
  border: 1px solid #dde3dc;
  border-radius: 3px;
}

.toolbar button {
  padding: 6px 9px;
  font-size: 11px;
}

#toggle-sidebar {
  border: 0;
  font-size: 15px;
  padding: 2px 5px;
}

.view-toggle {
  display: flex;
}

.view-toggle button {
  border-radius: 0;
}

.view-toggle button:first-child {
  border-radius: 4px 0 0 4px;
}

.view-toggle button:last-child {
  border-radius: 0 4px 4px 0;
}

.preview-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
  box-shadow: 0 2px 16px rgba(35, 57, 42, 0.0470588235);
}

body.mobile-preview iframe {
  width: 390px;
  max-width: 100%;
}

body.sidebar-hidden #sidebar {
  display: none;
}

#toast {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 15px);
  max-width: 90%;
  background: #213831;
  color: white;
  border-radius: 7px;
  padding: 11px 18px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 5;
}

#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1000px) {
  .toolbar-title, .local-badge {
    display: none;
  }
  .toolbar {
    padding: 10px;
  }
  .toolbar-right {
    gap: 6px;
  }
}
@media (max-width: 650px) {
  #sidebar {
    width: 280px;
    flex-basis: 280px;
  }
  .studio-header, .sidebar-scroll {
    padding-left: 17px;
    padding-right: 17px;
  }
  .sidebar-footer {
    padding: 12px 17px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar-right {
    flex-wrap: wrap;
  }
  .view-toggle {
    display: none;
  }
  #original {
    font-size: 10px;
  }
  .preview-stage {
    padding: 0;
  }
}
