
*{box-sizing:border-box}body{margin:0;background:#F6F3EF;color:#1F1D1B;font-family:system-ui,-apple-system,"Hiragino Kaku Gothic ProN",sans-serif;line-height:1.6}main{max-width:1100px;margin:auto;padding:24px 16px 48px}a{color:#C93A22}h1{font-size:clamp(1.5rem,4vw,2.2rem);line-height:1.3;margin:.5em 0}h2{font-size:1.2rem;margin:0 0 12px}.intro{margin-bottom:24px}.badge{display:inline-block;background:white;border-radius:99px;padding:3px 12px;font-size:.8rem}.layout{display:grid;grid-template-columns:1fr 1fr;gap:20px}.card{background:white;border-radius:16px;padding:22px;box-shadow:0 4px 18px #1F1D1B12}.fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.fields>label{display:flex;flex-direction:column;justify-content:space-between}/* 名前が折り返しても入力欄の高さをそろえる */label{display:block;font-weight:700;font-size:.92rem}input{width:100%;margin-top:5px;border:1px solid #aab5c0;border-radius:10px;padding:10px;font:inherit;color:#1F1D1B}input:focus,button:focus-visible{outline:3px solid #C93A22;outline-offset:2px}.hint{font-size:.85rem;color:#66615C;margin:5px 0 16px}.error{color:#a5203e;font-size:.85rem;min-height:1.4em;margin:8px 0}.choices{display:flex;gap:8px;margin:10px 0}.choices button{flex:1;background:white;color:#1F1D1B;border:1px solid #b4bdc6}.choices button[aria-pressed=true],.save{background:#C93A22;color:white;border:1px solid #C93A22}button{font:inherit;font-weight:700;border-radius:10px;padding:11px;cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.numbers{display:flex;gap:16px;flex-wrap:wrap}.metric{background:#FDF0EB;border-radius:12px;padding:12px;flex:1;min-width:140px}.metric strong{font-size:1.7rem;color:#C93A22}.figure{background:#F6F3EF;border-radius:12px;margin:16px 0;padding:12px;min-height:200px;display:grid;place-items:center}svg{max-width:100%;max-height:450px}.note{font-size:.86rem;color:#66615C}.save{width:100%}@media(max-width:700px){.layout{grid-template-columns:1fr}.card{padding:18px}}
canvas{display:block;width:100%;height:auto}.error a{color:inherit;text-decoration:underline}

.site-header,.site-footer{max-width:1100px;margin:auto;padding:16px}.site-header a{display:inline-flex;align-items:center;gap:8px;font-weight:700}.site-header img{width:36px;height:36px}.site-footer{font-size:.9rem}

/* サンプル表示、入力直下の結果、新しく作る */

.result-line{display:none;margin:8px 0;padding:10px 12px;border-radius:10px;background:#FDF0EB;font-weight:700;color:#8f2412}.result-line:empty{display:none}
button.reset{min-height:44px;background:#fff;color:#1F1D1B;border:1px solid #b4bdc6;margin-top:8px}
@media(max-width:700px){.result-line:not(:empty){display:block}}

.field-note{display:block;font-size:.78rem;font-weight:400;color:#66615C}

.spacing-settings{margin-top:16px}.spacing-settings summary{min-height:44px;align-content:center;cursor:pointer}.spacing-settings .fields{margin-top:8px}
.ep-logo-toggle{display:inline-flex;align-items:center;gap:10px;min-height:44px;margin:4px 0 8px;font-weight:700;cursor:pointer}
.ep-logo-toggle input[type=checkbox]{width:20px;height:20px;margin:0;padding:0;border-radius:4px;accent-color:#C93A22;flex:none}
.bag-presets,.overlap-presets{margin:0 0 14px}
.overlap-presets{margin-top:8px}
.preset-label{display:block;font-size:.82rem;font-weight:700;color:#66615C;margin-bottom:6px}
.preset-chips{display:flex;flex-wrap:wrap;gap:6px}
.preset-chips button{min-height:40px;padding:6px 12px;border-radius:999px;background:#fff;color:#1F1D1B;border:1px solid #b4bdc6;font-size:.84rem;font-weight:700}
.preset-chips button[aria-pressed=true]{background:#1F1D1B;color:#fff;border-color:#1F1D1B}
.budget-metric{flex-basis:100%}
.budget-sub{font-size:.92rem;font-weight:700;color:#1F1D1B}
.budget-sub strong{font-size:1.35rem}

.mobile-summary{display:none}
select{width:100%;margin-top:5px;border:1px solid #aab5c0;border-radius:10px;padding:10px;font:inherit;background:#fff;color:#1F1D1B}
@media(max-width:700px){
  body{padding-bottom:60px}
  .mobile-summary:not([hidden]){position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:7px;height:48px;max-height:48px;padding:2px 12px;background:#1F1D1B;color:#fff;font-size:.78rem;white-space:nowrap;box-shadow:0 2px 8px #0002}
  .mobile-summary button{margin-left:auto;min-height:40px;padding:3px 8px;border:1px solid #fff;background:#fff;color:#1F1D1B;font-size:.76rem}
  .mobile-summary b{font-size:.92rem}
  .layout{gap:14px}
  .fields{gap:10px}
  .ep-mini-preview{display:none!important}
  /* The common shell checks the mini-preview's hidden attribute, not its computed display. */
  body[data-ep-tool="itabag"][data-ep-view="input"] .ep-workspace-nav:has(.ep-mini-preview:not([hidden])){position:static}
  .ep-mobile-bar{flex-direction:row;align-items:center;min-height:52px;max-height:56px;padding:6px 12px calc(6px + env(safe-area-inset-bottom));gap:6px}
  .ep-mobile-bar .ep-bar-status:empty{display:none!important}
  .ep-mobile-bar .ep-bar-status:not(:empty){position:absolute;right:12px;bottom:calc(56px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);padding:7px 10px;border-radius:8px;background:#1F1D1B;color:#fff;box-shadow:0 2px 8px #0003}
  .ep-mobile-bar .ep-bar-buttons{display:flex;flex:1;gap:6px}
  .ep-mobile-bar .ep-bar-buttons button{min-height:40px;padding:6px 8px;font-size:.82rem;flex:1}
  .save{display:none!important}
  html.ep-keyboard-open .mobile-summary{position:static}
}

