/* ==========================================================================
   NPC Official Institutional Accessibility & Native Conversational Assistant
   اللجنة البارالمبية المصرية — منظومة الإتاحة الرقمية والمساعد التفاعلي المدمج
   100% Formal, Institutional, Emoji-Free UI (WCAG 2.1 AAA Compliant)
   ========================================================================== */

/* Screen Edge Visual Flash for Deaf & Hard-of-Hearing Alerts */
#npc-edge-flash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.25s ease;
    box-shadow: inset 0 0 0 0 transparent;
}
#npc-edge-flash.flash-error {
    opacity: 1;
    animation: npcEdgePulseError 0.9s ease-in-out 2;
}
#npc-edge-flash.flash-success {
    opacity: 1;
    animation: npcEdgePulseSuccess 0.8s ease-in-out 2;
}
#npc-edge-flash.flash-warning {
    opacity: 1;
    animation: npcEdgePulseWarning 0.85s ease-in-out 2;
}
@keyframes npcEdgePulseError {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(220, 38, 38, 0); }
    50% { box-shadow: inset 0 0 38px 14px rgba(220, 38, 38, 0.88); }
}
@keyframes npcEdgePulseSuccess {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(22, 163, 74, 0); }
    50% { box-shadow: inset 0 0 36px 12px rgba(22, 163, 74, 0.85); }
}
@keyframes npcEdgePulseWarning {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(234, 179, 8, 0); }
    50% { box-shadow: inset 0 0 36px 12px rgba(234, 179, 8, 0.88); }
}

/* Active DOM Element Highlight During Page Reading */
.npc-reading-highlight {
    outline: 3px solid #c89d3c !important;
    outline-offset: 4px !important;
    background-color: rgba(250, 204, 21, 0.14) !important;
    border-radius: 6px;
    transition: outline 0.2s ease, background-color 0.2s ease;
}

/* Reading Focus Ruler for Low Vision */
#npc-reading-ruler {
    position: fixed;
    left: 0;
    right: 0;
    height: 44px;
    background: rgba(250, 204, 21, 0.2);
    border-top: 2px solid #c89d3c;
    border-bottom: 2px solid #c89d3c;
    pointer-events: none;
    z-index: 99990;
    display: none;
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.25);
}
html.npc-ruler-active #npc-reading-ruler {
    display: block;
}

/* AAA High-Contrast Mode (Gold & White on Deep Black) for Low Vision */
html.npc-hc-mode,
html.npc-hc-mode body,
html.npc-hc-mode main,
html.npc-hc-mode .erp-main,
html.npc-hc-mode .section {
    background: #050505 !important;
    color: #ffffff !important;
}
html.npc-hc-mode .card,
html.npc-hc-mode .stat-box,
html.npc-hc-mode .sport-card,
html.npc-hc-mode .event-row,
html.npc-hc-mode .erp-topbar,
html.npc-hc-mode .header,
html.npc-hc-mode .footer {
    background: #0f0f0f !important;
    color: #ffffff !important;
    border: 2px solid #facc15 !important;
}
html.npc-hc-mode h1,
html.npc-hc-mode h2,
html.npc-hc-mode h3,
html.npc-hc-mode h4,
html.npc-hc-mode a,
html.npc-hc-mode .card-title,
html.npc-hc-mode .form-label,
html.npc-hc-mode strong {
    color: #facc15 !important;
}
html.npc-hc-mode p,
html.npc-hc-mode span,
html.npc-hc-mode li,
html.npc-hc-mode td,
html.npc-hc-mode th {
    color: #f8fafc !important;
}
html.npc-hc-mode input,
html.npc-hc-mode select,
html.npc-hc-mode textarea {
    background: #000000 !important;
    color: #facc15 !important;
    border: 2px solid #facc15 !important;
}
html.npc-hc-mode .btn,
html.npc-hc-mode .button {
    background: #facc15 !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
    font-weight: 800 !important;
}

/* Floating Institutional Accessibility & Assistant Launcher */
#npc-a11y-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99995;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: linear-gradient(135deg, #0b132b 0%, #1e293b 100%);
    color: #ffffff;
    border: 1.5px solid #c89d3c;
    border-radius: 999px;
    padding: 0.62rem 1.15rem;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(11, 19, 43, 0.38);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
#npc-a11y-fab:hover,
#npc-a11y-fab:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(200, 157, 60, 0.38);
    border-color: #facc15;
    outline: 2px solid #facc15;
}
#npc-a11y-fab .fab-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(200, 157, 60, 0.2);
    border: 1px solid rgba(250, 204, 21, 0.45);
    color: #facc15;
    border-radius: 50%;
    flex-shrink: 0;
}
#npc-a11y-fab.mode-active {
    background: linear-gradient(135deg, #7f1d1d 0%, #0f172a 100%);
    border-color: #facc15;
}

/* Synchronized Live Teleprompter / Caption Bar (Bottom Center) */
#npc-live-caption-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: min(680px, calc(100vw - 40px));
    background: rgba(11, 19, 43, 0.96);
    color: #f8fafc;
    border: 1.5px solid #c89d3c;
    border-radius: 14px;
    padding: 0.75rem 1.1rem;
    z-index: 99994;
    box-shadow: 0 18px 42px rgba(11, 19, 43, 0.45);
    font-family: 'Cairo', system-ui, sans-serif;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    backdrop-filter: blur(8px);
}
#npc-live-caption-bar.visible {
    display: flex;
}
.npc-caption-content {
    flex: 1;
    min-width: 0;
}
.npc-caption-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #facc15;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.2rem;
}
.npc-caption-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.npc-caption-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.npc-caption-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.npc-caption-btn:hover {
    background: #c89d3c;
    color: #0f172a;
    border-color: #facc15;
}

/* Institutional Accessibility & Native Assistant Modal / Drawer */
#npc-a11y-panel {
    position: fixed;
    bottom: 76px;
    left: 20px;
    width: min(510px, calc(100vw - 32px));
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #c89d3c;
    border-radius: 16px;
    box-shadow: 0 24px 56px rgba(11, 19, 43, 0.36);
    z-index: 99996;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
    text-align: right;
    display: none;
}
#npc-a11y-panel[dir="ltr"] {
    direction: ltr;
    text-align: left;
}
#npc-a11y-panel.open {
    display: block;
}
.npc-a11y-head {
    background: linear-gradient(135deg, #0b132b 0%, #1e293b 100%);
    color: #ffffff;
    padding: 0.95rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 2px solid #c89d3c;
}
.npc-a11y-head-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.npc-a11y-crest {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(200, 157, 60, 0.18);
    border: 1px solid rgba(250, 204, 21, 0.45);
    color: #facc15;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.npc-a11y-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}
.npc-a11y-head p {
    margin: 0.15rem 0 0;
    font-size: 0.73rem;
    color: #cbd5e1;
}
.npc-a11y-head-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.npc-lang-switch {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    overflow: hidden;
}
.npc-lang-btn {
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.28rem 0.55rem;
    cursor: pointer;
    transition: all 0.15s;
}
.npc-lang-btn.active {
    background: #c89d3c;
    color: #0b132b;
}
.npc-a11y-close {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.npc-a11y-close:hover {
    background: rgba(220, 38, 38, 0.85);
}

/* 3 Institutional Navigation Tabs */
.npc-a11y-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f1f5f9;
    padding: 0.35rem;
    gap: 0.3rem;
    border-bottom: 1px solid #e2e8f0;
}
.npc-a11y-tab {
    border: none;
    background: transparent;
    padding: 0.52rem 0.4rem;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.15s;
}
.npc-a11y-tab svg {
    flex-shrink: 0;
}
.npc-a11y-tab.active {
    background: #0b132b;
    color: #facc15;
    box-shadow: 0 2px 8px rgba(11, 19, 43, 0.18);
}

.npc-a11y-body {
    padding: 0.95rem 1.1rem;
}
.npc-a11y-pane {
    display: none;
}
.npc-a11y-pane.active {
    display: block;
}

/* Structured Page Reader Transport Box */
.npc-reader-transport {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-right: 4px solid #c89d3c;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.85rem;
}
#npc-a11y-panel[dir="ltr"] .npc-reader-transport {
    border-right: 1px solid #cbd5e1;
    border-left: 4px solid #c89d3c;
}
.npc-reader-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}
.npc-reader-title {
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.npc-reader-counter {
    font-size: 0.72rem;
    font-weight: 800;
    color: #475569;
    background: #e2e8f0;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
}
.npc-reader-now-playing {
    font-size: 0.76rem;
    color: #334155;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.55rem;
    line-height: 1.5;
    max-height: 62px;
    overflow-y: auto;
}
.npc-reader-controls {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    gap: 0.35rem;
}
.npc-transport-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
}
.npc-transport-btn:hover {
    background: #f1f5f9;
    border-color: #0f172a;
}
.npc-transport-btn.primary {
    background: #0b132b;
    color: #facc15;
    border-color: #0b132b;
}
.npc-transport-btn.primary:hover {
    background: #1e293b;
}

/* Feature Grid Buttons */
.npc-a11y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}
.npc-a11y-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.22rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.79rem;
    font-weight: 800;
    cursor: pointer;
    text-align: inherit;
    transition: all 0.15s;
    width: 100%;
}
.npc-a11y-btn-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #0f172a;
}
.npc-a11y-btn-top svg {
    color: #b48628;
    flex-shrink: 0;
}
.npc-a11y-btn:hover {
    border-color: #0f172a;
    background: #f1f5f9;
}
.npc-a11y-btn.active {
    background: #fefce8;
    border-color: #ca8a04;
    color: #0f172a;
    box-shadow: 0 0 0 2px rgba(202, 138, 4, 0.18);
}
.npc-a11y-btn small {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
}

/* Native Conversational Assistant Tab */
.npc-assistant-box {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.npc-assistant-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0b132b;
    color: #ffffff;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #c89d3c;
}
.npc-assistant-status-text {
    font-size: 0.76rem;
    font-weight: 700;
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.npc-voice-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}
.npc-voice-dot.listening {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    animation: npcPulseDot 1s infinite;
}
@keyframes npcPulseDot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}
.npc-assistant-log {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.75rem;
    max-height: 235px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.npc-msg {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    font-size: 0.79rem;
    line-height: 1.6;
}
.npc-msg-user {
    background: #e2e8f0;
    color: #0f172a;
    align-self: flex-start;
    font-weight: 700;
    border-right: 3px solid #0f172a;
}
#npc-a11y-panel[dir="ltr"] .npc-msg-user {
    border-right: none;
    border-left: 3px solid #0f172a;
}
.npc-msg-assistant {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-right: 4px solid #c89d3c;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}
#npc-a11y-panel[dir="ltr"] .npc-msg-assistant {
    border-right: 1px solid #cbd5e1;
    border-left: 4px solid #c89d3c;
}
.npc-msg-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.npc-msg-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #0b132b;
    color: #facc15 !important;
    text-decoration: none;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
}
.npc-msg-link:hover {
    background: #1e293b;
}
.npc-msg-steps {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.npc-msg-step {
    font-size: 0.72rem;
    color: #334155;
    background: #f8fafc;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border-right: 2px solid #0284c7;
}
.npc-assistant-input-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.npc-assistant-input {
    flex: 1;
    border: 1.5px solid #cbd5e1;
    border-radius: 9px;
    padding: 0.52rem 0.75rem;
    font-family: inherit;
    font-size: 0.8rem;
    color: #0f172a;
    background: #ffffff;
}
.npc-assistant-input:focus {
    outline: none;
    border-color: #0b132b;
}
.npc-assistant-mic-btn,
.npc-assistant-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-radius: 9px;
    padding: 0.52rem 0.75rem;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    border: 1.5px solid transparent;
    flex-shrink: 0;
}
.npc-assistant-mic-btn {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}
.npc-assistant-mic-btn.listening {
    background: #dc2626;
    color: #ffffff;
    border-color: #dc2626;
}
.npc-assistant-send-btn {
    background: #0b132b;
    color: #facc15;
    border-color: #c89d3c;
}
.npc-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.npc-quick-chip {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 999px;
    padding: 0.24rem 0.62rem;
    font-family: inherit;
    font-size: 0.71rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.npc-quick-chip:hover {
    background: #0b132b;
    color: #facc15;
    border-color: #0b132b;
}

/* Deaf & Hard-of-Hearing Interactive Sign Language Studio & Site Guide */
.npc-sign-studio {
    background: linear-gradient(145deg, #0b132b 0%, #172554 100%);
    color: #ffffff;
    border: 1.5px solid #c89d3c;
    border-radius: 14px;
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 10px 26px rgba(11, 19, 43, 0.25);
}
.npc-sign-studio-top {
    display: flex;
    align-items: stretch;
    gap: 0.85rem;
    margin-bottom: 0.7rem;
}
.npc-sign-avatar-stage {
    width: 126px;
    min-height: 132px;
    background: radial-gradient(circle at 50% 35%, #1e293b 0%, #090d16 100%);
    border: 1.5px solid rgba(250, 204, 21, 0.55);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.35rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.npc-sign-avatar-badge {
    font-size: 0.62rem;
    font-weight: 800;
    color: #0b132b;
    background: #facc15;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
    z-index: 2;
}
.npc-sign-svg {
    width: 104px;
    height: 98px;
    overflow: visible;
}
/* Articulated Sign Interpreter Hand & Arm Keyframe Animations */
.npc-sign-svg .sign-arm-right,
.npc-sign-svg .sign-arm-left,
.npc-sign-svg .sign-head {
    transform-box: fill-box;
    transform-origin: center;
}
.npc-sign-avatar-stage[data-gesture="welcome"] .sign-arm-right {
    animation: npcSignWelcomeRight 1.8s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="welcome"] .sign-arm-left {
    animation: npcSignWelcomeLeft 1.8s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="welcome"] .sign-head {
    animation: npcSignHeadNod 1.8s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="club"] .sign-arm-right {
    animation: npcSignStampRight 1.5s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="club"] .sign-arm-left {
    animation: npcSignHoldDocLeft 1.5s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="player"] .sign-arm-right,
.npc-sign-avatar-stage[data-gesture="champion"] .sign-arm-right {
    animation: npcSignVictoryRight 1.6s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="player"] .sign-arm-left,
.npc-sign-avatar-stage[data-gesture="champion"] .sign-arm-left {
    animation: npcSignVictoryLeft 1.6s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="deaf"] .sign-arm-right,
.npc-sign-avatar-stage[data-gesture="medical"] .sign-arm-right {
    animation: npcSignEarCheckRight 1.7s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="deaf"] .sign-arm-left,
.npc-sign-avatar-stage[data-gesture="medical"] .sign-arm-left {
    animation: npcSignHoldDocLeft 1.7s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="finance"] .sign-arm-right,
.npc-sign-avatar-stage[data-gesture="sports"] .sign-arm-right,
.npc-sign-avatar-stage[data-gesture="news"] .sign-arm-right,
.npc-sign-avatar-stage[data-gesture="contact"] .sign-arm-right {
    animation: npcSignPresentRight 1.55s ease-in-out infinite;
}
.npc-sign-avatar-stage[data-gesture="finance"] .sign-arm-left,
.npc-sign-avatar-stage[data-gesture="sports"] .sign-arm-left,
.npc-sign-avatar-stage[data-gesture="news"] .sign-arm-left,
.npc-sign-avatar-stage[data-gesture="contact"] .sign-arm-left {
    animation: npcSignPresentLeft 1.55s ease-in-out infinite;
}

@keyframes npcSignHeadNod {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(2px) rotate(-3deg); }
}
@keyframes npcSignWelcomeRight {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    45% { transform: translate(-8px, -14px) rotate(-18deg); }
    75% { transform: translate(6px, -8px) rotate(12deg); }
}
@keyframes npcSignWelcomeLeft {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(6px, -10px) rotate(14deg); }
}
@keyframes npcSignStampRight {
    0%, 100% { transform: translate(0, -10px) rotate(-12deg); }
    50% { transform: translate(-10px, 4px) rotate(10deg); }
}
@keyframes npcSignHoldDocLeft {
    0%, 100% { transform: translate(4px, -4px) rotate(8deg); }
    50% { transform: translate(6px, -6px) rotate(12deg); }
}
@keyframes npcSignVictoryRight {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-6px, -18px) rotate(-24deg); }
}
@keyframes npcSignVictoryLeft {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(6px, -18px) rotate(24deg); }
}
@keyframes npcSignEarCheckRight {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    45% { transform: translate(-10px, -20px) rotate(-28deg); }
    80% { transform: translate(-4px, -8px) rotate(-10deg); }
}
@keyframes npcSignPresentRight {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10px, -10px) rotate(-16deg); }
}
@keyframes npcSignPresentLeft {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(10px, -10px) rotate(16deg); }
}

.npc-sign-studio-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.npc-sign-module-Title {
    font-size: 0.86rem;
    font-weight: 800;
    color: #facc15;
    margin: 0 0 0.25rem;
    line-height: 1.35;
}
.npc-sign-hand-desc {
    font-size: 0.72rem;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.07);
    border-right: 3px solid #facc15;
    padding: 0.32rem 0.55rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    line-height: 1.45;
}
#npc-a11y-panel[dir="ltr"] .npc-sign-hand-desc {
    border-right: none;
    border-left: 3px solid #facc15;
}
.npc-sign-plain-summary {
    font-size: 0.76rem;
    color: #f8fafc;
    line-height: 1.55;
    margin: 0;
}

/* Sign Gloss Visual Sequence Bar (إشارات متتابعة مبسطة للصم) */
.npc-sign-gloss-wrap {
    background: rgba(9, 13, 22, 0.72);
    border: 1px solid rgba(200, 157, 60, 0.45);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.65rem;
}
.npc-sign-gloss-label {
    font-size: 0.68rem;
    font-weight: 800;
    color: #94a3b8;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.npc-sign-gloss-tokens {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.32rem;
}
.npc-sign-gloss-token {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 800;
    transition: all 0.2s ease;
}
.npc-sign-gloss-token.active-gloss {
    background: #facc15;
    color: #0b132b;
    border-color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.55);
}
.npc-sign-gloss-arrow {
    color: #c89d3c;
    font-size: 0.75rem;
    font-weight: 900;
}

/* Step-by-Step Deaf Storyboard inside Studio */
.npc-sign-steps-box {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}
.npc-sign-step-row {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 0.42rem 0.65rem;
    font-size: 0.74rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.45;
}
.npc-sign-step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c89d3c;
    color: #0b132b;
    font-size: 0.7rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Sign Studio Transport & Action Row */
.npc-sign-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.npc-sign-tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    background: #facc15;
    color: #0b132b;
    border: 1px solid #facc15;
    border-radius: 8px;
    padding: 0.42rem 0.75rem;
    font-family: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s;
}
.npc-sign-tour-btn:hover {
    background: #fde047;
}
.npc-sign-tour-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}
.npc-sign-tour-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 9-Module Site Encyclopedia Selector Grid */
.npc-sign-modules-title {
    font-size: 0.76rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.45rem;
}
.npc-sign-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.38rem;
    margin-bottom: 0.75rem;
}
.npc-sign-mod-btn {
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 8px;
    padding: 0.42rem 0.45rem;
    font-family: inherit;
    font-size: 0.71rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    line-height: 1.3;
}
.npc-sign-mod-btn:hover {
    border-color: #0b132b;
    background: #e2e8f0;
}
.npc-sign-mod-btn.active {
    background: #0b132b;
    color: #facc15;
    border-color: #c89d3c;
}

/* Floating Sign-in-Picture (PiP) Live Page & Element Sign Translator */
#npc-sign-pip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: min(335px, calc(100vw - 32px));
    background: linear-gradient(145deg, #0b132b 0%, #1e293b 100%);
    color: #ffffff;
    border: 2px solid #c89d3c;
    border-radius: 16px;
    padding: 0.75rem 0.85rem;
    z-index: 99993;
    box-shadow: 0 20px 44px rgba(11, 19, 43, 0.48);
    font-family: 'Cairo', system-ui, sans-serif;
    direction: rtl;
    text-align: right;
    display: none;
}
#npc-sign-pip.visible {
    display: block;
}
#npc-sign-pip[dir="ltr"] {
    direction: ltr;
    text-align: left;
}
.npc-sign-pip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(200, 157, 60, 0.35);
    padding-bottom: 0.4rem;
    margin-bottom: 0.55rem;
}
.npc-sign-pip-title {
    font-size: 0.76rem;
    font-weight: 800;
    color: #facc15;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.npc-sign-pip-body {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.npc-sign-pip-avatar {
    width: 78px;
    height: 82px;
    background: #090d16;
    border: 1px solid rgba(250, 204, 21, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.npc-sign-pip-avatar .npc-sign-svg {
    width: 70px;
    height: 70px;
}
.npc-sign-pip-text {
    flex: 1;
    min-width: 0;
}
.npc-sign-pip-gloss {
    font-size: 0.72rem;
    font-weight: 800;
    color: #facc15;
    margin-bottom: 0.22rem;
    line-height: 1.4;
}
.npc-sign-pip-desc {
    font-size: 0.73rem;
    color: #f8fafc;
    line-height: 1.45;
}

/* Shortcuts Box */
.npc-shortcuts-box {
    background: #0b132b;
    color: #f8fafc;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-size: 0.74rem;
    line-height: 1.75;
    border: 1px solid rgba(200, 157, 60, 0.4);
}
.npc-shortcuts-box kbd {
    background: #1e293b;
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.35);
    padding: 0.08rem 0.4rem;
    border-radius: 5px;
    font-weight: 800;
    font-size: 0.72rem;
}

/* Institutional Toast Notifications */
#npc-toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 99997;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: min(390px, calc(100vw - 32px));
    pointer-events: none;
    font-family: 'Cairo', system-ui, sans-serif;
    direction: rtl;
}
.npc-toast {
    pointer-events: auto;
    background: #ffffff;
    color: #0f172a;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
    border-right: 5px solid #0284c7;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    animation: npcToastSlideIn 0.25s ease;
}
.npc-toast.toast-error { border-right-color: #dc2626; background: #fef2f2; }
.npc-toast.toast-warning { border-right-color: #d97706; background: #fffbeb; }
.npc-toast.toast-success { border-right-color: #16a34a; background: #f0fdf4; }
.npc-toast-title {
    font-size: 0.84rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}
.npc-toast-msg {
    font-size: 0.77rem;
    color: #334155;
    line-height: 1.5;
}
@keyframes npcToastSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Smart Form Coach Progress Bar & Field Feedback */
.npc-form-coach-bar {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-right: 4px solid #c89d3c;
    border-radius: 10px;
    padding: 0.65rem 0.95rem;
    margin-bottom: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.npc-form-coach-track {
    flex: 1;
    min-width: 160px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.npc-form-coach-fill {
    height: 100%;
    background: linear-gradient(90deg, #c89d3c, #16a34a);
    width: 0%;
    transition: width 0.3s ease;
}
.npc-field-coach-hint {
    margin-top: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    display: inline-block;
}
.npc-field-coach-hint.valid {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.npc-field-coach-hint.invalid {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Topbar Smart Notification Bell & Radar Drawer (Workspace) */
.npc-radar-bell-wrap {
    position: relative;
}
.npc-radar-bell-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.38rem 0.85rem;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.15s;
}
.npc-radar-bell-btn:hover {
    border-color: #c89d3c;
    background: #fefce8;
}
.npc-radar-badge {
    background: #dc2626;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    animation: npcBadgePulse 2s infinite;
}
@keyframes npcBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.npc-radar-drawer {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(420px, calc(100vw - 28px));
    max-height: 460px;
    overflow-y: auto;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22);
    z-index: 9999;
    display: none;
    text-align: right;
    direction: rtl;
}
.npc-radar-drawer.open {
    display: block;
}
.npc-radar-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.npc-radar-item.level-critical {
    border-right: 4px solid #dc2626;
    background: #fff5f5;
}
.npc-radar-item.level-warning {
    border-right: 4px solid #d97706;
    background: #fffbeb;
}
.npc-radar-item.level-info {
    border-right: 4px solid #0284c7;
}
