.fx-tone { display: grid; gap: 16px; }
.fx-tone > * { min-width: 0; color: var(--fx-ink); }
.fx-tone .fx-tone-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-tone .fx-tone-goal { margin: 0; line-height: 1.5; }
.fx-tone .fx-tone-controls { border: 0; margin: 0; padding: 0; min-width: 0; }
.fx-tone .fx-tone-controls legend { padding: 0; margin-bottom: 10px; font-size: 16px; font-weight: 700; }
.fx-tone .fx-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.fx-tone .fx-btn { box-sizing: border-box; flex: 1 1 140px; min-width: 24px; min-height: 44px; max-width: 100%; padding: 10px 12px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; font-weight: 700; line-height: 1.4; white-space: normal; text-align: center; cursor: pointer; }
.fx-tone .fx-tone-tone .fx-btn { flex-basis: 60px; padding: 10px 6px; }
.fx-tone .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); font-weight: 700; }
.fx-tone .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-tone .fx-tone-swap { display: grid; min-width: 0; }
.fx-tone .fx-tone-swap > * { grid-area: 1 / 1; visibility: hidden; margin: 0; color: var(--fx-ink); }
.fx-tone .fx-tone-state { visibility: hidden; }
.fx-tone:has(#fx-tone-sam:checked) .fx-tone-who-sam, .fx-tone:has(#fx-tone-manager:checked) .fx-tone-who-manager, .fx-tone:has(#fx-tone-child:checked) .fx-tone-who-child, .fx-tone:has(#fx-tone-chatty:checked) .fx-tone-chatty, .fx-tone:has(#fx-tone-simple:checked) .fx-tone-simple, .fx-tone:has(#fx-tone-formal:checked) .fx-tone-formal { visibility: visible; }
.fx-tone:has(#fx-tone-sam:checked):has(#fx-tone-chatty:checked) .fx-tone-sc, .fx-tone:has(#fx-tone-sam:checked):has(#fx-tone-simple:checked) .fx-tone-ss, .fx-tone:has(#fx-tone-sam:checked):has(#fx-tone-formal:checked) .fx-tone-sf, .fx-tone:has(#fx-tone-manager:checked):has(#fx-tone-chatty:checked) .fx-tone-mc, .fx-tone:has(#fx-tone-manager:checked):has(#fx-tone-simple:checked) .fx-tone-ms, .fx-tone:has(#fx-tone-manager:checked):has(#fx-tone-formal:checked) .fx-tone-mf, .fx-tone:has(#fx-tone-child:checked):has(#fx-tone-chatty:checked) .fx-tone-cc, .fx-tone:has(#fx-tone-child:checked):has(#fx-tone-simple:checked) .fx-tone-cs, .fx-tone:has(#fx-tone-child:checked):has(#fx-tone-formal:checked) .fx-tone-cf { visibility: visible; }
.fx-tone .fx-tone-scene { box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 218px 170px; gap: 12px; height: 440px; padding: 12px; align-content: center; }
.fx-tone .fx-tone-part { font-size: 14px; line-height: 20px; }
.fx-tone .fx-tone-words { display: grid; align-content: start; gap: 8px; min-width: 0; }
.fx-tone .fx-tone-bubble { position: relative; padding: 12px; border: 2px solid var(--fx-ink); border-radius: 18px; background: var(--fx-paper); font-size: 16px; line-height: 24px; }
.fx-tone .fx-tone-bubble::after { content: ""; position: absolute; left: 22px; bottom: -8px; width: 12px; height: 12px; background: var(--fx-paper); border-right: 2px solid var(--fx-ink); border-bottom: 2px solid var(--fx-ink); transform: rotate(45deg); }
.fx-tone .fx-tone-person { display: grid; grid-template-rows: 20px 22px 94px 20px 40px; gap: 4px; min-width: 0; text-align: center; }
.fx-tone .fx-tone-identity { font-size: 16px; line-height: 22px; }
.fx-tone .fx-tone-reaction { font-size: 14px; line-height: 20px; }
.fx-tone .fx-tone-portrait { width: 150px; height: 94px; max-width: 100%; justify-self: center; }
.fx-tone .fx-tone-shirt { fill: var(--fx-mint); stroke: var(--fx-ink); stroke-width: 2; }
.fx-tone:has(#fx-tone-manager:checked) .fx-tone-shirt { fill: var(--fx-grape); }
.fx-tone:has(#fx-tone-child:checked) .fx-tone-shirt { fill: var(--fx-coral); }
.fx-tone .fx-tone-skin { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 2; }
.fx-tone .fx-tone-hair, .fx-tone .fx-tone-eye { fill: var(--fx-ink); }
.fx-tone .fx-tone-face { fill: none; stroke: var(--fx-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.fx-tone .fx-tone-head { transform-origin: 90px 43px; }
.fx-tone:has(#fx-tone-manager:checked):has(#fx-tone-formal:checked) .fx-tone-head { animation: fx-tone-nod 0.7s 1; }
.fx-tone .fx-tone-tick circle { fill: var(--fx-paper); stroke: var(--fx-mint); stroke-width: 3; }
.fx-tone .fx-tone-tick path { fill: none; stroke: var(--fx-mint); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.fx-tone .fx-tone-tickword { color: var(--fx-ink); background: var(--fx-mint); border-radius: 4px; padding: 0 4px; font-weight: 700; }
.fx-tone .fx-tone-dial { grid-column: 1 / -1; display: grid; justify-items: center; align-content: start; gap: 4px; min-width: 0; }
.fx-tone .fx-tone-gauge { position: relative; width: min(100%, 240px); height: 110px; }
.fx-tone .fx-tone-stop { position: absolute; padding: 2px 4px; border-radius: 6px; font-size: 14px; line-height: 20px; }
.fx-tone .fx-tone-stop-chatty { left: 0; top: 30px; }
.fx-tone .fx-tone-stop-simple { left: 50%; top: 0; transform: translateX(-50%); }
.fx-tone .fx-tone-stop-formal { right: 0; top: 30px; }
.fx-tone:has(#fx-tone-chatty:checked) .fx-tone-stop-chatty, .fx-tone:has(#fx-tone-simple:checked) .fx-tone-stop-simple, .fx-tone:has(#fx-tone-formal:checked) .fx-tone-stop-formal { background: var(--fx-sun); text-decoration: underline; }
.fx-tone .fx-tone-knob { box-sizing: border-box; position: absolute; left: 50%; top: 35px; width: 72px; height: 72px; border: 3px solid var(--fx-ink); border-radius: 50%; background: var(--fx-sun-pale); transform: translateX(-50%); }
.fx-tone .fx-tone-pointer { position: absolute; left: calc(50% - 2px); bottom: 50%; width: 4px; height: 29px; border-radius: 2px; background: var(--fx-ink); transform-origin: 50% 100%; transform: rotate(60deg); transition: transform 0.35s; }
.fx-tone:has(#fx-tone-chatty:checked) .fx-tone-pointer { transform: rotate(-60deg); }
.fx-tone:has(#fx-tone-simple:checked) .fx-tone-pointer { transform: rotate(0deg); }
.fx-tone .fx-tone-hub { box-sizing: border-box; position: absolute; left: calc(50% - 6px); top: calc(50% - 6px); width: 12px; height: 12px; border: 2px solid var(--fx-ink); border-radius: 50%; background: var(--fx-coral); }
.fx-tone .fx-tone-dial-status { font-size: 14px; line-height: 20px; text-align: center; }
.fx-tone .fx-tone-feedback { line-height: 1.5; }
@container (max-width: 480px) { .fx-tone .fx-tone-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: 160px 218px 170px; height: 610px; } }
@keyframes fx-tone-nod { 0% { transform: rotate(0deg) translateY(0px); } 50% { transform: rotate(8deg) translateY(5px); } 100% { transform: rotate(0deg) translateY(0px); } }
@media (prefers-reduced-motion: reduce) { .fx-tone .fx-tone-head { animation: none; } .fx-tone .fx-tone-pointer { transition: none; } }