.preview-body,
.preview-body * {
  box-sizing: border-box;
}

.preview-body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #112142;
  --preview-scene-image: var(--preview-default-scene-image);
  --panel-shadow: 0 32px 70px rgba(30, 56, 105, 0.18);
}

.preview-body a {
  color: inherit;
  text-decoration: none;
}

.preview-body button,
.preview-body input {
  font: inherit;
}

.preview-body .site-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.preview-body .container {
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

.preview-body .brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.preview-body .brand__icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #6f88ff, #4c63ff);
  color: white;
}

.preview-body .brand__dot {
  color: #556dff;
}

.preview-body .glass-card,
.preview-body .widget-card {
  backdrop-filter: blur(24px);
}

.preview-body .mini-icon-button {
  display: inline-grid;
  place-items: center;
}

.preview-body .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #556dff, #3c58f5);
}

.preview-body .muted {
  color: rgba(22, 35, 68, 0.62);
  line-height: 1.55;
}

.preview-body {
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.86) 20%, rgba(242, 247, 255, 0.68) 42%, rgba(205, 224, 255, 0.72) 60%, rgba(163, 201, 240, 0.84) 100%),
    linear-gradient(180deg, #eff6ff 0%, #cfe5ff 36%, #8cb6de 100%);
}

.preview-body .site-shell::before,
.preview-body .site-shell::after {
  display: none;
}

.preview-app {
  position: relative;
  min-height: 100vh;
  padding: 28px 0 22px;
}

.preview-app .container.preview-stage {
  width: min(1420px, calc(100vw - 36px));
  min-height: calc(100vh - 50px);
}

.preview-stage {
  position: relative;
  z-index: 1;
}

.preview-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.4) 30%, rgba(255, 255, 255, 0.18) 48%, rgba(255, 255, 255, 0.06) 66%, rgba(255, 255, 255, 0) 78%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 28%, rgba(54, 97, 140, 0.12) 72%, rgba(41, 76, 114, 0.22) 100%),
    var(--preview-scene-image);
  background-position: center center, center center, center center;
  background-size: auto, auto, cover;
  background-repeat: no-repeat, no-repeat, no-repeat;
}

.preview-backdrop__sky,
.preview-backdrop__mist,
.preview-backdrop__glow,
.preview-backdrop__lake,
.preview-backdrop__reflection,
.preview-backdrop__mountain,
.preview-backdrop__forest {
  display: none;
}

.customize-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(14, 25, 49, 0.28);
  backdrop-filter: blur(6px);
}

.customize-panel {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9;
  width: min(390px, calc(100vw - 30px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.94);
  box-shadow: var(--panel-shadow);
}

.customize-panel__header,
.customize-panel__section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.customize-panel__header h2,
.customize-panel__section-head h3 {
  margin: 0;
  color: #162344;
}

.customize-panel__header h2 {
  font-size: 1.45rem;
}

.customize-panel__section-head h3 {
  font-size: 1.02rem;
}

.customize-panel__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: #556dff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customize-panel__header p,
.customize-panel__section-head p,
.customize-panel__status {
  margin: 8px 0 0;
  color: rgba(26, 39, 71, 0.7);
  line-height: 1.55;
}

.customize-panel__section + .customize-panel__section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(27, 48, 95, 0.08);
}

.customize-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(226, 233, 249, 0.66);
  color: #203156;
  cursor: pointer;
}

.customize-close svg {
  width: 22px;
  height: 22px;
}

.secondary-button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(75, 99, 162, 0.16);
  background: rgba(235, 241, 253, 0.72);
  color: #18315f;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.customize-panel__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.customize-panel__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 4px;
  color: #3d5cff;
  font-weight: 700;
}

.is-shortcut-modal-open {
  overflow: hidden;
}

.shortcut-modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 25, 49, 0.34);
  backdrop-filter: blur(10px);
}

.shortcut-modal[hidden] {
  display: none;
}

.shortcut-modal__dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.96);
  box-shadow: var(--panel-shadow);
}

.shortcut-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.shortcut-modal__header h2 {
  margin: 0;
  color: #162344;
  font-size: 1.45rem;
}

.shortcut-modal__header p {
  margin: 8px 0 0;
  color: rgba(26, 39, 71, 0.72);
  line-height: 1.55;
}

.shortcut-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.shortcut-field {
  display: grid;
  gap: 8px;
}

.shortcut-field span {
  color: #223257;
  font-size: 0.92rem;
  font-weight: 700;
}

.shortcut-field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(41, 64, 112, 0.16);
  background: rgba(246, 249, 255, 0.88);
  color: #162344;
  outline: none;
}

.shortcut-field input:focus {
  border-color: rgba(79, 103, 255, 0.56);
  box-shadow: 0 0 0 4px rgba(85, 109, 255, 0.12);
}

.shortcut-error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.9rem;
  font-weight: 600;
}

.shortcut-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

.background-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.background-preset {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(75, 99, 162, 0.12);
  border-radius: 18px;
  background: rgba(247, 250, 255, 0.92);
  cursor: pointer;
  text-align: left;
}

.background-preset.is-active {
  border-color: rgba(79, 101, 255, 0.42);
  box-shadow: 0 14px 28px rgba(73, 95, 198, 0.14);
}

.background-preset__swatch {
  display: block;
  height: 74px;
  border-radius: 14px;
  background: var(--preset-swatch);
}

.background-preset__label {
  color: #1a2747;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand--preview {
  gap: 12px;
  font-size: 1.28rem;
  font-weight: 700;
  color: #162344;
}

.brand__icon--preview {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 14px 24px rgba(74, 103, 204, 0.18);
}

.brand__icon--preview svg {
  width: 26px;
  height: 26px;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 46px;
}

.preview-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-weather {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  color: #1a2747;
}

.preview-weather__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #f5bf17;
}

.preview-weather__icon svg {
  width: 26px;
  height: 26px;
}

.preview-weather__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(56, 92, 167, 0.22);
  border-top-color: #4f67ff;
  animation: preview-weather-spin 0.9s linear infinite;
}

.preview-weather__copy {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.preview-weather__copy strong {
  font-size: 1.06rem;
}

.preview-weather__copy small {
  color: rgba(22, 35, 68, 0.72);
  font-size: 0.94rem;
}

.preview-weather__note {
  color: rgba(22, 35, 68, 0.5);
  font-size: 0.74rem;
  font-weight: 600;
}

.preview-weather.is-error .preview-weather__icon {
  color: #f59e0b;
}

.preview-weather.is-error .preview-weather__note {
  color: rgba(180, 83, 9, 0.9);
}

.preview-weather.is-success .preview-weather__note {
  color: rgba(22, 35, 68, 0.46);
}

@keyframes preview-weather-spin {
  to {
    transform: rotate(360deg);
  }
}

.preview-topbar__divider {
  width: 1px;
  height: 38px;
  background: rgba(19, 38, 77, 0.16);
}

.mini-icon-button--preview {
  width: 42px;
  height: 42px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  color: #1a2747;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 18px rgba(77, 107, 178, 0.08);
}

.mini-icon-button--preview svg {
  width: 24px;
  height: 24px;
}

.layout-zone--hero {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.layout-module {
  position: relative;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.layout-module--hero {
  width: 100%;
  display: grid;
  justify-items: center;
}

.layout-module--search {
  margin-top: 4px;
}

.layout-module--quicklinks {
  margin-bottom: 52px;
}

.layout-module.is-drop-target,
.quicklink-card.is-drop-target {
  outline: 2px dashed rgba(79, 101, 255, 0.56);
  outline-offset: 10px;
}

.layout-module.is-dragging,
.quicklink-card.is-dragging {
  opacity: 0.62;
}

.drag-handle {
  position: absolute;
  top: 14px;
  right: 14px;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(80, 100, 156, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #213463;
  box-shadow: 0 12px 24px rgba(43, 66, 119, 0.12);
  cursor: grab;
}

.drag-handle__icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.drag-handle__icon svg {
  width: 18px;
  height: 18px;
}

.drag-handle__label {
  font-size: 0.86rem;
  font-weight: 700;
}

.is-reorder-mode .drag-handle {
  display: inline-flex;
}

.is-reorder-mode .layout-module,
.is-reorder-mode .quicklink-card--preview:not(.quicklink-card--add) {
  user-select: none;
}

.is-reorder-mode .drag-handle,
.is-reorder-mode .quicklink-card--preview:not(.quicklink-card--add) {
  touch-action: none;
}

.is-pointer-dragging .drag-handle,
.is-pointer-dragging .quicklink-card--preview:not(.quicklink-card--add) {
  cursor: grabbing;
}

.hero-center--preview {
  margin: 0 auto;
}

.hero-center--preview h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4.6vw, 4.8rem);
  line-height: 1.02;
  color: #162344;
}

.hero-center--preview p {
  margin: 10px 0 0;
  font-size: 1.16rem;
  color: rgba(22, 35, 68, 0.62);
}

.search-shell--preview {
  width: min(860px, calc(100vw - 70px));
  min-height: 78px;
  padding: 0 24px 0 28px;
  gap: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 60px rgba(77, 107, 178, 0.16);
}

.search-shell__icon {
  display: inline-flex;
  width: 30px;
  height: 30px;
  color: #1a2747;
}

.search-shell__icon svg {
  width: 30px;
  height: 30px;
}

.search-shell--preview input {
  font-size: 1.18rem;
  color: #26385c;
}

.search-shell--preview input::placeholder {
  color: rgba(56, 77, 115, 0.56);
}

.search-shell__divider {
  width: 1px;
  height: 32px;
  background: rgba(39, 56, 89, 0.14);
}

.provider-pill--preview {
  min-width: 54px;
  min-height: 54px;
  padding: 0;
  background: transparent;
}

.provider-pill__mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.12), rgba(234, 67, 53, 0.12));
  border: 1px solid rgba(65, 92, 151, 0.12);
  color: #4285f4;
  font-weight: 800;
  font-size: 1.18rem;
}

.quicklink-grid--preview {
  width: min(860px, calc(100vw - 70px));
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto;
}

.quicklink-card--preview {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.quicklink-card__tile {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(79, 105, 165, 0.16);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.quicklink-card--preview:hover .quicklink-card__tile {
  transform: translateY(-2px);
  box-shadow: 0 24px 52px rgba(79, 105, 165, 0.22);
}

.quicklink-card__drag-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.94);
  color: #2a3e6d;
  box-shadow: 0 10px 22px rgba(43, 66, 119, 0.14);
}

.quicklink-card__drag-badge svg {
  width: 16px;
  height: 16px;
}

.is-reorder-mode .quicklink-card__drag-badge {
  display: inline-flex;
}

.quicklink-card__emblem {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
}

.quicklink-card__emblem svg {
  width: 44px;
  height: 44px;
}

.quicklink-card__emblem--add svg {
  width: 36px;
  height: 36px;
}

.quicklink-card__fallback {
  font-size: 1.05rem;
  font-weight: 800;
}

.quicklink-card__label {
  color: #1d2b4b;
  font-size: 0.98rem;
  line-height: 1.3;
  text-align: center;
}

.quicklink-card--add:disabled {
  opacity: 0.7;
  cursor: default;
}

.widget-grid--preview {
  display: grid;
  grid-template-columns: 1fr 1.28fr 1fr;
  gap: 22px;
  align-items: stretch;
}

.widget-grid--preview .widget-card {
  min-height: 284px;
  padding: 22px 22px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 52px rgba(59, 88, 147, 0.18);
}

.widget-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #162344;
}

.widget-card__header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.widget-card__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5c6dff;
  font-weight: 700;
}

.widget-card__icon svg {
  width: 20px;
  height: 20px;
}

.widget-card__quote {
  margin-top: 34px;
  font-size: 1.2rem;
  line-height: 1.7;
  color: #1a2747;
}

.widget-card__quote-source {
  margin-top: 22px;
  color: #4667ff;
  font-weight: 600;
}

.story-list {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.story-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
}

.story-item__thumb {
  overflow: hidden;
  min-height: 58px;
  border-radius: 14px;
}

.story-item__thumb::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 40%),
    linear-gradient(135deg, rgba(72, 111, 173, 0.94), rgba(192, 210, 228, 0.98));
}

.story-item__thumb--one::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 40%),
    linear-gradient(135deg, #6d8299, #bacfe3);
}

.story-item__thumb--two::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 40%),
    linear-gradient(135deg, #87694c, #d7c3aa);
}

.story-item__thumb--three::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 40%),
    linear-gradient(135deg, #47484f, #b8b6c4);
}

.story-item strong {
  color: #1d2b4b;
  font-size: 0.98rem;
  line-height: 1.35;
}

.widget-card__timer-copy {
  color: rgba(26, 39, 71, 0.72);
}

.timer-value {
  margin: 34px 0 12px;
  font-size: clamp(4.1rem, 5.2vw, 5.7rem);
  letter-spacing: 0;
  color: #162344;
  text-align: center;
}

.timer-actions--stacked {
  display: grid;
  justify-items: center;
  margin-top: 26px;
  gap: 14px;
}

.primary-button--preview {
  width: 100%;
  min-height: 60px;
  box-shadow: 0 22px 36px rgba(78, 99, 255, 0.24);
}

.timer-reset-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(26, 39, 71, 0.58);
  font-weight: 600;
  cursor: pointer;
}

.preview-footer {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  padding-bottom: 8px;
}

.preview-footer__nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 2px 14px rgba(34, 53, 93, 0.28);
}

.preview-footer__nav a {
  color: inherit;
}

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

  .quicklink-grid--preview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .customize-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(70vh, 780px);
  }
}

@media (max-width: 820px) {
  .preview-app .container.preview-stage {
    width: min(100vw - 24px, 100%);
  }

  .preview-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 34px;
  }

  .preview-topbar__right {
    width: 100%;
    justify-content: space-between;
  }

  .search-shell--preview,
  .quicklink-grid--preview {
    width: 100%;
  }

  .quicklink-grid--preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 32px;
  }
}

@media (max-width: 560px) {
  .preview-app {
    padding-top: 18px;
  }

  .hero-center--preview h1 {
    font-size: 2.5rem;
  }

  .search-shell--preview {
    min-height: 68px;
    padding: 0 18px 0 20px;
    gap: 12px;
  }

  .quicklink-grid--preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .widget-grid--preview .widget-card {
    min-height: 0;
  }

  .timer-value {
    font-size: 3.5rem;
  }

  .background-preset-grid {
    grid-template-columns: 1fr;
  }
}
