:root{font-family:"Yu Gothic UI","Meiryo",sans-serif;color:#263e39;background:#f5f7f5;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #35a88b;outline-offset:3px}.header{height:82px;padding:0 5%;background:white;border-bottom:1px solid #e3eae5;display:flex;align-items:center;justify-content:space-between}.brand{text-decoration:none;color:#263e39;font-weight:800;font-size:21px;display:flex;gap:12px;align-items:center}.brand-icon{display:grid;place-items:center;background:#216d59;color:white;border-radius:11px;width:38px;height:38px;font-size:21px}.beta{font-size:9px;color:#798b82;letter-spacing:1.5px;margin-left:10px}.header-note{font-size:12px;color:#7d8b83}main{max-width:1440px;margin:auto;padding:45px 5% 65px}.eyebrow{font-size:11px;letter-spacing:2.5px;color:#39866d;font-weight:700}.intro h1{font-size:36px;letter-spacing:1px;margin:12px 0}.intro>p:last-child{font-size:14px;color:#74847b}.projects{display:flex;gap:12px;margin:30px 0}.project{border:1px solid #dde5df;background:#fff;padding:17px 24px;border-radius:12px;font-size:14px;font-weight:700;color:#8d9892;display:flex;align-items:center;gap:14px}.project>span{font-size:10px;opacity:.6}.project.active{background:#e6f1eb;border-color:#9cc6b6;color:#246a53}.project b{font-size:11px;background:#fff;border-radius:5px;padding:3px 7px}.project small{font-size:10px;font-weight:400}.project:disabled{cursor:default}.workspace{display:grid;grid-template-columns:330px minmax(0,1fr);gap:26px;align-items:start}.panel{background:white;border:1px solid #e1e8e2;border-radius:15px;padding:22px;margin-bottom:18px}h2{font-size:15px;margin:0 0 22px;display:flex;gap:10px;align-items:center}h2 span{font-size:10px;color:#4c8b71;background:#edf4ef;border-radius:5px;padding:5px}label{display:block;font-size:12px;font-weight:600;margin:16px 0 8px}input:not([type=checkbox]),select{width:100%;border:1px solid #dce4de;border-radius:7px;padding:11px 12px;color:#344a40;background:#fcfdfb;font-size:12px}.check-label{display:flex;align-items:center;gap:8px;font-weight:400;color:#617469}.check-label input{accent-color:#23765c;width:16px;height:16px}.section-heading{display:flex;align-items:center;justify-content:space-between}.section-heading h2{margin-bottom:0}.section-heading strong{font-size:12px;color:#368068}.help{font-size:11px;color:#849188;margin:15px 0}.bulk{display:flex;justify-content:space-between;margin:13px 0 20px}.text-button{border:0;background:none;color:#50826e;font-size:11px;padding:4px 0}.region{margin-top:18px}.region-title{font-size:11px;color:#849188;font-weight:500;margin:0 0 8px}.pref-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.pref{border:1px solid #e2e8e3;border-radius:6px;padding:9px 2px;background:white;font-size:11px;color:#64766a}.pref[aria-pressed=true]{background:#e8f3ec;border-color:#9ccbb5;color:#226b51;font-weight:700}.pref[aria-pressed=true]:before{content:'✓ ';font-size:10px}.preview-area{position:sticky;top:22px}.preview-toolbar{display:flex;justify-content:space-between;align-items:center;margin:3px 0 16px;font-size:11px;color:#8b978f}.preview-toolbar strong{font-size:13px;color:#3c5145}.preview-hint{margin-left:13px;font-size:10px}.live-dot{display:inline-block;width:6px;height:6px;background:#4b9e7c;border-radius:50%;margin-right:8px}.canvas-stage{background-color:#e9eeea;background-image:linear-gradient(45deg,#dfe6e0 25%,transparent 25%),linear-gradient(-45deg,#dfe6e0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe6e0 75%),linear-gradient(-45deg,transparent 75%,#dfe6e0 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;padding:26px;border:1px solid #dde5dd;border-radius:14px;min-height:360px;display:flex;justify-content:center;align-items:center}canvas{width:100%;height:auto;display:block;box-shadow:0 10px 30px #324d3a15;max-height:70vh;object-fit:contain}.export-bar{background:white;padding:23px;border:1px solid #e1e8e2;border-radius:12px;margin-top:18px;display:flex;align-items:center;justify-content:space-between;gap:15px}.export-bar strong{font-size:14px}.export-bar p{font-size:11px;color:#89958c;margin:7px 0 0}.primary{border:0;border-radius:8px;background:#226e56;color:white;font-size:13px;font-weight:700;padding:15px 23px;white-space:nowrap}.primary:hover{background:#17523f}.local-note{font-size:10px;color:#89958c;text-align:center;margin-top:16px}#status{font-size:12px;color:#287458;text-align:center;min-height:18px}.usage{font-size:12px;color:#78887b;border-top:1px solid #e1e8e2;padding:16px 0;line-height:1.8}.usage summary{cursor:pointer}footer{border-top:1px solid #e1e8e2;padding:25px 5%;font-size:12px;color:#6d8172}footer span{float:right;font-size:10px}@media(min-width:1500px){main{padding-left:35px;padding-right:35px}}@media(max-width:1050px){.workspace{grid-template-columns:285px minmax(0,1fr)}.export-bar{flex-direction:column;align-items:stretch}.primary{text-align:center}.preview-hint{display:none}.canvas-stage{padding:16px;min-height:250px}}@media(max-width:720px){.header{height:68px}.header-note,.beta{display:none}main{padding:25px 5%}.intro h1{font-size:28px}.intro>p:last-child{font-size:12px;line-height:1.8}.projects{gap:7px}.project{padding:13px 10px;font-size:11px;gap:5px;flex:1;justify-content:center}.project>span,.project b{display:none}.project small{font-size:9px}.workspace{display:flex;flex-direction:column}.editor,.preview-area{width:100%}.preview-area{position:static;order:-1}.canvas-stage{min-height:180px;padding:12px}.export-bar{flex-direction:row;padding:15px}.export-bar strong{font-size:11px}.export-bar p{display:none}.primary{padding:13px;font-size:11px}.pref-grid{grid-template-columns:repeat(4,1fr)}.pref{padding:12px 4px}.panel{padding:20px}.preview-toolbar{font-size:10px}footer span{display:none}}
/* Match the displayed canvas bounds to its bitmap for accurate map taps. */
canvas{width:auto;max-width:100%;max-height:70vh;height:auto;object-fit:initial}
.canvas-stage{min-height:0}
@media(max-width:720px){canvas{max-height:none;width:100%;height:auto}.canvas-stage{padding:10px}}
.counter-card{padding:10px 6px;cursor:default;text-align:center;min-width:0}.counter-card strong{display:block;font-size:11px}.counter-card.achieved{background:#e8f3ec;border-color:#9ccbb5;color:#226b51}.counter-controls{display:flex;align-items:center;gap:3px;margin:9px 0 5px}.counter-controls button{border:1px solid #dce4de;background:white;color:#246a53;border-radius:5px;min-width:28px;height:32px;padding:0}.counter-controls button:disabled{opacity:.35;cursor:default}.counter-controls input[type=number]{min-width:0;padding:5px 0;text-align:center;height:32px;appearance:textfield;-moz-appearance:textfield}.counter-controls input::-webkit-inner-spin-button,.counter-controls input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.counter-progress{font-size:10px;color:#617469}.pref-grid{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:720px){.pref-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.counter-controls button{min-width:30px;min-height:38px}.counter-controls input[type=number]{height:38px}}

/* Fill the preview width; tall images scroll naturally with the page. */
.canvas-stage canvas{width:100%;max-width:100%;height:auto;max-height:none}
.preview-area{position:static}

.export-bar{justify-content:flex-end}
#image-dialog{width:min(900px,94vw);max-height:92vh;border:1px solid #dce4de;border-radius:14px;padding:22px;color:#263e39;background:#fff;overflow:auto}
#image-dialog::backdrop{background:#172c26b3}
.image-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.image-dialog-heading h2{margin:0}
.image-actions{display:flex;align-items:center;gap:20px;margin:16px 0}
#output-image{display:block;width:100%;height:auto;background-color:#eef1ed;background-image:conic-gradient(#dbe2dd 25%,transparent 0 50%,#dbe2dd 0 75%,transparent 0);background-size:20px 20px}
.image-actions [hidden]{display:none}

.gift-settings{margin-top:18px;padding:14px 0;border-top:1px solid #dce4de;font-size:12px}.gift-settings summary{cursor:pointer;font-weight:700}.gift-settings .help{line-height:1.7}

/* Keep the project selector close to the header. */
main{padding-top:20px}.projects{margin-top:8px}
@media(max-width:720px){main{padding-top:14px}.projects{margin-top:6px}}

.page-guide{margin-top:36px;padding:28px;background:#fff;border:1px solid #e1e8e2;border-radius:14px;font-size:13px;line-height:1.9;color:#42574b}.page-guide h2{font-size:20px;margin:0 0 20px}.page-guide ol{padding-left:24px;margin:0}.page-guide li{padding-left:6px;margin-bottom:20px}.page-guide li strong{color:#263e39}.page-guide li p{margin:5px 0 0}.guide-notes{margin-top:22px;padding-top:14px;border-top:1px solid #e1e8e2;font-size:12px}.guide-notes p{margin:9px 0}.site-footer{display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap;align-items:center}.site-footer .author{font-size:12px}.site-footer .author-handle{display:inline;float:none;font-size:inherit;margin-left:5px}@media(max-width:720px){.page-guide{padding:20px;font-size:12px}.page-guide h2{font-size:18px}.site-footer{align-items:flex-start;flex-direction:column;gap:8px}}

#crop-dialog{width:min(440px,94vw);max-height:94vh;overflow:auto;padding:24px;border:1px solid #dce4de;border-radius:14px;color:#263e39}#crop-dialog::backdrop{background:#172c26b3}#crop-canvas{width:100%;height:auto;max-height:none;touch-action:none;cursor:grab;background:repeating-conic-gradient(#e0e5e0 0% 25%,#fff 0% 50%) 0/20px 20px;box-shadow:none}#crop-canvas:active{cursor:grabbing}#crop-dialog input[type=range]{padding:0;accent-color:#226e56}.crop-moves{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.crop-moves button{padding:8px 12px;background:#f5f7f5;border:1px solid #dce4de;border-radius:6px;color:#263e39}

.crop-frame{position:relative;margin:8px 0 20px;border:2px solid #075c40;background:#dce4de}

a.project{text-decoration:none;color:#526a5c}a.project:hover{border-color:#619c82;background:#f0f7f2}a.project.active{color:#246a53}

.projects{flex-wrap:wrap}@media(max-width:720px){.project{flex:0 1 auto;min-width:calc(33.333% - 5px)}}

/* Sharing UI follows MISSION PANEL MAKER's card, dialogs and role states. */
[hidden]{display:none!important}
.operation-tabs{display:inline-flex;background:#e7e9f2;border-radius:12px;padding:4px;margin-bottom:18px}.operation-tabs button{font:inherit;font-size:14px;font-weight:700;padding:11px 15px;border:0;border-radius:9px;color:#49495f;background:transparent}.operation-tabs button.active{background:#fff;color:#5546df;box-shadow:0 2px 5px #25254b10}.settings-locked{color:#747087;background:#edeaf3!important}.settings-locked::after{content:' 🔒'}
.sharing-panel{border:1px solid #e7e9f2;border-radius:16px;padding:22px;color:#202039;font-size:14px}.sharing-panel h2{font-size:17px;margin:0 0 18px}.sharing-panel h3{font-size:16px;margin:18px 0 12px}.sharing-panel p{font-size:13px;color:#74758b;line-height:1.7;margin:5px 0}.sharing-panel label{font-size:14px;margin:0 0 7px}.sharing-panel input{font-size:14px;padding:10px;color:#34344e;background:#fbfcff;border-color:#dedfea}.sharing-panel button,.sharing-ui-dialog button{font:inherit;font-size:14px;font-weight:700;border:1px solid #e1e3ee;background:#fff;color:#49495f;border-radius:9px;padding:11px 15px;cursor:pointer}.sharing-panel button{margin:5px 0}.sharing-panel button:hover,.sharing-ui-dialog button:hover{background:#f0efff}.sharing-panel button.primary,.sharing-ui-dialog button.primary{background:#5546df;color:#fff;border-color:#5546df}.sharing-panel button.primary:hover,.sharing-ui-dialog button.primary:hover{background:#4336c1}.sharing-panel .danger{color:#b75062;width:100%;margin-top:12px}.sharing-panel .hint{font-size:13px;color:#78798e;line-height:1.7;margin:12px 0}.sharing-panel details{margin-top:15px}.sharing-panel summary{cursor:pointer}.sharing-panel li{font-size:12px;margin-bottom:12px}.sharing-panel li button{padding:5px;margin-left:5px}#sharing-people>div{display:flex;align-items:center;justify-content:space-between;gap:8px}#sharing-history{padding-left:22px;max-height:360px;overflow:auto}
.sharing-ui-dialog{border:0;border-radius:18px;padding:28px;width:min(420px,90vw);max-height:90vh;overflow:auto;box-shadow:0 20px 70px #2225;color:#202039}.sharing-ui-dialog::backdrop{background:#17152e66}.sharing-ui-dialog h2{font-size:17px;margin:0 0 18px}.sharing-ui-dialog p{margin:5px 0;color:#74758b;font-size:14px;line-height:1.7}.sharing-ui-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}#sharing-confirm,#sharing-link-dialog{width:min(600px,94vw)}#sharing-link{display:block;width:100%;font:inherit;font-size:14px;border:1px solid #dedfea;border-radius:8px;padding:10px;margin-top:7px;color:#34344e;background:#fbfcff;resize:vertical;min-height:100px}
#sharing-banner{margin:0 auto 20px;padding:16px 20px;border:1px solid #c7bdf4;border-left:5px solid #5546df;border-radius:12px;background:#eeeaff;color:#3b2b87}#sharing-banner strong{display:block;font-size:16px}#sharing-banner strong span{color:#16834c;margin-right:5px}#sharing-banner>span{display:block;font-size:13px;line-height:1.7;margin-top:5px}
#supporter-banner{color:#17695e;margin:0;line-height:1.6}#supporter-banner strong{display:inline-block;background:#d0eee6;color:#115e52;border-radius:6px;padding:3px 10px;font-size:14px}#supporter-banner span{display:block;margin-top:6px;font-size:13px}.supporter-view{background:#eef8f6}.supporter-view .header{border-bottom:3px solid #168575;margin-bottom:22px;height:auto;min-height:100px;gap:12px;flex-wrap:wrap;padding-top:16px;padding-bottom:16px}.supporter-view .brand-icon{background:#13796b}.supporter-view .panel{border-color:#cce5df}.supporter-view .prefecture-panel{border-top:4px solid #168575}.supporter-view .projects,.supporter-view .operation-tabs,.supporter-view .page-guide,.supporter-view .preview-toolbar,.supporter-view .export-bar,.supporter-view .local-note{display:none}.supporter-view .primary{background:#13796b;border-color:#13796b}.projects a[aria-disabled=true]{opacity:.6;cursor:not-allowed}
body.sharing-ended>:not(#sharing-ended-message){display:none!important}body.sharing-ended{display:grid;min-height:100dvh;margin:0;place-items:center}#sharing-ended-message{margin:0;padding:24px;font-size:clamp(20px,4vw,28px);font-weight:700;text-align:center}
