:root{color-scheme:light;font-family:system-ui,"Yu Gothic UI",sans-serif;color:#172e35;background:#f1f6f5;--ink:#172e35;--green:#00584b;--line:#ceded9;--soft:#eff8f5}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;line-height:1.55}
[hidden]{display:none!important}
header{background:#fff;border-bottom:1px solid var(--line)}
header .wrap{min-height:62px;display:flex;align-items:center;gap:16px}
header strong{font-size:1.3rem;letter-spacing:.01em}
header span{font-size:.8rem;font-weight:650;color:var(--green);padding:3px 9px;border-radius:5px;background:var(--soft)}
.wrap{width:min(100% - 36px,980px);margin-inline:auto}
main{padding:30px 0 50px}
.kicker{margin:0 0 4px;color:var(--green);font-size:.85rem;font-weight:750}
h1,h2,p{margin-block-start:0} h1{font-size:clamp(1.6rem,5vw,2.7rem);line-height:1.25;margin-bottom:8px} h2{font-size:1.2rem;margin-bottom:12px}
.lead{color:#365055;margin-bottom:23px}
.card{background:white;border:1px solid var(--line);border-radius:13px;padding:clamp(15px,3vw,24px);margin:0 0 14px;box-shadow:0 2px 7px #173f2b08}
#drop-zone{border:2px dashed #9dbbb0;transition:background .12s,border-color .12s}#drop-zone.dragging{background:#e0f5eb;border-color:var(--green)}
.actions,.section-head{display:flex;align-items:center;gap:10px 15px;flex-wrap:wrap}
.section-head{justify-content:space-between;margin-bottom:8px}.section-head h2{margin:0}
button,.button,select,input[type=number]{font:inherit;color:var(--ink);border:1px solid #a9bfb8;border-radius:7px;background:white;min-height:42px;padding:7px 12px}
button,.button{cursor:pointer;font-weight:650}.button{display:inline-flex;align-items:center;position:relative}.button input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.primary{background:var(--green);border-color:var(--green);color:white}
button:not(:disabled):hover,.button:hover{filter:brightness(.92)}button:disabled{opacity:.48;cursor:default}
button:focus-visible,.button:focus-within,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #d3830a;outline-offset:2px}
input[type=checkbox],input[type=radio],input[type=range]{accent-color:var(--green)}
input[type=checkbox],input[type=radio]{width:16px;height:16px;vertical-align:middle;margin-right:3px}
.hint{font-size:.88rem;color:#405c62;margin:9px 0 0}.hint:empty{display:none}
#status{margin:12px 0 0;padding:8px 11px;background:var(--soft);border-left:3px solid #338175;border-radius:4px}
#status.error{background:#fff0ec;border-color:#b82d12;color:#851e0b}
#controls{gap:8px 14px;margin:12px 0}.inline{display:flex;gap:3px 13px;flex-wrap:wrap;min-width:0;margin:0;padding:4px 9px 7px;border:1px solid var(--line);border-radius:6px}.inline legend{font-size:.8rem;color:#405c62}
#threshold-label{display:flex;align-items:center;gap:5px}#threshold{width:105px}
.preview-frame{display:grid;place-items:center;min-height:145px;background:#e6efed;border-radius:8px;border:1px solid var(--line);padding:8px;overflow:hidden}
canvas{display:block;width:auto;height:auto;max-width:100%;max-height:70vh;object-fit:contain;background:#fff;box-shadow:0 1px 6px #172e3533}canvas.picking{cursor:crosshair;touch-action:manipulation}
.calibration{margin:12px 0 0}.input-unit{white-space:nowrap}input[type=number]{width:116px}
.export-actions{margin-top:13px}#output-info{font-size:.9rem;color:#405c62}
summary{font-weight:700;cursor:pointer}details p{margin:9px 0 0}
@media(max-width:500px){.wrap{width:calc(100% - 20px)}main{padding-top:22px}.section-head{align-items:flex-start}h2{font-size:1.08rem}.preview-frame{padding:4px}canvas{max-height:60vh}}

/* Shared public-tool navigation dimensions and colors, scoped to new tools. */
html{scroll-padding-top:110px}
.new-tools-header{position:sticky;top:0;z-index:80;display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:8px 20px;min-height:78px;padding:8px 24px;background:#fff;border-bottom:1px solid #d7e4dc;box-shadow:0 2px 9px #06271c0a}
.new-tools-header .tool-brand-navigation{display:flex;align-items:center;gap:10px;min-width:0;max-width:100%}
.new-tools-header .new-tool-brand{display:flex;align-items:center;gap:9px;min-width:0;text-decoration:none;color:#173f3b;font-size:25px;font-weight:800;line-height:1.2}
.new-tool-brand img{width:46px;height:46px;object-fit:contain}
.new-tool-brand small{display:block;font-size:11px;font-weight:700;line-height:1.3;margin-top:4px}
.new-tools-header .company-home-link{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 10px;border:1px solid #c7dbcf;border-radius:7px;color:#173f3b;font-size:14px;font-weight:600;white-space:nowrap;text-decoration:none}
.new-tools-header .company-home-en,.new-tools-header .tool-label-en{display:none}
.new-tools-header .tool-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:3px;min-width:0}
.new-tools-header .tool-shortcuts a{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:7px 9px;border:1px solid transparent;border-radius:6px;text-decoration:none;white-space:nowrap;color:#173f3b;font-size:14px;font-weight:650}
.new-tools-header .tool-shortcuts a[aria-current=page]{background:#eaf3ed;border-color:#d7e4dc}
.new-tools-header .tool-shortcuts a:hover,.new-tools-header .company-home-link:hover{background:#edf6f0}
.new-tools-header .tool-shortcuts svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;flex:none}
.new-tools-header .tool-label-compact{display:none}
.new-tool-page{font-family:system-ui,'Yu Gothic UI',Meiryo,sans-serif;color:#173f3b;background:#f3f7f4}
.new-tool-page main{max-width:none;width:100%;padding:20px 24px 48px;margin:0}
.new-tool-page .shape-sidebar,.new-tool-page .shape-nav-resizer{top:94px;height:calc(100dvh - 110px)}
.new-tool-page .preview-card{top:94px;max-height:calc(100dvh - 110px)}
.new-tool-page .new-tool-ad{display:flex;align-items:center;flex-direction:column;width:100%;min-width:0;margin:24px 0;clear:both}
.new-tool-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,728px);align-items:center;gap:24px;margin-bottom:18px}
.new-tool-intro .new-tool-ad{margin:0}
.new-tool-intro .lead{margin-bottom:0}
.new-ad-label{display:block;font-size:12px;line-height:24px;color:#62756b;text-align:center}
.new-tool-ad .ad-slot{display:grid;place-content:center;gap:7px;width:min(100%,970px);height:250px;min-width:0;border:1px dashed #becfc5;background:#f8fbf9;text-align:center;color:#637e70;font-size:14px;overflow:hidden}
.new-tool-banner .ad-slot{height:90px}
.new-tool-ad small{font-size:11px}
.new-tool-help{max-width:1100px;border:1px solid #c7dbcf;border-radius:12px;background:#fff;padding:20px;margin:20px 0}
.new-tool-help h2{font-size:20px;margin:0 0 12px}
.new-tool-help details{padding:10px 0;border-top:1px solid #e0e9e3}
.new-tool-help summary{font-size:15px;font-weight:650}
.new-tool-help p,.new-tool-help li{font-size:14px;line-height:1.7}
.new-private-status{font-size:12px;color:#557160;margin:0 0 12px}
.new-tool-footer{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px 24px;padding:22px;font-size:13px;border-top:1px solid #c7dbcf}
.new-tool-footer span{flex-basis:100%;text-align:center;font-size:11px;color:#62756b}
.new-tool-convert .card{max-width:none}
.new-tool-convert .preview-frame{min-width:0}
.new-tool-convert #controls{align-items:center}
.new-tool-convert #smooth-label{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.new-tool-convert #smooth{width:105px}
.new-tool-convert #preview{max-height:65dvh}
@media(max-width:1150px){.new-tools-header{gap:7px 12px}.new-tools-header .tool-shortcuts{flex-basis:100%;justify-content:space-between}.new-tool-page .shape-sidebar,.new-tool-page .shape-nav-resizer{top:136px;height:calc(100dvh - 152px)}.new-tool-page .preview-card{top:136px;max-height:calc(100dvh - 152px)}}
@media(max-width:900px){.new-tool-intro{grid-template-columns:1fr;gap:12px}.new-tool-page .shape-sidebar,.new-tool-page .shape-nav-resizer{display:none}.new-tool-page .preview-card{position:relative;top:0;max-height:none}.new-tool-page main{padding:16px}.new-tools-header{padding:8px 16px}.new-tools-header .tool-shortcuts a{gap:4px;padding:6px;font-size:13px}.new-tool-brand{font-size:23px!important}.new-tools-header .tool-shortcuts svg{display:none}}
@media(max-width:620px){.new-tools-header{position:relative;padding:8px 12px;gap:6px}.new-tool-brand{font-size:22px!important}.new-tool-brand img{width:40px;height:40px}.new-tool-brand small{font-size:10px}.new-tools-header .tool-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;gap:3px}.new-tools-header .tool-shortcuts a{justify-content:center;font-size:12px;min-height:38px;padding:5px 2px}.new-tools-header .tool-label-full{display:none}.new-tools-header .tool-label-compact{display:inline}.new-tool-page main{padding:16px 10px 36px}.new-tool-ad .ad-slot{height:250px}.new-tool-help{padding:16px}.new-tool-help h2{font-size:18px}.new-tool-convert .input-unit{white-space:normal}.new-tool-convert #controls{gap:10px}.new-tool-convert #preview{max-height:60dvh}}
@media(max-width:620px){.new-tool-banner .ad-slot{height:100px}}

/* Fixed drawing viewport: only its contents move or zoom. */
.new-tool-convert .preview-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0 0}
.new-tool-convert .preview-toolbar button{min-width:42px}
.new-tool-convert #preview-zoom{min-width:58px;text-align:center;font-variant-numeric:tabular-nums;font-size:.9rem}
.new-tool-convert #preview-pick[aria-pressed=true]{background:#fff2df;border-color:#b26111;color:#633600}
.new-tool-convert #preview-interaction{min-height:1.55em;margin-bottom:8px}
.new-tool-convert .preview-frame{display:block;position:relative;height:clamp(260px,60dvh,680px);min-height:0;padding:0;overflow:hidden}
.new-tool-convert #preview{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:fill;background:#e6efed;box-shadow:none;touch-action:none;cursor:grab}
.new-tool-convert #preview.picking{cursor:crosshair}
.new-tool-convert #preview.dragging{cursor:grabbing}
.new-tool-convert #preview:focus-visible{outline:3px solid #d3830a;outline-offset:-3px}
@media(max-width:620px){.new-tool-convert .preview-frame{height:clamp(250px,52dvh,480px)}.new-tool-convert .preview-toolbar{gap:6px}.new-tool-convert .preview-toolbar button{padding:7px 9px;font-size:.88rem}.new-tool-convert #preview-pick{flex-basis:100%}}

.publication-preview{padding:10px 14px;border:1px solid #c7dbcf;background:#eaf3ed;border-radius:7px;font-size:14px}.tool-language{margin-left:auto;font-size:14px;white-space:nowrap}.new-tool-page dialog{width:min(560px,calc(100% - 28px));border:1px solid #bfd2c8;border-radius:12px;padding:22px}.new-tool-page dialog::backdrop{background:#132c3566}.new-tool-page dialog .actions{margin-top:16px}#ad-privacy{font-size:13px}.new-tool-ad .ad-slot{height:100px}.new-tool-banner .ad-slot{height:90px}

.new-tools-header span{padding:0;border-radius:0;background:none;color:inherit;font-size:inherit;font-weight:inherit}html[lang=en] .new-tools-header .tool-label-ja,html[lang=en] .new-tools-header .company-home-ja{display:none}html[lang=en] .new-tools-header .tool-label-en,html[lang=en] .new-tools-header .company-home-en{display:inline}
