.page-editor{height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}.page-editor #app{display:contents}.editor{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,440px)}.editor-preview{display:flex;flex-direction:column;min-height:0;padding:16px;gap:10px;background:var(--bg-3)}.preview-frame{position:relative;flex:1 1 auto;min-height:0;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line)}.preview-frame>.bw-stage{position:absolute;inset:0}.preview-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.url-field{flex:1 1 200px;min-width:0;font-family:var(--mono);font-size:12.5px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);color:var(--fg)}.preview-bar .btn-icon,.url-field{padding:8px 10px}.url-count{font-size:12.5px;color:var(--muted);font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.url-count.warn{color:var(--warn)}.url-count.over{color:var(--danger);font-weight:600}.editor-controls{overflow-y:auto;border-left:1px solid var(--line);background:var(--bg);padding:4px 0 40px}.group{border-bottom:1px solid var(--line);padding:14px 18px}.group>h3,.group>summary{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:700;margin:0 0 10px;cursor:default;list-style:none}details.group>summary{cursor:pointer;margin:0;display:flex;align-items:center;justify-content:space-between}details.group>summary::-webkit-details-marker{display:none}details.group>summary:after{content:"+";font-size:16px;line-height:1}details.group[open]>summary{margin-bottom:10px}details.group[open]>summary:after{content:"−"}.group .dotset:before{content:"";display:inline-block;width:8px;height:8px;margin-right:7px;vertical-align:1px;border-radius:2px;background:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-edge)}.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.row>label.lbl{min-width:82px;font-size:14px;color:var(--muted)}.check .opt,.lbl .opt{display:block;font-size:11.5px;opacity:.8}.check .opt{display:inline;color:var(--muted)}.check .opt:before{content:"("}.check .opt:after{content:")"}.page-editor input[type=datetime-local],.page-editor input[type=email],.page-editor input[type=number],.page-editor input[type=tel],.page-editor input[type=text],.page-editor input[type=url],.page-editor select,.page-editor textarea{font:inherit;font-size:14px;color:var(--fg);background:var(--bg-2);border:1px solid var(--line);border-radius:8px;padding:7px 9px;min-width:0}@media (pointer:coarse){.page-editor input[type=datetime-local],.page-editor input[type=email],.page-editor input[type=number],.page-editor input[type=tel],.page-editor input[type=text],.page-editor input[type=url],.page-editor select,.page-editor textarea{font-size:16px}}.page-editor button:focus-visible,.page-editor input:focus-visible,.page-editor select:focus-visible,.page-editor textarea:focus-visible{outline:2px solid var(--accent-edge);outline-offset:1px}.page-editor input:disabled,.page-editor select:disabled{opacity:.45}.page-editor textarea{width:100%;resize:vertical;min-height:96px;font-family:var(--mono);line-height:1.45}.page-editor textarea.zero-msg{min-height:0}.page-editor input[type=number]{width:84px}.grow{flex:1 1 140px}.page-editor input[type=color]{width:38px;height:34px;padding:2px;border:1px solid var(--line);border-radius:8px;background:var(--bg-2)}.check{display:inline-flex;align-items:center;gap:6px;font-size:14px;cursor:pointer}.hint{color:var(--muted)}.advisory,.hint{font-size:13px;margin:6px 0 0}.advisory{color:var(--warn);padding:8px 10px;border:1px solid;border-radius:8px}.advisory[hidden],.hint[hidden]{display:none}.font-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:6px}.font-btn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:8px 10px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);color:var(--fg);cursor:pointer;text-align:left}.font-btn .sample{font-size:24px;line-height:1.1}.font-btn .name{font-size:11.5px;color:var(--muted);font-family:var(--sans)}.font-btn[aria-pressed=true]{background:var(--accent);border-color:var(--accent-edge);color:var(--accent-fg)}.font-btn[aria-pressed=true] .name{color:var(--accent-fg);opacity:.75}.kind-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}.kind-btn{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:10px 12px;border-radius:8px;border:1px solid var(--line);background:var(--bg-2);color:var(--fg);font:inherit;cursor:pointer;text-align:left}.kind-btn .title{font-size:15px;font-weight:600}.kind-btn .desc{font-size:12px;line-height:1.35;color:var(--muted)}.kind-btn[aria-pressed=true]{background:var(--accent);border-color:var(--accent-edge);color:var(--accent-fg)}.kind-btn[aria-pressed=true] .desc{color:var(--accent-fg);opacity:.75}.kind-panel{margin:8px 0 12px;padding:2px 0 4px 10px;border-left:3px solid var(--accent-edge)}.kind-panel .row>label.lbl{min-width:69px}.chips{display:flex;flex-wrap:wrap;gap:6px}.chip{font:inherit;font-size:13px;padding:4px 10px;border-radius:999px;border:1px solid var(--line);background:var(--bg-2);color:var(--fg);cursor:pointer}.chip[aria-pressed=true]{background:var(--accent);border-color:var(--accent-edge);color:var(--accent-fg)}.slides{list-style:none;margin:8px 0 0;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:4px}.slides li{display:flex;align-items:center;gap:6px;background:var(--bg-2);border:1px solid var(--line);border-radius:8px;padding:4px 4px 4px 10px}.slides .icon-btn,.slides .n{flex:none}.slides .n{font-size:12px;color:var(--muted);width:1.5em}.slides .txt{flex:1 1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13.5px;font-family:var(--mono);border:0;color:var(--fg);text-align:left;padding:4px 0}.icon-btn,.slides .txt{background:none;cursor:pointer}.icon-btn{font:inherit;font-size:13px;width:28px;height:28px;border-radius:6px;border:1px solid transparent;color:var(--muted)}.icon-btn:hover:not(:disabled){color:var(--fg);border-color:var(--line)}.icon-btn:disabled{opacity:.3;cursor:default}.cheats{width:100%;border-collapse:collapse;font-size:13px;margin-top:6px}.cheats td{padding:4px 6px;border-bottom:1px solid var(--line)}.cheats td:first-child{font-family:var(--mono);white-space:nowrap}.mini-details>summary{cursor:pointer;font-size:13.5px;color:var(--muted);margin-top:8px}.pad-sides{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.pad-sides label{display:flex;flex-direction:column;font-size:12px;color:var(--muted);gap:2px}.pad-sides input[type=number]{width:100%}@media (max-width:860px){html:has(body.page-editor){scroll-padding-top:calc(var(--editor-pane-h, 46vh) + 12px)}html.editor-typing:has(body.page-editor){scroll-padding-top:calc(var(--editor-pane-typing-h, 30vh) + 12px)}html.editor-typing .editor-preview{height:var(--editor-pane-typing-h,30vh);align-items:center}html.editor-typing .preview-frame{flex:none;width:var(--editor-frame-w);height:var(--editor-frame-h);transform:scale(var(--editor-frame-scale,1));transform-origin:top center;margin-bottom:calc(var(--editor-frame-h) * (var(--editor-frame-scale, 1) - 1))}html.editor-typing .editor-preview>.advisory,html.editor-typing .preview-bar{display:none}.page-editor{height:auto;overflow:visible}.editor{grid-template-columns:minmax(0,1fr)}.editor-preview{position:sticky;top:0;z-index:5;height:var(--editor-pane-h,46vh);padding:10px}.editor-controls{border-left:0;overflow:visible}}@media (max-width:600px){.url-field{flex-grow:1;flex-shrink:1;flex-basis:calc(100% - 50px)}.url-count{margin-right:auto}}.qr-dialog{width:min(360px,calc(100vw - 32px));padding:20px;border:1px solid var(--line);border-radius:var(--radius);background:var(--bg-2);color:var(--fg)}.qr-dialog::backdrop{background:rgb(0 0 0/.6)}.qr-dialog h2{margin:0 0 14px;font-size:18px}.qr-code svg{display:block;width:100%;height:auto}.qr-dialog .hint{margin:12px 0 0}.qr-actions{display:flex;justify-content:flex-end;margin-top:16px}.template-entry-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.template-launch{background:var(--accent);border-color:var(--accent-edge);color:var(--accent-fg);padding:8px 16px}.template-dialog{width:min(900px,calc(100vw - 28px));max-height:calc(100dvh - 40px);border:1px solid var(--line);border-radius:16px;background:var(--bg);color:var(--fg);padding:24px;overscroll-behavior:contain}.template-dialog::backdrop{background:rgb(0 0 0/.55)}.template-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.template-heading h2{margin:0;font:600 24px/1.3 var(--sans)}.template-dialog .template-search{width:100%;font:14px var(--sans);color:var(--fg);background:var(--bg-2);border:1px solid var(--line);border-radius:8px;padding:10px 12px;margin:18px 0 12px}.template-filters{margin-bottom:18px}.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.template-card{padding:0 0 12px;overflow:hidden;text-align:start;border:1px solid var(--line);border-radius:10px;background:var(--bg-2);color:var(--fg);cursor:pointer;min-width:0}.template-card:hover{border-color:var(--accent-edge)}.template-card:focus-visible{outline:2px solid var(--accent-edge);outline-offset:2px}.template-thumb{height:140px;width:100%;pointer-events:none}.template-card-title{display:block;font:600 13px var(--sans);padding:12px 12px 4px}.template-card-category{display:block;font:11px var(--sans);color:var(--muted);padding:0 12px}@media(max-width:600px){.template-dialog{padding:16px}.template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.template-thumb{height:110px}.template-heading h2{font-size:20px}}.birthday-editor-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.birthday-editor-heading h3{margin:0}.birthday-badge{font:11px var(--sans);letter-spacing:1px;color:var(--accent-edge);border:1px solid var(--line);border-radius:20px;padding:5px 9px}.birthday-editor .row{margin-top:14px;align-items:center}.birthday-editor input[type=text],.birthday-editor select{min-width:0;flex:1 1;width:100%}.birthday-photo-tools{padding:6px 14px 14px;margin-top:20px;border:1px solid var(--line);border-radius:12px;background:var(--bg-2)}.birthday-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.birthday-photo-tools input[type=file]{font-size:12px;width:100%;min-width:0}.birthday-editor input[type=range]{min-width:0;flex:1 1;accent-color:var(--accent)}.birthday-editor[hidden],.standard-controls[hidden]{display:none!important}.birthday-shortcut{margin-inline-start:auto}