/* Shared tool strip, accessible detail dialog and generated tool pages. */
.tools-band{scroll-margin-top:120px}
.tools-list .tool-logo{justify-content:center;width:56px;height:48px;padding:8px;border:0;background:transparent;opacity:1;white-space:normal;border-radius:6px}
.tool-logo:focus-visible{outline:2px solid #215639;outline-offset:2px;background:#e7ece3}
.tool-art{display:inline-flex;align-items:center;justify-content:center;flex:none;width:40px;height:32px;color:#215639;opacity:1}
.tool-image{display:block;width:auto;max-width:48px;height:32px;object-fit:contain}
.tool-image--svg{filter:none}
.tool-initial{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#215639;color:#fff;font:700 13px/1 Arial,sans-serif;letter-spacing:0}
.tools-band.is-dialog-open .tools-track{animation-play-state:paused}
/* Keep every original button reachable when keyboard focus enters the track. */
.tools-marquee.is-keyboard-nav .tools-track{animation:none;transform:none;width:100%}
.tools-marquee.is-keyboard-nav .tools-list:not(.tools-list--duplicate){flex:1;flex-wrap:wrap;justify-content:center;gap:16px 28px;padding:0 20px}
.tools-marquee.is-keyboard-nav .tools-list--duplicate{display:none}
body.tool-dialog-open{overflow:hidden}
.tool-dialog{position:fixed;inset:auto;margin:0;width:min(620px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:14px;background:var(--paper);color:var(--ink);box-shadow:0 20px 70px #102a2333;overflow-y:auto;overscroll-behavior:contain}
.tool-dialog::backdrop{background:#172c2440}
.tool-dialog-panel{padding:28px;overflow-wrap:anywhere}
.tool-dialog-close{display:block;margin:0 0 18px auto;min-height:44px;padding:7px 14px;background:transparent;border:1px solid var(--line);border-radius:24px}
.tool-dialog-heading{display:flex;align-items:center;gap:18px;padding-right:6px}
.tool-dialog h2{font-size:24px}.tool-dialog h3{font-size:17px;margin:22px 0 10px}
.tool-dialog p{margin:14px 0 0;line-height:1.85}.tool-dialog-category{font-size:12px;color:#526658}.tool-dialog .tool-dialog-category{margin:4px 0 0}
.tool-dialog ul{padding-left:1.4em;margin:10px 0}
.tool-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px;align-items:center}
.tool-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:48px;max-width:100%;padding:13px 22px;border:1px solid #215639;border-radius:4px;color:#215639;font-size:14px;line-height:1.7;text-align:center;overflow-wrap:anywhere}
.tool-button--primary{background:#215639;color:#fff}
.tool-button:hover{box-shadow:0 3px 12px #21563920}
.tool-badges{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 18px}
.tool-badge{display:inline-flex;align-items:center;min-height:32px;padding:4px 12px;border-radius:4px;font:700 12px/1.8 Arial,sans-serif;color:#fff}
a.tool-badge{min-height:44px}
.tool-badge--yuima{background:#38A169;color:#102a1b}.tool-badge--sabaki{background:#1A365D}.tool-badge--kassha{background:#9B4A2C}
body[data-page="tool"]{--page-accent:#215639;--page-text:#215639}
.tool-hero h1{font-size:clamp(30px,4.5vw,64px);max-width:1050px;overflow-wrap:anywhere}
.tool-hero-mark{margin-bottom:30px}.tool-hero-mark .tool-art{width:100px;height:80px}.tool-hero-mark .tool-image{height:80px;max-width:120px}.tool-hero-mark .tool-initial{width:80px;height:80px;font-size:30px}
.tool-hero .tool-lead{max-width:740px;margin-top:28px;font-size:16px;line-height:2}
body[data-page="tool"] .section-body{min-width:0;overflow-wrap:anywhere}
.tool-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;list-style:none;padding:0;margin:0}
.tool-cards li{padding:26px 22px;border:1px solid var(--line);border-top:3px solid #215639;line-height:1.9}
.tool-list{margin:0;padding-left:1.4em}.tool-list li+li{margin-top:20px}
.tool-articles{list-style:none;padding:0;margin:0}.tool-articles li{padding:20px 0;border-bottom:1px solid var(--line)}.tool-articles a{text-decoration:underline;text-underline-offset:5px}.tool-articles p{margin-top:8px}
.tool-disclaimer{padding:35px 7%;font-size:12px}.tool-disclaimer .text-link{width:fit-content;max-width:100%;margin-top:18px;font-size:13px}
@media(max-width:600px), (max-height:500px){
.tool-dialog{inset:auto 0 0!important;width:100%;max-width:100%;max-height:88dvh;border-radius:18px 18px 0 0;border-bottom:0}
.tool-dialog-panel{padding:20px 22px max(24px,env(safe-area-inset-bottom))}
.tool-dialog h2{font-size:21px}.tool-dialog-heading{gap:14px}
.tool-actions{align-items:stretch}.tool-actions .tool-button{width:100%}
.tool-cards{grid-template-columns:minmax(0,1fr)}
body[data-page="tool"] .page-contact h2{overflow-wrap:anywhere}
}
@media(prefers-reduced-motion:reduce){.tool-dialog{scroll-behavior:auto}}
/* Contain wide content without changing the existing normal pages. */
body[data-page="tool"]{overflow-x:clip}
body[data-page="tool"] main,body[data-page="tool"] main section{min-width:0;max-width:100%}
.tool-dialog-panel>*{min-width:0;max-width:100%}

/* Neutral typeset names; strip sizing is scoped below to preserve tool pages. */
.tool-name{font-family:'Inter',sans-serif;font-weight:600;font-size:26px;line-height:32px;letter-spacing:-0.01em;color:#215639;font-style:normal}
.tools-list .tool-logo--text{width:auto;max-width:112px}
.tool-art.tool-art--text{width:auto;max-width:96px;height:32px}
/* Three 32px icons at most; the long label wraps at its space. */
.tool-name--long{font-size:18px;line-height:16px;max-width:96px;text-align:center;white-space:normal}
.tool-hero-mark .tool-art--text{width:auto;max-width:100%;height:auto;min-height:80px;justify-content:flex-start}
.tool-hero-mark .tool-name{font-size:32px;line-height:1.3;max-width:100%;text-align:left;overflow-wrap:anywhere}
.tool-dialog-heading>div{min-width:0}
.tool-dialog-heading h2.tool-name{font-family:'Inter',sans-serif;font-size:26px;line-height:1.3;letter-spacing:-0.01em;color:#215639;opacity:1;overflow-wrap:anywhere}
.tool-name--compact{font-size:20px}

/* Content stays visible; only the outer frame and native overlay animate. */
.tool-dialog-panel,.tool-dialog-panel *{opacity:1!important}
.tool-dialog[open]{animation:tool-dialog-enter .25s ease-out}
.tool-dialog[open]::backdrop{animation:tool-backdrop-enter .25s ease-out}
@keyframes tool-dialog-enter{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes tool-backdrop-enter{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.tool-dialog[open],.tool-dialog[open]::backdrop{animation:none}}
/* Uniform text strip; separators sit in the gap, including the duplicate seam. */
.tools-list .tool-logo--text{width:max-content;max-width:none;white-space:nowrap}
.tools-list .tool-art--text{width:max-content;max-width:none;white-space:nowrap}
.tools-list .tool-name{font:600 16px/28px 'Inter',sans-serif;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:normal}
.tools-list .tool-art:not(.tool-art--text){height:28px}
.tools-list .tool-image{height:28px}

.tools-list>li{position:relative}
.tools-list>li::after{content:"";position:absolute;right:-16px;top:50%;width:1px;height:14px;background:#21563933;transform:translateY(-50%);pointer-events:none}
.tools-marquee.is-keyboard-nav .tools-list>li::after{display:none}
@media(max-width:600px){
.tools-list{gap:24px;padding-right:24px}
.tools-list>li::after{right:-12px}
.tools-list .tool-name{font-size:15px}
}
@media(prefers-reduced-motion:reduce){
.tools-list{gap:16px 28px;padding:0 var(--gutter)}
.tools-list>li::after{display:none}
}
