:root{color-scheme:dark;--bg:#151719;--panel:#202225;--line:#373a3f;--muted:#a2a7af;--yellow:#ffd02c}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#f5f5f5;font-family:Arial,'Noto Sans JP','Yu Gothic',sans-serif;font-size:14px}header{height:94px;border-bottom:1px solid var(--line);padding:20px 32px;display:flex;align-items:center;justify-content:space-between;gap:16px}header>div{display:flex;gap:15px;align-items:center}.mark{background:var(--yellow);color:#141414;font-size:35px;width:49px;text-align:center;border-radius:4px}small,.tag{font-size:10px;letter-spacing:2px;color:var(--yellow)}h1{font-size:19px;margin:6px 0}h2{font-size:29px;margin:10px 0}p{line-height:1.7;color:var(--muted)}main{display:grid;grid-template-columns:420px 1fr;max-width:1700px;margin:auto}aside{padding:28px;border-right:1px solid var(--line)}.intro p{font-size:13px;margin:0 0 22px;line-height:1.8}.data-actions{display:flex;gap:8px;margin:16px 0}.data-actions button{flex:1}button,input,select{font:inherit}button{border:1px solid #46494e;background:#2a2d31;color:#eee;padding:10px 13px;border-radius:6px;cursor:pointer}button:hover{border-color:var(--yellow)}button:disabled{opacity:.4;cursor:default}button.primary{background:var(--yellow);border:0;color:#181818;font-weight:bold;padding:14px 24px}details{border-top:1px solid var(--line);padding:19px 0}summary{cursor:pointer;font-weight:700;list-style:none;display:flex;justify-content:space-between}summary:after{content:'＋';color:var(--muted)}details[open]>summary:after{content:'−'}summary span{font-size:11px;color:var(--muted);font-weight:400}label{display:block;font-size:12px;color:#bcc0c5;margin-top:16px}input:not([type=range]):not([type=color]),select{display:block;background:#151719;border:1px solid #43464c;border-radius:5px;padding:10px;color:white;width:100%;margin-top:7px}input[type=color]{display:block;width:100%;height:35px;margin-top:7px;border:0;background:none}input[type=range]{width:100%;accent-color:var(--yellow);margin-top:8px}.hint,.privacy{font-size:11px}.move{background:var(--panel);border:1px solid var(--line);padding:13px;border-radius:7px;margin-top:15px}.move-top{display:flex;align-items:center;justify-content:space-between;color:var(--yellow);font-size:11px}.move-top button{padding:4px 8px;font-size:12px;margin-left:4px}.move label{margin-top:10px}.keys{display:flex;flex-wrap:wrap;gap:4px;margin-top:8px}.keys button{padding:5px 8px;min-width:30px;background:#363a40;font-size:12px}.keys .attack{color:#ffd02c}.wide{width:100%;margin-top:14px}.preview{padding:28px 40px;position:sticky;top:0;align-self:start;height:100vh;overflow:auto}.preview-bar{display:flex;justify-content:space-between;color:#989ea7;font-size:11px;letter-spacing:1px;margin-bottom:20px}.preview-bar i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--yellow);margin-right:7px}.mat{background:#0e1012;border:1px solid #373a3f;padding:22px;display:flex;justify-content:center;border-radius:4px}canvas{width:100%;max-width:670px;height:auto;display:block;box-shadow:0 16px 40px #0008;touch-action:none;cursor:move}.preview-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px;font-size:11px;color:var(--muted)}.preview-bottom button{font-size:11px}#status{font-size:12px}button:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--yellow);outline-offset:3px}@media(max-width:1000px){main{grid-template-columns:360px 1fr}.preview{padding:24px 18px}.mat{padding:10px}}@media(max-width:760px){header{padding:16px;height:auto}h1{font-size:14px}header .mark{display:none}header button.primary{padding:12px;font-size:12px}main{display:flex;flex-direction:column}.preview{position:relative;height:auto;order:-1;width:100%;padding:20px}canvas{max-height:60vh;width:auto;max-width:100%;object-fit:contain}.preview-bottom{flex-wrap:wrap}aside{border:0;width:100%;padding:20px}}



.action-feedback{position:sticky;top:0;z-index:20;background:#302c1d;border-bottom:1px solid #8b7840;padding:14px 28px;display:flex;align-items:center;gap:14px;flex-wrap:wrap}.action-feedback a{color:#ffdb62;text-decoration:underline}.action-feedback img{display:block;max-height:200px;max-width:180px}.action-feedback p{margin:0;color:#eee}.confirm-panel{position:fixed;inset:0;background:#000b;z-index:100;display:grid;place-items:center;padding:20px}.confirm-panel>div{max-width:500px;background:#24272c;border:1px solid #666;padding:24px;border-radius:8px}.confirm-panel p{color:white}.action-feedback[hidden],.confirm-panel[hidden]{display:none}

[hidden]{display:none!important}.project-data summary{font-size:13px;line-height:1.6;gap:8px}.project-data summary:after{flex-shrink:0}.project-data .hint{font-size:12px}.project-data-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0 0}.project-data-actions button{white-space:nowrap;min-height:42px;padding:10px 8px;font-size:13px}.site-footer{border-top:1px solid var(--line);padding:20px 28px;font-size:12px;color:var(--muted)}.site-footer a{color:#ddd;text-underline-offset:3px}.site-footer a:hover{color:var(--yellow)}.preview-bar{letter-spacing:0}

/* Color only the clickable summary; expanded content retains its existing background. */
details>summary{color:#f2f3f5;background:#303640;border:1px solid #596270;border-radius:6px;padding:12px 14px;align-items:center;gap:12px;transition:background-color .15s ease,border-color .15s ease}
details[open]>summary{color:#fff4c5;background:#514829;border-color:#9b853d}
details>summary:hover{background:#3b4350;border-color:#8290a4}
details[open]>summary:hover{background:#615532;border-color:#c4a84d}
details>summary:after{content:'開く';color:inherit;font-size:11px;font-weight:400;white-space:nowrap;flex-shrink:0}
details[open]>summary:after{content:'閉じる'}
.generator-nav{display:flex;gap:8px;padding:12px 28px;border-bottom:1px solid var(--line);flex-wrap:wrap}.generator-nav a{display:block;color:#c2c8d0;padding:9px 14px;border:1px solid #4a515b;border-radius:5px;text-decoration:none;font-size:13px}.generator-nav a[aria-current=page]{background:#514829;border-color:#9b853d;color:#fff4c5}.reset-actions{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:8px;margin-top:14px}.reset-actions button{padding:10px 6px;font-size:12px;white-space:nowrap}
.preview{top:12px;height:calc(100dvh - 180px);min-height:280px;display:flex;flex-direction:column;overflow:visible;padding:20px 28px}.preview-bar{flex:0 0 auto;margin-bottom:12px}.mat{flex:1 1 0;min-height:0;align-items:center;padding:14px;overflow:hidden}.mat canvas{flex:0 0 auto;max-width:100%;max-height:100%;object-fit:contain}.preview #status{flex:0 0 auto;min-height:20px;margin:10px 0 0}.preview-bottom:empty{display:none}
@media(max-width:760px){.generator-nav{padding:10px 16px;gap:6px}.generator-nav a{padding:8px 10px;font-size:12px}.preview{height:58dvh;min-height:260px;top:auto;padding:16px}.mat{padding:10px}.mat canvas{max-height:100%}}

.background-settings{display:grid;grid-template-columns:minmax(0,1fr) 96px;gap:12px;align-items:start;margin-bottom:12px}.background-settings label{min-width:0}.background-settings input[type=file]{font-size:11px;padding:8px}.background-settings input[type=color]{height:38px}
