:root { color-scheme: light; font-family: system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color: #182235; background: #f3f5fa; line-height: 1.6; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; padding: 36px 16px; }
.generator { max-width: 620px; margin: auto; padding: 32px; background: #fff; border: 1px solid #dce1ea; border-radius: 20px; }
header { margin-bottom: 24px; }
.eyebrow { color: #4338ca; font-size: 13px; font-weight: 600; letter-spacing: .08em; }
h1 { font-size: 26px; margin: 8px 0; }
h2 { font-size: 18px; margin: 24px 0 12px; }
p { margin: 8px 0; }
.muted { color: #586475; }
.small { font-size: 13px; }
.notice { margin: 20px 0; padding: 12px 16px; background: #fff8e7; border-left: 3px solid #b78326; border-radius: 4px; font-size: 14px; }
label, legend { font-size: 14px; font-weight: 600; }
input[type="text"], textarea { width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #aeb8c7; border-radius: 8px; background: #fff; color: inherit; font: inherit; }
textarea { resize: vertical; min-height: 100px; overflow-wrap: anywhere; font-size: 13px; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #818cf8; outline-offset: 3px; }
fieldset { padding: 0; border: 0; margin: 22px 0; }
.color-options { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.color-options label { display: flex; align-items: center; gap: 4px; padding: 4px 0; font-weight: 400; cursor: pointer; }
input[type="radio"] { accent-color: #4338ca; }
button, .button { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border: 1px solid transparent; border-radius: 8px; background: #4338ca; color: #fff; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #3730a3; }
button:disabled { cursor: wait; opacity: .65; }
#generateBtn { width: 100%; }
.secondary { color: #3730a3; background: #eef2ff; border-color: #c7d2fe; }
.secondary:hover { background: #e0e7ff; }
.actions { display: flex; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.status { min-height: 24px; font-size: 14px; overflow-wrap: anywhere; }
.status[data-type="error"] { color: #a32424; }
.status[data-type="success"] { color: #065f46; }
#qrcode { width: max-content; max-width: 100%; margin: 24px auto 8px; padding: 20px; background: #fff; }
#qrcode img, #qrcode canvas { max-width: 100%; height: auto; }
#qrStatus { text-align: center; }
footer { border-top: 1px solid #e2e6ee; padding-top: 20px; margin-top: 28px; }
a { color: #3730a3; }
.viewer { padding: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.viewer-header { padding: 12px 20px; margin: 0; background: #fff; border-bottom: 1px solid #dce1ea; flex-shrink: 0; max-height: 50vh; overflow: auto; }
.viewer-title { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.viewer-title a { font-size: 13px; }
.target-address { font-family: ui-monospace, monospace; font-size: 13px; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.frame-host { flex: 1; min-height: 120px; }
.content { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 480px) { body { padding: 16px 10px; } .generator { padding: 22px 18px; } h1 { font-size: 24px; } .viewer-header { padding: 12px; } }
