:root{font-family:Inter,Arial,sans-serif;color:#282039;background:#faf7ef;color-scheme:light;--line:#e2dbea;--muted:#544d61;--accent:#5840a4}
*{box-sizing:border-box}body{margin:0}header{background:#faf7ef;border-bottom:1px solid var(--line)}
.shell{width:min(1100px,calc(100% - 40px));margin-inline:auto}.masthead{display:flex;align-items:center;gap:16px;height:66px}.brand{font-weight:900;letter-spacing:-.07em;font-size:30px}.section-name{border-left:1px solid var(--line);padding-left:16px;font-weight:650}.stage{margin-left:auto;font-size:.82rem;color:var(--muted)}
.intro{margin:40px 0 24px}h1{font-size:clamp(2rem,5vw,3.5rem);letter-spacing:-.065em;margin:0 0 8px}h2{font-size:1.15rem;letter-spacing:-.02em;margin:0}p{margin:0;color:var(--muted);line-height:1.5}
.studio{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:18px}.card{background:#fffcf7;border:1px solid var(--line);border-radius:24px;overflow:hidden}
.visual{display:flex;flex-direction:column}.section-bar,.preview-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 20px}.preview-footer{font-size:.79rem;color:var(--muted);flex-wrap:wrap}
#viewer{flex:1;min-height:340px;position:relative;background:radial-gradient(ellipse at 50% 44%,#f5ecff,#e0d4fa);display:grid;place-items:center}
#viewer canvas{position:absolute;width:100%;height:100%;outline-offset:-4px;cursor:grab;touch-action:none}#viewer canvas:active{cursor:grabbing}
.controls{padding:22px;display:grid;align-content:start;gap:9px}.controls h2{margin-bottom:4px}label,legend{font-weight:650;font-size:.9rem}input,select,button{font:inherit}input[type=text],input[type=password],input:not([type]),select{width:100%;padding:10px 11px;border:1px solid #a89db9;border-radius:8px;background:#fff;color:inherit}small{font-size:.78rem;color:var(--muted)}#error:not(:empty){color:#8c281c}
.colors{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:4px}.colors label{display:flex;align-items:center;justify-content:space-between;gap:5px;border:1px solid var(--line);border-radius:8px;padding:5px 8px;cursor:pointer}.colors label.selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}input[type=color]{cursor:pointer;width:39px;height:31px;background:none;border:0;padding:0}hr{border:0;border-top:1px solid var(--line);width:100%;margin:9px 0}
button{border:1px solid #a89db9;background:#fffcf7;color:inherit;border-radius:8px;padding:8px 12px;cursor:pointer}button.primary{background:var(--accent);color:white;border-color:var(--accent);font-weight:700}button:disabled{opacity:.55;cursor:default}:focus-visible{outline:3px solid #5840a4;outline-offset:3px}
.simulation{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.sim-controls{padding:24px}.sim-controls p{margin:8px 0 15px}fieldset{margin:0 0 14px;padding:8px 12px 10px;border:1px solid var(--line);border-radius:8px;width:fit-content}fieldset label+label{margin-left:10px}.mute{display:inline-flex;align-items:center;margin-left:10px;gap:4px}
.phone-stage{position:relative;display:grid;place-items:center;background:#eee6fa;overflow:hidden;padding:18px;min-height:250px}.phone{width:min(258px,100%);min-height:202px;border:5px solid #282021;border-radius:24px;padding:12px;background:linear-gradient(135deg,#e5d3fa,#8c74c7);box-shadow:0 7px 20px #21160735}.phone[data-device=iphone]{background:linear-gradient(135deg,#f3d5c2,#ac7caa)}.camera{height:8px;width:8px;border-radius:10px;background:#282021;margin:0 auto 14px}.phone[data-device=iphone] .camera{width:49px}#prompt{background:#fff9f2;border-radius:12px;padding:12px;font-size:.82rem}#prompt strong,#prompt span{display:block;overflow-wrap:anywhere}#exact-url{margin:5px 0;color:var(--muted);max-height:65px;overflow:auto}#open-link{display:inline-block;color:#5840a4;padding:4px 0;font-weight:650}.tap-token{pointer-events:none;position:absolute;right:13%;bottom:15px;background:#f3b26a;color:#282039;border-radius:10px;padding:10px 15px;opacity:0}.scanning .tap-token{animation:tap .45s ease both}@keyframes tap{0%{opacity:0;transform:translate(45px,20px) rotate(-14deg)}50%{opacity:1}100%{opacity:0;transform:translate(-22px,-42px) rotate(-14deg)}}footer{padding:20px 0 40px;color:var(--muted);font-size:.82rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:730px){.studio,.simulation{grid-template-columns:1fr}.intro{margin-top:26px}#viewer{min-height:300px}}
@media(prefers-reduced-motion:reduce){.scanning .tap-token{animation:none}}

.brand { color: inherit; text-decoration: none; }
.brand span { color: #bf684f; }
.intro h1 { font-weight: 900; font-size: clamp(2.85rem, 7vw, 5.3rem); line-height: .98; }
.intro h1 em { color: var(--accent); font-style: normal; }
.intro { padding-block: 12px; }
.section-name { white-space: nowrap; }
.stage { text-align: right; }
.card { box-shadow: 0 5px 18px #3020480b; }
button, button.primary { border-radius: 999px; font-weight: 750; }
button.primary { padding: 11px 17px; }
#record-fields { display: grid; gap: 8px; min-width: 0; }
#record-note:empty, #error:empty, #domain:empty, #open-link[hidden] { display: none; }
#exact-url { white-space: pre-wrap; }
@media(max-width:380px) { .section-name { white-space: normal; } .masthead { gap: 11px; } .section-name { padding-left: 11px; } }
