/* Lexy game modal styles (gm-*). Extracted from includes/game-modal.cfm
   (the block lived outside cfoutput — plain CSS, no per-request values).
   Loaded by the include via <link>, cache-busted hourly. */
 
.gm-overlay {
    --gm-color: #8D75E6;
}
 
.gm-overlay[data-dm-theme="dark"] {
    background: rgba(17,17,22,0.85);
}
.gm-modal-box[data-dm-theme="dark"] {
    background: ##1A1A22;
    color: ##f3f4f6;
}
.gm-modal-box[data-dm-theme="dark"] .gm-modal-x { color: rgba(255,255,255,0.5); }
.gm-modal-box[data-dm-theme="dark"] .gm-modal-x:hover { color: ##fff; }
.gm-modal-box[data-dm-theme="dark"] .gm-step-label { color: rgba(255,255,255,0.5); }
.gm-modal-box[data-dm-theme="dark"] .gm-step-text { color: rgba(255,255,255,0.7); }
.gm-modal-box[data-dm-theme="dark"] .gm-footer { color: rgba(255,255,255,0.4); }
 
.gm-overlay[data-dm-theme="light"] {
    background: rgba(17,24,39,0.4);
}
.gm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17,24,39,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.gm-modal-box {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
    position: relative;
}
.gm-modal-x {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: #9ca3af;
    width: 32px;
    height: 32px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.gm-modal-x:hover { color: #6b7280; }
.gm-modal-body { padding: 28px 24px 24px; }
.gm-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    padding-right: 32px;
}
.gm-modal-sub {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

 
.gm-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}
.gm-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.gm-step-num {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--gm-color) 15%, transparent);
    color: var(--gm-color);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}
.gm-step-content { flex: 1; }
.gm-step-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}
.gm-step-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

 
.gm-phone-wrapper { max-width: 340px;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color 0.2s;
    overflow: hidden;
}
.gm-phone-wrapper:focus-within { border-color: var(--gm-color); }
.gm-phone-flag-container {
    display: flex;
    align-items: center;
    padding-left: 14px;
    gap: 8px;
    flex-shrink: 0;
}
.gm-phone-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gm-phone-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}
.gm-phone-input {
    flex: 1;
    height: 48px;
    padding: 0 14px 0 10px;
    font-size: 16px;
    color: #1a1a1a;
    background: transparent;
    border: none;
    outline: none;
}
.gm-phone-input::placeholder { color: #9ca3af; }
.gm-phone-input[readonly] { background: #f9fafb; cursor: default; }
.gm-phone-status {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}
.gm-phone-status.valid { color: #22c55e; }
.gm-phone-status.invalid { color: #ef4444; }
.gm-phone-status.loading { color: #9CA3AF; }
.gm-phone-message {
    font-size: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
    padding-left: 4px;
    color: #6b7280;
}
.gm-phone-message.valid { color: #22c55e; }
.gm-phone-message.invalid { color: #ef4444; }
@keyframes gm-shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-5px)} 40%,80%{transform:translateX(5px)} }
.gm-phone-wrapper.gm-shake { animation: gm-shake 0.4s ease-in-out; border-color: #ef4444; }

 
.gm-split-btn-container {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
}
.gm-split-main {
    flex: 1;
    padding: 16px;
    background: var(--gm-color);
    color: white;
    border: none;
    border-radius: 10px 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.gm-split-main svg { width: 20px; height: 20px; flex-shrink: 0; }
.gm-split-main:hover { filter: brightness(1.1); }

.gm-split-toggle {
    padding: 16px 14px;
    background: var(--gm-color);
    color: white;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.2);
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gm-split-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}
.gm-split-toggle.open svg { transform: rotate(180deg); }
.gm-split-toggle:hover { filter: brightness(1.1); }

 
.gm-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.gm-dropdown-btn {
    width: 100%;
    padding: 14px 16px;
    background: color-mix(in srgb, var(--gm-color) 12%, white);
    color: var(--gm-color);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.gm-dropdown-btn svg { width: 20px; height: 20px; }
.gm-dropdown-btn:hover { background: color-mix(in srgb, var(--gm-color) 20%, white); }

 
.gm-modal-footer {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

 
.gm-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: var(--gm-color);
    border-radius: 50%;
    animation: gm-spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes gm-spin { to { transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.gm-success-icon { margin-bottom: 20px; text-align: center; }
.gm-error-icon { margin-bottom: 20px; text-align: center; }

 
.gm-state-body {
    padding: 48px 24px;
    text-align: center;
}
.gm-state-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.gm-state-sub {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}
.gm-state-btn {
    width: 100%;
    padding: 14px;
    background: var(--gm-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.gm-state-btn:hover { filter: brightness(1.1); }

 
.gm-qr-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    display: inline-block;
    margin-bottom: 24px;
}
.gm-qr-image {
    width: 180px;
    height: 180px;
    display: block;
}
.gm-qr-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    text-align: left;
}
.gm-qr-step {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gm-qr-step p {
    color: #374151;
    font-size: 14px;
    margin: 0;
}
.gm-back-btn {
    width: 100%;
    padding: 14px;
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.gm-back-btn:hover { background: #e5e7eb; }

/* Share by email state — reuses gm-modal-body / gm-phone-wrapper /
   gm-phone-input / gm-split-* so it matches the initial call-to-play layout. */
.gm-share-field { text-align: left; margin-bottom: 16px; }
.gm-share-label {
    display: block; font-size: 14px; font-weight: 600;
    color: #374151; margin-bottom: 6px;
}
/* Message field: same gray-bordered wrapper as the phone input, but the
   textarea grows vertically instead of the fixed 48px input height. */
.gm-share-msg-wrapper { align-items: stretch; }
.gm-share-note {
    height: auto; min-height: 84px; padding: 12px 14px;
    resize: vertical; line-height: 1.5; font-family: inherit;
}
/* Split "Send email" button spinner (white on the purple main button) */
.gm-share-btn-default { display: inline-flex; align-items: center; gap: 10px; }
.gm-share-btn-loading { display: inline-flex; align-items: center; justify-content: center; }
.gm-share-spinner {
    width: 20px; height: 20px; margin: 0;
    border: 3px solid rgba(255,255,255,0.5); border-top-color: #fff;
}


.gm-slideshow-container {
    position: fixed;
    inset: 0;
    background: rgba(17,24,39,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gm-game-modal {
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 95vh;
    height: 700px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    background: linear-gradient(145deg, var(--gm-color) 0%, color-mix(in srgb, var(--gm-color) 55%, #1a0a2e) 100%);
}

 
@supports not (color: color-mix(in srgb, red, blue)) {
    .gm-game-modal {
        background: linear-gradient(145deg, #8D75E6 0%, #4a2c82 100%);
    }
}

.gm-game-modal.fullscreen {
    max-width: 100%;
    max-height: 100%;
    width: 100vw;
    height: 100%;
    border-radius: 0;
}

 
.gm-game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-shrink: 0;
}

.gm-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gm-game-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gm-game-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.gm-game-icon svg {
    width: 32px;
    height: 32px;
}

.gm-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gm-game-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.gm-progress-text {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.gm-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gm-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    color: white;
}

.gm-header-btn:hover {
    background: rgba(255,255,255,0.25);
}

.gm-header-btn svg {
    width: 20px;
    height: 20px;
}

 
.gm-progress-container {
    padding: 0 20px;
    flex-shrink: 0;
}

.gm-progress-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
}

.gm-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

 
.gm-game-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

 
.gm-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: white;
}

.gm-spinner-white {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: gm-spin 1s linear infinite;
}

 
.gm-question-container {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.gm-question-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
}

.gm-question-text {
    font-size: 28px;
    font-weight: 700;
    color: white;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}
 
.gm-question-text.gm-q-long {
    font-size: 22px;
}
.gm-question-text.gm-q-xl {
    font-size: 18px;
    line-height: 1.35;
}

 
.gm-answers-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.gm-answer-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    background: rgba(255,255,255,0.12);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.gm-answer-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.gm-answer-btn:active {
    transform: translateY(0);
}

.gm-answer-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.gm-answer-text {
    font-size: 16px;
    font-weight: 500;
    color: white;
    flex: 1;
}

 
.gm-answer-btn.correct {
    background: rgba(34,197,94,0.5);
    border-color: rgba(34,197,94,0.8);
}

.gm-answer-btn.correct .gm-answer-number {
    background: rgba(34,197,94,0.8);
}

.gm-answer-btn.incorrect {
    background: rgba(239,68,68,0.5);
    border-color: rgba(239,68,68,0.8);
}

.gm-answer-btn.incorrect .gm-answer-number {
    background: rgba(239,68,68,0.8);
}

 
.gm-game-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    flex-shrink: 0;
}

.gm-footer-score {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.gm-footer-score strong {
    font-weight: 700;
    color: white;
}

.gm-footer-accuracy {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

 
.gm-results-fullscreen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    min-height: 100%;
    position: relative;
}

 
.gm-results-topright {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}
.gm-results-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}
.gm-results-close:hover { background: rgba(255,255,255,0.25); }
.gm-results-close svg { width: 18px; height: 18px; display: block; }

.gm-results-icon {
    margin-bottom: 24px;
}

.gm-results-icon img {
    filter: brightness(0) invert(1);
}

.gm-results-icon svg {
    opacity: 0.9;
}

.gm-results-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
}

.gm-results-score-text {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    margin: 0 0 24px 0;
}

.gm-results-percentage {
    font-size: 80px;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 4px;
}

.gm-results-accuracy-label {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
}

.gm-results-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.gm-results-btn {
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 140px;
}

.gm-results-btn.primary {
    background: white;
    color: var(--gm-color);
}

.gm-results-btn.primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
}

.gm-results-btn.secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.gm-results-btn.secondary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

 
.gm-results-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.gm-results-screen .gm-results-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: white;
}

.gm-results-screen .gm-results-text {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 24px 0;
}

.gm-results-button {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: white;
    color: var(--gm-color);
    margin: 4px;
}

.gm-results-button.secondary {
    background: rgba(255,255,255,0.15);
    color: white;
}

 
.gm-overlay[dir="rtl"] .gm-step-content { text-align: right; }
.gm-overlay[dir="rtl"] .gm-phone-flag-container {
    padding-left: 0;
    padding-right: 14px;
    margin-left: 10px;
}
.gm-overlay[dir="rtl"] .gm-phone-input {
    text-align: right;
    padding: 0 12px 0 10px;
}
.gm-overlay[dir="rtl"] .gm-phone-status {
    margin-left: 12px;
    margin-right: 0;
}
.gm-overlay[dir="rtl"] .gm-phone-message { text-align: right; }
.gm-overlay[dir="rtl"] .gm-modal-title {
    padding-right: 0;
    padding-left: 32px;
    text-align: right;
}
.gm-overlay[dir="rtl"] .gm-modal-sub { text-align: right; }
.gm-overlay[dir="rtl"] .gm-modal-x {
    right: auto;
    left: 16px;
}
.gm-overlay[dir="rtl"] .gm-split-main {
    border-radius: 0 10px 10px 0;
}
.gm-overlay[dir="rtl"] .gm-split-toggle {
    border-radius: 10px 0 0 10px;
    border-left: none;
    border-right: 1px solid rgba(255,255,255,0.2);
}
.gm-overlay[dir="rtl"] .gm-qr-steps { text-align: right; }

 
.gm-overlay[dir="rtl"] .gm-answer-btn {
    text-align: right;
}
.gm-overlay[dir="rtl"] .gm-answer-text {
    text-align: right;
}

 
.gm-overlay[dir="rtl"] .gm-header-info {
    text-align: right;
}

 
.gm-overlay[dir="rtl"] .gm-game-footer {
    flex-direction: row-reverse;
}

 
.gm-motion-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.gm-motion-icon svg {
    width: 32px;
    height: 32px;
}
.gm-motion-icon-theme {
    background: color-mix(in srgb, var(--gm-color) 15%, transparent);
}
.gm-motion-icon-theme svg {
    stroke: var(--gm-color);
}
.gm-motion-icon-warn {
    background: rgba(245, 158, 11, 0.12);
}
.gm-motion-icon-warn svg {
    stroke: #f59e0b;
}
.gm-motion-speed-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: color-mix(in srgb, var(--gm-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--gm-color) 20%, transparent);
    border-radius: 20px;
    font-size: 13px;
    color: var(--gm-color);
    font-weight: 600;
    margin-bottom: 20px;
}
.gm-motion-speed-dot {
    width: 8px;
    height: 8px;
    background: var(--gm-color);
    border-radius: 50%;
    animation: gm-motion-pulse 1.5s infinite;
}
@keyframes gm-motion-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

 
.gm-phone-input:-webkit-autofill,
.gm-phone-input:-webkit-autofill:hover,
.gm-phone-input:-webkit-autofill:focus,
.gm-phone-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

 
@media (max-width: 640px) {
    .gm-game-modal {
 
        max-height: 100vh;
        height: 100vh;
        max-height: 100dvh;
        height: 100dvh;
        border-radius: 0;
    }
    .gm-slideshow-container {
        padding: 0;
    }
    .gm-game-header {
        padding: 12px 16px;
    }
    .gm-header-btn {
        width: 36px;
        height: 36px;
    }
    .gm-game-title {
        font-size: 14px;
    }
    .gm-progress-text {
        font-size: 12px;
    }
    .gm-question-text {
        font-size: 22px;
    }
    .gm-question-text.gm-q-long {
        font-size: 18px;
    }
    .gm-question-text.gm-q-xl {
        font-size: 15px;
    }
    .gm-answer-btn {
        padding: 14px 16px;
    }
    .gm-answer-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .gm-answer-text {
        font-size: 15px;
    }
    .gm-results-title {
        font-size: 28px;
    }
    .gm-results-percentage {
        font-size: 60px;
    }
    .gm-results-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }
    .gm-results-btn {
        width: 100%;
    }
}

 
.dm-state {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 9999; 
}
.dm-state[data-theme="dark"] {
    background: #231E41;
    color: #FFFFFF;
    --dm-card-bg: rgba(255,255,255,0.05);
    --dm-card-border: rgba(255,255,255,0.10);
    --dm-text-secondary: rgba(255,255,255,0.50);
    --dm-text-tertiary: rgba(255,255,255,0.40);
    --dm-text-quaternary: rgba(255,255,255,0.30);
    --dm-speed-unit: rgba(255,255,255,0.40);
    --dm-exit-bg: rgba(255,255,255,0.10);
    --dm-exit-border: rgba(255,255,255,0.20);
    --dm-exit-text: rgba(255,255,255,0.70);
    --dm-accent: #8D75E6;
    --dm-badge-bg: rgba(141,117,230,0.20);
}
.dm-state[data-theme="light"] {
    background: #F3ECF7;
    color: #111827;
    --dm-card-bg: rgba(255,255,255,0.60);
    --dm-card-border: rgba(255,255,255,1);
    --dm-text-secondary: rgba(17,24,39,0.60);
    --dm-text-tertiary: rgba(17,24,39,0.50);
    --dm-text-quaternary: rgba(17,24,39,0.40);
    --dm-speed-unit: rgba(17,24,39,0.40);
    --dm-exit-bg: rgba(255,255,255,0.60);
    --dm-exit-border: rgba(255,255,255,1);
    --dm-exit-text: rgba(17,24,39,0.70);
    --dm-accent: #8D75E6;
    --dm-badge-bg: rgba(141,117,230,0.10);
    --dm-card-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
 
.dm-top-section {
    display: flex; flex-direction: column; align-items: center;
    flex-shrink: 0;
    padding-top: 54px; padding-bottom: 0;
}
.dm-mode-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--dm-badge-bg); color: var(--dm-accent);
    padding: 8px 16px; border-radius: 100px;
    margin-bottom: 32px;
}
.dm-badge-icon { display: flex; align-items: center; }
.dm-badge-text { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.dm-speed-number {
    font-size: 80px; font-weight: 700; line-height: 1; letter-spacing: -2px;
    text-align: center; margin-bottom: 4px;
}
.dm-speed-unit { font-size: 18px; font-weight: 500; color: var(--dm-speed-unit); text-transform: uppercase; letter-spacing: 1px; }
 
.dm-voice-section {
    display: flex; flex-direction: column; align-items: center;
    padding: 32px 24px; flex-shrink: 0;
}
.dm-voice-prompt { font-size: 14px; color: var(--dm-text-secondary); margin-bottom: 24px; }
.dm-voice-btn {
    width: 112px; height: 112px; border-radius: 56px;
    background: var(--dm-accent); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 24px rgba(141,117,230,0.3);
}
.dm-voice-btn:active { transform: scale(0.95); }
.dm-voice-btn.listening {
    animation: dm-voice-pulse 1.5s infinite;
}
@keyframes dm-voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(141,117,230,0.4); }
    50% { box-shadow: 0 0 0 20px rgba(141,117,230,0); }
}
.dm-voice-transcript {
    font-size: 14px; font-weight: 400; color: var(--dm-text-tertiary);
    font-style: italic; min-height: 0; margin-top: 16px;
    text-align: center; max-width: 280px; word-break: break-word;
}
.dm-voice-example {
    font-size: 14px; color: var(--dm-text-quaternary);
    font-style: italic; margin-top: 16px;
    max-width: 280px; text-align: center;
}
 
.dm-section-header {
    font-size: 12px; font-weight: 600; letter-spacing: 0.8px;
    color: var(--dm-text-secondary); text-transform: uppercase;
    margin-bottom: 16px;
}
 
.dm-actions-section {
    padding: 0 24px 32px 24px; display: flex; flex-direction: column;
    flex-shrink: 0;
}
.dm-action-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.dm-action-card {
    border-radius: 16px;
    background: var(--dm-accent);
    border: none;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    gap: 12px; padding: 16px;
    transition: transform 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 4px 12px rgba(141,117,230,0.25);
}
.dm-action-card:active { transform: scale(0.96); opacity: 0.85; }
 
.dm-action-card.dm-card-disabled {
    opacity: 0.35;
    pointer-events: none;
    box-shadow: none;
}
.dm-action-icon {
    display: flex; align-items: center; justify-content: center;
    color: #FFFFFF;
}
.dm-action-icon svg { width: 40px; height: 40px; }
.dm-action-label {
    font-size: 13px; font-weight: 600; white-space: nowrap;
    color: #FFFFFF;
}
 
.dm-exit-bar {
    padding: 24px 24px 32px 24px; display: flex;
    flex-shrink: 0;
}
.dm-exit-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--dm-exit-bg); border: 1px solid var(--dm-exit-border);
    border-radius: 100px; padding: 12px 24px;
    color: var(--dm-exit-text); font-size: 14px; font-weight: 500;
    font-family: inherit; cursor: pointer;
    transition: background 0.15s ease;
    box-shadow: var(--dm-card-shadow, none);
}
.dm-exit-btn:active { opacity: 0.8; }
.dm-state::-webkit-scrollbar { display: none; }
 
.dm-perm-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10001; padding: 24px;
}
.dm-perm-card {
    background: #FFFFFF; border-radius: 20px; width: 100%; max-width: 380px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}
.dm-perm-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 40px 32px 32px 32px; gap: 16px;
}
.dm-perm-icon-wrap {
    width: 56px; height: 56px; border-radius: 28px;
    display: flex; align-items: center; justify-content: center;
}
.dm-perm-title {
    font-size: 20px; font-weight: 700; color: #111827;
    text-align: center; margin: 0; line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.dm-perm-body {
    font-size: 14px; font-weight: 400; color: #6B7280;
    text-align: center; margin: 0; line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.dm-perm-note {
    font-size: 12px; font-weight: 400; color: #6B7280; opacity: 0.7;
    text-align: center; margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.dm-perm-actions {
    display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px;
}
.dm-perm-btn-primary {
    width: 100%; height: 48px; border-radius: 100px; border: none;
    background: #8D75E6; color: #FFFFFF;
    font-size: 14px; font-weight: 500; cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: opacity 0.15s ease;
}
.dm-perm-btn-primary:active { opacity: 0.85; }
.dm-perm-btn-secondary {
    width: 100%; height: 48px; border-radius: 100px; border: none;
    background: #F3F4F6; color: #374151;
    font-size: 14px; font-weight: 500; cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: opacity 0.15s ease;
}
.dm-perm-btn-secondary:active { opacity: 0.85; }
.dm-perm-spinner {
    width: 48px; height: 48px; border-radius: 50%;
    border: 4px solid #E5E7EB; border-top-color: #8D75E6;
    animation: dm-perm-spin 0.8s linear infinite;
}
@keyframes dm-perm-spin { to { transform: rotate(360deg); } }

/* calling orb at hero-demo scale inside modal states */
.gm-state-body .lexy-call-orb { width: 128px; height: 128px; margin-bottom: 20px; }
.gm-state-body .lexy-call-orb .lco-ring { width: 128px; height: 128px; }
.gm-state-body .lexy-call-orb .lco-core { width: 78px; height: 78px; }
.gm-state-body .lexy-call-orb .lco-core svg { width: 34px; height: 34px; }
