:root {
    color-scheme: light;
    --page: #f6f7ff;
    --surface: rgba(255, 255, 255, .88);
    --surface-strong: rgba(255, 255, 255, .98);
    --ink: #14213d;
    --muted: #8290aa;
    --line: rgba(50, 77, 129, .12);
    --accent: #7c3aed;
    --accent-soft: rgba(124, 58, 237, .12);
    --accent-dark: #6d28d9;
    --cyan: #7c3aed;
    --violet: #7c3aed;
    --gold: #f4b740;
    --danger: #ef476f;
    --ok: #12b981;
    --shadow: 0 18px 48px rgba(35, 64, 120, .14);
}

* {
    box-sizing: border-box;
    font-family: "UKIJ Ekran Embedded", "UKIJ CJK", "UKIJ Tuz Tom", "UKIJ Tuz", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

[hidden] {
    display: none !important;
}

.fa-solid,
.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.fa-regular,
.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(79, 107, 255, .16), transparent 34%),
        radial-gradient(circle at 96% 8%, rgba(139, 92, 246, .15), transparent 34%),
        linear-gradient(180deg, #f8faff 0%, #eef2ff 48%, #fbfcff 100%);
    color: var(--ink);
    font-family: "UKIJ Ekran Embedded", "UKIJ CJK", "UKIJ Tuz Tom", "UKIJ Tuz", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(79, 107, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, .025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, #000, transparent 68%);
}

.app {
    width: min(460px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: max(14px, env(safe-area-inset-top)) 16px calc(96px + env(safe-area-inset-bottom));
    direction: rtl;
    position: relative;
    overflow: visible;
}

.app::before,
.app::after {
    content: "";
    position: fixed;
    left: 50%;
    width: min(430px, 100%);
    transform: translateX(-50%);
    pointer-events: none;
}

.app::before {
    top: 0;
    height: 230px;
    background: radial-gradient(circle at 50% 20%, rgba(92, 96, 255, .14), transparent 54%);
}

.app::after {
    display: none;
}

.app-screen {
    position: relative;
    z-index: 1;
    animation: screenFade .18s ease-out;
}

.app-screen[hidden] {
    display: none !important;
}

.screen-loader {
    min-height: 220px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

@keyframes screenFade {
    from {
        opacity: .64;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.studio-stack {
    display: grid;
    gap: 14px;
}

.topbar {
    position: relative;
    min-height: 220px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    gap: 12px;
    padding: 74px 22px 24px;
    margin: -14px -16px 14px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .52), transparent 26%),
        radial-gradient(circle at 18% 22%, rgba(139, 92, 246, .20), transparent 34%),
        linear-gradient(135deg, #eef4ff 0%, #e9e8ff 52%, #f8fbff 100%);
    border-bottom: 1px solid rgba(92, 96, 255, .10);
}

.topbar::before,
.topbar::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.topbar::before {
    left: -24px;
    right: -24px;
    top: 92px;
    height: 64px;
    opacity: .62;
    background:
        radial-gradient(ellipse at 22% 50%, rgba(79, 107, 255, .30) 0 14%, transparent 34%),
        radial-gradient(ellipse at 72% 50%, rgba(139, 92, 246, .28) 0 12%, transparent 32%),
        repeating-radial-gradient(ellipse at 50% 50%, transparent 0 7px, rgba(92, 96, 255, .16) 8px 9px, transparent 10px 17px);
    filter: blur(.15px);
    transform: scaleX(1.18);
    mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.topbar::after {
    top: 119px;
    left: 0;
    width: 100%;
    height: 2px;
    opacity: .7;
    background: linear-gradient(90deg, transparent, var(--accent), var(--violet), var(--accent), transparent);
    box-shadow: 0 0 24px rgba(92, 96, 255, .30);
}

.hero-copy {
    position: relative;
    z-index: 2;
    text-align: right;
    padding-left: 58px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    color: #45607f;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
}

.brand {
    min-width: 0;
    color: var(--ink);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.38;
    text-shadow: 0 10px 28px rgba(92, 96, 255, .14);
}

.brand::first-letter {
    color: var(--accent);
}

.brand-accent {
    color: var(--accent);
}

.brand-subtitle {
    max-width: 320px;
    margin-top: 8px;
    color: #637089;
    font-size: 13px;
    font-weight: 720;
    line-height: 1.65;
}

.worker {
    position: absolute;
    z-index: 3;
    bottom: 16px;
    left: 16px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #49617b;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.app-mark {
    position: absolute;
    z-index: 3;
    top: max(18px, env(safe-area-inset-top));
    right: 18px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(255, 255, 255, .80);
    overflow: hidden;
    border: 1px solid rgba(92, 96, 255, .12);
    box-shadow: 0 16px 32px rgba(92, 96, 255, .12);
}

.app-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.worker:not(.ready) {
    background: rgba(255, 255, 255, .72);
    color: #8a97aa;
}

.text-card,
.mode-card,
.settings-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .90));
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.text-card {
    min-height: 176px;
    display: grid;
    grid-template-rows: auto minmax(190px, 1fr) auto;
    gap: 10px;
    padding: 14px;
    margin-top: 0;
    position: relative;
    border-color: rgba(255, 255, 255, .17);
    background:
        radial-gradient(circle at 94% 8%, rgba(139, 92, 246, .08), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(248, 251, 255, .94));
}

label,
.field-label {
    display: block;
    margin-bottom: 9px;
    color: #54647d;
    font-size: 14px;
    font-weight: 780;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    background: rgb(242 242 253 / 28%);
    color: var(--ink);
    font: inherit;
    outline: none;
}

button,
input,
select,
textarea,
summary {
    font-family: inherit !important;
}

button {
    -webkit-tap-highlight-color: transparent;
    transition: transform .16s ease, opacity .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

input,
select {
    height: 48px;
    padding: 0 12px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 12px 0 42px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.25 1.5L6 6.25L10.75 1.5' stroke='%2314213d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-size: 11px 8px;
}

textarea {
    min-height: 98px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    resize: vertical;
    direction: rtl;
    line-height: 1.8;
    font-size: 16px;
    color: var(--ink);
}

#text {
    min-height: 190px;
    max-height: 48vh;
    overflow-y: auto;
    resize: none;
    padding-bottom: 2px;
}

textarea::placeholder,
input::placeholder {
    color: #a0abc0;
}

#reference-text {
    min-height: 108px;
    border: 1px solid var(--line);
    padding: 12px;
    background: rgba(245, 248, 255, .82);
}

.text-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}

.text-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghost {
    border: 0;
    border-radius: 999px;
    background: rgba(92, 96, 255, .08);
    color: var(--accent);
    font: inherit;
    cursor: pointer;
    padding: 7px 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.chip-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 10px 24px rgba(35, 64, 120, .08);
    overflow: hidden;
}

.chip-row button {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #50627d;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.45;
    cursor: pointer;
    padding: 8px 6px;
    position: relative;
    overflow: hidden;
}

.chip-row button span {
    display: block;
}

.chip-row button small {
    display: none;
}

.chip-row button::before {
    position: static;
    width: auto;
    height: auto;
    display: inline-block;
    margin-left: 6px;
    transform: none;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    font-family: "Font Awesome 6 Free" !important;
    font-size: 14px;
    font-weight: 900;
}

.chip-row button[data-mode-button="clone"]::before {
    content: "\f2a2";
}

.chip-row button[data-mode-button="design"]::before {
    content: "\f1de";
}

.chip-row button[data-mode-button="library"]::before {
    content: "\f001";
}

.chip-row button.active {
    background:
        linear-gradient(180deg, rgba(92, 96, 255, .12), rgba(255, 255, 255, .94));
    color: var(--accent-dark);
    box-shadow: none;
}

.chip-row button.active span {
    color: var(--accent-dark);
}

.chip-row button.active small {
    color: #6c7b93;
}

.chip-row button.active::before {
    color: var(--accent-dark);
    background: transparent;
    box-shadow: none;
}

.mode-panel {
    display: none;
    margin-top: 0;
}

.mode-panel.active {
    display: block;
}

.mode-card {
    padding: 12px;
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
}

.section-title::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 18px rgba(79, 107, 255, .30);
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.grid.two {
    grid-template-columns: 1fr;
}

.audio-tool {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(247, 249, 255, .86);
    overflow: hidden;
}

.reference-empty,
.reference-editor {
    background: transparent;
}

.reference-empty[hidden],
.reference-editor[hidden],
.clip-editor[hidden] {
    display: none !important;
}

.audio-badge {
    width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    color: var(--accent);
    padding: 10px 12px 0;
    font-size: 12px;
    font-weight: 800;
}

.reference-drop {
    min-height: 74px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: stretch;
    gap: 10px;
    margin: 8px 12px 10px;
    border: 1px dashed rgba(92, 96, 255, .26);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    color: var(--accent);
    cursor: pointer;
    text-align: right;
    padding: 12px;
}

.reference-drop.dragging {
    background: rgba(92, 96, 255, .08);
}

.reference-drop[hidden],
.reference-recording[hidden],
.icon-button[hidden],
.icon-label[hidden] {
    display: none !important;
}

.reference-drop i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--accent-soft);
    font-size: 18px;
}

.reference-drop-main {
    display: block;
    font-size: 14px;
    font-weight: 850;
}

.reference-drop-sub {
    color: #8a97aa;
    font-size: 11px;
    line-height: 1.35;
}

.reference-toolbar {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: stretch;
    gap: 8px;
    padding: 0 12px 12px;
    border-top: 0;
}

.reference-recording {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    margin: 8px 12px 10px;
    border: 1px dashed rgba(92, 96, 255, .26);
    border-radius: 14px;
    background: rgba(255, 255, 255, .72);
    color: var(--accent);
}

.recording-wave {
    width: min(190px, 72%);
    height: 42px;
    display: grid;
    grid-template-columns: repeat(22, 1fr);
    gap: 4px;
    align-items: center;
    direction: ltr;
}

.recording-wave span {
    display: block;
    height: calc(8px + var(--h) * 1px);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--violet));
    animation: recordingPulse 1s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.05s);
}

.recording-text {
    color: var(--accent);
    font-size: 14px;
    font-weight: 850;
}

@keyframes recordingPulse {
    0%, 100% {
        transform: scaleY(.45);
        opacity: .36;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.reference-editor-top {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px 0;
}

.reference-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.reference-actions .icon-button {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(124, 58, 237, .08);
}

.reference-editor-top .audio-badge {
    margin: 0;
}

.icon-button,
.icon-label {
    width: 100%;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    place-items: center;
    border: 1px solid rgba(92, 96, 255, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .78);
    color: var(--accent-dark);
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .74);
    color: var(--ink);
    padding: 0 12px;
    font-weight: 760;
    cursor: pointer;
}

.design-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.mode-card .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.library-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.library-head .section-title {
    margin-bottom: 4px;
}

.library-subtitle {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.voice-library-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 224px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 2px 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.voice-library-list::-webkit-scrollbar {
    display: none;
}

.saved-voice-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0;
}

.saved-voice-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 0%, rgba(124, 58, 237, .08), transparent 32%),
        rgba(255, 255, 255, .92);
    padding: 13px 12px;
    text-align: right;
    cursor: pointer;
    /*box-shadow: 0 12px 28px rgba(35, 64, 120, .10);*/
}

.saved-voice-card.active {
    border-color: rgba(92, 96, 255, .58);
    /*box-shadow: 0 0 0 3px rgba(92, 96, 255, .10), 0 16px 38px rgba(92, 96, 255, .14);*/
}

.saved-voice-orb {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(124, 58, 237, .10);
    color: var(--accent);
    font-size: 17px;
}

.saved-voice-preview {
    border: 0;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .16);
}

.saved-voice-card.clone-voice .saved-voice-orb {
    background: linear-gradient(135deg, #7c3aed, #9f7aea);
    color: #fff;
}

.saved-voice-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.saved-voice-name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 920;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saved-voice-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.saved-voice-tags::-webkit-scrollbar {
    display: none;
}

.saved-voice-tags span {
    min-height: 20px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(124, 58, 237, .08);
    color: var(--accent);
    padding: 0 7px;
    font-size: 10px;
    font-weight: 780;
}

.saved-voice-wave {
    height: 20px;
    display: grid;
    grid-template-columns: repeat(34, 1fr);
    gap: 2px;
    align-items: center;
    direction: ltr;
    opacity: .62;
}

.saved-voice-wave span {
    display: block;
    height: calc(4px + var(--h) * 1px);
    border-radius: 999px;
    background: #e9ddff;
}

.saved-voice-wave span.is-played {
    background: #7c3aed;
}

.saved-voice-wave.is-playing span.is-played {
    background: #7c3aed;
    animation: savedVoicePulse .78s ease-in-out infinite alternate;
    animation-delay: calc(var(--h) * -18ms);
}

@keyframes savedVoicePulse {
    from {
        transform: scaleY(.52);
        opacity: .58;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

.saved-voice-check {
    display: none;
}

.saved-voice-delete {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    align-self: start;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #7b8498;
    cursor: pointer;
    margin: auto;
}

.saved-voice-load-more {
    min-height: 26px;
    display: grid;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
}

.empty-library {
    border: 1px dashed rgba(92, 96, 255, .22);
    border-radius: 16px;
    background: rgba(245, 248, 255, .74);
    color: var(--muted);
    padding: 18px 12px;
    text-align: center;
    font-size: 13px;
    line-height: 1.65;
}

.toast-stack {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 9999;
    width: max-content;
    max-width: min(78vw, 320px);
    display: grid;
    justify-items: center;
    gap: 8px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    direction: rtl;
}

.toast {
    max-width: 100%;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: rgba(20, 23, 32, .86);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
    color: #ffffff;
    font-size: 13px;
    font-weight: 780;
    line-height: 1.55;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: toast-in .18s ease both;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: scale(.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(16, 24, 40, .22);
    backdrop-filter: blur(10px);
    direction: rtl;
}

.confirm-backdrop[hidden] {
    display: none !important;
}

.confirm-dialog {
    width: min(360px, 100%);
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(124, 58, 237, .14), transparent 34%),
        #ffffff;
    box-shadow: 0 24px 72px rgba(67, 56, 202, .24);
    padding: 22px;
    text-align: center;
}

.confirm-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .14), rgba(99, 102, 241, .10));
    color: var(--accent);
    font-size: 23px;
}

.confirm-title {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
}

.confirm-text {
    margin: 8px 0 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 720;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.confirm-button {
    min-height: 46px;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 880;
    cursor: pointer;
}

.confirm-cancel {
    background: #f3f4f8;
    color: var(--muted);
}

.confirm-ok {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(124, 58, 237, .25);
}

.login-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: end center;
    padding: 18px;
    background: rgba(16, 24, 40, .22);
    backdrop-filter: blur(10px);
    direction: rtl;
    align-items: center;
}

.login-backdrop[hidden] {
    display: none !important;
}

.login-dialog {
    width: min(390px, 100%);
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 26px;
    background:
        radial-gradient(circle at 10% 0%, rgba(124, 58, 237, .14), transparent 32%),
        radial-gradient(circle at 95% 15%, rgba(99, 102, 241, .12), transparent 34%),
        #ffffff;
    box-shadow: 0 24px 72px rgba(67, 56, 202, .22);
    padding: 18px;
    animation: login-sheet-in .24s ease both;
}

@keyframes login-sheet-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-dialog-head {
    display: grid;
    grid-template-columns: 46px 1fr 34px;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.login-dialog-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(124, 58, 237, .24);
}

.login-dialog-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 930;
}

.login-dialog-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 720;
    line-height: 1.45;
}

.login-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f3f4f8;
    color: var(--muted);
    font-family: inherit;
    cursor: pointer;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(124, 58, 237, .12);
    border-radius: 16px;
    background: rgba(124, 58, 237, .07);
}

.login-tabs button {
    min-height: 42px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: .18s ease;
}

.login-tabs button.active {
    background: #ffffff;
    color: var(--accent);
    box-shadow: 0 10px 24px rgba(67, 56, 202, .12);
}

.auth-panel {
    display: grid;
    gap: 12px;
}

.auth-panel[hidden] {
    display: none !important;
}

.auth-switch-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.auth-switch-line button {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    padding: 0;
}

.login-field {
    display: grid;
    gap: 7px;
    text-align: right;
}

.login-field label {
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
}

.login-input-wrap {
    min-height: 48px;
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 15px;
    background: rgba(247, 249, 255, .86);
    padding: 0 12px;
}

.login-input-wrap.password-wrap {
    grid-template-columns: 34px 1fr 32px;
}

.login-input-wrap i {
    color: var(--accent);
    font-size: 16px;
}

.login-input-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 780;
    text-align: right;
    direction: ltr;
}

.password-toggle {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(124, 58, 237, .08);
    color: var(--accent);
    font-family: inherit;
    cursor: pointer;
}

.password-toggle i {
    font-size: 14px;
}

.login-code-row {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 9px;
}

.login-code-button {
    min-height: 48px;
    border: 1px solid rgba(124, 58, 237, .18);
    border-radius: 15px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: inherit;
    font-size: 12px;
    font-weight: 880;
    cursor: pointer;
}

.login-code-button:disabled {
    opacity: .58;
    cursor: default;
}

.login-submit {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 930;
    box-shadow: 0 14px 30px rgba(124, 58, 237, .24);
    cursor: pointer;
}

.login-submit:disabled {
    cursor: wait;
    opacity: .78;
}

.login-note {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 720;
    line-height: 1.6;
    text-align: center;
}

.login-agreements {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    line-height: 1.65;
    text-align: center;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
}

.agreement-check {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.agreement-check input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.agreement-check span {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1.5px solid #c7d0df;
    border-radius: 50%;
    background: #ffffff;
    color: #ffffff;
    transition: .18s ease;
}

.agreement-check span::before {
    content: "";
    width: 7px;
    height: 4px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg) translateY(-1px);
    opacity: 0;
}

.agreement-check input:checked + span {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 6px 14px rgba(124, 58, 237, .22);
}

.agreement-check input:checked + span::before {
    opacity: 1;
}

.agreement-copy {
    min-width: 0;
}

.agreement-link {
    border: 0;
    background: transparent;
    color: var(--accent);
    font-family: inherit;
    font-size: 11px;
    font-weight: 860;
    cursor: pointer;
    padding: 0;
}

.account-backdrop {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: grid;
    place-items: end center;
    padding: 16px;
    background: rgba(16, 24, 40, .22);
    backdrop-filter: blur(10px);
    direction: rtl;
}

.account-backdrop[hidden] {
    display: none !important;
}

.account-dialog {
    width: min(430px, 100%);
    max-height: min(82vh, 720px);
    overflow: auto;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 28px 28px 20px 20px;
    background:
        radial-gradient(circle at 12% 0%, rgba(124, 58, 237, .13), transparent 28%),
        linear-gradient(180deg, #ffffff, #f8faff);
    box-shadow: 0 -18px 60px rgba(67, 56, 202, .22);
    padding: 18px;
}

.account-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.account-dialog-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 940;
}

.account-dialog-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.account-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(124, 58, 237, .08);
    color: var(--accent);
}

.account-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(124, 58, 237, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    margin-bottom: 12px;
}

.account-avatar {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #e3e8ff, #d7c8ff);
    color: var(--accent);
    font-size: 22px;
}

.account-name {
    color: var(--ink);
    font-size: 18px;
    font-weight: 930;
}

.account-uid {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
    direction: ltr;
    text-align: right;
}

.account-info-list,
.account-form {
    border: 1px solid rgba(124, 58, 237, .10);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    padding: 14px;
}

.account-info-list {
    margin-bottom: 12px;
}

.account-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.account-info-row strong {
    color: var(--ink);
    font-size: 13px;
    direction: ltr;
}

.account-form {
    display: grid;
    gap: 12px;
}

.account-form-title {
    color: var(--ink);
    font-size: 15px;
    font-weight: 930;
}

.account-submit {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 930;
    box-shadow: 0 14px 30px rgba(124, 58, 237, .24);
}

.agreement-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(16, 24, 40, .22);
    backdrop-filter: blur(10px);
}

.agreement-backdrop[hidden] {
    display: none !important;
}

.agreement-dialog {
    width: min(420px, 100%);
    max-height: min(76vh, 620px);
    display: grid;
    grid-template-rows: auto 1fr auto;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 72px rgba(67, 56, 202, .22);
    overflow: hidden;
}

.agreement-head {
    display: grid;
    grid-template-columns: 1fr 34px;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(124, 58, 237, .10);
}

.agreement-title {
    color: var(--ink);
    font-size: 18px;
    font-weight: 930;
    text-align: left;
}

.agreement-backdrop.is-rtl .agreement-title {
    text-align: right;
}

.agreement-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f3f4f8;
    color: var(--muted);
    cursor: pointer;
}

.agreement-body {
    padding: 14px 16px;
    overflow-y: auto;
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.72;
    font-size: 13px;
}

.agreement-backdrop.is-ltr .agreement-body {
    direction: ltr;
    text-align: left;
}

.agreement-backdrop.is-rtl .agreement-body {
    direction: rtl;
    text-align: right;
}

.agreement-body h3 {
    margin: 14px 0 6px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 850;
}

.agreement-body p {
    margin: 0 0 8px;
}

.agreement-body ul {
    margin: 0 0 10px 18px;
    padding: 0;
}

.agreement-backdrop.is-rtl .agreement-body ul {
    margin: 0 18px 10px 0;
}

.wechat-help-card {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 8px 0 2px;
    text-align: center;
}

.wechat-help-card img {
    width: min(240px, 78vw);
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(67, 56, 202, .14);
}

.wechat-help-id {
    color: var(--ink);
    font-size: 15px;
    font-weight: 850;
}

.wechat-help-id span {
    direction: ltr;
    unicode-bidi: isolate;
    color: var(--accent);
    font-weight: 930;
}

.agreement-foot {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(124, 58, 237, .10);
}

.agreement-ok {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.feedback-backdrop {
    position: fixed;
    inset: 0;
    z-index: 112;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, .24);
    backdrop-filter: blur(10px);
}

.feedback-backdrop[hidden] {
    display: none !important;
}

.feedback-dialog {
    width: min(420px, 100%);
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 72px rgba(67, 56, 202, .22);
    overflow: hidden;
}

.feedback-head {
    display: grid;
    grid-template-columns: 1fr 36px;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(124, 58, 237, .10);
}

.feedback-title {
    color: var(--ink);
    font-size: 19px;
    font-weight: 930;
}

.feedback-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.feedback-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f3f4f8;
    color: var(--muted);
    cursor: pointer;
}

.feedback-form {
    display: grid;
    gap: 14px;
    padding: 16px 18px 18px;
}

.feedback-field {
    display: grid;
    gap: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 850;
}

.feedback-field textarea,
.feedback-field input {
    width: 100%;
    border: 1px solid rgba(124, 58, 237, .13);
    border-radius: 16px;
    background: #f8f8fc;
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
}

.feedback-field textarea {
    min-height: 132px;
    max-height: 260px;
    padding: 12px 14px;
    resize: vertical;
}

.feedback-field input {
    min-height: 48px;
    padding: 0 14px;
}

.feedback-field textarea:focus,
.feedback-field input:focus {
    border-color: rgba(124, 58, 237, .42);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .10);
}

.feedback-actions {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 10px;
}

.feedback-cancel,
.feedback-submit {
    min-height: 46px;
    border: 0;
    border-radius: 15px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.feedback-cancel {
    background: #f3f4f8;
    color: var(--muted);
}

.feedback-submit {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(124, 58, 237, .22);
}

.feedback-submit:disabled {
    cursor: progress;
    opacity: .72;
}

.icon-button.recording,
.record-button.recording {
    border-color: rgba(183, 58, 68, .42);
    background: rgba(239, 71, 111, .10);
    color: var(--danger);
}

.reference-toolbar .record-button.recording {
    grid-column: 1 / -1;
}

.reference-file-input {
    display: none;
}

.file-name,
.clip-hint {
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.file-name {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wave-wrap {
    border: 0;
    border-radius: 0;
    background: #ffffff;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 82px;
    background: #ffffff;
    cursor: crosshair;
    touch-action: none;
}

.reference-times {
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 4px;
    color: #8390a8;
    font-size: 13px;
    font-weight: 750;
}

.reference-controls {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px 10px;
    color: #7c899f;
    direction: ltr;
}

.reference-control-left,
.reference-control-center,
.reference-control-right {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.reference-control-center {
    flex: 1;
    justify-content: center;
}

.reference-control {
    border: 0;
    background: transparent;
    color: #7c899f;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
}

.reference-play {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 34px;
}

.speed-pill {
    min-width: 35px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: #7c899f;
    font-size: 12px;
    font-weight: 850;
    direction: ltr;
}

.clip-editor {
    padding: 10px;
    border-top: 1px solid var(--line);
    background: rgba(245, 248, 255, .68);
}

.clip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.clip-range {
    margin: 10px 0;
}

.clip-range input {
    height: auto;
    padding: 0;
    accent-color: var(--accent);
}

.audio-preview {
    display: none;
    width: 100%;
    margin-top: 10px;
}

.audio-preview.ready {
    display: none;
}

.state {
    margin-top: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.state.error {
    color: var(--danger);
}

.player {
    display: none;
}

.voice-player {
    display: none;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    margin: 0;
    scroll-margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(244, 249, 255, .94));
    box-shadow: 0 20px 46px rgba(35, 64, 120, .14);
    direction: ltr;
}

.voice-player.ready {
    display: flex;
}

.text-card + .voice-player.ready {
    margin-top: -2px;
}

.player-play,
.player-delete,
.player-download {
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
}

.player-play {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--violet));
    color: #fff;
    font-size: 17px;
    font-weight: 900;
}

.player-wave {
    height: 44px;
    flex: 1;
    display: grid;
    grid-template-columns: repeat(26, 1fr);
    gap: 3px;
    align-items: center;
    direction: ltr;
}

.player-wave span {
    display: block;
    height: calc(8px + var(--h) * 1px);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--violet));
    opacity: .92;
    transition: opacity .2s ease, background .2s ease;
}

.player-wave span:nth-last-child(-n+4) {
    opacity: .22;
    background: #c8d3e8;
}

.player-wave span.dim {
    opacity: .2;
    background: #c8d3e8;
}

.player-time {
    min-width: 42px;
    color: var(--accent);
    font-size: 17px;
    font-weight: 800;
    direction: ltr;
    text-align: center;
}

.player-divider {
    width: 1px;
    height: 36px;
    background: var(--line);
}

.player-delete,
.player-download {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    color: #8a97aa;
    font-size: 20px;
}

.player-download {
    color: var(--accent);
    font-size: 23px;
}

.settings-card {
    margin-top: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 7%, rgba(139, 92, 246, .07), transparent 32%),
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .92));
}

.settings-summary {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
    color: var(--ink);
    font-weight: 880;
    list-style: none;
    cursor: pointer;
}

.settings-summary::-webkit-details-marker {
    display: none;
}

.settings-card:not([open]) .settings-summary {
    border-bottom: 0;
}

.settings-summary::after {
    content: "\f078";
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: "Font Awesome 6 Free" !important;
    font-size: 12px;
    font-weight: 900;
    transition: transform .18s ease;
}

.settings-card[open] .settings-summary::after {
    transform: rotate(180deg);
}

.settings-body {
    padding: 0 14px 14px;
    border-top: 1px solid var(--line);
}

.settings-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 17px;
    font-weight: 900;
}

.settings-title::before {
    content: "\f1de";
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900;
    color: var(--accent);
}

.settings-reset {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    background: transparent;
    color: #7c899f;
    font-size: 13px;
    font-weight: 820;
    cursor: pointer;
    padding: 0;
}

.settings-group {
    margin-top: 14px;
}

.settings-group + .settings-group {
    margin-top: 12px;
    padding-top: 14px;
    border-top: 1px solid rgb(50 77 129 / 6%);
}

.settings-group-title {
    margin-bottom: 10px;
    color: #6b7890;
    font-size: 12px;
    font-weight: 880;
}

.settings-body .grid.two {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 10px;
}

.settings-body .field {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 7px;
    min-height: auto;
    padding: 0;
    border-bottom: 0;
}

.settings-body .field:last-child {
    border-bottom: 0;
}

.settings-body label {
    margin: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.35;
}

.settings-body select {
    height: 42px;
    border-radius: 12px;
    background-color: rgb(242 242 253 / 28%);
    text-align: right;
}

.settings-slider {
    min-height: 42px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 12px;
    background: rgba(245, 248, 255, .92);
    direction: ltr;
}

.settings-slider input {
    appearance: none;
    -webkit-appearance: none;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    accent-color: var(--accent);
    display: block;
}

.settings-slider input::-webkit-slider-runnable-track {
    height: 6px;
    line-height: 24px;
    position: relative;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) 0 var(--slider-progress, 50%), rgba(124, 58, 237, .14) var(--slider-progress, 50%) 100%);
}

.settings-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -7px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 6px 14px rgba(124, 58, 237, .26);
}

.settings-slider input::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: rgba(124, 58, 237, .14);
}

.settings-slider input::-moz-range-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--accent);
}

.settings-slider input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 6px 14px rgba(124, 58, 237, .26);
}

.settings-slider output {
    min-width: 30px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-align: left;
    direction: ltr;
}

.bottom-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 4px 0 4px;
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 8;
}

.primary,
.secondary {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font: inherit;
    font-size: 17px;
    font-weight: 850;
    cursor: pointer;
}

.primary {
    border: 0;
    background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 52%, #8b5cf6 100%);
    color: #fff;
    box-shadow: 0 16px 32px rgba(92, 96, 255, .26), inset 0 1px 0 rgba(255, 255, 255, .20);
    backdrop-filter: blur(14px);
}

.secondary {
    border: 1px solid rgba(92, 96, 255, .28);
    background: rgba(255, 255, 255, .92);
    color: var(--accent-dark);
}

.primary.generating {
    background: linear-gradient(90deg, #6d28d9, #7c3aed, #8b5cf6, #6d28d9);
    background-size: 220% 100%;
    animation: generatingFlow 1.15s ease-in-out infinite;
    box-shadow: 0 18px 46px rgba(104, 77, 255, .36);
}

@keyframes generatingFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.primary:disabled,
.secondary:disabled {
    cursor: wait;
    opacity: .72;
}

.chip-row button:active {
    transform: scale(.98);
}

.page-head {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.profile-head-spacer {
    height: 25px;
    margin-bottom: 6px;
}

.page-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 930;
    line-height: 1.25;
}

.home-title-wrap {
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 10px;
}

.voice-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 255, 255, .85), transparent 28%),
        linear-gradient(135deg, #6d28d9, #7c3aed 56%, #a78bfa);
    color: #fff;
    box-shadow: 0 14px 28px rgba(124, 58, 237, .22);
}

.voice-logo i {
    font-size: 19px;
}

.page-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    line-height: 1.4;
}

.page-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.works-actions {
    display: flex;
    min-width: 76px;
    justify-content: flex-end;
    direction: rtl;
}

.round-action {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    color: #40526b;
    box-shadow: 0 8px 20px rgba(35, 64, 120, .08);
}

.round-action.is-open {
    border-color: rgba(124, 58, 237, .24);
    background: var(--accent-soft);
    color: var(--accent);
}

.works-search-form {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 34px;
}

.works-search-field {
    width: 0;
    min-width: 0;
    height: 34px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    opacity: 0;
    border: 1px solid rgba(124, 58, 237, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: #8b96aa;
    box-shadow: 0 8px 20px rgba(35, 64, 120, .08);
    transform-origin: right center;
    transform: scaleX(.88);
    transition: width .24s ease, opacity .18s ease, transform .24s ease, padding .24s ease;
}

.works-actions.is-search-open .works-search-toggle {
    display: none;
}

.works-actions.is-search-open .works-search-field {
    width: min(232px, calc(100vw - 110px));
    padding: 0 10px;
    opacity: 1;
    transform: scaleX(1);
}

.works-search-field input {
    height: 30px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    direction: rtl;
    font-size: 13px;
    font-weight: 760;
}

.works-search-field button {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(124, 58, 237, .08);
    color: #7e8ca4;
    cursor: pointer;
}

.works-refresh-indicator {
    height: 0;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    color: #8b96aa;
    font-size: 12px;
    font-weight: 820;
    transform: translateY(calc((var(--works-refresh-pull, 0px) - 42px) * .35));
    opacity: 0;
    transition: opacity .16s ease, transform .16s ease;
}

.works-refresh-indicator i {
    color: var(--accent);
}

#works-screen {
    transform: translateY(var(--works-refresh-pull, 0px));
    transition: transform .18s ease;
    overscroll-behavior-y: contain;
}

#works-screen.is-refresh-pulling,
#works-screen.is-refreshing {
    transition: none;
}

#works-screen.is-refresh-pulling .works-refresh-indicator,
#works-screen.is-refreshing .works-refresh-indicator {
    height: 42px;
    opacity: 1;
}

#works-screen.is-refresh-ready .works-refresh-indicator {
    color: var(--accent);
}

#works-screen.is-refreshing .works-refresh-indicator i {
    animation: refreshSpin .8s linear infinite;
}

#works-screen.is-works-loading .generated-audio-list {
    opacity: .62;
    pointer-events: none;
}

@keyframes refreshSpin {
    to {
        transform: rotate(360deg);
    }
}

.login-chip {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(92, 96, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    color: var(--accent-dark);
    padding: 0 14px;
    font-size: 14px;
    font-weight: 880;
}

.quota-chip {
    color: #8a95a8;
    font-size: 11px;
    font-weight: 760;
    line-height: 1.4;
    white-space: nowrap;
}

.quota-chip span {
    color: #ff4848;
    font-weight: 900;
}

.quota-chip[hidden] {
    display: none !important;
}

.mode-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.mode-card-head .section-title {
    margin-bottom: 0;
}

.login-chip.is-authenticated {
    width: 72px;
    height: 33px;
    min-width: 72px;
    min-height: 33px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: 0 14px 28px rgba(92, 96, 255, .14);
    color: var(--accent);
}

.language-capsule {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 5px;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 999px;
    background: rgba(255, 255, 255, .88);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .84),
        0 10px 22px rgba(92, 96, 255, .14);
    overflow: hidden;
}

.language-capsule-indicator {
    position: absolute;
    top: 2.2px;
    bottom: 3px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 25%, rgba(255, 255, 255, .42), transparent 28%),
        linear-gradient(135deg, var(--accent), var(--accent-dark));
    box-shadow: 0 8px 18px rgba(124, 58, 237, .32);
    transition: transform .18s ease;
}

.language-capsule[data-active-language="ug"] .language-capsule-indicator {
    transform: translateX(100%);
}

.language-capsule-option {
    position: relative;
    z-index: 1;
    height: 100%;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(109, 40, 217, .58);
    font-size: 14px;
    font-weight: 950;
    line-height: 1;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.language-capsule-option.is-active {
    color: #ffffff;
    text-shadow: 0 1px 5px rgba(76, 29, 149, .22);
}

.login-chip:disabled {
    opacity: 1;
    cursor: default;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    display: grid;
    align-items: end;
    border: 1px solid rgba(92, 96, 255, .12);
    border-radius: 22px;
    background:
        radial-gradient(circle at 18% 18%, rgba(37, 183, 255, .16), transparent 28%),
        radial-gradient(circle at 92% 20%, rgba(139, 92, 246, .16), transparent 31%),
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(232, 242, 255, .94));
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 14px;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: 34px -34px auto;
    height: 62px;
    opacity: .46;
    background:
        radial-gradient(ellipse at 18% 50%, rgba(79, 107, 255, .32) 0 13%, transparent 31%),
        radial-gradient(ellipse at 78% 50%, rgba(139, 92, 246, .28) 0 12%, transparent 30%),
        repeating-radial-gradient(ellipse at 50% 50%, transparent 0 7px, rgba(92, 96, 255, .18) 8px 9px, transparent 10px 17px);
    mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 280px;
}

.hero-title {
    color: var(--ink);
    font-size: 26px;
    font-weight: 940;
    line-height: 1.35;
}

.hero-title span {
    color: var(--accent);
}

.hero-text {
    margin-top: 8px;
    color: #64728a;
    font-size: 13px;
    font-weight: 760;
    line-height: 1.7;
}

.hero-cta {
    width: max-content;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #6d28d9, #7c3aed, #8b5cf6);
    color: #fff;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(92, 96, 255, .22);
}

.quick-create-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 12px;
    margin-bottom: 18px;
}

.feature-main,
.feature-side {
    border: 0;
    text-align: right;
    color: #fff;
    box-shadow: var(--shadow);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.feature-main {
    min-height: 176px;
    border-radius: 22px;
    padding: 20px;
    background:
        radial-gradient(circle at 32% 20%, rgba(255, 255, 255, .18), transparent 34%),
        linear-gradient(145deg, #6d28d9, #7c3aed);
}

.feature-main i,
.feature-side i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .20);
    margin-bottom: 22px;
}

.feature-main span,
.feature-side span {
    display: block;
    font-size: 19px;
    font-weight: 920;
}

.feature-main small,
.feature-side small {
    display: block;
    margin-top: 7px;
    color: rgba(255, 255, 255, .70);
    font-size: 12px;
    font-weight: 760;
    line-height: 1.5;
}

.feature-stack {
    display: grid;
    gap: 12px;
}

.feature-side {
    min-height: 82px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-radius: 18px;
    padding: 14px;
}

.feature-side.design {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.feature-side.library {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.feature-side i {
    margin: 0;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.shortcut {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #40526b;
    font-size: 12px;
    font-weight: 840;
    cursor: pointer;
}

.shortcut i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    color: var(--accent);
    box-shadow: 0 10px 24px rgba(35, 64, 120, .10);
    font-size: 17px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 16px 0 10px;
}

.section-head strong {
    color: var(--ink);
    font-size: 18px;
    font-weight: 920;
}

.section-head button,
.section-head span {
    border: 0;
    background: transparent;
    color: #8794a9;
    font-size: 12px;
    font-weight: 760;
}

.ai-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ai-card,
.profile-card,
.menu-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .90);
    box-shadow: 0 12px 30px rgba(35, 64, 120, .10);
}

.ai-card {
    min-height: 86px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px;
    text-align: right;
}

.ai-card i {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
}

.ai-card strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.ai-card small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    margin: 0 0 18px;
    width: 100%;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: right;
    padding: 0;
    cursor: pointer;
}

.profile-header.is-authenticated,
.profile-header:disabled {
    opacity: 1;
    cursor: default;
}

.profile-settings-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    color: var(--accent);
    box-shadow: 0 10px 24px rgba(92, 96, 255, .12);
    font-size: 16px;
    cursor: pointer;
}

.profile-settings-button[hidden] {
    display: none !important;
}

.avatar {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #e3e8ff, #d7c8ff);
    color: var(--accent);
    font-size: 28px;
    box-shadow: 0 14px 28px rgba(92, 96, 255, .14);
}

.profile-name {
    color: var(--ink);
    font-size: 22px;
    font-weight: 930;
}

.profile-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.profile-identity.is-authenticated {
    direction: ltr;
    text-align: right;
}

.profile-card {
    padding: 16px;
    margin-bottom: 14px;
}

.membership-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(124, 58, 237, .14);
    background:
        radial-gradient(circle at 10% 0%, rgba(124, 58, 237, .14), transparent 34%),
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .92));
}

.membership-card::after {
    content: "";
    position: absolute;
    inset-inline-start: -40px;
    top: -60px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(99, 102, 241, .10);
}

.membership-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.membership-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 930;
}

.membership-title i {
    color: var(--accent);
}

.membership-card.is-member .membership-title i {
    color: #f59e0b;
    filter: drop-shadow(0 3px 8px rgba(245, 158, 11, .26));
}

.membership-buy[hidden] {
    display: none !important;
}

.membership-status {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.membership-buy {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    padding: 0 14px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(124, 58, 237, .22);
    cursor: pointer;
}

.membership-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.membership-stat {
    min-height: 74px;
    border: 1px solid rgba(124, 58, 237, .10);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    padding: 12px;
}

.membership-stat strong {
    display: block;
    color: var(--ink);
    font-size: 21px;
    font-weight: 930;
    line-height: 1.2;
}

.membership-stat span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 760;
    line-height: 1.35;
}

.usage-card {
    display: grid;
    gap: 12px;
}

.usage-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

.usage-card button.usage-row {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: right;
    cursor: pointer;
}

.usage-card button.usage-row:active {
    transform: scale(.99);
}

.usage-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.usage-label {
    color: var(--ink);
    font-size: 14px;
    font-weight: 860;
}

.usage-sub {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 720;
}

.usage-value {
    color: var(--accent);
    font-size: 18px;
    font-weight: 930;
    direction: ltr;
}

.membership-backdrop {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: grid;
    place-items: end center;
    padding: 0;
    background: rgba(16, 24, 40, .26);
    backdrop-filter: blur(8px);
    direction: rtl;
}

.membership-backdrop[hidden] {
    display: none !important;
}

.membership-dialog {
    width: min(430px, 100%);
    max-height: min(86vh, 720px);
    display: grid;
    grid-template-rows: auto 1fr;
    border: 1px solid rgba(124, 58, 237, .12);
    border-bottom: 0;
    border-radius: 30px 30px 0 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(124, 58, 237, .16), transparent 34%),
        radial-gradient(circle at 88% 8%, rgba(99, 102, 241, .10), transparent 30%),
        #ffffff;
    box-shadow: 0 -24px 72px rgba(67, 56, 202, .22);
    overflow: hidden;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    animation: membership-sheet-in .24s ease both;
}

@keyframes membership-sheet-in {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.membership-dialog-head {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 36px;
    align-items: center;
    gap: 10px;
    padding: 28px 20px 14px;
}

.membership-dialog-head::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #dbe2ef;
    transform: translateX(-50%);
}

.membership-dialog-title {
    color: var(--ink);
    font-size: 20px;
    font-weight: 930;
}

.membership-dialog-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 730;
}

.membership-close {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(243, 244, 248, .92);
    color: var(--muted);
    cursor: pointer;
}

.membership-content {
    display: grid;
    gap: 18px;
    padding: 4px 12px;
    overflow-y: auto;
}

.member-plan-title {
    color: var(--ink);
    font-size: 16px;
    font-weight: 930;
    line-height: 1.3;
}

.member-plan-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 740;
    line-height: 1.45;
}

.member-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    gap: 10px;
    margin-top: 0;
    overflow: visible;
}

.membership-plans::-webkit-scrollbar {
    display: none;
}

.member-benefit {
    min-width: 72px;
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 7px;
}

.benefit-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 19px;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .05);
}

.member-benefit strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 880;
    line-height: 1.25;
}

.member-benefit span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 720;
    line-height: 1.25;
}

.membership-agreement-note {
    margin: 12px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 730;
    line-height: 1.7;
    display: flex;
    justify-content: center;
}

.membership-agreement-note .agreement-link {
    font-size: 11px;
}

.membership-plans {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    gap: 12px;
    margin-top: 12px;
    overflow-x: auto;
    padding: 2px 0 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.membership-plan {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    justify-items: center;
    text-align: center;
    gap: 9px;
    min-height: 188px;
    border: 1.5px solid rgba(124, 58, 237, .12);
    border-radius: 20px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(248, 250, 255, .96));
    padding: 22px 14px 14px;
    box-shadow: 0 10px 24px rgba(35, 64, 120, .06);
    cursor: pointer;
}

.membership-plan.active {
    border-color: rgba(124, 58, 237, .30);
    background:
        radial-gradient(circle at 0% 0%, rgba(124, 58, 237, .13), transparent 32%),
        linear-gradient(145deg, #ffffff, #f8faff);
    box-shadow: 0 14px 30px rgba(124, 58, 237, .12);
}

.plan-ribbon {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 84px;
    min-height: 26px;
    display: grid;
    place-items: center;
    border-radius: 0 18px 0 14px;
    background: linear-gradient(135deg, #fee4b8, #ffd49a);
    color: #8a4b16;
    padding: 0 9px;
    font-size: 11px;
    font-weight: 900;
}

.membership-plan.active::after {
    content: "تەۋسىيە";
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 900;
}

.plan-name {
    color: var(--ink);
    font-size: 17px;
    font-weight: 910;
    margin-top: 8px;
}

.plan-days {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 740;
}

.plan-price {
    color: var(--accent);
    font-size: 32px;
    font-weight: 930;
    direction: ltr;
    text-align: center;
    line-height: 1;
}

.plan-price small {
    font-size: 14px;
    font-weight: 850;
    margin-inline-end: 2px;
}

.plan-original {
    color: #a6afbf;
    font-size: 11px;
    font-weight: 760;
    text-decoration: line-through;
}

.plan-note {
    width: 100%;
    border-top: 1px solid rgba(124, 58, 237, .10);
    padding-top: 9px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 820;
    line-height: 1.35;
}

.membership-paybar {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(124, 58, 237, .10);
    background: rgba(255, 255, 255, .92);
    padding: 12px 18px max(14px, env(safe-area-inset-bottom));
}

.pay-total {
    color: var(--muted);
    font-size: 14px;
    font-weight: 820;
    white-space: nowrap;
}

.pay-total strong {
    color: #e11d48;
    font-size: 26px;
    font-weight: 930;
    direction: ltr;
    vertical-align: baseline;
}

.membership-pay {
    min-height: 50px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(124, 58, 237, .24);
}

.native-pay-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(16, 24, 40, .26);
    backdrop-filter: blur(10px);
    direction: rtl;
}

.native-pay-backdrop[hidden] {
    display: none !important;
}

.native-pay-dialog {
    position: relative;
    width: min(340px, 100%);
    display: grid;
    justify-items: center;
    gap: 10px;
    border: 1px solid rgba(124, 58, 237, .14);
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 0%, rgba(124, 58, 237, .15), transparent 34%),
        #ffffff;
    box-shadow: 0 24px 72px rgba(67, 56, 202, .24);
    padding: 22px;
    text-align: center;
    animation: toast-in .18s ease both;
}

.native-pay-close {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f3f4f8;
    color: var(--muted);
    cursor: pointer;
}

.native-pay-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(34, 197, 94, .12);
}

.native-pay-icon svg {
    width: 36px;
    height: 36px;
    display: block;
}

.wechat-bubble-main {
    fill: #19c15f;
}

.wechat-bubble-second {
    fill: #0ea64a;
}

.native-pay-title {
    color: var(--ink);
    font-size: 19px;
    font-weight: 930;
}

.native-pay-subtitle,
.native-pay-status {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.native-pay-qr {
    width: 210px;
    height: 210px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .10);
}

.native-pay-qr img {
    width: 190px;
    height: 190px;
    display: block;
}

.quota-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.quota-item {
    min-height: 78px;
    border-radius: 16px;
    background: #f6f9ff;
    padding: 13px;
}

.quota-item strong {
    display: block;
    color: var(--ink);
    font-size: 21px;
    font-weight: 930;
}

.quota-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
}

.profile-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.profile-tool {
    display: grid;
    justify-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #40526b;
    font-size: 11px;
    font-weight: 840;
}

.profile-tool i {
    color: var(--accent);
    font-size: 20px;
}

.history-list {
    display: grid;
    gap: 9px;
}

.history-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, .86);
    padding: 9px 12px;
}

.history-row i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
}

.history-row strong {
    display: block;
    color: var(--ink);
    font-size: 13px;
    font-weight: 890;
}

.history-row span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.menu-card {
    overflow: hidden;
    margin-top: 12px;
}

.generated-audio-list {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.works-load-more {
    min-height: 46px;
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 820;
}

.works-load-more[hidden] {
    display: none;
}

.works-load-more::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid rgba(124, 58, 237, .18);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.works-load-more span {
    display: none;
}

.generated-audio-card {
    min-height: 118px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 14px;
    border: 1px solid rgba(92, 96, 255, .08);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(248, 250, 255, .96));
    box-shadow: 0 14px 28px rgba(35, 64, 120, .07);
}

.generated-audio-main {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 12px;
    min-width: 0;
}

.generated-play {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .06);
    cursor: pointer;
    flex: 0 0 auto;
}

.generated-play i {
    font-size: 16px;
}

.generated-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding-top: 2px;
}

.generated-title {
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.generated-meta {
    color: #a0a9ba;
    font-size: 11px;
    font-weight: 720;
    line-height: 1.4;
    direction: ltr;
    text-align: right;
}

.generated-wave {
    height: 20px;
    display: grid;
    grid-template-columns: repeat(34, minmax(0, 1fr));
    gap: 2px;
    align-items: center;
    margin-top: 6px;
    direction: ltr;
    opacity: .36;
}

.generated-wave span {
    display: block;
    height: calc(3px + var(--h) * 1px);
    border-radius: 999px;
    background: rgba(124, 58, 237, .22);
    transition: background .16s ease, opacity .16s ease, transform .16s ease;
}

.generated-wave span.is-played {
    background: rgba(124, 58, 237, .72);
}

.generated-audio-card.is-playing .generated-wave span.is-played {
    transform: scaleY(1.14);
}

.generated-audio-player {
    display: none;
}

.generated-audio-side {
    position: relative;
    min-height: 100%;
    display: grid;
    justify-items: end;
    align-content: space-between;
    gap: 8px;
    padding-top: 1px;
}

.generated-menu {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #25324b;
    cursor: pointer;
}

.generated-menu-popover {
    position: absolute;
    top: 34px;
    left: 0;
    z-index: 12;
    min-width: 112px;
    padding: 6px;
    border: 1px solid rgba(124, 58, 237, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 16px 32px rgba(35, 64, 120, .16);
}

.generated-menu-popover[hidden] {
    display: none;
}

.generated-menu-popover button {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #334155;
    font-family: inherit;
    font-size: 12px;
    font-weight: 820;
    text-align: right;
    cursor: pointer;
}

body[data-interface-language="zh"] .generated-menu-popover {
    left: auto;
    right: 0;
}

body[data-interface-language="zh"] .generated-menu-popover button {
    text-align: left;
}

.generated-menu-popover button:hover {
    background: rgba(124, 58, 237, .08);
}

.generated-menu-popover i {
    color: var(--accent);
    font-size: 13px;
}

.generated-duration {
    color: #8d96a8;
    font-size: 13px;
    font-weight: 760;
    line-height: 1;
    padding-top: 6px;
}

.works-section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 10px;
}

.works-section-title {
    color: var(--ink);
    font-size: 18px;
    font-weight: 930;
    line-height: 1.2;
}

.works-section-subtitle {
    color: #9aa6b8;
    font-size: 12px;
    font-weight: 760;
    line-height: 1.2;
}

.menu-row {
    min-height: 52px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: #40526b;
    border-bottom: 1px solid var(--line);
    font-weight: 820;
}

button.menu-row {
    width: 100%;
    border-inline: 0;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    background: transparent;
    font-family: inherit;
    text-align: right;
    cursor: pointer;
}

.menu-row:last-child {
    border-bottom: 0;
}

.menu-row i:first-child {
    color: var(--accent);
}

.menu-row-value {
    color: #8a97aa;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.menu-row-trail {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #8a97aa;
}

.menu-row-trail i {
    color: #a4afc0;
    font-size: 12px;
}

.logout-row {
    color: #ef476f;
}

.logout-row[hidden] {
    display: none !important;
}

.logout-row i:first-child {
    color: #ef476f;
}

body[data-interface-language="zh"] .app,
body[data-interface-language="zh"] .toast-stack,
body[data-interface-language="zh"] .confirm-backdrop,
body[data-interface-language="zh"] .login-backdrop,
body[data-interface-language="zh"] .account-backdrop,
body[data-interface-language="zh"] .membership-backdrop,
body[data-interface-language="zh"] .native-pay-backdrop,
body[data-interface-language="zh"] .works-actions,
body[data-interface-language="zh"] .works-search-field input,
body[data-interface-language="zh"] textarea {
    direction: ltr;
}

body[data-interface-language="zh"] .hero-copy,
body[data-interface-language="zh"] .reference-drop,
body[data-interface-language="zh"] .saved-voice-card,
body[data-interface-language="zh"] .profile-header,
body[data-interface-language="zh"] .profile-identity.is-authenticated,
body[data-interface-language="zh"] .usage-card button.usage-row,
body[data-interface-language="zh"] button.menu-row,
body[data-interface-language="zh"] .generated-copy {
    text-align: left;
}

body[data-interface-language="zh"] select {
    padding: 0 42px 0 12px;
    background-position: right 16px center;
}

body[data-interface-language="zh"] .works-search-field {
    transform-origin: left center;
}

body[data-interface-language="zh"] .agreement-backdrop.is-ltr .agreement-title,
body[data-interface-language="zh"] .agreement-backdrop.is-ltr .agreement-body {
    text-align: left;
}

.tabbar {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 50;
    width: min(460px, 100%);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(50, 77, 129, .10);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(18px);
    box-shadow: 0 -18px 42px #3315660f;
}

.tabbar button {
    min-height: 54px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #8a97aa;
    font-size: 11px;
    font-weight: 820;
    cursor: pointer;
}

.tabbar i {
    font-size: 18px;
}

.tabbar button.active {
    color: var(--accent);
}

@media (max-width: 380px) {
    .app {
        padding-inline: 12px;
    }

    .topbar {
        margin-inline: -12px;
        padding-inline: 18px;
    }

    .brand {
        font-size: 23px;
    }

    .chip-row button {
        min-height: 94px;
        font-size: 12px;
        padding-inline: 6px;
        padding-top: 48px;
    }

    textarea {
        min-height: 122px;
    }

    .settings-body .field {
        grid-template-columns: 1fr;
    }

    .settings-body .grid.two {
        grid-template-columns: 1fr;
    }

}

/* ── ئەسەرلەر بوش ھالەت ── */
.works-empty {
    min-height: 118px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 16px;
    border: 1px solid rgba(92, 96, 255, .08);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(248, 250, 255, .96));
    box-shadow: 0 14px 28px rgba(35, 64, 120, .07);
    text-align: center;
}

.works-empty-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 24px;
}

.works-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.works-empty-sub {
    font-size: 13px;
    color: var(--muted);
    max-width: 240px;
    line-height: 1.6;
}
