/* handy.moe camera & voice wave (Genzo, 2026-12-03): film looks, lo-fi looks, webcam studio, voice changer. */
.cam-stage { position: relative; display: grid; place-items: center; background: var(--check-a); border: 1px solid var(--rule-2); min-height: 200px; margin: 16px 0 8px; overflow: hidden; }
.cam-stage canvas, .cam-stage img, .cam-stage video { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; }
.cam-stage canvas.pixel, .cam-stage video.pixel { image-rendering: pixelated; }
.cam-stage canvas.fill { width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.cam-stage img.cam-before { display: none; }
.cam-stage.before canvas { display: none; }
.cam-stage.before img.cam-before { display: block; }
.cam-stage.side { grid-template-columns: 1fr 1fr; gap: 8px; }
.cam-stage.side img.cam-before { display: block; grid-row: 1; grid-column: 1; }
.cam-stage.side canvas { grid-row: 1; grid-column: 2; }
.cam-stage.side canvas, .cam-stage.side img.cam-before { width: 100%; height: auto; object-fit: contain; }
.cam-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; margin-top: 16px; }
.cam-thumb { flex: 0 0 auto; width: 104px; height: 80px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--rule-2); color: var(--ink-3); cursor: pointer; padding: 2px; }
.cam-thumb canvas { max-width: 100%; max-height: 100%; }
.cam-thumb[aria-pressed="true"] { border-color: var(--fire); outline: 2px solid var(--fire); outline-offset: -2px; }
.cam-group { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
.cam-group legend { font-size: var(--small); color: var(--ink-3); padding: 0; margin-bottom: 4px; }
.cam-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cam-chip { position: relative; }
.cam-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.cam-chip span { display: block; padding: 4px 12px; border: 1px solid var(--rule-2); background: var(--paper); color: var(--ink-2); font-size: var(--small); }
.cam-chip:hover span { color: var(--fire); border-color: var(--fire); }
.cam-chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cam-chip input:focus-visible + span { outline: 2px solid var(--fire); outline-offset: 2px; }
.cam-sliders { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 24px; margin-top: 16px; }
.cam-sl input[type=range] { width: 100%; }
.cam-bar { align-items: center; }
.cam-meter { height: 8px; background: var(--paper); border: 1px solid var(--rule-2); flex: 1 1 160px; min-width: 120px; }
.cam-meter > i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .06s linear; }
.cam-rec { color: #ff4d4d; }
.cam-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #ff4d4d; margin-right: 6px; animation: cam-blink 1s steps(2) infinite; }
@keyframes cam-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cam-dot { animation: none; } }
.cam-out { margin-top: 16px; }
.cam-out video, .cam-out audio { width: 100%; max-height: 60vh; background: #000; }
.cam-stats { font-size: var(--small); color: var(--ink-3); }
.cam-stats b { color: var(--ink); font-weight: normal; }
.cam-tabs { margin-top: 16px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.voice-grid .cam-chip span { text-align: center; padding: 8px; }
.cam-howto-obs { margin-top: 16px; }
.cam-howto-obs ol { margin: 8px 0 0 24px; }
.cam-howto-obs li + li { margin-top: 4px; }
@media (max-width: 520px) {
  .cam-stage.side { grid-template-columns: 1fr; }
  .cam-stage.side canvas { grid-row: 2; grid-column: 1; }
  .cam-thumb { width: 80px; height: 64px; }
}
