:root {
  --paper: #0f1118;
  --paper-soft: #151822;
  --card: #1a1d28;
  --card-2: #202430;
  --ink: #f3f0ea;
  --muted: #9298a8;
  --line: #363a48;
  --accent: #ff6b8a;
  --violet: #8d7bff;
  --mint: #bff4d0;
  --shadow: 0 22px 70px rgba(0, 0, 0, .28);
  --radius: 18px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-display: "Songti SC", "Noto Serif CJK SC", "STSong", serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background:
    radial-gradient(circle at 82% 2%, rgba(141, 123, 255, .13), transparent 27%),
    radial-gradient(circle at 6% 34%, rgba(255, 107, 138, .07), transparent 24%),
    var(--paper);
  font-family: var(--font-sans); line-height: 1.65; -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
canvas, svg { display: block; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 16px; color: var(--paper); background: var(--mint); border-radius: 8px; text-decoration: none; }
.skip-link:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shell { width: min(1220px, calc(100% - 40px)); margin-inline: auto; }

.site-header { position: relative; z-index: 10; padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { display: flex; align-items: flex-end; gap: 3px; width: 43px; height: 43px; padding: 10px 9px; border: 1px solid #595d70; border-radius: 11px; background: #191c27; }
.brand-mark i { display: block; width: 6px; border-radius: 6px; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 13px; }.brand-mark i:nth-child(2) { height: 22px; background: var(--violet); }.brand-mark i:nth-child(3) { height: 17px; background: var(--mint); }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-family: var(--font-display); font-size: 19px; letter-spacing: .09em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .14em; }
.top-nav { display: flex; gap: 25px; font-size: 12px; }
.top-nav a { color: #c1c4ce; text-decoration: none; }
.top-nav a:hover { color: var(--accent); }

.hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: clamp(40px, 8vw, 100px); align-items: center; padding-block: clamp(50px, 8vw, 96px) 78px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 23px; color: #8f95a6; font-size: 10px; letter-spacing: .04em; }
.eyebrow span { padding: 4px 8px; color: var(--paper); background: var(--accent); border-radius: 3px; font-family: var(--font-mono); font-size: 8px; }
.hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(60px, 8.6vw, 104px); line-height: .98; letter-spacing: -.075em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 620px; margin: 28px 0 0; color: #a2a7b4; font-size: clamp(15px, 1.7vw, 18px); line-height: 1.9; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 25px; color: #b4b8c3; font-size: 10px; }
.hero-facts span { display: flex; align-items: center; gap: 7px; }
.hero-facts i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(191, 244, 208, .08); }
.hero-visual { position: relative; }
.visual-photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid #4a4e5f; border-radius: 160px 160px 22px 22px; background: linear-gradient(155deg, #2c274d 0%, #67436c 45%, #f28d82 100%); box-shadow: 15px 16px 0 rgba(141, 123, 255, .22); }
.visual-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 52%, rgba(8, 10, 18, .55)); }
.sun { position: absolute; top: 18%; left: 50%; width: 94px; height: 94px; border-radius: 50%; background: #ffd4b7; transform: translateX(-50%); box-shadow: 0 0 60px rgba(255, 199, 165, .62); }
.hill { position: absolute; width: 140%; height: 55%; border-radius: 50% 50% 0 0; }
.hill.h1 { left: -36%; bottom: -22%; background: #182028; transform: rotate(12deg); }
.hill.h2 { right: -41%; bottom: -30%; background: #28323d; transform: rotate(-8deg); }
.visual-watermark { position: absolute; z-index: 2; left: 50%; top: 57%; width: 80%; color: rgba(255, 255, 255, .75); font-family: var(--font-mono); font-size: clamp(25px, 3vw, 39px); font-weight: 700; line-height: 1.15; letter-spacing: .15em; text-align: center; transform: translate(-50%, -50%) rotate(-14deg); white-space: nowrap; }
.visual-caption { display: flex; justify-content: space-between; margin-top: 15px; color: #7f8595; font-family: var(--font-mono); font-size: 8px; letter-spacing: .09em; }
.visual-caption strong { color: var(--mint); }

.studio { display: grid; grid-template-columns: minmax(350px, .73fr) minmax(0, 1.27fr); gap: 24px; align-items: start; }
.settings-card, .preview-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.settings-card { padding: clamp(21px, 3vw, 30px); }
.settings-heading, .preview-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.section-index { margin: 0 0 2px; color: var(--accent); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .15em; }
.settings-heading h2, .preview-heading h2 { margin: 0; font-family: var(--font-display); font-size: 28px; line-height: 1.2; letter-spacing: -.04em; }
.privacy-pill { padding: 4px 8px; color: var(--mint); border: 1px solid #4a6b57; border-radius: 100px; font-family: var(--font-mono); font-size: 8px; }
.upload-zone { position: relative; display: flex; align-items: center; gap: 13px; margin-top: 19px; padding: 15px; border: 1px dashed #555a6d; border-radius: 12px; background: #151822; transition: border-color .18s, background .18s; }
.upload-zone.is-dragging { border-color: var(--accent); background: #221923; }
.upload-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; color: var(--accent); border: 1px solid #54596b; border-radius: 9px; font-size: 23px; font-weight: 300; }
.upload-zone > div:nth-child(3) { display: grid; min-width: 0; }
.upload-zone strong { font-size: 12px; }
.upload-zone span { color: var(--muted); font-size: 9.5px; }
.upload-zone small { margin-top: 2px; color: #717889; font-size: 8px; }
.outline-button { margin-left: auto; flex: 0 0 auto; padding: 7px 10px; color: #e6e3dd; background: #252937; border: 1px solid #4d5263; border-radius: 7px; font-size: 9px; cursor: pointer; }
.outline-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.outline-button:disabled { opacity: .5; cursor: wait; }
.load-error { margin-top: 10px; padding: 8px 10px; color: #ffd8df; background: rgba(255, 107, 138, .12); border-left: 3px solid var(--accent); font-size: 9px; }
.type-tabs { display: flex; gap: 5px; margin-top: 18px; padding: 4px; background: #12151d; border: 1px solid #303442; border-radius: 9px; }
.type-tab { flex: 1; padding: 8px 9px; color: #8d93a2; background: transparent; border: 0; border-radius: 6px; font-size: 10.5px; cursor: pointer; }
.type-tab.is-active { color: var(--ink); background: #2b3040; }
.lock-chip, .premium-tag { display: inline-flex; padding: 1px 5px; color: var(--paper); background: var(--accent); border-radius: 3px; font-family: var(--font-mono); font-size: 7px; font-style: normal; font-weight: 500; }
.settings-section { margin-top: 19px; padding-top: 18px; border-top: 1px solid #303442; }
.field-label, .field > span, .range-field > span, .control-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #bdc0ca; font-size: 9.5px; font-weight: 600; }
textarea, input[type="text"], select, input[type="color"] { color: var(--ink); background: #13161f; border: 1px solid #3b4050; border-radius: 8px; outline: 0; }
textarea { width: 100%; min-height: 74px; padding: 10px 11px; resize: vertical; line-height: 1.6; }
textarea:focus, input[type="text"]:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 107, 138, .1); }
select { width: 100%; min-height: 38px; padding: 7px 9px; }
input[type="color"] { width: 44px; height: 38px; padding: 3px; cursor: pointer; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 11px; }
.field { display: grid; }
.field > span { justify-content: flex-start; }
.field input[type="color"] { width: 100%; }
.wide-field { grid-column: 1 / -1; }
.logo-picker { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-picker small { display: block; color: #777e8e; font-size: 8px; }
.file-button { padding: 7px 10px; color: #e7e3dc; background: #252937; border: 1px solid #4d5263; border-radius: 7px; font-size: 9px; cursor: pointer; white-space: nowrap; }
.logo-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.logo-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: #8c93a2; font-size: 8.5px; }
.logo-meta img { width: 33px; height: 33px; object-fit: contain; background: #11141b; border: 1px solid #373c4b; border-radius: 6px; padding: 3px; }
.logo-meta button { margin-left: auto; padding: 0; color: var(--accent); background: transparent; border: 0; border-bottom: 1px solid currentColor; font-size: 8px; cursor: pointer; }
.range-field { display: block; margin-top: 13px; }
.range-field output { margin-left: auto; color: var(--accent); font-family: var(--font-mono); font-size: 8.5px; }
input[type="range"] { width: 100%; height: 4px; accent-color: var(--accent); cursor: pointer; }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-label { margin: 0; }
.segmented { display: flex; padding: 3px; background: #12151d; border: 1px solid #343948; border-radius: 7px; }
.segmented button { padding: 5px 11px; color: #9298a7; background: transparent; border: 0; border-radius: 5px; font-size: 9px; cursor: pointer; }
.segmented button.is-active { color: var(--paper); background: var(--violet); }
.output-heading { display: flex; justify-content: space-between; align-items: center; }
.range-compact { align-content: start; }
.range-compact input { margin-top: 9px; }
.check-row { display: flex; align-items: center; gap: 7px; color: #aeb3bf; font-size: 9px; }
.check-row input { width: 15px; height: 15px; accent-color: var(--violet); }
.check-row input:disabled, .range-field input:disabled { opacity: .38; cursor: not-allowed; }
.primary-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 20px; color: var(--paper); background: var(--accent); border: 0; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .15s, background .15s; }
.primary-button:hover:not(:disabled) { background: #ff8099; transform: translateY(-1px); }
.primary-button:disabled { opacity: .4; cursor: not-allowed; }
.primary-button span { font-size: 18px; }
.download-note { margin: 8px 0 0; color: #737b8c; font-size: 8.5px; text-align: center; }

.preview-card { min-width: 0; padding: 26px; }
.preview-resolution { padding: 5px 8px; color: #b7bcc8; background: #12151d; border: 1px solid #333846; border-radius: 6px; font-family: var(--font-mono); font-size: 8px; }
.preview-stage { display: grid; place-items: center; min-height: 525px; margin-top: 18px; padding: 18px; overflow: hidden; border: 1px solid #323746; border-radius: 12px; background-color: #0c0e14; background-image: linear-gradient(45deg, #171a23 25%, transparent 25%), linear-gradient(-45deg, #171a23 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #171a23 75%), linear-gradient(-45deg, transparent 75%, #171a23 75%); background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0; }
#previewCanvas { max-width: 100%; max-height: 780px; object-fit: contain; border-radius: 4px; box-shadow: 0 15px 55px rgba(0, 0, 0, .42); }
.preview-empty { display: grid; justify-items: center; gap: 8px; color: #737b8c; text-align: center; }
.empty-grid { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 4px; color: #505769; border: 1px solid #3b4050; border-radius: 16px; font-size: 32px; }
.preview-empty strong { color: #9da3b1; font-size: 12px; }
.preview-empty span { font-size: 9px; line-height: 1.7; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 41px; padding-top: 10px; }
.file-summary { display: flex; flex-wrap: wrap; gap: 5px 12px; color: #7b8394; font-size: 8.5px; }
.file-summary span:first-child { color: var(--mint); font-family: var(--font-mono); }
.remove-button { padding: 0; color: #c18a96; background: transparent; border: 0; border-bottom: 1px solid #76515a; font-size: 8px; cursor: pointer; }
.batch-strip { margin-top: 10px; padding-top: 13px; border-top: 1px solid #303442; }
.batch-strip-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.batch-strip-heading h3 { margin: 0; color: #bfc3ce; font-size: 10px; }
.batch-strip-heading span { color: #747c8d; font-family: var(--font-mono); font-size: 8px; }
.thumbnail-list { display: flex; gap: 8px; margin-top: 9px; overflow-x: auto; padding-bottom: 5px; }
.thumbnail { flex: 0 0 102px; display: grid; gap: 4px; padding: 4px; color: #8b92a2; background: #13161f; border: 1px solid #343948; border-radius: 8px; cursor: pointer; text-align: left; }
.thumbnail.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 107, 138, .13); }
.thumbnail-canvas { width: 100%; height: 67px; object-fit: cover; border-radius: 4px; background: #090b10; }
.thumbnail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 7.5px; }
.privacy-strip { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; padding-top: 11px; border-top: 1px solid #303442; color: #6f7788; font-size: 8px; }
.privacy-strip span { color: var(--mint); font-size: 15px; line-height: 1.2; }
.privacy-strip p { margin: 0; }

.unlock-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 24px; align-items: start; margin-top: 35px; scroll-margin-top: 30px; }
.premium-panel { padding: 29px; color: var(--paper); background: linear-gradient(145deg, #3b2f66, #4b2d4c); border: 1px solid #5c5378; border-radius: var(--radius); box-shadow: 8px 8px 0 rgba(255, 107, 138, .28); }
.premium-panel .section-index { color: var(--mint); }
.premium-panel h2 { margin: 10px 0 19px; font-family: var(--font-display); font-size: 29px; line-height: 1.25; letter-spacing: -.04em; }
.premium-list { display: grid; gap: 10px; }
.premium-list > div { display: flex; gap: 11px; padding-bottom: 9px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.premium-list > div > span { color: var(--accent); font-family: var(--font-mono); font-size: 8px; }
.premium-list p { display: grid; margin: 0; }
.premium-list strong { font-size: 10.5px; }
.premium-list small { color: #b6b1c7; font-size: 8px; }

.site-footer { margin-top: 78px; padding: 34px 0 21px; border-top: 1px solid #252936; background: #0b0d13; }
.footer-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-mark { display: grid; place-items: center; width: 35px; height: 35px; color: var(--paper); background: #202430; border: 1px solid #3b4050; border-radius: 8px; font-family: var(--font-mono); font-size: 10px; }
.footer-brand strong { font-family: var(--font-display); letter-spacing: .08em; }
.footer-brand p { margin: 1px 0 0; color: #686f80; font-size: 8.5px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px 20px; font-size: 10px; }
.footer-links a { color: #959ba9; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; gap: 20px; margin-top: 27px; padding-top: 14px; border-top: 1px solid #202430; color: #596172; font-family: var(--font-mono); font-size: 8px; }

/* Shared referral card. */
.referral-card { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 36px); color: var(--ink); background: #1a1d28; border: 1px solid #3a3f4f; border-radius: var(--radius); box-shadow: 7px 7px 0 rgba(141, 123, 255, .52); }
.referral-card::after { content: ""; position: absolute; width: 205px; height: 205px; right: -77px; top: -100px; border: 31px solid var(--accent); border-radius: 50%; opacity: .18; pointer-events: none; }
.referral-kicker { display: flex; align-items: center; gap: 8px; color: #858c9d; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .12em; }
.referral-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 138, .13); }
.referral-heading { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 16px; }
.referral-heading h2 { margin: 0; color: var(--ink); font-family: var(--font-display); font-size: clamp(25px, 3vw, 35px); line-height: 1.22; letter-spacing: -.035em; }
.referral-heading p { max-width: 560px; margin: 9px 0 0; color: #969dac; font-size: 11.5px; }
.referral-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #555b6c; border-radius: 100px; color: #b0b6c3; font-family: var(--font-mono); font-size: 8.5px; }
.referral-badge.is-unlocked, .referral-badge.is-trial { color: var(--paper); background: var(--violet); border-color: var(--violet); }
.referral-badge.is-trial { color: #321923; background: #ffc2ce; border-color: #ffc2ce; }
.referral-progress { display: flex; align-items: center; gap: 12px; margin-top: 21px; color: #c4c8d1; font-size: 10.5px; }
.referral-steps { display: flex; gap: 5px; }
.referral-steps i { width: 31px; height: 5px; border-radius: 10px; background: #3d4252; }
.referral-steps i.is-filled { background: var(--accent); }
.referral-label { display: block; margin: 24px 0 7px; color: #7c8495; font-size: 8.5px; }
.referral-copy-row { display: flex; gap: 8px; }
.referral-link { min-width: 0; flex: 1; color: #eef0f5 !important; background: #11141b !important; border-color: #464c5d !important; font-family: var(--font-mono); font-size: 10px; }
.referral-copy { flex: 0 0 auto; padding: 9px 14px; color: var(--paper); background: var(--accent); border: 1px solid var(--accent); border-radius: 7px; font-weight: 700; font-size: 10.5px; cursor: pointer; }
.referral-copy.is-copied { color: var(--paper); background: #398f61; border-color: #398f61; }
.referral-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 12px; color: #757d8e; font-size: 9px; }
.referral-refresh { flex: 0 0 auto; padding: 0; color: #a5abba; background: transparent; border: 0; border-bottom: 1px solid #596173; font-size: 8.5px; cursor: pointer; }
.referral-trial { margin-top: 15px; padding: 9px 11px; color: #ffdce4; background: rgba(255, 107, 138, .11); border: 1px solid rgba(255, 107, 138, .3); border-radius: 7px; font-size: 9.5px; }

@media (max-width: 950px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { width: min(360px, 80vw); }
  .studio { grid-template-columns: 1fr; }
  .settings-card { order: 2; }
  .preview-card { order: 1; }
  .unlock-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 1220px); }
  .site-header { padding: 15px 0; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 16px; }
  .top-nav { gap: 14px; font-size: 10.5px; }
  .hero { gap: 35px; padding-top: 46px; }
  .hero h1 { font-size: clamp(53px, 17vw, 76px); }
  .hero-copy > p:not(.eyebrow) { font-size: 14px; }
  .hero-visual { width: min(300px, 79vw); justify-self: center; }
  .visual-photo { border-radius: 120px 120px 18px 18px; }
  .settings-card, .preview-card { padding: 19px; }
  .settings-heading h2, .preview-heading h2 { font-size: 25px; }
  .upload-zone { align-items: flex-start; flex-wrap: wrap; }
  .outline-button { width: 100%; margin-left: 0; }
  .field-grid { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .preview-stage { min-height: 350px; padding: 10px; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; gap: 6px; }
  .footer-main, .footer-base { flex-direction: column; }
  .footer-links { justify-content: flex-start; }
  .referral-heading { flex-direction: column; }
  .referral-copy-row { flex-direction: column; }
  .referral-foot { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
