
  .qr-container { max-width: 1180px; }
  .qr-head h1 { margin-bottom: 6px; }
  #tool-qr [hidden] { display: none !important; }
  #tool-qr button { min-width: 0; margin: 0; transform: none; }
  .qr-work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 28px; align-items: start; }
  .qr-work > * { min-width: 0; }
  @media (max-width: 920px) { .qr-work { grid-template-columns: 1fr; } .qr-right { order: -1; } }
  .qr-card { padding: 16px; margin: 0 0 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
  .qr-h { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.02rem; font-weight: 800; }
  .qr-adv > summary { margin: 0; cursor: pointer; list-style: none; }
  .qr-adv > summary::-webkit-details-marker { display: none; }
  .qr-adv > summary::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
  .qr-adv[open] > summary { margin-bottom: 14px; } .qr-adv[open] > summary::after { transform: rotate(225deg); }
  .qr-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); font-size: .82rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
  .qr-types { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; }
  @media (max-width: 560px) { .qr-types { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  #tool-qr .qr-type { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 8px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--muted); font-size: .76rem; font-weight: 700; line-height: 1.15; box-shadow: none; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
  #tool-qr .qr-type svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  #tool-qr .qr-type:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
  #tool-qr .qr-type[aria-selected="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--bg)); }
  .qr-f { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; animation: qrIn .16s ease; }
  @keyframes qrIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
  @media (max-width: 520px) { .qr-f { grid-template-columns: 1fr; } }
  .qr-fld { display: grid; gap: 4px; align-content: start; font-size: .84rem; color: var(--muted); }
  .qr-wide { grid-column: 1 / -1; }
  .qr-tg { align-content: end; }
  #tool-qr input[type=text], #tool-qr input[type=url], #tool-qr input[type=email], #tool-qr input[type=tel], #tool-qr input[type=datetime-local], #tool-qr textarea, #tool-qr select { width: 100%; box-sizing: border-box; margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; }
  #tool-qr textarea { resize: vertical; min-height: 64px; }
  #tool-qr input:focus-visible, #tool-qr textarea:focus-visible, #tool-qr select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
  #tool-qr input[type=color] { flex: none; width: 40px; height: 36px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); cursor: pointer; }
  #tool-qr input[type=color]:disabled { opacity: .4; cursor: not-allowed; }
  .qr-hint { margin: 0; color: var(--muted); font-size: .83rem; line-height: 1.45; }
  .qr-sec { margin: 0 0 16px; } .qr-sec:last-child { margin-bottom: 0; }
  .qr-lbl { font-size: .8rem; font-weight: 700; color: var(--muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
  .qr-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  @media (max-width: 560px) { .qr-row2 { grid-template-columns: 1fr; } }
  .qr-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
  #tool-qr .qr-swatch { width: 34px; height: 34px; padding: 0; border: 2px solid var(--border); border-radius: 10px; background: linear-gradient(135deg, var(--a) 0 50%, var(--b) 50% 100%); box-shadow: none; cursor: pointer; transition: transform .12s; }
  #tool-qr .qr-swatch:hover { transform: translateY(-2px); }
  .qr-cols { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 6px; }
  .qr-col { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
  .qr-togs { display: flex; flex-wrap: wrap; gap: 0 20px; }
  .qr-tog { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: .9rem; color: var(--text); }
  .qr-tog input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; margin: 0; }
  .qr-sw { flex: 0 0 auto; position: relative; width: 36px; height: 21px; border-radius: 99px; background: color-mix(in srgb, var(--text) 22%, transparent); transition: background .15s; }
  .qr-sw::after { content: ""; position: absolute; top: 2.5px; left: 2.5px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s; }
  .qr-tog input:checked + .qr-sw { background: var(--accent); }
  .qr-tog input:checked + .qr-sw::after { transform: translateX(15px); }
  .qr-tog input:focus-visible + .qr-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
  .qr-seg { display: flex; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--bg); }
  #tool-qr .qr-seg button { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 700; box-shadow: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #tool-qr .qr-seg button svg { width: 26px; height: 26px; fill: currentColor; }
  #tool-qr .qr-seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
  .qr-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; }
  .qr-thumb:empty { display: none; }
  .qr-thumb img { display: block; width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
  .qr-range { display: grid; gap: 4px; margin: 0 0 8px; font-size: .84rem; color: var(--muted); }
  .qr-range input { width: 100%; accent-color: var(--accent); }
  .qr-capr { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; margin-top: 12px; }
  .qr-capr .qr-fld { flex: 1 1 200px; }
  .qr-right { position: sticky; top: 80px; }
  @media (max-width: 920px) { .qr-right { position: static; } }
  .qr-stage { display: flex; justify-content: center; align-items: center; padding: 22px; border-radius: 18px; background: repeating-conic-gradient(color-mix(in srgb, var(--text) 7%, transparent) 0 25%, transparent 0 50%) 0 0 / 18px 18px; border: 1px solid var(--border); }
  .qr-preview { width: 100%; max-width: 340px; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
  .qr-preview svg { display: block; max-width: 100%; max-height: 100%; width: 100%; height: auto; filter: drop-shadow(0 6px 18px rgba(0,0,0,.18)); }
  @media (max-width: 920px) { .qr-preview { max-width: 230px; } .qr-stage { padding: 14px; } }
  .qr-empty { display: grid; justify-items: center; gap: 10px; color: var(--muted); text-align: center; font-size: .92rem; padding: 20px; }
  .qr-empty svg { width: 64px; height: 64px; fill: currentColor; opacity: .35; }
  .qr-bad { color: var(--error, #d92d20); }
  .qr-meta { min-height: 1.3em; margin: 10px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
  .qr-warn { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, #F59E0B 55%, var(--border)); background: color-mix(in srgb, #F59E0B 12%, var(--card)); font-size: .85rem; line-height: 1.45; }
  .qr-warn p { margin: 0; } .qr-warn p + p { margin-top: 5px; }
  .qr-dl { display: grid; gap: 8px; margin: 14px 0 0; }
  .qr-dlrow { display: flex; gap: 8px; }
  .qr-dlrow > button { flex: 1 1 0; }
  .qr-dlrow select { flex: 0 0 112px; width: 112px !important; }
  .qr-cm { flex: 0 0 112px; display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
  .qr-cm input { text-align: right; }
  #qrmsg { min-height: 1.4em; margin-top: 10px; text-align: center; font-weight: 600; font-size: .9rem; }
  #qrmsg.ok { color: var(--ok, #1a7f4b); } #qrmsg.error { color: var(--error, #d92d20); }
  .qr-note { margin: 6px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; text-align: center; }
