/* Chunk Sound Pad MVP — static, no build, max 420px
   Structure: Base(reset/type) → AppShell(header/views/tabbar/toast) → Views(listen/form/history/me) */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "Pretendard", sans-serif; background: #2c3e50; display: flex; justify-content: center; min-height: 100vh; }
.sound-pad { width: 100%; }
.wrap { margin: 0 auto; width: 100%; max-width: 420px; min-height: 100svh; background: #121214; color: #f5f3ee; border-left: 1px solid #2a2a30; border-right: 1px solid #2a2a30; padding: 20px 20px calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
header { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #2a2a30; padding-bottom: 16px; position: sticky; top: 0; z-index: 20; background: #121214; padding-top: 4px; }
#btn-reset { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #333; background: #1c1c21; color: #999; font-size: 18px; cursor: pointer; }
.brand { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: #e0a458; }
h1 { font-size: 18px; margin-top: 4px; }
.guidance { margin-top: 16px; border-left: 2px solid #e0a458; background: #1c1c21; padding: 12px 16px; min-height: 96px; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #e0a458; }
.cue { font-size: 14px; margin-top: 6px; line-height: 1.5; }
.cmd { margin-top: 4px; font-family: monospace; font-size: 14px; color: #7dd3a8; }
.orb-zone { display: flex; flex-direction: column; align-items: center; padding: 24px 0 20px; }
.orb { width: 120px; height: 120px; border-radius: 50%; border: none; cursor: pointer; background: radial-gradient(circle, rgba(255,255,255,.15) 0%, rgba(20,20,25,0) 70%), #1c1c21; box-shadow: 0 0 0 1px #333; animation: breathe 3s infinite ease-in-out; }
.orb-core { width: 56px; height: 56px; margin: 32px auto; border-radius: 50%; background: #2a2a30; }
.orb.state-tts { background: conic-gradient(from 0deg, #FF7E36, #FF2E93, #00F0FF, #FF7E36); animation: spin .8s infinite linear; }
.orb.state-stt, .orb.is-listening { background: radial-gradient(circle, rgba(255,184,0,.4) 0%, rgba(255,184,0,0) 65%), #1c1c21; animation: glow .5s infinite alternate; }
.orb.state-train { background: conic-gradient(from 90deg, #7dd3a8, #00F0FF, #7dd3a8); animation: spin 1.2s infinite linear; }
.orb.state-mastered { background: linear-gradient(135deg, #0B2911, #1d5c2e); }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes spin { to { filter: hue-rotate(360deg); } }
@keyframes glow { from { box-shadow: 0 0 0 1px #ffb800; } to { box-shadow: 0 0 24px 2px #ffb800; } }
.status-row { display: flex; gap: 8px; align-items: center; margin-top: 16px; }
#status { font-size: 12px; color: #999; }
.tap-hint { margin-top: 4px; font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: rgba(224,164,88,.8); }
.heard { margin-top: 6px; min-height: 20px; max-width: 340px; text-align: center; font-size: 11px; color: rgba(153,153,153,.8); }
.pip { width: 8px; height: 8px; border-radius: 50%; background: #444; }
.pip.is-live { background: #ff3b30; animation: glow .5s infinite alternate; }
.ba { color: #e0a458; font-weight: 600; }
.cover-line { font-size: 19px; font-weight: 700; line-height: 1.4; color: #e0a458; }
.passes { padding: 20px 0; }
.passes-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.passes-title { font-size: 14px; margin-top: 4px; }
.count { font-family: monospace; font-size: 24px; color: #7dd3a8; }
.count span { color: #fff; }
.dots { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.dot-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: monospace; font-size: 9px; color: #999; }
.pass-dot { width: 22px; height: 22px; border-radius: 50%; background: transparent; border: 2px solid #555; }
.pass-dot.is-complete { border-color: #7dd3a8; background: radial-gradient(circle, #7dd3a8 0 6px, transparent 7px); }
#view-listen { display: flex; flex-direction: column; flex: 1 0 auto; }
.orb-zone { flex: 1 0 auto; justify-content: center; }
#cmd3-wrap { margin-top: auto; }
.cmd3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.cmd3 .cmd-btn { align-items: flex-start; justify-content: center; gap: 4px; }
.cmd-btn b { display: block; font-size: 12px; line-height: 1.35; }
.cmd-btn i { display: block; font-style: normal; font-size: 10px; color: #999; margin-top: 4px; }
#tone-grid-pass { margin-top: 14px; }
.flow-cap { grid-column: 1 / -1; text-align: center; font-size: 11px; color: #777; letter-spacing: .08em; }
.cmd-btn { position: relative; min-height: 80px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid #2a2a30; background: #1c1c21; color: #fff; padding: 12px; cursor: pointer; text-align: left; }
.cmd-btn b { display: block; font-size: 12px; }
.cmd-btn i { display: block; font-style: normal; font-family: monospace; font-size: 9px; color: #999; margin-top: 4px; }
.cmd-btn.is-active { border-color: #e0a458; }
.step-badge { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #2a2a30; color: #999; }
.cmd-btn.is-next { border-color: #7dd3a8; animation: nextPulse 1.6s infinite ease-in-out; }
.cmd-btn.is-next .step-badge { background: #7dd3a8; color: #121214; }
.cmd-btn.is-done .step-badge { background: transparent; color: #7dd3a8; font-size: 0; }
.cmd-btn.is-done .step-badge::after { content: "✓"; font-size: 13px; }
@keyframes nextPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(125,211,168,.0); } 50% { box-shadow: 0 0 0 3px rgba(125,211,168,.35); } }
.manual { margin-top: 12px; width: 100%; border: 1px dashed rgba(255,184,0,.6); background: rgba(255,184,0,.08); color: #ffb800; padding: 12px; font-size: 14px; cursor: pointer; }
.peek { margin-top: 10px; width: 100%; background: none; border: none; color: #666; font-size: 12px; text-decoration: underline; cursor: pointer; }
.tone-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tone-button { min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 1px solid #2a2a30; background: #1c1c21; color: #fff; cursor: pointer; }
.tone-button:disabled { opacity: .45; cursor: not-allowed; }
.tone-button span:last-child { font-size: 10px; color: #999; }
.tone-button.is-active { border-color: #7dd3a8; }
.tone-emoji { font-size: 24px; }
.tone-note { margin-top: 12px; text-align: center; font-size: 10px; color: #999; }
.cafe { margin-top: 20px; display: flex; min-height: 52px; align-items: center; justify-content: center; border: 1px solid #2ecc71; background: rgba(46,204,113,.12); color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; padding: 0 16px; text-align: center; }
.hidden { display: none !important; }
#start-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(8,8,10,.96); padding: 24px; }
.start-card { width: 100%; max-width: 340px; text-align: center; background: #1c1c21; border: 1px solid #333; border-radius: 20px; padding: 32px 24px; }
.start-card h1 { font-size: 22px; }
.start-card p { margin-top: 12px; font-size: 14px; line-height: 1.6; color: #bbb; }
#btn-start { margin-top: 20px; width: 100%; border: none; border-radius: 50px; background: #2ecc71; color: #fff; font-size: 18px; font-weight: 800; padding: 16px; cursor: pointer; }
.start-note { font-size: 12px !important; color: #777 !important; }
.skip { margin-top: 10px; background: none; border: none; color: #777; font-size: 13px; text-decoration: underline; cursor: pointer; }
/* 4탭 */
.view-head h2 { font-size: 18px; color: #fff; }
.view-sub { font-size: 12px; color: #777; margin: 4px 0 16px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 420px; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(18,18,20,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid #2a2a30; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); }
.tab { position: relative; background: none; border: none; color: #666; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 10px; padding: 8px 0 6px; cursor: pointer; line-height: 1.2; }
.tab-icon { font-size: 24px; line-height: 1; }
.tab.active { color: #2ecc71; font-weight: 700; }
.tab-badge { position: absolute; top: 0; right: calc(50% - 26px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff453a; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }
.tab-badge.done { background: #2ecc71; }
.toast { position: fixed; left: 50%; transform: translateX(-50%) translateY(8px); bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60; max-width: 340px; background: rgba(28,28,33,.96); border: 1px solid #444; color: #fff; font-size: 13px; border-radius: 20px; padding: 10px 18px; opacity: 0; transition: opacity .25s ease, transform .25s ease; pointer-events: none; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } .cmd-btn.is-next { animation: none; } }
/* 형태 */
.picker { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.pick { flex: 0 0 auto; border: 1px solid #333; background: #1c1c21; color: #999; border-radius: 20px; padding: 8px 18px; font-size: 13px; cursor: pointer; scroll-snap-align: start; }
.pick.is-on { border-color: #7dd3a8; color: #7dd3a8; }
.form-full { font-size: 19px; font-weight: 700; line-height: 1.4; margin-bottom: 12px; }
.form-card { position: relative; display: block; width: 100%; text-align: left; background: #1c1c21; border: 1px solid #2a2a30; border-radius: 14px; padding: 14px 14px 14px 44px; margin-bottom: 8px; cursor: pointer; color: #fff; }
.form-card .step-badge { left: 12px; right: auto; top: 14px; }
.form-text { font-size: 16px; font-weight: 700; }
.form-hint { font-size: 11px; color: #999; margin-top: 4px; }
.ccq-sec { margin-top: 20px; border-top: 1px solid #2a2a30; padding-top: 16px; }
.ccq-sec h3 { font-size: 14px; margin-bottom: 10px; }
.ccq-card { background: #1c1c21; border: 1px solid #2a2a30; border-radius: 14px; padding: 14px; margin-bottom: 8px; }
.ccq-q { font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.ccq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ccq-ans { border: 1px solid #444; background: none; color: #fff; border-radius: 12px; padding: 10px; font-size: 14px; cursor: pointer; }
.ccq-ans:disabled { opacity: .85; cursor: default; }
.ccq-ans.is-yes { border-color: #2ecc71; color: #2ecc71; }
.ccq-ans.is-no { border-color: #e74c3c; color: #e74c3c; }
#ccq-score { margin-top: 10px; }
/* 기록·내정보 */
.hist-row { display: flex; justify-content: space-between; align-items: center; background: #1c1c21; border: 1px solid #2a2a30; border-radius: 12px; padding: 12px 14px; font-size: 13px; color: #bbb; margin-bottom: 8px; }
.hist-row b { color: #fff; }
.set-row { display: flex; justify-content: space-between; align-items: center; background: #1c1c21; border: 1px solid #2a2a30; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 8px; }
.set-row span { display: flex; flex-direction: column; gap: 2px; }
.set-sub { font-size: 11px; color: #777; }
.lib-card { background: #1c1c21; border: 1px solid #2a2a30; border-radius: 14px; padding: 14px; }
.lib-card #pack-list { margin: 10px 0; }
.hist-hero { background: linear-gradient(135deg, #0B2911, #1c1c21); border: 1px solid #2ecc71; border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.hist-hero-date { font-size: 15px; font-weight: 700; margin-top: 6px; }
.sent-card { background: #1c1c21; border: 1px solid #2a2a30; border-radius: 14px; padding: 14px; margin-bottom: 8px; cursor: pointer; }
.sent-card.is-on { border-color: #7dd3a8; }
.hist-sec { border-top: 1px solid #2a2a30; padding-top: 14px; }
.sent-text { font-size: 14px; font-weight: 700; line-height: 1.4; }
.mini-dots { display: flex; gap: 6px; margin: 10px 0 6px; }
.mini-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid #555; }
.mini-dot.is-on { background: #7dd3a8; border-color: #7dd3a8; }
.sent-date { font-size: 11px; color: #777; }
.toggle { border: 1px solid #2ecc71; background: none; color: #2ecc71; border-radius: 20px; padding: 4px 16px; font-size: 13px; cursor: pointer; }
.toggle[aria-pressed="false"] { border-color: #444; color: #777; }
.lib-title { font-size: 14px; margin: 20px 0 10px; }
/* S3-T1: import textarea/file/preset styles removed (single-button import) */
