* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

#photo-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
}

#photo-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 10%;
    filter: brightness(.6) saturate(1.15);
    transition: filter 1.2s ease;
}

#photo-bg img.speaking {
    filter: brightness(.45) saturate(1.4);
}

#photo-grad {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, .5) 0%,
            rgba(0, 0, 0, .1) 20%,
            rgba(0, 0, 0, .0) 40%,
            rgba(0, 0, 0, .0) 55%,
            rgba(0, 0, 0, .55) 75%,
            rgba(0, 0, 0, .88) 100%);
}

#viz-wrap {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity .6s;
    background: transparent;
}

#viz-wrap.active {
    opacity: 1;
}

#viz {
    width: 100%;
    height: 100%;
    display: block;
}

.screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen.off {
    display: none;
}

#s-perm {
    background: none;
}

.perm-bg-blur {
    position: fixed;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(40px) brightness(.7);
    -webkit-backdrop-filter: blur(40px) brightness(.7);
}

.perm-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 32px;
    padding-top: max(env(safe-area-inset-top, 0px), 60px);
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 50px);
    justify-content: space-between;
}

.perm-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.perm-app {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    font-weight: 500;
    letter-spacing: .3px;
}

.perm-name {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
    text-align: center;
}

.perm-role {
    font-size: 17px;
    color: rgba(255, 255, 255, .6);
    font-weight: 400;
}

.perm-photo-wrap {
    position: relative;
}

.perm-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 3px solid rgba(255, 255, 255, .25);
    box-shadow: 0 0 0 10px rgba(255, 255, 255, .06), 0 20px 60px rgba(0, 0, 0, .5);
}

.perm-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
}

.sdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00ffa3;
    animation: sdot 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes sdot {

    0%,
    100% {
        opacity: .3;
    }

    50% {
        opacity: 1;
    }
}

.slide-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.slide-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, .4);
    letter-spacing: .3px;
}

.slide-track {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 64px;
    background: rgba(255, 255, 255, .1);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
    touch-action: none;
}

.slide-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255, 255, 255, .45);
    pointer-events: none;
    transition: opacity .15s;
    letter-spacing: .3px;
}

.slide-thumb-accept {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #34c759, #25a244);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(52, 199, 89, .55);
    cursor: grab;
    touch-action: none;
}

.slide-thumb-accept svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.slide-thumb-accept.snap,
.slide-thumb-hangup.snap {
    transition: left .28s cubic-bezier(.4, 0, .2, 1);
}

#s-conn {
    background: none;
}

.conn-blur {
    position: fixed;
    inset: 0;
    backdrop-filter: blur(10px) brightness(.6);
    -webkit-backdrop-filter: blur(10px) brightness(.6);
}

.conn-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.conn-lbl {
    font-size: 12px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .35);
    font-weight: 500;
}

.conn-name {
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
}

.conn-role {
    font-size: 15px;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 28px;
}

.conn-dots {
    display: flex;
    gap: 10px;
}

.conn-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    animation: cdot 1.4s ease-in-out infinite;
}

.conn-dot:nth-child(2) {
    animation-delay: .25s;
}

.conn-dot:nth-child(3) {
    animation-delay: .5s;
}

@keyframes cdot {

    0%,
    80%,
    100% {
        opacity: .25;
    }

    40% {
        opacity: 1;
        background: #fff;
    }
}

#s-call {
    background: none;
    justify-content: space-between;
    padding-top: max(env(safe-area-inset-top, 0px), 54px);
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 44px);
}

.call-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 0 24px;
}

.call-enc {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.call-name {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .6);
}

.call-role {
    font-size: 15px;
    color: rgba(255, 255, 255, .5);
}

.call-timer {
    font-size: 20px;
    font-weight: 300;
    color: rgba(255, 255, 255, .75);
    letter-spacing: 3px;
    font-family: 'SF Mono', 'Courier New', monospace;
    font-variant-numeric: tabular-nums;
}

.call-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 0 32px;
}

.hangup-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #ff3b30, #c0392b);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(255, 59, 48, .5), 0 0 0 1px rgba(255, 255, 255, .08);
    transition: transform .12s, box-shadow .12s;
}

.hangup-btn:active {
    transform: scale(.91);
    box-shadow: 0 4px 16px rgba(255, 59, 48, .4);
}

.hangup-btn svg {
    width: 30px;
    height: 30px;
    fill: #fff;
}

.fallback-row {
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 300px;
}

.fallback-row.show {
    display: flex;
}

.fallback-input {
    flex: 1;
    padding: 13px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
}

.fallback-input::placeholder {
    color: rgba(255, 255, 255, .25);
}

.fallback-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--g1, #00ffa3), var(--g2, #00c17d));
    display: flex;
    align-items: center;
    justify-content: center;
}

.fallback-send svg {
    width: 20px;
    height: 20px;
    fill: #000;
}

.invalid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 14px;
    background: #000;
}

.invalid h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.invalid p {
    color: rgba(255, 255, 255, .35);
    font-size: 14px;
}

.icon-phone-accept {
    transform: rotate(0deg);
}

.icon-phone-end {
    transform: rotate(135deg);
}