:root {
  --yc-600: #7f56d9;
  --yc-700: #6941c6;
  --ink: #111528;
  --muted: #667085;
  --line: #eceff6;
  --action-blue: #1a73e8;
  --brand-strip: #1a73e8;
  --device-w: 286px;
  --screen-ratio: 2.10
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
small,
strong,
em,
span,
a,
label,
input,
textarea,
button,
select,
option,
.dd-item,
.dd-btn,
.action,
.link-blue,
.k,
.v,
.opt,
.title,
.subtitle {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

input::placeholder,
textarea::placeholder {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: auto;
  overflow-y: auto;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  overflow-x: hidden;
}

.container {
  max-width: 1680px;
  margin: 0 auto;
  padding: 16px;
}

.grid {
  display: grid;
  grid-template-columns: 1.22fr .78fr;
  gap: 20px;
}

@media (max-width:1200px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: #fff;
  border: 1px solid #f0f1f6;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(88, 44, 169, .08);
}

.preview-card {
  position: sticky;
  top: 24px;
  align-self: start;
  height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  background: #fff;
}

.topbar.no-underline {
  border-bottom: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.yup-logo {
  height: 30px;
  width: auto;
}

.titles h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f1428;
}

.subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

h2 {
  margin: 0 0 12px;
  font-size: 15.6px;
  color: #0f132a;
  font-weight: 700;
}

.hint {
  color: #8a8fa3;
}

.small {
  font-size: 12px;
}

.row {
  display: grid;
  gap: 12px;
}

.row-2 {
  grid-template-columns: 1fr 1fr;
}

.row-spaced {
  margin-top: 14px;
}

.card .row+.row {
  margin-top: 14px;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

label {
  font-weight: 600;
  color: #0f1120;
  font-size: 13px;
}

input[type="text"],
input[type="url"],
input[type="tel"],
input[type="email"],
textarea {
  background: #fff;
  border: 1px solid #e7eaf4;
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  color: #111827;
  outline: none;
  transition: border .15s, box-shadow .15s;
}

input:focus,
textarea:focus {
  border-color: var(--yc-600);
  box-shadow: 0 0 0 4px rgba(105, 65, 198, .18);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  font-size: 12px;
  opacity: .85;
}

.counter {
  font-size: 12px;
  color: #8588a0;
  text-align: right;
  margin-top: -6px;
}

.divider {
  border: 0;
  border-top: 1px solid #eef0f6;
  margin: 18px 0;
}

.drop {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px dashed #d9d6f6;
  border-radius: 14px;
  padding: 14px;
  background: #fcfbff;
  cursor: pointer;
  min-height: 96px;
}

.drop:hover {
  background: #f9f7ff;
}

.drop.dragover {
  background: #efe9ff;
  border-color: #c7b4ff;
}

.thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid #ebe9f8;
  background: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb.banner {
  width: 120px;
  height: 72px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(180deg, #c8bfff, #a995ff);
  box-shadow: 0 4px 10px rgba(105, 65, 198, .25);
}

.thumb-icon.banner {
  width: 50px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, #c8bfff, #a995ff);
  box-shadow: 0 4px 10px rgba(105, 65, 198, .25);
}

.meta .title {
  font-weight: 700;
  color: #37296d;
}

.meta small {
  color: #8a86a6;
}

.check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #352f6a;
}

.chk input {
  width: 16px;
  height: 16px;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.btn {
  border: 1px solid #ece8ff;
  background: #fff;
  color: #6f61a8;
  padding: 9px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(180deg, var(--yc-600), var(--yc-700));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(105, 65, 198, .23);
}

.btn-large {
  padding: 12px 16px;
  font-size: 14px;
}

.preview-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 6px;
  order: 1;
}

.seg {
  display: inline-flex;
  gap: 6px;
  background: #f7f7fb;
  border: 1px solid #ece8ff;
  border-radius: 12px;
  padding: 4px;
}

.seg button {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  color: #6f61a8;
  cursor: pointer;
  font-size: 13px;
}

.seg button.active {
  background: linear-gradient(180deg, var(--yc-600), var(--yc-700));
  color: #fff;
  box-shadow: 0 6px 16px rgba(105, 65, 198, .25);
}

.preview-wrap {
  order: 2;
  display: flex;
  justify-content: center;
  height: auto;
  margin-bottom: 8px;
}

.device {
  width: var(--device-w);
  max-width: 100%;
  transform-origin: top center;
}

.shell {
  position: relative;
  padding: 12px;
  border-radius: 32px;
  background: #fdfcff;
  border: 1px solid #e8e8f4;
  box-shadow: 0 18px 48px rgba(12, 8, 40, .15);
}

.btns-left,
.btns-right {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.btns-left:before {
  content: "";
  position: absolute;
  left: -3px;
  top: 86px;
  width: 3px;
  height: 66px;
  border-radius: 2px;
  background: #e8e8f4;
}

.btns-right:before {
  content: "";
  position: absolute;
  right: -3px;
  top: 136px;
  width: 3px;
  height: 80px;
  border-radius: 2px;
  background: #e8e8f4;
}

.speaker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 6px;
  width: 58px;
  height: 5px;
  border-radius: 10px;
  background: #dcdaf0;
  border: 1px solid #d6d4ee;
}

.notch,
.island {
  display: none;
}

.island {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 8px;
  width: 112px;
  height: 24px;
  border-radius: 12px;
  background: #0f1321;
  opacity: .9;
}

.screen {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  color: #111827;
  height: calc(var(--device-w)*var(--screen-ratio));
}

.statusbar {
  height: 16px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  font-size: 9.5px;
  border-bottom: 1px solid #f1f2f6;
}

.dots {
  display: flex;
  gap: 4px;
}

.dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #b8b9c7;
}

.topbar {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-bottom: 1px solid #f1f2f6;
  background: #fff;
}

.back {
  width: 9px;
  height: 9px;
  border-left: 2px solid #182032;
  border-bottom: 2px solid #182032;
  transform: rotate(45deg);
}

.title {
  font-weight: 800;
  font-size: 12px;
}

.viewport {
  position: relative;
  height: calc(100% - 54px);
  overflow: hidden;
  background: #fff;
}

.hero {
  border-bottom: 1px solid #eef0f6;
}

.banner {
  height: 80px;
  background: #eef0ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip {
  display: none !important;
}

.biz {
  padding: 2px 12px 2px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #ececf5;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .06);
  transform: translateY(-26px);
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.1;
}

.name {
  text-align: center;
  font-weight: 700;
  margin-top: -8px;
  font-size: 13.2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.desc {
  max-width: 100%;
  text-align: center;
  color: #4b5563;
  margin-top: 6px;
  font-size: 11.8px;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.actions-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 10px 0;
  flex-wrap: wrap;
  align-items: center;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--action-blue);
  text-decoration: none;
  font-size: 11px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.action svg {
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  flex: 0 0 12px;
  display: block;
}

.pad-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eef0f6;
  border-bottom: 1px solid #eef0f6;
  padding: 8px 12px;
  background: #fff;
}

.link-blue {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}

.link-blue.active {
  border-bottom: 2px solid #1a73e8;
  padding-bottom: 6px;
}

.panel-area {
  height: calc(100% - 186px);
  overflow: hidden;
}

.list,
.options {
  height: 100%;
  overflow: hidden;
  padding: 6px 0;
}

.rowi,
.opt {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
}

.rowi {
  border-top: 1px solid #eef0f6;
}

.rowi:first-child {
  border-top: 0;
}

.rowi svg {
  width: 16px;
  height: 16px;
  color: #6b7280;
}

.k {
  color: #6b7280;
  font-size: 10.5px;
  margin-top: 1px;
}

.v {
  font-weight: 600;
  font-size: 12.3px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.list .v a {
  color: inherit;
  text-decoration: none;
}

.opt {
  justify-content: space-between;
  border-bottom: 1px solid #eef0f6;
  font-size: 11px;
}

.opt small {
  color: #9aa0ae;
  font-weight: 700;
  font-size: 10px;
}

.caret {
  border: solid #9aa0ae;
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(-45deg);
}

.device-select {
  order: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 0;
  height: auto;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dd-btn {
  border: 1px solid #ece8ff;
  background: #fff;
  color: #6f61a8;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.dd-btn::after {
  content: "▴";
  margin-left: 8px;
  font-size: 12px;
}

.dd-list {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(100% + 6px);
  background: #fff;
  border: 1px solid #ece8ff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(17, 8, 41, .12);
  min-width: 240px;
  z-index: 10;
  display: none;
  max-height: 320px;
  overflow: auto;
}

.dd-item {
  padding: 9px 12px;
  font-weight: 600;
  color: #352f6a;
  font-size: 13px;
  cursor: pointer;
}

.dd-item:hover {
  background: #f7f7fb;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 12, 40, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.box {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid #ece7ff;
  width: min(92vw, 900px);
}

.crop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.crop-head strong {
  font-size: 15px;
}

.crop-area {
  border: 1px solid #eceff6;
  border-radius: 12px;
  background: #f7f7fb;
  padding: 12px;
}

.cvp {
  position: relative;
  background: #fff;
  border-radius: 10px;
  height: min(70vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cvp img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  position: absolute;
}

.sel {
  position: absolute;
  border: 2px solid var(--yc-700);
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .35);
  cursor: move;
  display: none;
  background: linear-gradient(to right, rgba(255, 255, 255, .35) 1px, transparent 1px) 0 0/ calc(100%/3) 100%, linear-gradient(to bottom, rgba(255, 255, 255, .35) 1px, transparent 1px) 0 0/100% calc(100%/3);
}

.sel .h {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--yc-700);
  border-radius: 3px;
}

.h-nw {
  left: -8px;
  top: -8px;
}

.h-ne {
  right: -8px;
  top: -8px;
}

.h-sw {
  left: -8px;
  bottom: -8px;
}

.h-se {
  right: -8px;
  bottom: -8px;
}

.badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: #fff;
  color: #26283a;
  border: 1px solid #e6e6ef;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
}

.quality {
  font-size: 12.5px;
  color: #5a5f73;
  margin-right: auto;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
}

.actions-right {
  display: flex;
  gap: 10px;
}

body::after {
  content: "";
  display: block;
  height: 0;
}

.req {
  display: inline-block;
  margin-left: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  vertical-align: middle;
}

.invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15) !important;
}

.invalid-group {
  outline: 2px solid rgba(220, 38, 38, .6);
  border-radius: 10px;
  padding: 6px;
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 12px;
    border-radius: 12px;
  }

  .row-2 {
    grid-template-columns: 1fr;
  }

  .row-spaced {
    margin-top: 10px;
  }

  input[type="text"],
  input[type="url"],
  input[type="tel"],
  input[type="email"],
  textarea {
    font-size: 16px;
  }

  .topbar {
    height: 40px;
    margin: 16px 0 20px;
  }

  .brand {
    gap: 12px;
  }

  .yup-logo {
    height: 26px;
  }

  .preview-card {
    position: static;
    top: auto;
    height: auto;
    overflow: visible;
  }

  .preview-head {
    justify-content: center;
    margin-bottom: 8px;
  }

  .seg {
    padding: 4px;
  }

  .seg button {
    padding: 10px 12px;
    font-size: 13px;
  }

  :root {
    --device-w: min(88vw, 360px);
  }

  .preview-wrap {
    margin-bottom: 6px;
  }

  .viewport {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .panel-area {
    height: auto;
    max-height: 54vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .actions-row {
    gap: 16px;
    margin: 8px 0;
  }

  .action {
    font-size: 12px;
  }

  .pad-links {
    padding: 10px 12px;
  }

  .link-blue {
    font-size: 13px;
  }

  .dd-list {
    top: auto;
    bottom: calc(100% + 6px);
    max-height: 50vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dd-btn {
    font-size: 14px;
    padding: 10px 12px;
  }

  .drop {
    min-height: 84px;
    padding: 12px;
    gap: 12px;
  }

  .thumb {
    width: 64px;
    height: 64px;
  }

  .thumb.banner {
    width: 110px;
    height: 64px;
  }

  .btn {
    padding: 11px 14px;
    font-size: 14px;
  }

  .btn-large {
    padding: 12px 16px;
    font-size: 15px;
  }

  .box {
    width: min(96vw, 560px);
    padding: 12px;
  }

  .cvp {
    height: min(62vh, 420px);
  }

  .sel .h {
    width: 14px;
    height: 14px;
  }

  .invalid {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .12) !important;
  }

  .invalid-group {
    outline: 2px solid rgba(220, 38, 38, .45);
  }

  .statusbar {
    height: 18px;
    font-size: 10.5px;
  }

  .title {
    font-size: 12.5px;
  }

  .biz {
    padding: 2px 10px 6px;
  }

  .logo {
    transform: translateY(-22px);
  }

  .name {
    font-size: 13.5px;
  }

  .desc {
    font-size: 12.3px;
  }

  .dropdown {
    z-index: 20;
  }
}

@media (max-width: 380px) {
  :root {
    --device-w: 88vw;
  }

  .actions-row {
    gap: 12px;
  }

  .action {
    font-size: 11.5px;
  }

  .dd-btn {
    font-size: 13px;
  }

  .dd-list {
    min-width: 200px;
  }
}