/* Mobile app layout for the card maker only. Desktop /create is unchanged. */
body.page-create .wa-help { display: none; }
.create-short { display: none; }
.app-steps {
  display: none;
  gap: 0;
  margin: 0 0 16px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.app-steps::-webkit-scrollbar { display: none; }
.app-step {
  flex: 1 0 auto;
  min-width: 72px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  padding: 10px 12px 12px;
  cursor: pointer;
}
.app-step[aria-selected="true"] { color: var(--rose); border-bottom-color: var(--rose); font-weight: 600; }
.step-pager { display: none; }
.qr-step { display: none; }
.gallery-finish { display: none; }
.skip-now {
  display: inline-flex;
  width: 100%;
  margin: 0 0 14px;

  border-color: #6f6ff2;
  background: #f6efe8;
  color: #6f6ff2; 
}
.skip-now:hover {
  
  background: #6f6ff2;
  color: white;
}
.create-card-msg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  background: #2a1621;
  color: #fff;
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}
.create-card-msg-text {
  flex: 1 1 160px;
  min-width: 0;
  white-space: pre-wrap;
}
.create-card-msg-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.create-card-msg-wa:hover { color: #fff; filter: brightness(1.05); }
.maker-dock { display: none; }
.maker-dock-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 8px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.maker-dock-btn.is-primary {
  background: var(--rose, #b5536c);
  border-color: var(--rose, #b5536c);
  color: #fff;
}
.maker-dock-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}
@media (max-width: 1024px) {
  .app-steps { display: flex; }
  body.page-create .panel.is-step-off { display: none; }
  body.page-create .maker-actions { display: none; }
  body.page-create .maker { padding-bottom: 120px; }
  .maker-dock {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -10px 28px rgba(42, 22, 33, .1);
  }
  body.page-create.preview-open .maker-dock,
  body.page-create.is-modal-open .maker-dock { visibility: hidden; }
}

.layout-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.layout-open strong { display: block; font-size: 16px; font-weight: 600; }
.layout-open small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.layout-open-go {
  flex: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--rose, #b5536c);
}
.color-tone-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
  margin: 8px 0 4px;
}
.color-tone-cats .design-cat {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 5px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.color-tone-cats .design-cat.is-on {
  border-color: var(--gold, #b8893b);
  background: #fff6e8;
  color: var(--gold, #b8893b);
  box-shadow: 0 0 0 2px rgba(184, 137, 59, .22);
}
.color-theme-picks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px 6px;
  margin-top: 8px;
}
.color-theme-picks.is-modal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 0;
}
.color-theme-pick { position: relative; cursor: pointer; text-align: center; width: auto; min-width: 0; }
button.color-theme-pick {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
}
.color-theme-picks.is-modal .color-theme-pick,
.color-theme-picks.is-modal button.color-theme-pick { width: 52px; }
.color-theme-pick input { position: absolute; opacity: 0; }
.color-theme-swatch {
  position: relative;
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: linear-gradient(to bottom right, var(--a) 50%, var(--b) 50%);
  overflow: hidden;
}
.color-theme-swatch.is-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}
.color-theme-pick small { display: block; margin-top: 4px; font-size: 11px; font-weight: 500; line-height: 1.2; color: var(--muted); }
.color-theme-pick input:checked + .color-theme-swatch,
button.color-theme-pick.is-on .color-theme-swatch { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(181, 83, 108, .22); }
.layout-modal[hidden] { display: none; }
.layout-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  overflow: hidden;
  background: rgba(42, 22, 33, .55);
  transition: background-color .34s ease;
}
.layout-modal.is-closing { background: rgba(42, 22, 33, 0); }
.layout-modal-card {
  width: 100%;
  height: 80dvh;
  max-height: 80dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -16px 40px rgba(42, 22, 33, .22);
  transform: translateY(0);
  transition: transform .34s cubic-bezier(.22, .9, .3, 1);
}
.layout-modal.is-closing .layout-modal-card {
  transform: translateY(100%);
  transition-timing-function: cubic-bezier(.4, 0, 1, 1);
}
@media (prefers-reduced-motion: reduce) {
  .layout-modal,
  .layout-modal-card { transition: none; }
}
.layout-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.layout-modal-head h2 { margin: 0; font-size: 22px; }
.layout-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--blush, #f6ece8);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.layout-cats {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 0;
}
.layout-cats .design-cat {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.layout-cats .design-cat.is-on {
  border-color: var(--gold, #b8893b);
  background: #fff6e8;
  color: var(--gold, #b8893b);
  box-shadow: 0 0 0 2px rgba(184, 137, 59, .28);
}
.layout-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
  -webkit-overflow-scrolling: touch;
}
.layout-tile[hidden] { display: none !important; }
.layout-tile {
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 156px;
  height: max-content;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0;
  background: #fff;
  color: inherit;
  font: inherit;
  text-align: center;
  min-width: 0;
  cursor: pointer;
}
.layout-frame {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 717.4;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f7f3ea;
  flex: none;
}
.layout-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .28s ease;
}
.layout-frame.is-ready img { opacity: 1; }
.layout-frame .design-frame-loader {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.layout-frame .design-frame-loader::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid rgba(42, 22, 33, .18);
  border-top-color: rgba(42, 22, 33, .72);
  border-radius: 50%;
  animation: design-spin .7s linear infinite;
}
.layout-frame.is-dark .design-frame-loader::after {
  border-color: rgba(255, 255, 255, .22);
  border-top-color: rgba(255, 255, 255, .92);
}
.layout-frame:not(.is-loading) .design-frame-loader { display: none; }
@keyframes design-spin { to { transform: rotate(360deg); } }
.layout-name {
  position: absolute;
  left: 8px;
  bottom: 10%;
  z-index: 2;
  max-width: calc(100% - 16px);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: rgba(42, 22, 33, .78);
  border-radius: 999px;
  padding: 5px 10px;
  pointer-events: none;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layout-select {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: none;
}
.layout-select:hover { transform: none; }
.layout-premium {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #2a1621;
  background: var(--gold-light, #e8d5a3);
  border-radius: 999px;
  padding: 4px 7px;
  pointer-events: none;
}
.layout-tile.is-selected { border-color: var(--rose, #b5536c); box-shadow: 0 0 0 2px rgba(181, 83, 108, .22); }
.layout-tile.is-locked .layout-frame img { opacity: .72; }
body.is-modal-open { overflow: hidden; }
.song-modal-card,
.crop-modal-card,
.crop-modal-card.is-phone,
.crop-modal-card.is-wide { width: 100%; }
.layout-modal-card.crop-modal-card,
.layout-modal-card.crop-modal-card.is-phone,
.layout-modal-card.crop-modal-card.is-wide {
  height: 95dvh;
  max-height: 95dvh;
}
.crop-modal-card.is-wide .crop-stage { height: min(42vh, 340px); }
.crop-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
}
.crop-stage {
  position: relative;
  overflow: hidden;
  height: min(58vh, 460px);
  margin: 0 -4px 12px;
  background: #1c1218;
  border-radius: 16px;
  touch-action: none;
  cursor: grab;
}
.crop-stage.is-dragging { cursor: grabbing; }
.crop-stage img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
}
.crop-frame {
  position: absolute;
  box-sizing: border-box;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(12, 8, 10, .58);
}
.crop-frame.is-square {
  border: 2px solid #fff;
  border-radius: 12px;
}
.crop-frame.is-phone {
  border: 7px solid #1c1218;
  border-radius: 32px;
  background: transparent;
}
.crop-frame.is-wide {
  border: 2px solid #fff;
  border-radius: 10px;
}
.crop-frame.is-phone::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 38%;
  height: 7px;
  transform: translateX(-50%);
  background: #1c1218;
  border-radius: 999px;
}
.crop-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.crop-zoom input[type="range"] { flex: 1; accent-color: var(--rose, #b5536c); }
.font-size-field { margin: 22px auto 0; max-width: 460px; text-align: center; }
.font-size-field .f { text-align: center; }
.font-size-bar { display: flex; align-items: center; gap: 14px; }
.font-size-bar input[type="range"] { flex: 1; margin: 0; accent-color: var(--rose, #b5536c); }
.font-size-step {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer; line-height: 1; padding: 0;
}
.font-size-step.is-down { font-size: 14px; }
.font-size-step.is-up { font-size: 22px; }
.font-size-value { margin: 8px 0 0; font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.crop-zoom button {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.crop-hint { margin: 0 0 12px; font-size: 13px; }
.crop-actions { display: flex; justify-content: flex-end; gap: 8px; }
.symbol-modal-card,
.portrait-modal-card,
.portrait-modal-card.is-wide { width: 100%; }
.portrait-upload {
  width: 100%;
  font: inherit;
  cursor: pointer;
  margin-bottom: 14px;
}
.portrait-or { margin: 0 0 10px; }
.portrait-choices {
  display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.portrait-choices .preset {
  position: relative;
  padding: 8px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  line-height: 0;
}
.portrait-choices .preset img,
.portrait-choices .preset video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #f6efe8;
}
.hero-bg-kinds { justify-content: flex-start; margin: 0 0 12px; }
#hero-bg-presets .preset {
  aspect-ratio: 400 / 651;
  align-self: start;
}
#hero-bg-presets .preset img,
#hero-bg-presets .preset video {
  position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    aspect-ratio: auto;
}
.portrait-choices .preset video::-webkit-media-controls,
.portrait-choices .preset video::-webkit-media-controls-start-playback-button,
.portrait-choices .preset video::-webkit-media-controls-overlay-play-button,
.photo-pick-circle video::-webkit-media-controls,
.photo-pick-circle video::-webkit-media-controls-start-playback-button,
.photo-pick-circle video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0 !important;
}
.portrait-choices .preset-video {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  background: rgba(20, 12, 16, .62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6 4.2v7.6l6-3.8z'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(20, 12, 16, .35);
}
.portrait-choices .preset.is-on {
  border-color: var(--gold, #b8893b);
  background: #fff6e8;
  box-shadow: 0 0 0 3px rgba(184, 137, 59, .32);
}
.portrait-choices .preset.is-on::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold, #b8893b) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  box-shadow: 0 1px 4px rgba(42, 22, 33, .25);
}
body.page-create .shape-pick:has(input:checked) {
  background: #fff6e8;
  box-shadow: inset 0 0 0 2px var(--gold, #b8893b);
}
body.page-create .shape-pick:has(input:checked) .shape-swatch {
  background: linear-gradient(180deg, #c96b82, #8c3148);
}
body.page-create .shape-pick:has(input:checked) small {
  color: var(--rose, #b5536c);
  font-weight: 600;
}
.symbol-modal-card .sym-picks { margin-top: 0; }
#symbol-preview i {
  width: 42px;
  height: 42px;
  background: var(--ink-2);
  -webkit-mask: var(--sym) center / contain no-repeat;
  mask: var(--sym) center / contain no-repeat;
}
#symbol-preview i.wide { width: 62px; }
.share-bg-field { margin: 8px 0 18px; }
.share-bg-field .toggle { margin-top: 12px; }
.og-regen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.og-regen .muted { flex: 1 1 180px; }
.photo-pick .file button.file-face,
.photo-pick-actions > .file-face {
  width: auto;
  font: inherit;
  cursor: pointer;
}
.photo-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.song-modal-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
.done-modal-card { width: 100%; }
.done-modal-body {
  overflow: auto;
  padding: 8px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}
.done-phone-scale {
  --done-scale: .52;
  width: calc(416px * var(--done-scale));
  height: calc(667px * var(--done-scale));
  margin: 4px auto 14px;
  flex: none;
  overflow: hidden;
}
.done-phone-scale .invite-phone {
  transform: scale(var(--done-scale));
  transform-origin: top left;
}
.done-thanks {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 12px;
}
.done-thanks em { font-style: italic; color: var(--rose, #b5536c); }
.done-admin-msg {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 16px;
  white-space: pre-wrap;
}
.done-modal-body .qr-actions { display: grid; gap: 10px; margin-top: 14px; }
.done-modal-body .qr-actions .btn { width: 100%; margin: 0; }
.done-modal-body .qr-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
.done-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}
.done-links a {
  color: var(--rose, #b5536c);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.done-links a:hover { text-decoration: underline; }
.gallery-finish { margin-top: 22px; width: 100%; }

@media (max-width: 900px) {
  body.page-create { background: #f3ece6; }
  body.page-create .site-header { background: rgba(255, 255, 255, .94); }
  body.page-create .nav { min-height: 54px; gap: 8px; }
  body.page-create .logo { flex: none; gap: 8px; min-width: 0; }
  body.page-create .logo-img { height: 36px; }
  body.page-create .logo-text { display: inline; font-size: 18px; }
  body.page-create .nav-cta { display: flex; flex: none; margin-left: auto; }
  body.page-create .menu-btn { margin-left: 8px; }
  body.page-create .nav-share { display: inline; flex: none; font-size: 15px; }
  body.page-create .nav-cta .nav-home { display: inline-flex; }
  body.page-create .nav-cta .nav-upgrade,
  body.page-create .nav-cta > .btn-primary { display: none; }
  body.page-create .nav-links .account-upgrade { display: none; }
  body.page-create .site-header.open .nav-links {
    top: 100%;
    height: auto;
    min-height: 0;
  }
  body.page-create .wrap { width: 100%; padding-left: 12px; padding-right: 12px; }

  body.page-create .maker-head { display: none; }
  body.page-create .app-steps {
    display: flex;
    position: sticky;
    top: 54px;
    z-index: 80;
    margin: 0 -12px 12px;
    padding: 0 6px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    scrollbar-width: none;
  }
  body.page-create .create-card-msg {
    margin: 0 0 14px;
  }
  body.page-create .app-steps::-webkit-scrollbar { display: none; }
  body.page-create .app-step {
    flex: 1 0 auto;
    min-width: 64px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    padding: 12px 8px 10px;
    cursor: pointer;
  }
  body.page-create .app-step[aria-selected="true"] { color: var(--rose); border-bottom-color: var(--rose); font-weight: 600; }

  body.page-create .maker { display: block; padding: 12px 0 108px; }
  body.page-create .maker > form { min-width: 0; width: 100%; }
  body.page-create .gallery-finish { display: none; }
  body.page-create .step-pager { display: none; }
  body.page-create .panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 4px 0 8px;
    margin: 0;
  }
  body.page-create .panel h2 { display: none; }
  body.page-create .f input,
  body.page-create .f textarea,
  body.page-create .f select { background-color: #fff; border-radius: 10px; }
  body.page-create .fields,
  body.page-create .fields-3 { grid-template-columns: minmax(0, 1fr); }
  body.page-create .when-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.page-create .f input[type="date"],
  body.page-create .f input[type="time"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding: 7px 10px;
    margin-top: 0;
  }

  body.page-create .create-fabs { display: none; }
  body.page-create.preview-open .maker-dock { visibility: hidden; }
  body.page-create .preview-col {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .28s;
  }
  body.page-create .preview-col::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(42, 22, 33, .55);
    opacity: 0;
    transition: opacity .28s ease;
  }
  body.page-create.preview-open .preview-col {
    visibility: visible;
    pointer-events: auto;
    transition: visibility 0s;
  }
  body.page-create.preview-open .preview-col::before { opacity: 1; }
  body.page-create .preview-box {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    height: min(92dvh, 920px);
    max-height: 92dvh;
    background: #fff;
    border-radius: 22px 22px 0 0;
    overflow: hidden;
    box-shadow: 0 -16px 40px rgba(42, 22, 33, .22);
    transform: translateY(110%);
    transition: transform .28s ease;
  }
  body.page-create.preview-open .preview-box { transform: translateY(0); }
  body.page-create .preview-sheet-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: none;
    gap: 12px;
    padding: 12px 12px 12px 18px;
    border-bottom: 1px solid var(--line);
    background: #fff;
  }
  body.page-create .preview-sheet-bar strong { font-size: 17px; font-weight: 600; }
  body.page-create .preview-sheet-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: var(--blush, #f6ece8);
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }
  body.page-create .invite-phone {
    flex: 1;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fbf6ec;
  }
  body.page-create .done-phone-scale {
    --done-scale: .48;
    margin: 8px auto 14px;
  }
  body.page-create .done-phone-scale .invite-phone {
    flex: none;
    box-sizing: content-box;
    width: 400px;
    height: 651px;
    min-height: 0;
    aspect-ratio: auto;
    border: 8px solid #1c1218;
    border-radius: 28px;
    box-shadow: 0 22px 48px rgba(42, 22, 33, .22);
    background: #1c1218;
    transform: scale(var(--done-scale));
    transform-origin: top left;
  }
  body.page-create .done-phone-scale .invite-phone iframe {
    width: 400px;
    height: 651px;
    max-width: none;
    border-radius: 20px;
    transform: none;
  }
  body.page-create .invite-phone iframe {
    width: 100%;
    height: 100%;
    max-width: none;
    transform: none;
    border-radius: 0;
    pointer-events: auto;
  }
  body.page-create .phone-actions { display: none; }
  body.page-create .save-msg { display: none; }
  body.page-create.preview-open .plan-float { visibility: hidden; }

  body.page-create .maker-actions { display: none; }
  body.page-create .maker-qr { scroll-margin-bottom: 88px; margin-top: 8px; }
  body.page-create .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
  body.page-create .plan-float { bottom: calc(16px + env(safe-area-inset-bottom)); }

  .layout-modal {
    align-items: flex-end;
    justify-content: center;
    padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
    width: 100%;
    max-width: 100dvw;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
  .layout-modal-card {
    width: 100%;
    max-width: 100%;
    height: 80dvh;
    max-height: 80dvh;
    min-height: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -16px 40px rgba(42, 22, 33, .22);
  }
  .layout-modal-card.crop-modal-card,
  .layout-modal-card.crop-modal-card.is-phone,
  .layout-modal-card.crop-modal-card.is-wide {
    height: 95dvh;
    max-height: 95dvh;
  }
  .layout-modal-head {
    flex: none;
    padding: calc(12px + env(safe-area-inset-top)) 12px 12px 16px;
  }
  .layout-modal-head h2 { font-size: 20px; }
  .layout-grid {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .layout-tile { width: 100%; min-width: 0; max-width: 100%; }
  .layout-frame {
    width: 100%;
    height: auto;
    aspect-ratio: 390 / 717.4;
  }
}
@media (max-width: 420px) {
  body.page-create .logo-img { height: 32px; }
  body.page-create .logo-text { display: inline; font-size: 16px; }
  body.page-create .nav-share { font-size: 14px; }
}

.create-fabs, .preview-sheet-bar { display: none; }

/* Date and time pickers */
.wtd-pick { position: relative; display: block; margin-top: 6px; }
body.page-create .f .wtd-pick-native,
body.page-create .f input.wtd-pick-native[type="date"],
body.page-create .f input.wtd-pick-native[type="time"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.wtd-pick-face {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #e4d5cc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: 500 15px/1.25 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.wtd-pick-face.is-empty { color: var(--muted); font-weight: 400; }
.wtd-pick-face svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--rose);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wtd-pick-face:hover { border-color: var(--gold); background: #fff; }
.wtd-pick-face:focus-visible,
.wtd-pick-face[aria-expanded="true"] {
  outline: none;
  border-color: var(--rose);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(201, 162, 77, .28);
}
.wtd-pick-face:disabled { color: var(--muted); background: #f3ece6; cursor: not-allowed; }
.wtd-pop {
  position: fixed;
  z-index: 200;
  width: min(268px, calc(100vw - 24px));
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(42, 22, 33, .16);
  color: var(--ink);
}
.wtd-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wtd-cal-head strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .01em;
}
.wtd-cal-nav, .wtd-cal-day, .wtd-cal-today {
  border: 0;
  background: transparent;
  color: inherit;
  font: 500 13px/1 var(--sans);
  cursor: pointer;
}
.wtd-cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--rose-dark);
  font-size: 20px;
}
.wtd-cal-nav:hover, .wtd-cal-day:hover { background: var(--blush); }
.wtd-cal-week, .wtd-cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.wtd-cal-days > span { height: 30px; }
.wtd-cal-week { margin: 8px 0 2px; }
.wtd-cal-week span {
  text-align: center;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.wtd-cal-day { height: 30px; border-radius: 999px; }
.wtd-cal-day.is-today { box-shadow: inset 0 0 0 1px var(--gold); }
.wtd-cal-day.is-on { background: var(--rose); color: #fff; box-shadow: none; }
.wtd-wheel-labels {
  display: grid;
  grid-template-columns: 1fr 1fr .7fr;
  margin: 8px 0 2px;
}
.wtd-wheel-labels span {
  text-align: center;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.wtd-wheels {
  --wtd-row: 32px;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr .7fr;
}
.wtd-wheel {
  height: calc(var(--wtd-row) * 5);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
}
.wtd-wheel::-webkit-scrollbar { display: none; }
.wtd-wheel-pad { height: calc(var(--wtd-row) * 2); }
.wtd-wheel button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--wtd-row);
  scroll-snap-align: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 15px/1 var(--sans);
  cursor: pointer;
}
.wtd-wheel button.is-on {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}
.wtd-wheel-window {
  pointer-events: none;
  position: absolute;
  left: 4px;
  right: 4px;
  top: 50%;
  height: var(--wtd-row);
  transform: translateY(-50%);
  border-radius: 8px;
  background: rgba(201, 162, 77, .16);
  box-shadow: inset 0 0 0 1px rgba(169, 128, 47, .35);
}
.wtd-time-now {
  margin: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}
.wtd-cal-today {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 0 2px;
  color: var(--rose-dark);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 11px;
}
.wtd-time-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.wtd-time-actions .wtd-cal-today { flex: 1; width: auto; margin: 0; padding: 8px 0; }
.wtd-time-ok {
  flex: 1.4;
  border: 0;
  border-radius: 999px;
  padding: 9px 12px;
  background: var(--rose);
  color: #fff;
  font: 600 12px/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.wtd-time-ok:hover { background: var(--rose-dark); }
@media (max-width: 760px) {
  .wtd-pick-face { min-height: 38px; padding: 7px 10px; font-size: 14px; border-radius: 11px; }
  .wtd-pick-face svg { width: 15px; height: 15px; }
  .wtd-pop { width: min(248px, calc(100vw - 20px)); padding: 8px; border-radius: 14px; }
  .wtd-cal-head strong, .wtd-time-now { font-size: 16px; }
  .wtd-cal-day, .wtd-cal-days > span { height: 28px; font-size: 12px; }
  .wtd-wheels { --wtd-row: 28px; }
  .wtd-wheel button { font-size: 14px; }
  .wtd-wheel button.is-on { font-size: 18px; }
  .wtd-cal-nav { width: 26px; height: 26px; }
}
