:root {
  --paper: #fff8f7;
  --ink: #2f2425;
  --muted: #8b7778;
  --line: #eadbd9;
  --soft: #fff0ed;
  --accent: #e96e61;
  --accent-deep: #d75448;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(99, 55, 51, 0.1);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 213, 204, 0.7), transparent 28rem),
    linear-gradient(180deg, #fffaf9 0%, var(--paper) 64%, #fff4f1 100%);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 34px 0 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 15px; font-weight: 800; letter-spacing: 0.12em; text-decoration: none; }

.brand-mark { display: grid; grid-template-columns: repeat(2, 8px); grid-template-rows: repeat(2, 8px); gap: 3px; width: 19px; height: 19px; transform: rotate(45deg); }
.brand-mark i { display: block; border-radius: 2px; background: var(--accent); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: #f2a49c; }

.topbar-note { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.hero { padding: clamp(44px, 8vw, 92px) 0 50px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--accent-deep); font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: 0.13em; }
.eyebrow span, .live-dot i, .footer-status i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(233, 110, 97, 0.11); }
.hero h1 { max-width: 720px; margin: 23px auto 17px; font-size: clamp(40px, 6vw, 73px); font-weight: 800; letter-spacing: -0.065em; line-height: 1.05; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-copy { margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.8; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.07fr) minmax(340px, 0.93fr); gap: 18px; align-items: stretch; }
.panel { border: 1px solid rgba(234, 219, 217, 0.92); border-radius: 20px; background: rgba(255,255,255,0.78); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.input-panel, .preview-panel { padding: clamp(24px, 4vw, 38px); }
.input-panel { display: flex; flex-direction: column; min-height: 540px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-kicker { display: block; margin-bottom: 10px; color: var(--accent); font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: 0.12em; }
.panel h2 { margin: 0; font-size: 20px; letter-spacing: -0.035em; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.live-dot i { width: 5px; height: 5px; box-shadow: none; }

textarea { width: 100%; min-height: 200px; margin-top: 34px; padding: 20px; resize: vertical; border: 1px solid var(--line); border-radius: 13px; outline: none; color: var(--ink); background: #fffdfc; font-size: 16px; line-height: 1.65; transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease; }
textarea::placeholder { color: #c5b2b1; }
textarea:focus { border-color: var(--accent); background: var(--white); box-shadow: 0 0 0 4px rgba(233, 110, 97, 0.11); }
.input-meta { display: flex; justify-content: space-between; margin-top: 10px; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; }
.quick-fill { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 27px; color: var(--muted); font-size: 11px; }
.chip { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: transparent; font-size: 11px; transition: 160ms ease; }
.chip:hover, .chip:focus-visible { border-color: var(--accent); color: var(--accent-deep); background: var(--soft); }
.actions { display: flex; gap: 12px; margin-top: auto; padding-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 48px; border: 0; border-radius: 10px; font-size: 13px; font-weight: 700; transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease; }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:focus-visible, .chip:focus-visible { outline: 3px solid rgba(233, 110, 97, 0.28); outline-offset: 3px; }
.button-primary { flex: 1; color: white; background: var(--accent); box-shadow: 0 11px 24px rgba(233, 110, 97, 0.25); }
.button-primary:hover { background: var(--accent-deep); box-shadow: 0 14px 28px rgba(233, 110, 97, 0.3); }
.button-arrow { font-size: 18px; font-weight: 400; line-height: 1; }
.button-quiet { padding: 0 18px; color: var(--muted); background: var(--soft); }
.button-quiet:hover { color: var(--accent-deep); background: #ffe5e0; }

.preview-panel { display: flex; flex-direction: column; min-height: 540px; }
.preview-heading { align-items: center; }
.format-badge { padding: 6px 9px; border-radius: 6px; color: var(--accent-deep); background: var(--soft); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.08em; }
.qr-stage { position: relative; display: grid; place-items: center; min-height: 300px; margin: 33px 0 19px; overflow: hidden; border: 1px dashed #e8ceca; border-radius: 15px; background-color: #fffdfc; background-image: radial-gradient(#eddad6 0.65px, transparent 0.65px); background-size: 14px 14px; }
.qr-placeholder { display: grid; place-items: center; gap: 9px; padding: 40px 20px; color: var(--muted); text-align: center; }
.qr-placeholder strong { color: var(--ink); font-size: 13px; }
.qr-placeholder span:last-child { font-size: 11px; }
.placeholder-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 7px; border: 1px solid #e5ceca; border-radius: 50%; color: var(--accent); font-size: 22px; font-weight: 300; }
#qr-image { display: none; width: min(74%, 260px); height: auto; padding: 10px; border-radius: 7px; background: #fff; box-shadow: 0 12px 36px rgba(85, 54, 48, 0.08); }
.qr-stage.has-qr #qr-image { display: block; animation: qr-in 260ms ease-out both; }
.qr-stage.has-qr .qr-placeholder { display: none; }
@keyframes qr-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
.scan-corner { position: absolute; width: 18px; height: 18px; border-color: rgba(233, 110, 97, 0.6); }
.scan-corner-tl { top: 16px; left: 16px; border-top: 1px solid; border-left: 1px solid; }
.scan-corner-tr { top: 16px; right: 16px; border-top: 1px solid; border-right: 1px solid; }
.scan-corner-bl { bottom: 16px; left: 16px; border-bottom: 1px solid; border-left: 1px solid; }
.scan-corner-br { right: 16px; bottom: 16px; border-right: 1px solid; border-bottom: 1px solid; }
.preview-hint { min-height: 20px; margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.button-download { width: 100%; color: var(--accent-deep); background: var(--soft); }
.button-download:hover:not(:disabled) { background: #ffe4df; }
.button-download:disabled { cursor: not-allowed; opacity: 0.48; }
.download-icon { font-size: 19px; font-weight: 400; line-height: 1; }

.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 36px 18px 50px; }
.feature { display: flex; align-items: flex-start; gap: 14px; color: var(--ink); font-size: 12px; line-height: 1.5; }
.feature-number { color: var(--accent); font-family: "DM Mono", monospace; font-size: 11px; }
.feature small { color: var(--muted); font-size: 11px; }
.footer { display: flex; justify-content: space-between; padding: 18px 0 30px; border-top: 1px solid rgba(234, 219, 217, 0.85); color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: 0.05em; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; }
.footer-status i { width: 5px; height: 5px; box-shadow: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 780px) {
  .page-shell { width: min(100% - 30px, 560px); }
  .topbar { padding-top: 22px; }
  .topbar-note { display: none; }
  .hero { padding: 50px 0 34px; }
  .hero h1 { font-size: clamp(39px, 11vw, 58px); }
  .hero-copy { max-width: 320px; font-size: 13px; }
  .workspace { grid-template-columns: 1fr; }
  .input-panel, .preview-panel { min-height: 0; }
  .input-panel { min-height: 500px; }
  .preview-panel { min-height: 470px; }
  .qr-stage { min-height: 285px; }
  .feature-row { padding-right: 0; padding-left: 0; }
}

@media (max-width: 480px) {
  .page-shell { width: min(100% - 22px, 560px); }
  .panel { border-radius: 16px; }
  .input-panel, .preview-panel { padding: 21px; }
  .panel h2 { font-size: 18px; }
  textarea { min-height: 180px; margin-top: 28px; }
  .actions { gap: 8px; }
  .button-quiet { padding: 0 14px; }
  .feature-row { gap: 10px; }
  .feature { gap: 8px; font-size: 10px; }
  .feature small { font-size: 9px; }
  .footer { display: block; line-height: 2; }
  .footer-status { float: right; }
}
