:root { color: var(--tools-text); background: var(--tools-bg); font-family: var(--tools-sans); font-synthesis: none; text-rendering: optimizeLegibility; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
[v-cloak] { display: none; }
:focus-visible { outline: 3px solid var(--tools-green); outline-offset: 3px; }
.brand { color: inherit; text-decoration: none; }
main { width: min(1040px, calc(100% - 40px)); margin: 42px auto 64px; }
.hero { max-width: 850px; margin: 0 auto 28px; text-align: center; }
.hero h1 { margin: 10px 0; font: 500 clamp(2rem, 4vw, 3.4rem)/1.08 var(--tools-serif); letter-spacing: -.035em; text-wrap: balance; }
.hero-copy { color: var(--tools-muted); font-size: 1.15rem; line-height: 1.6; }
.eyebrow { color: var(--tools-green-text); font: 700 .8rem/1.4 var(--tools-mono); letter-spacing: .1em; text-transform: uppercase; }
.workspace { max-width: 850px; margin: auto; padding: 28px; border: 1px solid var(--tools-line); border-radius: 24px; background: var(--tools-surface); }
.workspace-top { display: flex; align-items: center; gap: 20px; margin-bottom: 14px; }
.workspace-top > div { min-width: 0; flex: 1; }
.workspace-top img { flex: 0 0 144px; width: 144px; height: 96px; object-fit: contain; }
.mode-switch { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-switch button { flex: 1 1 160px; padding: 10px; border: 1px solid var(--tools-line); border-radius: 10px; background: var(--tools-surface); color: var(--tools-text); min-height: 44px; font-weight: 600; cursor: pointer; }
.mode-switch button[aria-pressed=true] { background: var(--tools-green-soft); border-color: var(--tools-green); box-shadow: inset 0 -2px var(--tools-green); color: var(--tools-green-text); }
.privacy { color: var(--tools-green-text); font-size: .9rem; display: flex; gap: 8px; align-items: center; line-height: 1.5; }
.privacy svg { width: 18px; height: 18px; flex-shrink: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
label { display: block; font-weight: 600; margin: 14px 0 6px; line-height: 1.4; }
textarea, select, input[type=number] { display: block; width: 100%; min-width: 0; color: var(--tools-text); background: var(--tools-bg); border: 1px solid var(--tools-line); padding: 11px 12px; border-radius: 10px; }
textarea { font-family: var(--tools-mono); line-height: 1.5; resize: vertical; }
select, input { min-height: 44px; }
.counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.counts > div { display: flex; flex-direction: column; }
.counts label { flex: 1; }
.hint { color: var(--tools-muted); line-height: 1.6; font-size: .9rem; }
.hint { margin: 8px 0 16px; }
.advanced { margin-block: 12px; border-top: 1px solid var(--tools-line); padding-top: 12px; }
summary { cursor: pointer; min-height: 44px; line-height: 1.5; padding-block: 8px; }
.choice { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.choice input { accent-color: var(--tools-action); width: 20px; flex-shrink: 0; }
.actions, .piece-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions { margin-top: 16px; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 16px; min-height: 48px; border: 1px solid var(--tools-line); border-radius: 10px; font-weight: 700; cursor: pointer; }
.button-primary { color: var(--tools-on-action); background: var(--tools-action); border-color: var(--tools-action); }
.button-primary:hover { background: var(--tools-action-hover); }
.button-secondary { color: var(--tools-text); background: var(--tools-surface); }
.button-secondary:hover, .icon-button:hover { background: var(--tools-green-soft); }
button:disabled { opacity: .5; cursor: default; }
.quiet { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--tools-green-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.icon-button { width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--tools-line); border-radius: 9px; color: var(--tools-text); background: var(--tools-surface); cursor: pointer; }
.icon-button svg { width: 18px; height: 18px; }
.piece-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.piece-heading label { margin: 0; }
.results { border-top: 1px solid var(--tools-line); margin-top: 20px; padding-top: 12px; }
h2 { font: 500 1.65rem/1.2 var(--tools-serif); }
.piece-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 20px; }
#error { color: var(--tools-red); line-height: 1.5; }
#status { color: var(--tools-green-text); margin: 10px 0 0; line-height: 1.5; }
#status:empty { display: none; }
progress { width: 100%; accent-color: var(--tools-green); }
.clear-row { margin-top: 12px; display: flex; justify-content: flex-end; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Keep the secret beside its threshold settings and primary action on desktop. */
.split-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.split-form fieldset { display: contents; }
.split-input { grid-column: 1; grid-row: 1 / span 2; min-width: 0; }
.split-settings { grid-column: 2; grid-row: 1; min-width: 0; }
.split-form .actions { grid-column: 2; grid-row: 2; align-self: start; }
@media (max-width: 680px) { main { width: calc(100% - 24px); margin-top: 30px; } .workspace { padding: 16px; border-radius: 18px; } .workspace-top { flex-direction: column; gap: 4px; align-items: stretch; } .workspace-top img { width: 120px; height: 80px; flex-basis: auto; align-self: center; } .hero-copy { font-size: 1rem; } .counts { grid-template-columns: 1fr; gap: 0; } .mode-switch button { flex-basis: 100%; } .actions { align-items: stretch; flex-direction: column; } .actions .quiet { align-self: flex-start; } }

@media (max-width: 680px) { .split-form, .split-form fieldset { display: block; } }
