:root{color-scheme:light;--page:#f7f8f5;--surface:#fff;--ink:#25352d;--muted:#5e6c63;--line:#d9dfd8;--accent:#24684b;--selected:#e9f1e9;--focus:#176346;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;font-size:100%;font-synthesis:none;color:var(--ink);background:var(--page)}
*{box-sizing:border-box}body{margin:0;font-size:1rem;line-height:1.5}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{color:inherit;cursor:pointer}button:disabled{opacity:.5;cursor:wait}button:active{background-color:var(--selected)}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid var(--focus);outline-offset:3px}a{color:var(--accent);text-underline-offset:3px}svg{display:block;flex-shrink:0}button svg,.button svg{width:1.2rem;height:1.2rem;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.svg-library{position:absolute;width:0;height:0;overflow:hidden}.skip-link{position:fixed;z-index:10;top:-100px;left:10px;background:var(--ink);color:white;padding:12px}.skip-link:focus{top:10px}
.app-shell{height:100svh;height:100dvh;min-height:31rem;max-width:1100px;margin:0 auto;padding:env(safe-area-inset-top) max(14px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));display:flex;flex-direction:column;gap:8px}
.app-header{flex:none;min-height:3.5rem;display:flex;justify-content:space-between;align-items:center;gap:8px}.app-header h1{display:flex;align-items:center;gap:8px;font-size:1.0625rem;line-height:1.3;letter-spacing:.025em;margin:0;font-weight:700}.brand-mark{width:1.35rem;height:1.35rem;color:var(--accent);transform:rotate(-12deg)}.quiet-button,.outline-button{min-height:48px;border:0;background:transparent;border-radius:8px;padding:8px 10px;font-size:.875rem;line-height:1.4}.quiet-button:hover{background:var(--selected)}.app-header .quiet-button{font-size:.75rem;padding-inline:6px}.outline-button{border:1px solid var(--line);background:var(--surface);min-width:4.75rem}.outline-button[aria-pressed=true]{background:var(--selected);border-color:var(--accent)}
.editor{flex:1;min-width:0;min-height:0;display:grid;grid-template-rows:auto minmax(8rem,1fr) auto auto;gap:8px}.toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}.animal-picker{display:flex;background:#e7ece5;padding:3px;border-radius:11px;gap:2px}.animal-button{display:flex;align-items:center;justify-content:center;gap:6px;min-width:3.75rem;min-height:48px;padding:6px 10px;border:1px solid transparent;border-radius:8px;background:transparent;font-size:.9375rem;font-weight:600}.animal-button[aria-pressed=true]{background:white;border-color:#cbd8cb;box-shadow:0 1px 2px #25352d12}.animal-button svg{width:1.8rem;height:1.8rem;fill:initial;stroke:none}.view-actions{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-left:auto}.view-actions button{white-space:nowrap}
#comparison{position:relative;min-width:0;min-height:8rem;width:100%;height:100%;overflow:hidden;border-radius:10px;background:#e6ebe4;isolation:isolate;touch-action:pan-y;cursor:ew-resize}#comparison canvas{display:none}#comparison>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-select:none}#comparison>img:not([src]){visibility:hidden}#animal-preview{clip-path:inset(0 0 0 var(--split,50%))}.image-label{position:absolute;max-width:calc(50% - 16px);top:10px;z-index:2;background:#fffffff0;color:#26352d;border-radius:4px;padding:5px 8px;font-size:.75rem;line-height:1.4;pointer-events:none}.original-label{left:10px}.animal-label{right:10px}.comparison-line{position:absolute;top:0;bottom:0;left:var(--split,50%);width:2px;background:white;z-index:1;pointer-events:none;transform:translateX(-1px)}.comparison-handle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:44px;height:44px;background:white;border-radius:50%;box-shadow:0 1px 7px #25352d24;display:grid;place-items:center;color:var(--ink)}.comparison-handle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.source-label{position:absolute;max-width:calc(100% - 20px);bottom:8px;left:10px;font-size:.6875rem;line-height:1.4;padding:3px 6px;border-radius:3px;background:#ffffffe6;color:#3e4c43;pointer-events:none}#comparison[data-view=animal]{cursor:default}#comparison[data-view=animal] #animal-preview{clip-path:none}#comparison[data-view=animal] .original-label,#comparison[data-view=animal] .comparison-line{display:none}
.slider-row{display:flex;align-items:center;gap:12px;min-height:44px}.slider-row label{font-size:.8125rem;white-space:nowrap}.slider-hint{font-size:.75rem;color:var(--muted);white-space:nowrap}#split-range{display:block;min-width:0;flex:1;height:44px;margin:0;appearance:none;-webkit-appearance:none;background:transparent;cursor:ew-resize;touch-action:pan-y;accent-color:var(--accent)}#split-range::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:#cad5cb}#split-range::-moz-range-track{height:4px;border-radius:2px;background:#cad5cb}#split-range::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:22px;height:22px;border:3px solid white;border-radius:50%;margin-top:-9px;background:var(--accent);box-shadow:0 0 0 1px var(--accent)}#split-range::-moz-range-thumb{width:16px;height:16px;border:3px solid white;border-radius:50%;background:var(--accent);box-shadow:0 0 0 1px var(--accent)}#split-range:disabled{opacity:.4;cursor:default}.scope-note{font-size:.75rem;color:var(--muted);line-height:1.5;margin:0}
.action-bar{flex:none;padding-top:4px}.primary-actions{display:flex;flex-wrap:wrap;gap:8px}.primary-actions #upload-button{flex:1 1 8rem}.primary-actions #save-button{flex:1 1 5rem}.primary-actions #share-button{flex:1 1 3rem}.button{white-space:nowrap;display:flex;align-items:center;justify-content:center;gap:7px;min-height:50px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;font-size:.9375rem;font-weight:600;line-height:1.5;text-decoration:none}.primary{background:var(--accent);border-color:var(--accent);color:white}.primary:hover{background:#1c593e}.primary:active{background:#154930}.secondary{background:white}.secondary:hover{background:var(--selected)}.privacy{margin:6px 0 0;font-size:.6875rem;line-height:1.5;text-align:center;color:var(--muted)}#status{font-size:.8125rem;line-height:1.5;margin:6px 0 0;color:var(--ink)}#status:empty{display:none}
/* Narrow/short screens keep operations reachable. No page overflow clipping. */
@media(max-width:360px){.app-header h1{font-size:1rem;gap:5px}.app-header .quiet-button{font-size:.6875rem;padding-inline:0}.brand-mark{width:1.15rem;height:1.15rem}.animal-button{min-width:3.125rem;padding-inline:6px}.animal-button svg{width:1.4rem;height:1.4rem}.quiet-button,.outline-button{font-size:.8125rem;padding-inline:8px}.view-actions{gap:2px}.share-word{display:none}.toolbar{gap:4px}}
@media(min-width:761px){.app-shell{padding-inline:28px;padding-bottom:max(16px,env(safe-area-inset-bottom));gap:12px}.app-header{min-height:64px}.app-header h1{font-size:1.25rem}.app-header .quiet-button{font-size:.875rem}.editor{gap:10px}.primary-actions{max-width:560px;margin:auto}.scope-note{text-align:center}.privacy{font-size:.75rem}.animal-button{min-width:74px}#status{text-align:center}}
@media(max-height:500px){.app-shell{height:auto;min-height:100svh}.editor{grid-template-rows:auto minmax(12rem,45svh) auto auto}.app-header{min-height:52px}}
dialog{width:min(620px,calc(100% - 24px));max-height:calc(100svh - 24px);max-height:calc(100dvh - 24px);padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:0 15px 70px #15342130}dialog::backdrop{background:#14251c88}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;padding-bottom:12px;background:white}.dialog-heading h2{font-size:1.0625rem;line-height:1.4;margin:0;font-weight:700}.close-button{width:48px;min-width:48px;height:48px;border:1px solid var(--line);border-radius:50%;background:transparent;font-size:1.75rem;line-height:1}.close-button:hover{background:var(--selected)}#science-dialog[open]{display:flex;flex-direction:column;overflow:hidden}.dialog-scroll{min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:6px}#science-copy,.species-note{font-size:.9375rem;line-height:1.85}#science-copy h3,.species-note h3{font-size:1rem;line-height:1.6;margin:24px 0 8px}.species-note h3{margin-top:4px}#science-copy p,.species-note p{margin:8px 0 16px}#science-copy ul{padding-left:22px}#science-copy li{margin:10px 0}#science-copy a{overflow-wrap:anywhere}#export-dialog[open]{display:flex;flex-direction:column;gap:10px;height:min(820px,calc(100dvh - 24px))}.export-preview{min-height:100px;flex:1;display:flex;justify-content:center;align-items:center;background:var(--page)}#export-image{max-width:100%;max-height:100%;object-fit:contain;display:block}.export-hint{font-size:.8125rem;color:var(--muted);margin:0;flex:none}#download-link{flex:none}.dialog-heading{padding:0}
@media(prefers-reduced-motion:no-preference){button{transition:background-color 150ms,border-color 150ms}dialog[open]{animation:open-dialog 150ms ease-out}@keyframes open-dialog{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}}
