*{box-sizing:border-box}
body{margin:0;background:#eef4fb;color:#172a49;font:16px/1.65 system-ui,sans-serif}
main{width:min(880px,calc(100% - 28px));margin:28px auto}
h1{line-height:1.35;font-size:clamp(24px,5vw,38px);margin:0}
h2{font-size:20px}
section{background:white;border:1px solid #c7d7eb;border-radius:14px;padding:clamp(12px,4vw,24px);margin:16px 0}
.drop{text-align:center;background:#f6faff;border:2px dashed #799cc7}
.drop.active{background:#dcecff}
input[type=file]{display:block;margin:12px auto;width:min(100%,380px);font:inherit}
button,input::file-selector-button{border:0;border-radius:8px;background:#223a70;color:white;font:inherit;font-weight:700;padding:8px 12px;cursor:pointer}
button:disabled{opacity:.5;cursor:default}
select{font:inherit;color:inherit;padding:6px;border:1px solid #9eb1cb;border-radius:6px}
.actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.result{background:#eaf2ff;border-radius:10px;padding:12px;display:grid;gap:5px}
.result strong{font-size:clamp(17px,4vw,25px)}
small{color:#425875}
.notice{border-left:4px solid #94afd2;padding:8px 12px;background:#f4f7fc}
.blue{color:#005582}.orange{color:#9a4800}
canvas{display:block;width:auto;height:auto;max-width:100%;max-height:70vh;margin:0 auto;background:#f2f5f9;touch-action:none;cursor:crosshair}
#boxes{max-height:220px;overflow:auto;padding-left:24px}
#boxes li{margin:6px 0;overflow-wrap:anywhere}
#boxes button{margin-left:8px;padding:3px 8px}
.secondary{background:#edf3fa;color:#223a70}

#boxes li.selected { background:#e5f1ff; border-radius:6px; }
#boxes button[aria-pressed="true"] { background:#223a70; color:white; }

[hidden] { display:none !important; }
.result { margin-top:12px; }

.site-frame { display:block; width:100%; border:0; background:#223a70; }
.site-header-frame { height:105px; position:sticky; top:0; z-index:10; }
.site-footer-frame { height:210px; }
.back { text-align:center; }
.back a { color:#223a70; }
@media (max-width:530px) {
  .site-header-frame { height:72px; }
  .site-footer-frame { height:245px; }
}
