﻿/* QR Generator */
.qr-page main { width: min(1240px, calc(100% - 28px)); }
.qr-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
  gap: 28px;
  align-items: center;
  background: radial-gradient(circle at 84% 18%, rgba(242, 140, 56, 0.28), transparent 30%), linear-gradient(130deg, rgba(16, 34, 62, 0.98) 0%, rgba(26, 53, 95, 0.94) 70%);
}
.qr-hero-copy h1 { font-size: clamp(1.65rem, 4vw, 2.65rem); line-height: 1.14; }
.qr-hero-art { width: 100%; max-height: 300px; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.22)); }
.qr-intro-grid, .qr-guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 26px; margin-bottom: 28px; }
.qr-intro-grid .box, .qr-guide-grid .box { margin-bottom: 0; }
.qr-privacy-note { background: linear-gradient(145deg, rgba(242, 140, 56, 0.08), transparent 38%), #fff; }
.qr-workbench { border: 1px solid var(--line); border-radius: 20px; background: #f7faff; box-shadow: 0 12px 28px rgba(12, 26, 48, 0.08); padding: 22px; margin: 30px 0 34px; }
.qr-type-panel { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 22px; }
.qr-type-panel h2, .qr-preview-panel h2 { margin-top: 4px; }
.qr-type-panel .lead { max-width: 820px; margin-bottom: 18px; }
.qr-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.qr-type-grid button, .qr-form button, .qr-reader button { font-family: inherit; }
.qr-type-grid button { min-height: 78px; border: 1px solid #b8c7de; background: #fff; color: #234267; border-radius: 16px; padding: 12px 13px; font-weight: 800; cursor: pointer; text-align: left; box-shadow: 0 8px 16px rgba(12, 26, 48, 0.05); transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease; }
.qr-type-grid button span { display: block; font-size: 0.98rem; line-height: 1.2; }
.qr-type-grid button small { display: block; margin-top: 5px; color: #647894; font-weight: 700; line-height: 1.25; }
.qr-type-grid button:hover { transform: translateY(-2px); background: #eef5ff; border-color: #8aa6ca; }
.qr-type-grid button.active { background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; border-color: var(--navy); }
.qr-type-grid button.active small { color: rgba(255, 255, 255, 0.78); }
.qr-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr); gap: 28px; align-items: start; }
.qr-form-main, .qr-preview-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.qr-fields { display: none; border-left: 4px solid var(--orange); padding-left: 18px; margin-bottom: 22px; }
.qr-fields.active { display: block; }
.qr-fields h3, .qr-options-panel h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.24rem; }
.qr-fields p, .qr-options-panel p { margin: 0 0 16px; color: var(--muted); line-height: 1.68; }
.qr-form label, .qr-reader label { display: flex; flex-direction: column; gap: 6px; color: #2f4664; font-weight: 800; font-size: 0.92rem; }
.qr-form input, .qr-form textarea, .qr-form select, .qr-reader input { width: 100%; border: 1px solid #c9d5e5; border-radius: 10px; padding: 10px 11px; color: var(--ink); background: #fbfdff; font: inherit; }
.qr-form textarea { resize: vertical; }
.qr-form input:focus, .qr-form textarea:focus, .qr-form select:focus, .qr-reader input:focus { outline: 2px solid rgba(242, 140, 56, 0.35); border-color: var(--orange); }
.qr-field-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.qr-field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qr-field-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qr-check { justify-content: center; min-height: 48px; }
.qr-check input { width: auto; margin-right: 8px; }
.qr-options-panel { border-top: 1px solid var(--line); padding-top: 22px; }
.qr-action-row, .qr-downloads, .qr-reader-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.qr-action-row button, .qr-downloads button, .qr-reader-row button { cursor: pointer; }
.qr-action-row button:disabled, .qr-downloads button:disabled { opacity: 0.55; cursor: not-allowed; }
.qr-preview-panel { position: sticky; top: 88px; }
.qr-preview-frame { background: linear-gradient(45deg, #eef3f9 25%, transparent 25%), linear-gradient(-45deg, #eef3f9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eef3f9 75%), linear-gradient(-45deg, transparent 75%, #eef3f9 75%); background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0; border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
#qr-canvas { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; background: #fff; border-radius: 12px; }
.qr-status { color: #4c6078; margin: 14px 0; }
.qr-status.error { color: #b42318; font-weight: 800; }
.qr-payload-box { margin-top: 16px; }
.qr-payload-box summary { background: #f2f6fb; }
.qr-payload-box pre, .qr-read-result { white-space: pre-wrap; word-break: break-word; border: 1px solid var(--line); border-radius: 12px; background: #0f213b; color: #f2f7ff; padding: 14px; overflow: auto; }
.qr-reader, .qr-roadmap { margin-top: 28px; }
.qr-reader-row label { flex: 1 1 320px; }
@media (max-width: 980px) {
  .qr-hero, .qr-type-panel, .qr-form { grid-template-columns: 1fr; }
  .qr-preview-panel { position: static; }
  .qr-field-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .qr-workbench { padding: 14px; }
  .qr-form-main, .qr-preview-panel { padding: 16px; }
  .qr-field-grid.two, .qr-field-grid.four { grid-template-columns: 1fr; }
  .qr-hero-art { max-height: 220px; }
}
