:root { color-scheme: light; --bg:#f5f6fa; --fg:#1d2230; --card:#fff; --line:#d5d9e4; --accent:#e53935; }
* { 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:1200px; 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:1200px; 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; }
label { display:block; font-weight:600; font-size:.9rem; margin-top:12px; }
input[type=text], input[type=search] { 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:200px; 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); }
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; }
.preview img { width:100%; height:auto; border:1px solid var(--line); border-radius:8px; background:#fff; }
.hint { font-size:.8rem; opacity:.7; margin:8px 0 0; }
.error { color:#d32f2f; font-size:.85rem; margin:4px 0 0; }

.right { display:flex; flex-direction:column; gap:16px; min-width:0; }
.pickerHead { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.tabs { display:flex; gap:4px; }
.tabs button { padding:6px 14px; border:2px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); font:inherit; cursor:pointer; }
.tabs button[aria-pressed=true] { border-color:var(--accent); font-weight:700; }
.pickerScroll { overflow:auto; border:1px solid var(--line); border-radius:8px; }
.pickerScroll svg { display:block; width:100%; min-width:900px; height:auto; }
.picker .booth { cursor:pointer; }
.picker .booth:hover rect { stroke:var(--accent); stroke-width:4; }

label.check { display:flex; align-items:center; gap:8px; margin-top:12px; font-weight:500; cursor:pointer; }

input[type=range] { width:100%; margin-top:4px; }
#arrowOut { font-weight:400; opacity:.7; margin-left:6px; }
