.qr-page {
  background:
    radial-gradient(circle at 84% 4%, rgba(174, 199, 231, .33), transparent 27rem),
    radial-gradient(circle at 8% 38%, rgba(255, 194, 144, .2), transparent 25rem),
    #f4f1ea;
}
.back-home { justify-self: end; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 750; }
.back-home span { color: var(--coral); margin-left: 4px; }
.qr-main { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 70px 0 110px; }
.qr-hero { display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 70px; margin-bottom: 46px; }
.qr-hero h1 { margin: 24px 0 17px; font-size: clamp(48px, 6vw, 76px); line-height: 1.02; letter-spacing: -.065em; }
.qr-hero h1 em { color: #4d75a2; font-family: Georgia, "Songti SC", serif; font-weight: 500; }
.qr-hero > div > p { max-width: 650px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; }
.hero-qr { position: relative; width: 190px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 20px; border: 1px solid rgba(73, 92, 112, .18); border-radius: 32px; background: rgba(255,254,250,.72); box-shadow: 0 24px 55px rgba(54, 57, 64, .1); transform: rotate(3deg); }
.hero-qr span { border-radius: 7px; background: #292827; }
.hero-qr span:nth-child(2), .hero-qr span:nth-child(4), .hero-qr span:nth-child(6), .hero-qr span:nth-child(8) { background: transparent; box-shadow: inset 0 0 0 9px #292827; }
.hero-qr span:nth-child(5) { background: #87a7ca; }
.hero-qr i { position: absolute; inset: 50% auto auto 50%; width: 38px; height: 38px; display: grid; place-items: center; border: 5px solid #fffefa; border-radius: 11px; color: #fff; background: #ff7253; font: normal 800 12px serif; transform: translate(-50%, -50%) rotate(-3deg); }

.qr-workbench { padding: 27px; border: 1px solid rgba(105, 98, 88, .2); border-radius: 28px; background: rgba(255,254,250,.84); box-shadow: 0 28px 75px rgba(54,47,37,.1), inset 0 1px #fff; backdrop-filter: blur(14px); }
.workbench-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 3px 4px 22px; }
.workbench-heading > div:first-child { display: grid; gap: 5px; }
.workbench-heading > div:first-child > span { color: #527aa5; font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.workbench-heading h2 { margin: 0; font-size: 26px; letter-spacing: -.04em; }
.local-note { display: inline-flex; align-items: center; gap: 7px; color: #8c867e; font-size: 10px; }
.local-note i { width: 6px; height: 6px; border-radius: 50%; background: #4da57e; }
.qr-layout { display: grid; grid-template-columns: 1.45fr .75fr; gap: 14px; }
.generator-card, .reader-card { min-width: 0; border: 1px solid #e1dcd3; border-radius: 21px; background: #fffefa; }
.generator-card { padding: 22px; }
.reader-card { padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 11px; }
.panel-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #24425e; background: #aac3dc; font: italic 12px Georgia, serif; transform: rotate(-2deg); }
.reader-number { color: #673c2e; background: #f2b49e; }
.panel-heading h3 { margin: 0 0 4px; font-size: 17px; }
.panel-heading p { margin: 0; color: #928b83; font-size: 9px; }
.content-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #f0ede7; }
.content-tabs button { border: 0; border-radius: 7px; padding: 7px 9px; color: #7f7971; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.content-tabs button.active { color: #fff; background: #292725; }
.generator-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; margin-top: 23px; }
.qr-fields { min-width: 0; }
.field-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #57524c; font-size: 10px; font-weight: 800; }
.field-label span { color: #aaa39a; font-weight: 600; }
#qrContent { width: 100%; min-height: 146px; resize: vertical; border: 1px solid #d9d3ca; border-radius: 13px; outline: 0; padding: 13px; color: #292725; background: #fff; font-size: 12px; line-height: 1.65; }
#qrContent:focus, .wifi-fields input:focus, .wifi-fields select:focus { border-color: #6589af; box-shadow: 0 0 0 4px rgba(101,137,175,.09); }
.wifi-fields[hidden] { display: none; }
.wifi-fields { display: grid; gap: 7px; }
.wifi-fields > input, .wifi-fields label input, .wifi-fields select { width: 100%; height: 42px; border: 1px solid #d9d3ca; border-radius: 10px; outline: 0; padding: 0 11px; color: #514c45; background: #fff; font-size: 10px; }
.wifi-row { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8px; }
.wifi-row label { display: grid; gap: 6px; color: #716b63; font-size: 9px; font-weight: 750; }
.checkbox-label { display: flex; align-items: center; gap: 7px; color: #777169; font-size: 9px; }
.checkbox-label input { width: 14px; height: 14px; accent-color: #527aa5; }
.style-settings { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #ece7df; }
.style-settings label { min-width: 0; display: grid; gap: 6px; color: #817b73; font-size: 8px; font-weight: 750; }
.style-settings select { width: 100%; height: 34px; border: 1px solid #ddd7ce; border-radius: 8px; outline: 0; padding: 0 5px; color: #5e5952; background: #f7f4ef; font-size: 9px; }
.color-setting input { width: 100%; height: 34px; border: 1px solid #ddd7ce; border-radius: 8px; padding: 3px; background: #f7f4ef; cursor: pointer; }
.qr-message, .reader-message { min-height: 16px; margin: 7px 1px 0; color: #c7513f; font-size: 9px; }
.preview-column { display: flex; min-width: 0; flex-direction: column; align-items: stretch; }
.canvas-shell { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border: 1px solid #e0dbd2; border-radius: 17px; padding: 13px; background: #f4f1eb; }
#qrCanvas { width: 100%; height: 100%; display: block; border-radius: 7px; image-rendering: pixelated; }
.canvas-shell > span { position: absolute; color: #9a938a; font-size: 10px; }
.download-actions { display: grid; grid-template-columns: 1.25fr .6fr 1fr; gap: 5px; margin-top: 8px; }
.download-actions button, .result-actions button, .result-actions a { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #d9d3ca; border-radius: 8px; padding: 0 9px; color: #666058; background: #f5f2ec; text-decoration: none; font-size: 8px; font-weight: 800; cursor: pointer; }
.download-actions .primary-action, .result-actions .primary-action { border-color: #292725; color: #fff; background: #292725; }
.primary-action span { margin-left: 5px; color: #ff9c82; }
.preview-column > small { margin-top: 7px; color: #a29b92; text-align: center; font-size: 7px; line-height: 1.5; }
.offline-pill { border-radius: 999px; padding: 6px 8px; color: #39785e; background: #e8f2ed; font-size: 8px; font-weight: 800; }
.drop-zone { min-height: 310px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 23px; border: 1.5px dashed #cfc8bd; border-radius: 16px; padding: 28px 18px; background: #f8f5ef; text-align: center; cursor: pointer; transition: border-color .18s, background .18s; }
.drop-zone:hover, .drop-zone.dragging { border-color: #527aa5; background: #f0f5fa; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.scan-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 16px; color: #3d5e7d; background: #dce8f3; font-size: 26px; transform: rotate(2deg); }
.drop-zone strong { font-size: 13px; }
.drop-zone p { margin: 7px 0 16px; color: #999289; font-size: 9px; }
.drop-zone em { border-radius: 8px; padding: 8px 11px; color: #fff; background: #292725; font-size: 8px; font-style: normal; font-weight: 800; }
.reader-result[hidden] { display: none; }
.reader-result { display: grid; gap: 12px; margin-top: 23px; }
.uploaded-preview { position: relative; height: 128px; overflow: hidden; border-radius: 14px; background: #eeeae3; }
.uploaded-preview img { width: 100%; height: 100%; display: block; object-fit: contain; }
.uploaded-preview span { position: absolute; right: 8px; top: 8px; border-radius: 999px; padding: 5px 7px; color: #fff; background: #3e8b69; font-size: 7px; font-weight: 800; }
.result-content > span { display: inline-block; margin-bottom: 6px; color: #527aa5; font-size: 8px; font-weight: 850; letter-spacing: .08em; }
.result-content textarea { width: 100%; resize: vertical; border: 1px solid #ddd7ce; border-radius: 10px; outline: 0; padding: 10px; color: #4b4741; background: #fff; font: 9px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.result-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 7px; }
.result-actions [hidden] { display: none; }
.qr-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.qr-benefits article { min-height: 154px; padding: 21px; border: 1px solid rgba(111,103,92,.17); border-radius: 17px; background: rgba(255,254,250,.48); }
.qr-benefits span { color: #527aa5; font: italic 11px Georgia, serif; }
.qr-benefits strong { display: block; margin: 23px 0 7px; font-size: 14px; }
.qr-benefits p { margin: 0; color: #7f7970; font-size: 11px; line-height: 1.65; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 30; padding: 11px 15px; border-radius: 10px; color: #fff; background: #242220; box-shadow: 0 12px 36px rgba(0,0,0,.2); font-size: 11px; font-weight: 750; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1030px) {
  .qr-layout { grid-template-columns: 1fr; }
  .generator-body { grid-template-columns: minmax(0, 1fr) 280px; }
  .drop-zone { min-height: 235px; }
}
@media (max-width: 760px) {
  .qr-main { width: calc(100% - 24px); padding: 48px 0 76px; }
  .qr-hero { grid-template-columns: 1fr; gap: 28px; margin-bottom: 30px; }
  .qr-hero h1 { font-size: clamp(43px, 13vw, 61px); }
  .qr-hero > div > p { font-size: 14px; }
  .hero-qr { display: none; }
  .qr-workbench { padding: 13px; border-radius: 21px; }
  .workbench-heading { padding: 8px 4px 17px; }
  .generator-card, .reader-card { padding: 17px; }
  .generator-body { grid-template-columns: 1fr; }
  .preview-column { width: min(100%, 340px); margin: 0 auto; }
  .qr-benefits { grid-template-columns: 1fr; }
  .qr-benefits article { min-height: 130px; }
}
@media (max-width: 500px) {
  .back-home { display: none; }
  .panel-heading { flex-direction: column; }
  .style-settings { grid-template-columns: repeat(3, 1fr); }
  .style-settings .color-setting { grid-column: span 1; }
  .wifi-row { grid-template-columns: 1fr; }
  .download-actions { grid-template-columns: 1fr 1fr; }
  .download-actions .primary-action { grid-column: 1 / -1; }
  .result-actions { grid-template-columns: 1fr; }
}
