:root { color-scheme: light; --bg:#f3f0ea; --fg:#22222a; --card:#fff; --line:#d8d2c6; --accent:#d93a5a; }
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--fg); font-family:'Hiragino Sans','Yu Gothic','Noto Sans JP',sans-serif; line-height:1.6; }
header, footer { padding:16px; max-width:1280px; margin:0 auto; }
h1 { margin:0 0 4px; font-size:1.4rem; }
main { display:grid; grid-template-columns:minmax(300px,380px) 1fr; gap:16px; max-width:1280px; margin:0 auto; padding:0 16px 16px; }
@media (max-width:820px) { main { grid-template-columns:1fr; } }
.panel, .preview { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; min-width:0; }
label { display:block; font-weight:600; font-size:.9rem; margin-top:12px; }
input[type=text], input[type=search], select { width:100%; padding:10px; margin-top:4px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); font-size:1rem; }
.results { list-style:none; margin:4px 0 0; padding:0; max-height:220px; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.results:empty { display:none; }
.results button { display:block; width:100%; text-align:left; padding:8px 10px; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--fg); font:inherit; cursor:pointer; }
.results button:hover, .results button:focus { background:var(--bg); }
.results small { opacity:.7; }
fieldset { border:1px solid var(--line); border-radius:8px; margin:16px 0 0; padding:8px 12px 12px; }
.themes { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.themes label { margin:0; font-weight:500; border:2px solid var(--line); border-radius:8px; padding:8px; cursor:pointer; }
.themes input { margin-right:6px; }
.themes label:has(input:checked) { border-color:var(--accent); }
label.check { display:flex; align-items:center; gap:8px; font-weight:500; cursor:pointer; }
button.sub { margin-top:10px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); font:inherit; cursor:pointer; }
button#save { width:100%; margin-top:16px; padding:14px; border:0; border-radius:10px; background:var(--accent); color:#fff; font-size:1.05rem; font-weight:700; cursor:pointer; }
button#save:disabled { opacity:.5; cursor:not-allowed; }
.right { display:flex; flex-direction:column; gap:16px; min-width:0; }
#preview svg { display:block; width:100%; height:auto; border:1px solid var(--line); border-radius:8px; }
#preview [data-part="window"] { cursor:grab; touch-action:none; }
#preview.dragging [data-part="window"] { cursor:grabbing; }
.pickerScroll { overflow:auto; border:1px solid var(--line); border-radius:8px; margin-top:8px; }
.pickerScroll svg { display:block; width:100%; min-width:900px; height:auto; }
.picker .hit { fill:transparent; cursor:pointer; }
.picker .hit:hover { fill:rgba(217,58,90,.18); stroke:var(--accent); stroke-width:6; }
.picker .sel { fill:rgba(217,58,90,.2); stroke:var(--accent); stroke-width:10; }
.hint { font-size:.8rem; opacity:.7; margin:8px 0 0; }
.error { color:#c62828; font-size:.85rem; margin:4px 0 0; }
[hidden] { display: none !important; }
input[type=range] { width:100%; margin-top:4px; }
#scaleOut { font-weight:400; opacity:.7; margin-left:6px; }
