:root {
    --voice-demo-bg: #f5f7f9;
    --voice-demo-surface: #ffffff;
    --voice-demo-border: #d8dee6;
    --voice-demo-text: #16202a;
    --voice-demo-muted: #647282;
    --voice-demo-primary: #0f766e;
    --voice-demo-primary-dark: #0b5f59;
    --voice-demo-accent: #2563eb;
    --voice-demo-danger: #b42318;
    --voice-demo-warning: #b45309;
    --voice-demo-track: #e7ebf0;
}

.voice-demo-page {
    margin: 0;
    min-height: 100vh;
    background: var(--voice-demo-bg);
    color: var(--voice-demo-text);
    font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.voice-demo-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 36px;
}

.voice-demo-shell-mypage {
    width: 100%;
    padding: 12px 0 24px;
}

.voice-demo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    margin-bottom: 28px;
}

.voice-demo-brand,
.voice-demo-link {
    color: var(--voice-demo-text);
    text-decoration: none;
}

.voice-demo-brand {
    font-weight: 800;
    font-size: 1.25rem;
}

.voice-demo-link {
    border: 1px solid var(--voice-demo-border);
    border-radius: 8px;
    padding: 8px 14px;
    background: var(--voice-demo-surface);
}

.voice-demo-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    gap: 28px;
    align-items: start;
}

.voice-demo-stage-mypage {
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 520px);
}

.voice-demo-copy {
    padding: 28px 0;
}

.voice-demo-kicker {
    margin: 0 0 10px;
    color: var(--voice-demo-primary);
    font-weight: 700;
}

.voice-demo-copy h1 {
    margin: 0 0 14px;
    font-size: 2.1rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.voice-demo-lead {
    margin: 0;
    color: var(--voice-demo-muted);
    line-height: 1.8;
}

.voice-demo-console {
    display: grid;
    gap: 16px;
    padding: 22px;
    background: var(--voice-demo-surface);
    border: 1px solid var(--voice-demo-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.voice-demo-control-group,
.voice-demo-device-row {
    display: grid;
    gap: 7px;
}

.voice-demo-control-group label,
.voice-demo-device-row label {
    color: var(--voice-demo-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.voice-demo-select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--voice-demo-border);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: var(--voice-demo-text);
    font-size: 0.95rem;
}

.voice-demo-select:disabled {
    color: var(--voice-demo-muted);
    background: #f3f5f7;
}

.voice-demo-status {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef8f6;
    color: var(--voice-demo-primary-dark);
    font-weight: 800;
}

.voice-demo-status[data-state="error"] {
    background: #fff1f0;
    color: var(--voice-demo-danger);
}

.voice-demo-status[data-state="warning"] {
    background: #fff7ed;
    color: var(--voice-demo-warning);
}

.voice-demo-message {
    min-height: 22px;
    color: var(--voice-demo-muted);
    line-height: 1.6;
}

.voice-demo-chat {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 140px;
    max-height: 240px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--voice-demo-border);
    border-radius: 8px;
    background: #f8fafc;
}

.voice-demo-chat-row {
    display: grid;
    gap: 4px;
    max-width: 88%;
}

.voice-demo-chat-row-user {
    justify-self: end;
}

.voice-demo-chat-row-assistant {
    justify-self: start;
}

.voice-demo-chat-label {
    color: var(--voice-demo-muted);
    font-size: 0.75rem;
    font-weight: 800;
}

.voice-demo-chat-row-user .voice-demo-chat-label {
    text-align: right;
}

.voice-demo-chat-bubble {
    overflow-wrap: anywhere;
    border: 1px solid var(--voice-demo-border);
    border-radius: 8px;
    padding: 9px 11px;
    background: #ffffff;
    color: var(--voice-demo-text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.voice-demo-chat-row-user .voice-demo-chat-bubble {
    border-color: rgba(15, 118, 110, 0.28);
    background: #e8f6f3;
}

.voice-demo-meters {
    display: grid;
    gap: 12px;
}

.voice-demo-meter {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.voice-demo-meter span:first-child {
    color: var(--voice-demo-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.voice-demo-meter-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--voice-demo-track);
}

.voice-demo-meter-track span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--voice-demo-primary), var(--voice-demo-accent));
    transition: width 80ms linear;
}

.voice-demo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.voice-demo-button {
    min-height: 42px;
    min-width: 92px;
    border: 1px solid var(--voice-demo-border);
    border-radius: 8px;
    padding: 9px 14px;
    background: #ffffff;
    color: var(--voice-demo-text);
    font-weight: 800;
    cursor: pointer;
}

.voice-demo-button-primary {
    border-color: var(--voice-demo-primary);
    background: var(--voice-demo-primary);
    color: #ffffff;
}

.voice-demo-button:hover:not(:disabled) {
    border-color: var(--voice-demo-primary);
}

.voice-demo-button-primary:hover:not(:disabled) {
    background: var(--voice-demo-primary-dark);
}

.voice-demo-button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.voice-demo-page-public {
    --voice-demo-public-navy: #05346c;
    --voice-demo-public-blue: #1a5ba3;
    --voice-demo-public-ink: #15334b;
    --voice-demo-public-red: #dc2625;
    --voice-demo-public-text: #33414f;
    --voice-demo-public-muted: #5b6b7c;
    --voice-demo-public-page: #eef3f9;
    --voice-demo-public-line: #e3ecf5;
    --voice-demo-public-blue-soft: rgba(26, 91, 163, 0.1);
    --voice-demo-public-shadow: 0 18px 50px -22px rgba(5, 52, 108, 0.4);
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    background: var(--voice-demo-public-page);
}

.voice-demo-public-phone {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: min(420px, 100vw);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    color: var(--voice-demo-public-text);
    padding: 28px 24px calc(28px + env(safe-area-inset-bottom));
}

.voice-demo-public-screen {
    display: none;
    max-width: 100%;
    min-height: calc(100vh - 56px - env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    flex-direction: column;
    animation: voice-demo-public-rise 0.42s ease both;
}

.voice-demo-public-screen.is-on {
    display: flex;
}

.voice-demo-public-screen[data-public-stage="intro"] {
    padding-bottom: 0;
}

/* intro 画面 最下部のポータルへ戻るリンク */
.voice-demo-public-backlink {
    margin-top: auto;
    padding-top: 20px;
    padding-bottom: 4px;
    text-align: center;
}

.voice-demo-public-backlink a {
    display: inline-block;
    color: var(--voice-demo-public-muted);
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    transition: color 0.2s ease;
}

.voice-demo-public-backlink a:hover,
.voice-demo-public-backlink a:focus {
    color: var(--voice-demo-public-navy);
}

/* 体験終了画面の「戻る」はキャンペーン文の直下に配置（最下部へ押し下げない）し、フォントを1.5倍に */
.voice-demo-public-backlink-inline {
    margin-top: 8px;
    padding-top: 8px;
}

.voice-demo-public-backlink-inline a {
    font-size: 21px;
}

/* 体験終了画面の「戻る」を /auth/portal/ のログインボタンと同じデザインのボタンにする */
.voice-demo-public-backlink-inline a.voice-demo-public-backlink-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 44px;
    border: 1px solid #9ca3af;
    border-radius: 12px;
    background: #fff;
    color: #0066cc;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    padding-bottom: 0;
    transition: transform .16s ease, box-shadow .2s ease, background-color .18s ease, border-color .18s ease;
}

.voice-demo-public-backlink-inline a.voice-demo-public-backlink-btn:hover,
.voice-demo-public-backlink-inline a.voice-demo-public-backlink-btn:focus {
    background: #f9fafb;
    border-color: #6b7280;
    color: #0052a3;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.07);
}

/* イントロ画面の「戻る」を /auth/register/ の戻るボタンと同じデザインのボタンにする */
.voice-demo-public-backlink a.voice-demo-public-intro-backlink-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 44px;
    border: 1px solid #9ca3af;
    border-radius: 12px;
    background: #fff;
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    padding-bottom: 0;
    transition: transform .16s ease, box-shadow .2s ease, background-color .18s ease, border-color .18s ease;
}

.voice-demo-public-backlink a.voice-demo-public-intro-backlink-btn:hover,
.voice-demo-public-backlink a.voice-demo-public-intro-backlink-btn:focus {
    background: #f9fafb;
    border-color: #6b7280;
    color: #374151;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(17, 24, 39, 0.07);
}

@keyframes voice-demo-public-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.voice-demo-public-lead {
    margin-top: auto;
}

.voice-demo-public-screen[data-public-stage="intro"] .voice-demo-public-lead {
    margin-bottom: 40px;
}

.voice-demo-public-intro-logo {
    display: block;
    width: 192px;
    height: 192px;
    margin: 0 auto 14px;
    object-fit: contain;
}

.voice-demo-public-avatar {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 4px solid #ffffff;
    background:
        radial-gradient(circle at 36% 30%, #ffffff 0 7%, transparent 8%),
        linear-gradient(145deg, #dce9f7, #8eb5dc 46%, #05346c);
    box-shadow: var(--voice-demo-public-shadow);
}

.voice-demo-public-avatar::before,
.voice-demo-public-avatar::after {
    content: "";
    position: absolute;
    inset: -13px;
    border: 2px solid var(--voice-demo-public-blue);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.voice-demo-public-avatar.is-speaking::before {
    animation: voice-demo-public-sonar 2.2s ease-out infinite;
}

.voice-demo-public-avatar.is-speaking::after {
    animation: voice-demo-public-sonar 2.2s ease-out 0.75s infinite;
}

.voice-demo-public-avatar.is-listening {
    box-shadow: 0 18px 44px -24px rgba(220, 38, 37, 0.55);
}

.voice-demo-public-avatar span {
    color: #ffffff;
    font-size: 3.4rem;
    font-weight: 800;
    letter-spacing: 0;
}

.voice-demo-public-avatar-small {
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
}

.voice-demo-public-avatar-small span {
    font-size: 2.3rem;
}

.voice-demo-public-avatar-large {
    width: 158px;
    height: 158px;
}

.voice-demo-public-call-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 158px;
    height: 158px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    object-fit: contain;
    box-shadow: 0 22px 55px -18px rgba(5, 52, 108, 0.45);
}

.voice-demo-public-ring.is-speaking::before,
.voice-demo-public-ring.is-speaking::after {
    content: "";
    position: absolute;
    width: 172px;
    height: 172px;
    border: 2px solid var(--voice-demo-public-blue);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.voice-demo-public-ring.is-speaking::before {
    animation: voice-demo-public-sonar 2.2s ease-out infinite;
}

.voice-demo-public-ring.is-speaking::after {
    animation: voice-demo-public-sonar 2.2s ease-out 0.75s infinite;
}

.voice-demo-public-call-logo.is-speaking {
    animation: voice-demo-public-bob 2.6s ease-in-out infinite;
}

.voice-demo-public-call-logo.is-listening {
    box-shadow: 0 18px 44px -24px rgba(220, 38, 37, 0.55);
}

@keyframes voice-demo-public-bob {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.025);
    }
}

@keyframes voice-demo-public-sonar {
    0% {
        opacity: 0.42;
        transform: scale(0.82);
    }
    100% {
        opacity: 0;
        transform: scale(1.28);
    }
}

.voice-demo-public-eyebrow {
    margin: 0 0 16px;
    color: var(--voice-demo-public-blue);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-align: center;
}

.voice-demo-public-lead h1,
.voice-demo-public-ended h2 {
    margin: 0;
    color: var(--voice-demo-public-ink);
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0;
}

.voice-demo-public-lead em,
.voice-demo-public-ended em {
    color: var(--voice-demo-public-blue);
    font-style: normal;
}

.voice-demo-public-sub {
    margin: 18px 0 0;
    color: var(--voice-demo-public-muted);
    font-size: 1.05rem;
    line-height: 1.85;
}

.voice-demo-public-facts {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.voice-demo-public-fact {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--voice-demo-public-text);
    font-size: 1rem;
}

.voice-demo-public-fact span {
    position: relative;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 11px;
    background: var(--voice-demo-public-blue-soft);
}

.voice-demo-public-fact span::after {
    content: "";
    position: absolute;
    top: 10px;
    left: 9px;
    width: 14px;
    height: 8px;
    border-left: 3px solid var(--voice-demo-public-blue);
    border-bottom: 3px solid var(--voice-demo-public-blue);
    transform: rotate(-45deg);
}

.voice-demo-public-cta {
    display: grid;
    gap: 14px;
    margin-top: 30px;
    text-align: center;
}

.voice-demo-public-cta-full {
    width: 100%;
}

.voice-demo-public-cta p,
.voice-demo-public-campaign {
    margin: 0;
    color: var(--voice-demo-public-muted);
    font-size: 0.86rem;
    line-height: 1.7;
}

/* イントロ画面「このデモ会話は無料で体験できます。」のフォントサイズ */
.voice-demo-public-cta p {
    font-size: 1.0rem;
}

.voice-demo-public-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 14px;
    padding: 14px 18px;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.voice-demo-public-button-primary {
    background: var(--voice-demo-public-navy);
    color: #ffffff;
    box-shadow: var(--voice-demo-public-shadow);
}

/* 終了画面「無料でDELNEをはじめる」ボタンは濃いオレンジ色 */
.voice-demo-public-button-register {
    background: #f4a016;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(244, 160, 22, 0.28);
}

.voice-demo-public-button-register:hover,
.voice-demo-public-button-register:focus {
    background: #db8d0c;
}

.voice-demo-public-button-ghost {
    background: transparent;
    color: var(--voice-demo-public-muted);
    box-shadow: none;
}

.voice-demo-public-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.voice-demo-public-mic-stage,
.voice-demo-public-connecting,
.voice-demo-public-call,
.voice-demo-public-ended {
    flex: 1;
}

.voice-demo-public-mic-stage,
.voice-demo-public-connecting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.voice-demo-public-mic-badge {
    position: relative;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: var(--voice-demo-public-blue-soft);
}

.voice-demo-public-mic-badge::after {
    content: "";
    position: absolute;
    inset: -10px;
    border: 2px solid var(--voice-demo-public-blue);
    border-radius: 50%;
    opacity: 0.25;
    animation: voice-demo-public-breathe 2.6s ease-in-out infinite;
}

.voice-demo-public-mic-badge span {
    position: relative;
    width: 30px;
    height: 48px;
    border: 4px solid var(--voice-demo-public-blue);
    border-radius: 18px;
}

.voice-demo-public-mic-badge span::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -18px;
    width: 32px;
    height: 22px;
    border-bottom: 4px solid var(--voice-demo-public-blue);
    border-left: 4px solid var(--voice-demo-public-blue);
    border-right: 4px solid var(--voice-demo-public-blue);
    border-radius: 0 0 18px 18px;
    transform: translateX(-50%);
}

.voice-demo-public-mic-badge span::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -31px;
    width: 4px;
    height: 14px;
    background: var(--voice-demo-public-blue);
    transform: translateX(-50%);
}

@keyframes voice-demo-public-breathe {
    0%,
    100% {
        opacity: 0.12;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.28;
        transform: scale(1.08);
    }
}

.voice-demo-public-mic-stage h2,
.voice-demo-public-connecting h2 {
    margin: 0;
    color: var(--voice-demo-public-ink);
    font-size: 1.45rem;
    letter-spacing: 0;
}

.voice-demo-public-mic-stage p,
.voice-demo-public-connecting p {
    max-width: 330px;
    margin: 14px 0 0;
    color: var(--voice-demo-public-muted);
    font-size: 1rem;
    line-height: 1.8;
}

.voice-demo-public-permission-help {
    display: none;
    width: 100%;
    margin-top: 18px;
    border: 1px solid #f6c9c7;
    border-radius: 14px;
    padding: 16px;
    background: #fdecec;
    text-align: left;
}

.voice-demo-public-permission-help.is-visible {
    display: grid;
    gap: 12px;
}

.voice-demo-public-permission-help p {
    margin: 0;
    color: #9b2a28;
    font-size: 0.95rem;
}

.voice-demo-public-device {
    display: grid;
    gap: 7px;
    width: 100%;
    margin-top: 18px;
    text-align: left;
}

.voice-demo-public-device label {
    color: var(--voice-demo-public-muted);
    font-size: 0.88rem;
    font-weight: 800;
}

.voice-demo-public-connecting {
    gap: 22px;
}

.voice-demo-public-call {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.voice-demo-public-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 230px;
    height: 230px;
}

.voice-demo-public-progress {
    position: absolute;
    inset: 0;
    transform: rotate(-90deg);
}

.voice-demo-public-progress-track,
.voice-demo-public-progress-value {
    fill: none;
    stroke-width: 6;
}

.voice-demo-public-progress-track {
    stroke: var(--voice-demo-public-line);
}

.voice-demo-public-progress-value {
    stroke: var(--voice-demo-public-blue);
    stroke-linecap: round;
    stroke-dasharray: 678.584;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.2s linear;
}

.voice-demo-public-timer {
    margin-top: 20px;
    color: var(--voice-demo-public-muted);
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.voice-demo-public-timer.is-warning {
    color: var(--voice-demo-public-red);
}

.voice-demo-public-call-status {
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
    text-align: center;
}

.voice-demo-public-call-status p {
    margin: 0;
    color: var(--voice-demo-public-blue);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.voice-demo-public-call-status h2 {
    box-sizing: border-box;
    width: min(100%, 320px);
    min-height: 3.4em;
    max-width: 320px;
    margin: 10px auto 0;
    color: var(--voice-demo-public-ink);
    font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.voice-demo-public-meters {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    margin-top: 14px;
    overflow: hidden;
}

.voice-demo-public-wave-meter {
    display: grid;
    gap: 8px;
    justify-items: center;
    width: 100%;
}

.voice-demo-public-wave-label {
    color: var(--voice-demo-public-muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.voice-demo-public-waveform {
    --voice-demo-input-level: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: min(100%, 320px);
    max-width: 100%;
    height: min(9dvh, 72px);
    min-height: 42px;
    overflow: hidden;
    pointer-events: none;
}

.voice-demo-public-wave-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 100%;
}

.voice-demo-public-wave-bar {
    display: block;
    width: clamp(2px, 0.9vw, 3px);
    height: 100%;
    border-radius: 999px;
    background-color: #7fd3ff;
    opacity: 0.62;
    transform-origin: center;
    animation: voice-demo-public-sine-wave 1.6s linear infinite;
    animation-delay: calc(var(--phase, 0) * -0.08s);
}

@keyframes voice-demo-public-sine-wave {
    0% {
        opacity: calc(0.35 + var(--voice-demo-input-level, 0) * 0.2);
        transform: scaleY(calc(0.14 + var(--voice-demo-input-level, 0) * 0.12));
    }
    25% {
        opacity: calc(0.46 + var(--voice-demo-input-level, 0) * 0.24);
        transform: scaleY(calc(0.24 + var(--voice-demo-input-level, 0) * 0.34));
    }
    50% {
        opacity: calc(0.62 + var(--voice-demo-input-level, 0) * 0.3);
        transform: scaleY(calc(0.34 + var(--voice-demo-input-level, 0) * 0.66));
    }
    75% {
        opacity: calc(0.46 + var(--voice-demo-input-level, 0) * 0.24);
        transform: scaleY(calc(0.24 + var(--voice-demo-input-level, 0) * 0.34));
    }
    100% {
        opacity: calc(0.35 + var(--voice-demo-input-level, 0) * 0.2);
        transform: scaleY(calc(0.14 + var(--voice-demo-input-level, 0) * 0.12));
    }
}

.voice-demo-public-endbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    padding-top: 18px;
}

.voice-demo-public-end-call {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border: 2px solid #f1c7c6;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 10px 24px -10px rgba(220, 38, 37, 0.35);
    cursor: pointer;
}

.voice-demo-public-end-call span {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--voice-demo-public-red);
}

.voice-demo-public-end-call:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.voice-demo-public-endbar > span {
    color: var(--voice-demo-public-red);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.voice-demo-public-ended {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    width: 100%;
    text-align: center;
}

.voice-demo-public-ended-badge {
    display: inline-flex;
    align-self: center;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    background: var(--voice-demo-public-blue-soft);
    color: var(--voice-demo-public-blue);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.voice-demo-public-recap {
    border: 1px solid var(--voice-demo-public-line);
    border-radius: 8px;
    padding: 20px;
    background: #ffffff;
    text-align: left;
}

.voice-demo-public-recap h3 {
    margin: 0 0 14px;
    color: var(--voice-demo-public-blue);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.voice-demo-public-recap ul {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.voice-demo-public-recap li {
    position: relative;
    padding-left: 18px;
    color: var(--voice-demo-public-text);
    font-size: 0.98rem;
    line-height: 1.6;
}

.voice-demo-public-recap li::before {
    content: "";
    position: absolute;
    top: 0.65em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--voice-demo-public-blue);
}

.voice-demo-public-campaign {
    color: var(--voice-demo-public-ink);
    font-size: 1rem;
    font-weight: 800;
}

.voice-demo-public-statusbar {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 3;
    display: grid;
    gap: 4px;
    border: 1px solid var(--voice-demo-public-line);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 24px -20px rgba(5, 52, 108, 0.55);
    color: var(--voice-demo-public-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.voice-demo-public-statusbar [data-status-text] {
    color: var(--voice-demo-public-navy);
    font-weight: 800;
}

.voice-demo-public-statusbar [data-state="error"] {
    color: var(--voice-demo-public-red);
}

.voice-demo-public-phone[data-public-current-stage="intro"] .voice-demo-public-statusbar,
.voice-demo-public-phone[data-public-current-stage="active"] .voice-demo-public-statusbar,
.voice-demo-public-phone[data-public-current-stage="ended"] .voice-demo-public-statusbar {
    display: none;
}

.voice-demo-public-phone[data-public-current-stage="mic"] .voice-demo-public-screen.is-on,
.voice-demo-public-phone[data-public-current-stage="connecting"] .voice-demo-public-screen.is-on {
    padding-bottom: 88px;
}

[hidden] {
    display: none !important;
}

@media (max-width: 860px) {
    .voice-demo-shell {
        width: min(100% - 24px, 640px);
        padding-top: 16px;
    }

    .voice-demo-stage,
    .voice-demo-stage-mypage {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .voice-demo-copy {
        padding: 10px 0 0;
    }

    .voice-demo-copy h1 {
        font-size: 1.55rem;
    }

    .voice-demo-console {
        padding: 16px;
    }
}

@media (max-width: 460px) {
    .voice-demo-public-phone {
        max-width: none;
        padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
    }

    .voice-demo-public-lead h1,
    .voice-demo-public-ended h2 {
        font-size: 1.65rem;
    }

    .voice-demo-public-intro-logo {
        width: 134px;
        height: 134px;
        margin: 10px auto 14px;
    }

    .voice-demo-public-sub,
    .voice-demo-public-fact {
        font-size: 0.98rem;
    }

    .voice-demo-public-ring {
        width: 150px;
        height: 150px;
    }

    .voice-demo-public-progress {
        inset: 0;
    }

    .voice-demo-public-progress-track,
    .voice-demo-public-progress-value {
        stroke-width: 4;
    }

    .voice-demo-public-call-logo {
        width: 111px;
        height: 111px;
        border-width: 3px;
    }

    .voice-demo-public-ring.is-speaking::before,
    .voice-demo-public-ring.is-speaking::after {
        width: 120px;
        height: 120px;
    }

    .voice-demo-public-avatar-large {
        width: 146px;
        height: 146px;
    }

    .voice-demo-public-call-status h2 {
        font-size: 1.22rem;
    }

    .voice-demo-public-waveform {
        width: min(100%, 260px);
    }

    .voice-demo-public-wave-group {
        gap: 3px;
    }

    .voice-demo-public-wave-bar {
        width: 2px;
    }

    .voice-demo-public-endbar {
        margin-top: 30px;
    }
}
