@import url("https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap");

:root {
  --bg: #F4F7FB;
  --panel: #FFFFFF;
  --panel-soft: #F8FAFC;
  --text: #172033;
  --muted: #64748B;
  --line: #E2E8F0;
  --brand: #EF3D30;
  --brand-dark: #CB2118;
  --teal: #14B8A6;
  --blue: #3B82F6;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.11);
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #FFFFFF;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.top-brand {
  margin: 0;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--brand);
  color: white;
  box-shadow: 0 14px 24px rgba(239, 61, 48, 0.28);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  text-align: left;
  font-weight: 750;
}

.nav button.active,
.nav button:hover {
  background: #FFF1F0;
  color: var(--brand-dark);
}

.main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.88);
  gap: 16px;
  padding: 12px 18px;
  backdrop-filter: blur(14px);
}

.search {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #FFFFFF;
  padding: 12px 16px;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.btn {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--text);
  padding: 10px 16px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.btn.primary {
  background: var(--brand);
  color: white;
}

.btn.dark {
  background: #111827;
  color: white;
}

.btn.ghost {
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.active-mode {
  border-color: rgba(239, 61, 48, 0.42);
  background: #FFF1F0;
  color: var(--brand-dark);
}

.content {
  padding: 16px;
}

.microsite-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88)),
    radial-gradient(circle at top left, rgba(239, 61, 48, 0.1), transparent 36%);
  padding: 16px 18px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.07);
}

.microsite-header h1 {
  margin: 4px 0 5px;
  font-family: "Play", ui-sans-serif, system-ui, sans-serif;
  font-size: 31px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.microsite-header p {
  margin: 0;
  color: var(--muted);
  font-family: "Play", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
}

.eyebrow {
  color: var(--brand-dark);
  font-family: "Play", ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-picker {
  display: grid;
  min-width: min(360px, 100%);
  gap: 6px;
}

.site-picker label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.site-picker select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 10px 12px;
  font-weight: 800;
}

.microsite-workspace {
  display: grid;
  grid-template-columns: minmax(440px, 1.35fr) minmax(330px, 0.95fr);
  min-height: calc(100vh - 124px);
  gap: 12px;
  align-items: stretch;
}

.builder-panel,
.live-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.builder-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.builder-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 16px;
  border-radius: 999px;
  background: #F1F5F9;
  padding: 5px;
}

.builder-tab {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6B7280;
  font-weight: 900;
}

.builder-tab.active {
  background: #FFFFFF;
  color: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.builder-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  padding: 0 16px 16px;
}

.add-component-wide {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: #050505;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 850;
}

.add-component-wide.inside-list {
  border-radius: 0;
  min-height: 60px;
}

.component-list {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.profile-inline {
  display: grid;
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
}

.divider-edit {
  display: grid;
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
}

.divider-editor-card {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 22px 24px 24px 72px;
}

.profile-heading {
  border-bottom: 1px solid var(--line);
}

.profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.profile-edit-grid .full {
  grid-column: 1 / -1;
}

.profile-option {
  align-self: end;
}

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

.choice-card {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 11px 12px;
  font-weight: 850;
}

.choice-card input {
  width: 18px;
  height: 18px;
  accent-color: #2563EB;
}

.choice-card:has(input:checked) {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #1D4ED8;
}

.component-row,
.link-edit {
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #FFFFFF;
}

.component-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  color: var(--text);
  text-align: left;
}

.component-row strong {
  font-size: 18px;
}

.component-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: #F1F5F9;
  color: #111827;
  font-weight: 950;
}

.component-note {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-chevron {
  color: #111827;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.mini-toggle {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #E5E7EB;
  position: relative;
}

.mini-toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: white;
  content: "";
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.18);
}

.mini-toggle.on {
  background: #BBF7D0;
}

.mini-toggle.on::after {
  left: 19px;
  background: #10B981;
}

.builder-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 12px;
  font-weight: 750;
}

.empty-state {
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  padding: 16px 18px;
  font-weight: 750;
}

.live-panel {
  position: sticky;
  top: 90px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 108px);
  padding: 0;
  background: #F8FAFC;
}

.live-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-weight: 850;
  padding: 12px;
}

.live-actions {
  display: flex;
  gap: 8px;
}

.btn.compact {
  min-height: 34px;
  padding: 7px 12px;
}

.btn.danger-text {
  color: #DC2626;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.hero h1 {
  margin: 0;
  font-size: 30px;
}

.hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card,
.panel,
.preview-phone {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 16px;
}

.stat-card strong {
  display: block;
  font-size: 26px;
}

.stat-card span {
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.site-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.site-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  padding: 12px;
  text-align: left;
}

.site-item.active {
  border-color: rgba(239, 61, 48, 0.45);
  background: #FFF7F6;
}

.site-item strong {
  font-size: 15px;
}

.site-item span {
  color: var(--muted);
  font-size: 13px;
}

.editor {
  display: grid;
  gap: 16px;
  padding: 16px;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 11px 12px;
}

.field small {
  color: var(--muted);
  font-size: 12px;
}

.file-input {
  min-height: 46px;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
}

.tab {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 8px 13px;
  font-weight: 800;
}

.tab.active {
  background: #111827;
  color: white;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-edit {
  display: grid;
  gap: 10px;
  background: #FFFFFF;
  padding: 0;
}

.compact-link {
  gap: 0;
}

.link-edit.is-hidden {
  opacity: 0.62;
  background: #F8FAFC;
}

.component-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 74px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.component-toolbar strong {
  font-size: 18px;
}

.component-title,
.component-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.component-title {
  min-width: 0;
}

.component-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.component-actions {
  flex-shrink: 0;
}

.link-editor-card {
  display: grid;
  gap: 12px;
  padding: 14px 18px 18px 72px;
}

.inline-card {
  border-bottom: 1px solid var(--line);
  background: #FFFFFF;
  padding: 22px 24px 24px 72px;
}

.inline-actions {
  display: flex;
  justify-content: flex-end;
}

.edit-btn {
  width: auto;
  min-width: 58px;
  padding: 0 10px;
  color: #2563EB;
  font-size: 13px;
}

.chevron-btn {
  font-size: 21px;
}

.move-actions {
  display: flex;
  gap: 6px;
}

.move-actions.mobile-move {
  display: none;
}

.move-actions.modal-move {
  display: flex;
  flex-wrap: wrap;
}

.move-btn {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  color: #111827;
  padding: 7px 10px;
  font-weight: 850;
}

.icon-btn {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  color: #111827;
  font-weight: 900;
}

.icon-btn.danger {
  color: #EF4444;
  font-size: 22px;
}

.hide-btn {
  width: auto;
  min-width: 78px;
  padding: 0 10px;
  color: #64748B;
  font-size: 12px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #D1D5DB;
  transition: background 0.18s ease;
}

.toggle-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FFFFFF;
  content: "";
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.toggle-switch input:checked + span {
  background: #BBF7D0;
}

.toggle-switch input:checked + span::after {
  transform: translateX(18px);
  background: #10B981;
}

.link-edit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.link-edit-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
  padding: 10px 12px;
}

.component-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.color-field {
  position: relative;
}

.field input.color-trigger,
.color-trigger {
  width: 52px;
  height: 52px;
  border: 3px solid #FFFFFF;
  border-radius: 999px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.13);
}

.color-trigger::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-trigger::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.round-color {
  width: 52px !important;
  height: 52px;
  border: 3px solid #FFFFFF !important;
  border-radius: 999px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.13);
}

.round-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.round-color::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

.color-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 10px;
  width: min(420px, 82vw);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #FFFFFF;
  padding: 10px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.color-preview {
  height: 76px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.color-inputs {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 0.75fr);
  gap: 8px;
}

.color-inputs label {
  display: grid;
  gap: 4px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.color-inputs input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.swatches {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

.swatch {
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid rgba(15, 23, 42, 0.08);
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.switch-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFFFF;
  padding: 11px 12px;
  font-weight: 800;
}

.switch-field input {
  width: 18px;
  height: 18px;
}

.preview-wrap {
  position: sticky;
  top: 92px;
}

.preview-phone {
  overflow: hidden;
  border-radius: 0;
  background: #071B21;
  padding: 0;
}

.live-panel .preview-phone {
  height: 100%;
  min-height: 0;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.preview-pc {
  border-radius: 0;
}

.preview-pc .phone-screen {
  min-height: 100%;
  border-radius: 0;
}

.preview-pc .phone-cover {
  height: 150px;
}

.preview-pc .phone-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phone-screen {
  min-height: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #09252C;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: white;
}

.live-panel .phone-screen {
  height: 100%;
  min-height: 0;
  overflow: auto;
  border-radius: 0;
}

.phone-brandbar {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0 !important;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand-glass) 70%, rgba(255, 255, 255, 0.18)), rgba(255, 255, 255, 0.16));
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
}

.phone-cover {
  position: relative;
  height: 168px;
  margin: 14px 18px 0;
  background: var(--cover), #FDF2F8;
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.phone-avatar {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin: -40px auto 0;
  overflow: hidden;
  border: 2px solid white;
  border-radius: 999px;
  background: #EF4444;
  color: white;
  font-size: 25px;
  font-weight: 900;
  position: relative;
  z-index: 2;
}

.phone-avatar.no-ring {
  border: 0;
}

.phone-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-copy {
  padding: 12px 20px 16px;
  text-align: center;
}

.phone-copy h3 {
  margin: 0;
  font-size: 28px;
}

.phone-copy.size-title-small h3 { font-size: 23px; }
.phone-copy.size-title-medium h3 { font-size: 26px; }
.phone-copy.size-title-large h3 { font-size: 29px; }
.phone-copy.size-title-xlarge h3 { font-size: 33px; }

.phone-copy p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.phone-copy.size-body-small p { font-size: 13px; }
.phone-copy.size-body-medium p { font-size: 15px; }
.phone-copy.size-body-large p { font-size: 17px; }
.phone-copy.size-body-xlarge p { font-size: 19px; }

.phone-links {
  display: grid;
  gap: 10px;
  padding: 0 18px 26px;
}

.phone-divider {
  width: 100%;
  margin: 4px 0 8px;
}

.phone-divider.divider-base {
  height: 1px;
  background: var(--divider-color);
}

.phone-divider.divider-bordered {
  border: 0 solid var(--divider-color);
  background: transparent;
}

.phone-divider.divider-thin {
  height: 1px;
  border-top-width: 1px;
}

.phone-divider.divider-medium {
  height: 2px;
  border-top-width: 2px;
}

.phone-divider.divider-thick {
  height: 4px;
  border-top-width: 4px;
}

.phone-link {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: #99F6E4;
  color: #111827;
  padding: 10px 13px;
  font-weight: 900;
}

.phone-link.align-left {
  justify-content: flex-start;
  text-align: left;
}

.phone-link.align-center {
  justify-content: center;
  text-align: center;
}

.phone-link.align-right {
  flex-direction: row-reverse;
  justify-content: flex-start;
  text-align: right;
}

.phone-link.bold {
  font-weight: 900;
}

.phone-link.regular {
  font-weight: 500;
}

.phone-link.italic {
  font-style: italic;
}

.phone-link.size-small {
  min-height: 42px;
  padding: 8px 11px;
  font-size: 13px;
}

.phone-link.size-medium {
  min-height: 50px;
}

.phone-link.size-large {
  min-height: 60px;
  padding: 14px 15px;
  font-size: 16px;
}

.phone-link.global-button-small { font-size: 13px; }
.phone-link.global-button-medium { font-size: 15px; }
.phone-link.global-button-large { font-size: 17px; }
.phone-link.global-button-xlarge { font-size: 19px; }

.phone-link.box {
  border-radius: 14px;
}

.phone-link.no-shadow {
  box-shadow: none;
}

.phone-link.shadow {
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
}

.dot {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
  font-size: 12px;
  overflow: hidden;
  flex: 0 0 auto;
}

.dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  border-radius: 16px;
  background: #111827;
  color: white;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 300px 1fr;
  }

  .preview-wrap {
    position: static;
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {
  .profile-edit-grid,
  .component-style-grid,
  .link-edit-row {
    grid-template-columns: 1fr;
  }

  .link-editor-card {
    padding-left: 18px;
  }

  .component-actions .icon-btn[title="Paling atas"],
  .component-actions .icon-btn[title="Naik"],
  .component-actions .icon-btn[title="Turun"],
  .component-actions .icon-btn[title="Paling bawah"] {
    display: none;
  }

  .move-actions.mobile-move {
    display: flex;
  }
}

@media (max-width: 820px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .workspace,
  .stats {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero,
  .microsite-header {
    align-items: stretch;
    flex-direction: column;
  }

  .builder-tabs {
    border-radius: 16px;
  }

  .builder-tab {
    border-radius: 12px;
  }

  .component-row {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .component-note,
  .mini-toggle {
    display: none;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .microsite-workspace {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .live-panel {
    position: static;
    height: 760px;
  }

  .profile-edit-grid,
  .component-style-grid,
  .link-edit-row {
    grid-template-columns: 1fr;
  }

  .link-editor-card {
    padding-left: 18px;
  }

  .component-actions .icon-btn[title="Paling atas"],
  .component-actions .icon-btn[title="Naik"],
  .component-actions .icon-btn[title="Turun"],
  .component-actions .icon-btn[title="Paling bawah"] {
    display: none;
  }

  .move-actions.mobile-move {
    display: flex;
  }
}

/* Public root patch: tambahan CSS kecil, tidak mengubah struktur dashboard Codex. */
.public-root {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.public-root .public-screen {
  min-height: 100vh;
  border-radius: 0;
  overflow: auto;
}
.public-link {
  text-decoration: none;
}
@media (min-width: 760px) {
  .public-root .phone-cover,
  .public-root .phone-copy,
  .public-root .phone-links {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
}
