/*
 * studio.css — IntroStudio (studio.js) และตัวควบคุมของมัน ใช้ร่วมกัน: Intro Builder (modules/intro/studio.css)
 * และหลังบ้าน gcms.in.th (js/intro/studio.css) — ไฟล์เดียวกันทุกไบต์ (node tools/export-gcms.mjs)
 * ความสูงของ Studio ตั้งได้ด้วย --ibs-height (จอใหญ่) และ --ibs-height-m (จอแคบ) บนตัวแม่
 */
.ib,
.ibs {
  --ib-bg: #f4f5fb;
  --ib-surface: #fff;
  --ib-subtle: #f8f9fd;
  --ib-border: #e3e6f0;
  --ib-ink: #141833;
  --ib-ink2: #383d5c;
  --ib-muted: #6b7091;
  --ib-brand: #5b4cf0;
  --ib-brand-hover: #4a3be0;
  --ib-brand-soft: #efedff;
  --ib-pink: #ec4899;
  --ib-success: #059669;
  --ib-success-hover: #047857;
  --ib-danger: #dc2626;
  --ib-r: 12px;
  --ib-shadow: 0 8px 24px rgba(20, 24, 51, .07), 0 1px 3px rgba(20, 24, 51, .05);
}
.ibs {
  color: var(--ib-ink);
  line-height: 1.6;
}
.ib button,
.ib input,
.ib select,
.ib textarea,
.ibs button,
.ibs input,
.ibs select,
.ibs textarea {
  font: inherit;
}
.ib [hidden],
.ibs [hidden] {
  display: none !important;
}
/* now.core.css ให้ button และช่องกรอกสูงเท่ากันทุกตัว (height: var(--input-height)) — การ์ดและปุ่มของหน้านี้สูงตามเนื้อหา */
.ib button,
.ib .ib-input,
.ibs button,
.ibs .ib-input {
  height: auto;
}
.ib-muted {
  color: var(--ib-muted);
  font-size: .86rem;
}
.ib-link {
  background: none;
  border: 0;
  color: var(--ib-ink2);
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: .92rem;
}
.ib-link:hover {
  background: var(--ib-subtle);
  color: var(--ib-brand);
}
.ib-danger,
.ib-link.ib-danger {
  color: var(--ib-danger);
}

/* ---------------- buttons & form */
.ib-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid var(--ib-border);
  background: var(--ib-surface);
  color: var(--ib-ink);
  cursor: pointer;
  text-decoration: none;
  font-size: .9rem;
  line-height: 1.35;
  transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.ib-btn:hover {
  border-color: #c9cde0;
  background: var(--ib-subtle);
}
.ib-btn:disabled {
  opacity: .45;
  cursor: default;
}
.ib-btn-primary {
  background: var(--ib-brand);
  border-color: var(--ib-brand);
  color: #fff;
}
.ib-btn-primary:hover {
  background: var(--ib-brand-hover);
  border-color: var(--ib-brand-hover);
}
.ib-btn-success {
  background: var(--ib-success);
  border-color: var(--ib-success);
  color: #fff;
}
.ib-btn-success:hover {
  background: var(--ib-success-hover);
  border-color: var(--ib-success-hover);
}
.ib-btn-ghost {
  background: transparent;
}
.ib-btn-lg {
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 600;
}
.ib-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--ib-border);
  border-radius: 9px;
  background: #fff;
  color: var(--ib-ink);
  font-size: .92rem;
  transition: border-color .15s, box-shadow .15s;
}
.ib-input:focus {
  outline: 0;
  border-color: var(--ib-brand);
  box-shadow: 0 0 0 3px rgba(91, 76, 240, .15);
}
textarea.ib-input {
  resize: vertical;
  min-height: 60px;
}
.ib-code {
  font: 12px/1.5 ui-monospace, Consolas, monospace;
}
.ib-form {
  display: grid;
  gap: 12px;
}
.ib-field {
  display: grid;
  gap: 5px;
}
.ib-field-label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ib-ink2);
}
.ib-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ib-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .9rem;
  user-select: none;
}
.ib-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ib-switch {
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #cfd3e3;
  position: relative;
  transition: background .2s;
}
.ib-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.ib-toggle input:checked + .ib-switch {
  background: var(--ib-brand);
}
.ib-toggle input:checked + .ib-switch::after {
  transform: translateX(16px);
}
.ib-toggle input:focus-visible + .ib-switch {
  box-shadow: 0 0 0 3px rgba(91, 76, 240, .3);
}
.ib-seg {
  display: inline-flex;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: #fff;
  padding: 3px;
  gap: 2px;
}
.ib-seg-wrap {
  flex-wrap: wrap;
}
.ib-seg button {
  border: 0;
  background: none;
  padding: 6px 11px;
  border-radius: 7px;
  cursor: pointer;
  font-size: .86rem;
  color: var(--ib-ink2);
  white-space: nowrap;
}
.ib-seg button:hover {
  background: var(--ib-subtle);
}
.ib-seg button.active {
  background: var(--ib-brand-soft);
  color: var(--ib-brand);
  font-weight: 600;
}
.ib-seg button:disabled {
  opacity: .35;
  cursor: default;
}
.ib-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ib-range {
  flex: 1;
  accent-color: var(--ib-brand);
}
.ib-range-row output {
  min-width: 64px;
  text-align: right;
  font-size: .85rem;
  color: var(--ib-ink2);
}
.ib-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ib-chip {
  border: 1px solid var(--ib-border);
  background: #fff;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: .82rem;
  cursor: pointer;
  color: var(--ib-ink2);
}
.ib-chip:hover {
  border-color: var(--ib-brand);
}
.ib-chip.active {
  background: var(--ib-brand);
  border-color: var(--ib-brand);
  color: #fff;
}
.ib-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ib-brand-soft);
  color: var(--ib-ink2);
  font-size: .88rem;
}
.ib-details summary {
  cursor: pointer;
  font-size: .88rem;
  color: var(--ib-brand);
  margin-top: 10px;
}

/* ---------------- cards & thumbnails */
.ib-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 9px;
  background: #e8eaf3;
  width: 100%;
}
.ib-thumb iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.ib-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--ib-surface);
  box-shadow: var(--ib-shadow);
  cursor: pointer;
  text-align: left;
  color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.ib-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(20, 24, 51, .12);
}
.ib-card.active {
  border-color: var(--ib-brand);
}
.ib-card-name {
  display: grid;
  gap: 1px;
  padding: 0 4px 2px;
}
.ib-card-name b {
  font-size: .9rem;
  font-weight: 600;
}
.ib-card-name small {
  font-size: .76rem;
  color: var(--ib-muted);
  line-height: 1.4;
}
.ib-grid {
  display: grid;
  gap: 12px;
}
.ib-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------------- studio */
.ib-studio {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  height: calc(100vh - 61px);
  height: var(--ibs-height, calc(100dvh - 61px));
  min-height: 520px;
}
.ib-side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--ib-surface);
  border-right: 1px solid var(--ib-border);
}
.ib-side-head {
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--ib-border);
}
.ib-name {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 8px;
  margin-left: -8px;
  font-size: 1.02rem;
  font-weight: 600;
  background: transparent;
  color: var(--ib-ink);
}
.ib-name:hover {
  border-color: var(--ib-border);
}
.ib-name:focus {
  outline: 0;
  border-color: var(--ib-brand);
  background: #fff;
}
.ib-side-links {
  display: flex;
  gap: 2px;
  margin-left: -12px;
}
.ib-side-links .ib-link {
  font-size: .83rem;
  padding: 4px 12px;
}
.ib-steps {
  overflow-x: auto;
  scrollbar-width: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  padding: 10px 10px 0;
  border-bottom: 1px solid var(--ib-border);
}
.ib-step {
  display: grid;
  justify-items: center;
  gap: 3px;
  border: 0;
  background: none;
  padding: 4px 2px 9px;
  cursor: pointer;
  font-size: .7rem;
  color: var(--ib-muted);
  line-height: 1.25;
  text-align: center;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.ib-step > span:last-child {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ib-step-n {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ib-border);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: .8rem;
  background: #fff;
}
.ib-step:hover {
  color: var(--ib-ink);
}
.ib-step.done .ib-step-n {
  border-color: var(--ib-brand);
  color: var(--ib-brand);
}
.ib-step.active {
  color: var(--ib-brand);
  font-weight: 600;
  border-bottom-color: var(--ib-brand);
}
.ib-step.active .ib-step-n {
  background: var(--ib-brand);
  border-color: var(--ib-brand);
  color: #fff;
}
.ib-pane {
  flex: 1;
  overflow-y: auto;
  padding: 4px 16px 20px;
  overscroll-behavior: contain;
}
.ib-pad {
  margin: 14px 0 6px;
}
.ib-sec {
  padding: 14px 0;
  border-bottom: 1px solid var(--ib-border);
}
.ib-sec:last-child {
  border-bottom: 0;
}
.ib-sec > * + * {
  margin-top: 10px;
}
.ib-sec-title {
  margin: 0;
  font-size: .92rem;
  font-weight: 600;
}
.ib-side-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--ib-border);
  background: var(--ib-subtle);
}
.ib-side-foot .ib-btn-primary,
.ib-side-foot .ib-btn-success {
  flex: 1;
}
.ib-kind-mini {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.ib-kind-mini button {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 8px 4px;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: .74rem;
  line-height: 1.25;
  color: var(--ib-ink2);
}
.ib-kind-mini span {
  font-size: 1.25rem;
}
.ib-kind-mini b {
  font-weight: 500;
}
.ib-kind-mini button.active {
  border-color: var(--ib-brand);
  background: var(--ib-brand-soft);
  color: var(--ib-brand);
}

/* image step */
.ib-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ib-slot {
  position: relative;
  width: 96px;
  aspect-ratio: 16/10;
  border-radius: 9px;
  border: 2px solid var(--ib-border);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--ib-subtle);
  color: var(--ib-muted);
  font-size: .75rem;
}
.ib-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ib-slot i {
  position: absolute;
  top: 4px;
  left: 4px;
  font-style: normal;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: .7rem;
  border-radius: 999px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
}
.ib-slot.active {
  border-color: var(--ib-brand);
  box-shadow: 0 0 0 3px rgba(91, 76, 240, .2);
}
.ib-slot-add {
  font-size: 1.5rem;
  border-style: dashed;
}
.ib-picker .ib-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 10px;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.ib-picker .ib-chip {
  flex: none;
}
.ib-pics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding: 2px;
}
.ib-pic {
  aspect-ratio: 4/3;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--ib-subtle);
}
.ib-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s;
}
.ib-pic:hover img {
  transform: scale(1.06);
}
.ib-pic.active {
  border-color: var(--ib-brand);
  box-shadow: 0 0 0 2px rgba(91, 76, 240, .25);
}
.ib-pic-up {
  display: grid;
  place-content: center;
  gap: 2px;
  border: 2px dashed #c9cde0;
  color: var(--ib-brand);
  font-size: .8rem;
  font-weight: 600;
}
.ib-pic-up small {
  font-weight: 400;
  color: var(--ib-muted);
  font-size: .7rem;
}
.ib-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ib-logo-prev {
  max-height: 48px;
  max-width: 140px;
  border-radius: 6px;
  background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 12px 12px;
  padding: 4px;
}

/* style step */
.ib-palettes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.ib-pal {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: none;
  cursor: pointer;
  color: var(--ib-ink2);
}
.ib-pal small {
  font-size: .72rem;
  line-height: 1.2;
}
.ib-pal-sw {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 44px;
  border-radius: 7px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, .08);
}
.ib-pal-sw i {
  flex: 1;
  height: 14px;
  border-radius: 3px;
}
.ib-pal-sw i:first-child {
  flex: 2;
  height: 22px;
}
.ib-pal.active {
  border-color: var(--ib-brand);
}
.ib-colors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.ib-color {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-size: .72rem;
  color: var(--ib-ink2);
  text-align: center;
}
.ib-color input {
  width: 100%;
  height: 34px;
  border: 1px solid var(--ib-border);
  border-radius: 8px;
  padding: 2px;
  background: #fff;
  cursor: pointer;
}
.ib-fonts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.ib-font {
  display: grid;
  gap: 2px;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  color: inherit;
}
.ib-font-sample {
  font-size: 1.15rem;
  line-height: 1.3;
}
.ib-font small {
  font-size: .7rem;
  color: var(--ib-muted);
  line-height: 1.3;
}
.ib-font.active {
  border-color: var(--ib-brand);
  background: var(--ib-brand-soft);
}

/* widgets step */
.ib-w {
  padding: 12px 14px;
  margin: 10px 0;
  border: 1px solid var(--ib-border);
  border-radius: 12px;
  background: #fff;
}
.ib-w.on {
  border-color: #cfc9ff;
  background: linear-gradient(#fbfaff, #fff);
}
.ib-w-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ib-w-head .ib-toggle {
  font-weight: 600;
}
.ib-w > small {
  display: block;
  margin: 2px 0 0 48px;
  font-size: .78rem;
}
.ib-w-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--ib-border);
}
.ib-cdstyles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.ib-cdstyles .ib-card {
  padding: 4px;
  gap: 4px;
  box-shadow: none;
  border-color: var(--ib-border);
  border-width: 1px;
}
.ib-cdstyles .ib-card.active {
  border-color: var(--ib-brand);
  box-shadow: 0 0 0 2px var(--ib-brand);
}
.ib-cdstyles .ib-card-name b {
  font-size: .74rem;
  text-align: center;
}

/* download step */
.ib-summary {
  display: grid;
  gap: 1px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--ib-border);
  background: var(--ib-border);
}
.ib-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #fff;
  font-size: .86rem;
}
.ib-summary span {
  color: var(--ib-muted);
}
.ib-summary b {
  text-align: right;
  font-weight: 500;
}
.ib-dl-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ib-dl-acts .ib-btn-lg {
  flex-basis: 100%;
}
.ib-tips {
  margin: 0;
  padding-left: 18px;
  font-size: .86rem;
  color: var(--ib-ink2);
  display: grid;
  gap: 6px;
}

/* work area */
.ib-work {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.ib-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ib-surface);
  border-bottom: 1px solid var(--ib-border);
  flex-wrap: wrap;
}
.ib-status {
  font-size: .8rem;
  color: var(--ib-muted);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ib-spacer {
  flex: 1;
}
.ib-hint {
  margin: 0;
  padding: 6px 16px;
  font-size: .78rem;
  color: var(--ib-muted);
  background: var(--ib-subtle);
  border-bottom: 1px solid var(--ib-border);
}
.ib-stage {
  flex: 1;
  min-height: 0;
  padding: 18px;
  display: flex;
  justify-content: center;
  overflow: auto;
  background: radial-gradient(circle at 20% 0, #e9e6ff, transparent 40%), radial-gradient(circle at 90% 100%, #fde2f1, transparent 45%), #eceef6;
}
.ib-device {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(20, 24, 51, .35), 0 0 0 1px rgba(20, 24, 51, .06);
  transition: width .25s;
}
.ib-device[data-device="tablet"] {
  width: 820px;
  max-width: 100%;
}
.ib-device[data-device="mobile"] {
  width: 390px;
  max-width: 100%;
  border-radius: 28px;
  border: 8px solid #141833;
}
.ib-device[data-device="mobile"] .ib-browser-bar {
  display: none;
}
.ib-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f1f2f7;
  border-bottom: 1px solid var(--ib-border);
  font-size: .75rem;
  color: var(--ib-muted);
}
.ib-browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f87171;
}
.ib-browser-bar i:nth-child(2) {
  background: #fbbf24;
}
.ib-browser-bar i:nth-child(3) {
  background: #34d399;
}
.ib-browser-bar span {
  margin-left: 10px;
  padding: 2px 12px;
  background: #fff;
  border-radius: 6px;
  flex: 1;
  max-width: 360px;
}
.ib-device iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0f172a;
}
.ib-mtabs {
  display: none;
}

/* modal + toast */
.ib-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 24, 51, .5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 16px;
  overflow-y: auto;
}
.ib-modal-box {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.ib-modal-wide .ib-modal-box,
.ib-modal-box.ib-modal-wide {
  max-width: 980px;
}
.ib-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--ib-border);
}
.ib-modal-body {
  padding: 16px 20px 20px;
}
.ib-modal-body > div > * + * {
  margin-top: 12px;
}
.ib-modal-acts {
  display: flex;
  gap: 8px;
}
.ib-x {
  border: 0;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ib-muted);
}
.ib-widget-demo {
  width: 100%;
  height: 230px;
  border: 1px solid var(--ib-border);
  border-radius: 10px;
}
.ib-mine-modal {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.ib-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 200;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 18px;
  border-radius: 10px;
  background: #141833;
  color: #fff;
  font: 500 14px/1.4 "Prompt", system-ui, sans-serif;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 32px);
}
.ib-toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.ib-toast.ok {
  background: var(--ib-success);
}
.ib-toast.warn {
  background: #b45309;
}

/* ---------------- responsive */
@media (max-width: 1100px) {
  .ib-studio {
    grid-template-columns: 360px minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .ib-studio {
    display: flex;
    flex-direction: column;
    height: var(--ibs-height-m, calc(100dvh - 57px));
  }
  .ib-side,
  .ib-work {
    flex: 1;
    min-height: 0;
  }
  .ib-studio .ib-work {
    display: none;
  }
  .ib-studio.ib-show-preview .ib-work {
    display: flex;
  }
  .ib-studio.ib-show-preview .ib-side {
    display: none;
  }
  .ib-side {
    border-right: 0;
  }
  .ib-toolbar {
    padding: 8px 10px;
    gap: 6px;
  }
  .ib-toolbar [data-device="tablet"],
  .ib-hint,
  .ib-status {
    display: none;
  }
  .ib-stage {
    padding: 10px;
  }
  .ib-mtabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--ib-border);
    background: #fff;
  }
  .ib-mtabs button {
    border: 0;
    background: none;
    padding: 12px;
    font-size: .92rem;
    color: var(--ib-muted);
    cursor: pointer;
  }
  .ib-mtabs button.active {
    color: var(--ib-brand);
    font-weight: 600;
    box-shadow: inset 0 3px 0 var(--ib-brand);
  }
}
@media (max-width: 520px) {
  .ib-palettes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ib-step {
    font-size: .62rem;
  }
  .ib-toolbar .ib-btn {
    padding: 7px 10px;
    font-size: .82rem;
  }
}
