:root{--oshi:#d24a69;--oshi-ink:#fff;--oshi-soft:#fdf0f3;--oshi-border:#f3c8d2;--oshi-text:#9e2a47}
*{box-sizing:border-box}body{margin:0;background:linear-gradient(180deg,var(--oshi-soft) 0%,#F6F3EF 280px);color:#1F1D1B;font-family:"Zen Maru Gothic","Zen Kaku Gothic New",system-ui,-apple-system,sans-serif}header,main{max-width:1200px;margin:auto;padding:20px}header a{color:#C93A22}h1{font-size:clamp(1.5rem,3vw,2.2rem);margin:.5em 0}h2{font-size:1.1rem}p{line-height:1.6}small,.hint{color:#66615C}.badge{display:inline-block;background:var(--oshi-soft);border-radius:99px;padding:5px 12px;font-size:.8rem}main{display:grid;grid-template-columns:1fr 1fr;gap:24px}.panel{background:white;border:1px solid #e6dfd8;border-radius:16px;padding:24px;box-shadow:0 8px 25px #1F1D1B0b}label{display:block;font-weight:650;margin:16px 0 6px}input,textarea,select{font:inherit;width:100%;padding:10px;border:1px solid #bec7ce;border-radius:9px;color:#1F1D1B;background:white}input[type=checkbox]{width:auto}button,.file{font:inherit;border:1px solid var(--oshi);border-radius:10px;padding:10px 14px;background:white;color:var(--oshi-text);cursor:pointer}button.primary{background:var(--oshi);border-color:var(--oshi);color:var(--oshi-ink)}button:disabled{opacity:.45;cursor:not-allowed}.row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.row>*{flex:1}.file{display:inline-block;text-align:center}.file input{position:absolute;width:1px;height:1px;opacity:0}.tabs{display:none}canvas{width:100%;height:auto;border-radius:12px;background:var(--oshi-soft);touch-action:manipulation}.list{display:grid;gap:8px;margin-top:14px}.item{display:flex;align-items:center;gap:8px;background:#F6F3EF;padding:10px;border-radius:10px}.item button{padding:6px 9px}.item span{flex:1}.notice{min-height:1.5em;color:var(--oshi-text)}.footer{margin-top:20px;border-top:1px solid #eee;padding-top:12px}.mobile-actions{display:none}@media(max-width:700px){header,main{padding:16px}main{display:block;padding-bottom:95px}.panel{padding:18px}.tabs{display:flex;gap:8px;margin:12px 0}.tabs button{flex:1}.tabs button.active{background:#1F1D1B;color:white;border-color:#1F1D1B}.panel.hidden{display:none}.mobile-actions{display:flex;position:fixed;bottom:0;left:0;right:0;background:white;padding:12px 16px;border-top:1px solid #e6dfd8;z-index:2}.mobile-actions button{width:100%}}.row>*{min-width:0}.item{flex-wrap:wrap}.item select{width:auto;min-width:110px;flex:1}.item button{min-height:44px}
.site-brand{display:inline-flex;align-items:center;gap:.5rem;font-weight:700;text-decoration:none}.footer{max-width:1200px;margin:20px auto;padding:20px}

#edit h2{border-left:4px solid var(--oshi);padding-left:.6em}

.ep-sample-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:10px 0 14px}
.ep-sample-btn{min-height:44px;padding:8px 16px;border:1px solid var(--oshi);border-radius:999px;background:#fff;color:var(--oshi-text);font-weight:650}
.ep-sample-btn:hover{background:var(--oshi-soft)}

.ep-choice-group{border:0;margin:14px 0 6px;padding:0}
.ep-choice-group legend{font-weight:650;margin-bottom:8px;padding:0}
.ep-choices{display:flex;flex-wrap:wrap;gap:8px}
.ep-choice-btn{min-height:44px;padding:8px 14px;border:1px solid #d4cbc4;border-radius:10px;background:#fff;color:#302b32;font-weight:600;cursor:pointer}
.ep-choice-btn[aria-pressed="true"]{background:var(--oshi);color:var(--oshi-ink);border-color:var(--oshi)}

.ep-swatches{border:0;margin:14px 0 4px;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px}.ep-swatches legend{font-weight:650;margin-bottom:6px;padding:0}.ep-swatch{width:44px;height:44px;min-width:44px;padding:0;border:2px solid #fff;border-radius:22px;background:var(--swatch);box-shadow:0 0 0 1px #c8bfb7;cursor:pointer}.ep-swatch[aria-pressed="true"]{box-shadow:0 0 0 2.5px #1f1d1b}.ep-swatches .ep-swatch-other{margin:0 0 0 4px;font-weight:500;font-size:14px}.ep-swatches input[type=color]{width:52px;min-width:52px;padding:2px}
@media(max-width:700px){#edit>.hint{display:none}}

/* 立ち絵の選択：先頭近くに置き、ボタンで選ぶ */
.ep-photo{margin:14px 0 6px}.ep-photo-title{display:block;font-weight:650;margin-bottom:8px}.ep-photo-actions{display:flex;flex-wrap:wrap;gap:8px}.ep-photo-actions button{min-height:44px;padding:10px 16px}.ep-photo-pick{background:#b32f1b;border-color:#b32f1b;color:#fff}.ep-photo-actions button[hidden]{display:none}.ep-photo .hint{margin:6px 0 0;min-height:0}.ep-photo .hint:empty{display:none}
.ep-fit-group{margin-top:10px}

.ep-logo-toggle{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin:12px 0 4px;font-weight:600;cursor:pointer}
.ep-logo-toggle input[type=checkbox]{width:20px;height:20px;accent-color:#C93A22;margin:0}

#new{margin-top:8px}

.character-extras{margin-block:16px}.character-extras summary{min-height:44px;align-content:center;cursor:pointer}

#pick-photo.ep-photo-pick{background:#fff;color:#c0341d;border:1px solid #c0341d}

.ep-custom-fields{margin:16px 0;padding:12px 14px;border:1px solid #e6dfd8;border-radius:12px;background:#faf7f4}
.ep-custom-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.ep-custom-title{font-weight:650;font-size:.95rem}
.ep-add-custom-btn{min-height:44px;padding:8px 14px;border-radius:10px;font-weight:650}
.ep-custom-list{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.ep-custom-list:empty{margin-top:0}
.ep-custom-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:8px;padding:10px;border:1px solid #e6dfd8;border-radius:10px;background:#fff}
.ep-custom-row-inputs{display:flex;flex-direction:column;gap:6px;min-width:0}
.ep-custom-remove{min-height:44px;width:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border:1px solid #d4cbc4;border-radius:10px;background:#fff;color:#5a524c;font-weight:700}

.ep-radar-box{margin:16px 0;padding:12px 14px;border:1px solid var(--oshi-border);border-radius:12px;background:#fff}
.ep-radar-toggle{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;font-weight:650;cursor:pointer}
.ep-radar-toggle input[type=checkbox]{width:20px;height:20px;accent-color:var(--oshi);margin:0}
.ep-radar-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.ep-radar-list[hidden]{display:none}
.ep-radar-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ep-radar-label{flex:1;min-width:96px}
.ep-radar-stars{display:inline-flex;gap:4px}
.ep-star-btn{min-width:36px;min-height:36px;padding:0 6px;border:1px solid #d4cbc4;border-radius:8px;background:#fff;color:#8a7f78;font-weight:700;line-height:1}
.ep-star-btn[aria-pressed="true"]{background:var(--oshi);border-color:var(--oshi);color:var(--oshi-ink)}


