:root {
  --bg: #06111a;
  --card: #0d1c28;
  --card2: #102638;
  --phone: #071018;
  --text: #f4f8fb;
  --muted: #9fb2c4;
  --border: #193247;
  --white: #ffffff;
  --green: #52ff75;
  --blue: #b9d7ee;
  --preview-phone-width: 390px;
  --preview-phone-height: 780px;
}

.phone-shell {
  width: calc(var(--preview-phone-width) + 28px);
  max-width: calc(var(--preview-phone-width) + 28px);
  margin: 0 auto;
  background: #050c12;
  border: 1px solid var(--border);
  border-radius: 40px;
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.phone-screen {
  background: var(--phone);
  border-radius: 28px;
  overflow: hidden;
  width: 100%;
  height: var(--preview-phone-height);
  min-height: var(--preview-phone-height);
  display: flex;
  flex-direction: column;
  position: relative;
}

.preview-root,
.preview-root *,
.preview-root *::before,
.preview-root *::after {
  box-sizing: border-box;
}

.phone-status {
  height: 28px;
  background: #081018;
}

.screen {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
}

.screen.hidden {
  display: none;
}

.app-scroll {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px 100px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: touch;
}

.preview-root .app-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

[data-screen="city"] {
  overflow: hidden;
}

[data-screen="city"] .city-picker-header {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #182837;
}

[data-screen="city"] .app-scroll,
[data-screen="city"] [data-city-list] {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  padding: 12px 16px 28px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scrollbar-gutter: auto;
}

[data-screen="city"] .city-list {
  width: 100%;
  max-width: 100%;
}

[data-screen="city"] .city-row {
  width: 100%;
  max-width: 100%;
}

.app-header {
  margin-bottom: 16px;
}

.city-pill-btn {
  display: inline-block;
  background: #102232;
  border: none;
  border-radius: 999px;
  color: #8fb5d7;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 8px 12px;
  margin-bottom: 14px;
  cursor: pointer;
}

.city-picker-header {
  width: 100%;
  max-width: 100%;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #182837;
}

.city-picker-title {
  color: #f6faff;
  font-size: 28px;
  font-weight: 900;
  margin: 12px 0 10px;
  letter-spacing: -0.5px;
}

.city-search-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid #1d3244;
  background: #10202d;
  color: #f6faff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0;
  -webkit-appearance: none;
  appearance: none;
}

.city-search-input::placeholder {
  color: #89a0b8;
}

.city-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.city-row {
  min-height: 72px;
  border-radius: 18px;
  padding: 14px 16px;
  background: #0e1822;
  border: 1px solid #182837;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.city-row:hover {
  border-color: #2a4558;
}

.city-row.selected {
  border-color: #4bc57d;
}

.city-row-name {
  color: #f6faff;
  font-size: 16px;
  font-weight: 800;
  display: block;
}

.city-row-meta {
  color: #89a0b8;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

.city-row-status {
  color: #bfd0e0;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.app-title {
  color: #f6faff;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 0;
}

.app-tagline {
  color: #bfd0e0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
  margin: 10px 0 0;
}

.app-supporting {
  color: #7f93a9;
  font-size: 14px;
  margin: 6px 0 0;
}

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

.header-pill {
  flex: 1;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #102232;
  border: 1px solid #1d3244;
  color: #bfd0e0;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #1d3244;
  background: #10202d;
  color: #a8bed1;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip.active {
  background: #e8f0f7;
  border-color: #e8f0f7;
  color: #081018;
}

.home-helper {
  color: #a8bed1;
  font-size: 13px;
  line-height: 1.45;
  margin: 14px 0 0;
}

.search-all-card {
  margin-top: 12px;
  width: 100%;
  border-radius: 22px;
  padding: 16px;
  background: #f6faff;
  border: 1px solid #f6faff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
}

.search-all-title {
  color: #071018;
  font-size: 16px;
  font-weight: 900;
  display: block;
}

.search-all-sub {
  color: #32485d;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  display: block;
}

.venue-card {
  background: #0e1822;
  border: 1px solid #182837;
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
}

.venue-card:hover {
  border-color: #2a4558;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rank-badge {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #142433;
  color: #d4e2f0;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.wait-badge {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}

.venue-name {
  color: #f6faff;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.venue-area {
  color: #89a0b8;
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.venue-address {
  color: #7f93a9;
  font-size: 12px;
  margin: 4px 0 0;
}

.warning-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #3c3112;
  color: #f5c56a;
  font-size: 12px;
  font-weight: 800;
}

.predicted-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #121a22;
  border: 1px solid #203042;
  color: #90a4b8;
  font-size: 12px;
  font-weight: 700;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.meta-item {
  background: #101c28;
  border-radius: 16px;
  padding: 12px;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meta-label {
  color: #7d93a8;
  font-size: 12px;
  font-weight: 700;
}

.meta-value {
  color: #edf4fa;
  font-size: 15px;
  font-weight: 800;
  margin-top: 6px;
  line-height: 1.2;
}

.tag-inline {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #101c28;
  border: 1px solid #203042;
}

.tag-inline-title {
  color: #7d93a8;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.tag-inline-text {
  color: #f6faff;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 700;
}

.state-box {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

.state-box strong {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 17px;
}

.retry-btn {
  margin-top: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: var(--white);
  color: #041019;
  font-weight: 800;
  cursor: pointer;
}

.floating-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 20px 20px;
  background: linear-gradient(transparent, rgba(7, 16, 24, 0.96) 24%);
}

.floating-btn {
  width: 100%;
  height: 58px;
  border-radius: 24px;
  background: #f6faff;
  border: none;
  color: #071018;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.top-bar {
  padding: 14px 16px 0;
}

.back-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #12324a;
  border: 1px solid #2d5876;
  color: #f6faff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.search-bar {
  display: block;
  min-height: 48px;
  margin: 12px 16px 0;
  width: calc(100% - 32px);
  max-width: calc(100% - 32px);
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid #1d3244;
  background: #10202d;
  color: #f6faff;
  font-size: 14px;
  font-weight: 600;
  -webkit-appearance: none;
  appearance: none;
}

.search-bar::placeholder {
  color: #89a0b8;
}

.search-heading {
  padding: 8px 16px 0;
  color: #f6faff;
  font-size: 22px;
  font-weight: 800;
}

.search-heading.hidden {
  display: none;
}

.search-empty-hint {
  color: #7f93a9;
  font-size: 12px;
  line-height: 16px;
  margin: 0 0 12px;
  font-weight: 600;
}

.missing-venue-card {
  border-radius: 16px;
  border: 1px solid #1d3244;
  background: #10202d;
  padding: 14px;
  margin-bottom: 12px;
}

.missing-venue-title {
  color: #f6faff;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}

.missing-venue-text {
  color: #89a0b8;
  font-size: 13px;
  line-height: 18px;
  margin: 4px 0 12px;
  font-weight: 600;
}

.missing-venue-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.missing-venue-input {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #1d3244;
  background: #0e1822;
  padding: 12px 14px;
  color: #f6faff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.missing-venue-input::placeholder {
  color: #89a0b8;
}

.missing-venue-note {
  min-height: 72px;
  resize: vertical;
}

.missing-venue-btn {
  width: 100%;
  min-height: 46px;
  border: none;
  border-radius: 14px;
  background: #f6faff;
  color: #071018;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
}

.missing-venue-btn.disabled,
.missing-venue-btn:disabled {
  background: #6f7a85;
  color: #d9e2ea;
  cursor: default;
}

.detail-card {
  background: #0e1822;
  border: 1px solid #182837;
  border-radius: 22px;
  padding: 16px;
  margin-top: 16px;
}

.detail-card-title {
  color: #89a0b8;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}

.detail-card-value {
  color: #f6faff;
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.problem-card {
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid #26435c;
  background: #132536;
  padding: 12px;
}

.problem-title {
  color: #f6faff;
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 3px;
}

.problem-text {
  color: #b7c7d7;
  font-size: 12px;
  margin: 0 0 8px;
  font-weight: 600;
}

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

.problem-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #10202d;
  border: 1px solid #2b4964;
  color: #f6faff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

[data-screen="report-wait"] {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-screen="report-wait"] .top-bar {
  flex-shrink: 0;
}

.report-wait-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px 28px;
  -webkit-overflow-scrolling: touch;
}

.report-wait-title {
  color: #f6faff;
  font-size: 28px;
  line-height: 34px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 14px;
}

.selected-venue-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #0e1822;
  border: 1px solid #182837;
  border-radius: 20px;
  padding: 16px;
}

.selected-venue-text {
  flex: 1;
  min-width: 0;
}

.selected-venue-name {
  color: #f6faff;
  font-size: 19px;
  line-height: 26px;
  font-weight: 800;
  margin: 0;
}

.selected-venue-area {
  color: #89a0b8;
  font-size: 14px;
  margin: 4px 0 0;
  font-weight: 600;
}

.selected-venue-address {
  color: #7f93a9;
  font-size: 12px;
  line-height: 16px;
  margin: 4px 0 0;
}

.selected-venue-warning {
  display: inline-block;
  margin-top: 10px;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #4a1a1d;
  color: #ffb6ba;
  font-size: 12px;
  font-weight: 800;
}

.change-pill {
  flex-shrink: 0;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #102232;
  border: none;
  color: #8fb5d7;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.problem-compact-card {
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #0e1822;
  border: 1px solid #1d3244;
}

.problem-compact-title {
  color: #f6faff;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
}

.problem-compact-body {
  color: #a8bed1;
  font-size: 13px;
  line-height: 18px;
  margin: 4px 0 8px;
  font-weight: 600;
}

.problem-compact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.problem-compact-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #10202d;
  border: 1px solid #294256;
  color: #f6faff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.problem-compact-btn.active {
  background: #1a3a55;
  border-color: #3d6a8e;
}

.issue-compact-card {
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid #1d3244;
  background: #10202d;
}

.issue-compact-title {
  color: #f6faff;
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 8px;
}

.issue-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.issue-chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #0e1822;
  border: 1px solid #2b4964;
  color: #f6faff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
}

.issue-chip.active {
  background: #e8f0f7;
  border-color: #e8f0f7;
  color: #081018;
}

.current-wait-card {
  margin-top: 18px;
  background: #0e1822;
  border: 1px solid #182837;
  border-radius: 22px;
  padding: 16px;
}

.current-wait-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.current-wait-label {
  color: #e7eef5;
  font-size: 14px;
  font-weight: 800;
}

.current-wait-value {
  color: #f6faff;
  font-size: 14px;
  font-weight: 800;
}

.report-section {
  margin-top: 18px;
}

.report-section-label {
  color: #e7eef5;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 12px;
}

.report-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-chip {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  background: #10202d;
  border: 1px solid #1d3244;
  color: #a8bed1;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.report-chip.active {
  background: #e8f0f7;
  border-color: #e8f0f7;
  color: #081018;
}

.order-made-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #0e1822;
  border: 1px solid #182837;
  text-align: left;
  cursor: pointer;
}

.order-made-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.order-made-title {
  color: #f6faff;
  font-size: 16px;
  font-weight: 800;
}

.order-made-sub {
  color: #89a0b8;
  font-size: 13px;
  line-height: 18px;
  margin-top: 4px;
  font-weight: 600;
}

.report-toggle {
  flex-shrink: 0;
  display: inline-flex;
}

.report-toggle-track {
  position: relative;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: #243447;
  transition: background 0.2s ease;
}

.order-made-card.on .report-toggle-track {
  background: #29563e;
}

.report-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f6faff;
  transition: transform 0.2s ease;
}

.order-made-card.on .report-toggle-thumb {
  transform: translateX(20px);
  background: #b2f5cf;
}

.report-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  padding: 12px 16px 18px;
  background: linear-gradient(180deg, rgba(7, 16, 24, 0) 0%, #071018 24px, #071018 100%);
  border-top: 1px solid rgba(24, 40, 55, 0.65);
}

.report-submit-btn {
  width: 100%;
  min-height: 58px;
  border: none;
  border-radius: 16px;
  background: #f6faff;
  color: #071018;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
}

.report-submit-btn.disabled,
.report-submit-btn:disabled {
  background: #6f7a85;
  color: #d9e2ea;
  cursor: default;
  box-shadow: none;
}

.report-footer-hint {
  color: #7f93a9;
  font-size: 12px;
  line-height: 16px;
  margin: 8px 0 0;
  text-align: center;
  font-weight: 600;
}

.preview-root {
  width: calc(var(--preview-phone-width) + 28px);
  max-width: calc(var(--preview-phone-width) + 28px);
  flex-shrink: 0;
}

/* preview-compact only limits venue count in preview.js — no UI sizing overrides */

/* Full-page live preview on app.html — taller only, same width */
.preview-root.preview-full-page.preview-large {
  --preview-phone-height: 820px;
}

.preview-root.preview-full-page.preview-large .phone-screen {
  height: var(--preview-phone-height);
  min-height: var(--preview-phone-height);
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 8, 13, 0.82);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text);
}

.modal p {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
}

.store-row {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.store-btn {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.store-btn.primary {
  background: var(--white);
  color: #041019;
}

.store-btn.secondary {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: default;
}

.modal-close {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.info-list {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
  padding-left: 18px;
}

.support-modal-body {
  margin-bottom: 18px;
}

.support-section-title {
  color: #f6faff;
  font-size: 15px;
  font-weight: 800;
  margin: 16px 0 6px;
}

.support-modal-body .support-section-title:first-child {
  margin-top: 0;
}

.support-body {
  color: #bfd0e0;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.support-link {
  color: #8fb5d7;
  text-decoration: none;
  font-weight: 700;
}

.support-link:hover {
  text-decoration: underline;
}

.support-privacy-list {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .phone-shell {
    border-radius: 32px;
    padding: 10px;
  }

  .phone-screen,
  .preview-root.preview-full-page.preview-large .phone-screen {
    border-radius: 24px;
    height: min(var(--preview-phone-height), 86vh);
    min-height: min(720px, 82vh);
  }

  .preview-root.preview-full-page.preview-large .phone-screen {
    height: min(820px, 88vh);
    min-height: min(760px, 84vh);
  }
}

/* Mobile website: scale embedded previews down (desktop app UI unchanged) */
@media (max-width: 600px) {
  body.page-home #live-preview,
  body.page-live-preview #livePreview {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
  }

  body.page-home #live-preview .preview-root,
  body.page-live-preview #livePreview .preview-root {
    width: calc(var(--preview-phone-width) + 28px);
    max-width: calc(var(--preview-phone-width) + 28px);
    flex-shrink: 0;
    transform-origin: top center;
  }

  body.page-home #live-preview .preview-root {
    --preview-mobile-scale: 0.82;
    transform: scale(var(--preview-mobile-scale));
    margin-bottom: calc(-1 * (var(--preview-phone-height) + 56px) * (1 - var(--preview-mobile-scale)));
  }

  body.page-home .phone-screen {
    height: var(--preview-phone-height);
    min-height: var(--preview-phone-height);
  }

  body.page-live-preview #livePreview .preview-root {
    --preview-mobile-scale: 0.9;
    --preview-mobile-shell-height: 876px;
    transform: scale(var(--preview-mobile-scale));
    margin-bottom: calc(-1 * var(--preview-mobile-shell-height) * (1 - var(--preview-mobile-scale)));
  }

  body.page-live-preview .preview-root.preview-full-page.preview-large .phone-screen {
    height: 820px;
    min-height: 820px;
    max-height: min(820px, 78vh);
  }
}

@media (max-width: 480px) {
  .phone-shell,
  .preview-root {
    width: min(calc(var(--preview-phone-width) + 28px), calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  body.page-home .preview-root,
  body.page-home .phone-shell,
  body.page-live-preview .preview-root,
  body.page-live-preview .phone-shell {
    width: calc(var(--preview-phone-width) + 28px);
    max-width: calc(var(--preview-phone-width) + 28px);
  }

  .phone-shell {
    border-radius: 28px;
    padding: 10px;
  }

  .phone-screen {
    height: min(var(--preview-phone-height), 88vh);
    min-height: min(680px, 84vh);
  }

  .preview-root.preview-full-page.preview-large .phone-screen {
    height: min(820px, 88vh);
    min-height: min(680px, 84vh);
  }

  body.page-home .phone-screen {
    height: var(--preview-phone-height);
    min-height: var(--preview-phone-height);
  }

  body.page-live-preview .preview-root.preview-full-page.preview-large .phone-screen {
    height: 820px;
    min-height: 820px;
    max-height: min(820px, 78vh);
  }
}
