
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      padding-top: calc(20px + env(safe-area-inset-top, 0px));
      padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
      color: #ffffff;
      opacity: 0;
      transition: opacity 0.15s ease-in;
    }

    body[data-shared-menu-layout="desktop-top"] {
      padding-top: calc(var(--sbm-desktop-menu-offset, 78px) + 20px);
      padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }

    body.i18n-ready {
      opacity: 1;
    }

    .container {
      width: 100%;
      max-width: 1200px;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      padding: 40px;
      box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
      border: 1px solid rgba(255, 255, 255, 0.18);
    }

    h1 {
      font-size: clamp(2rem, 5vw, 3.5rem);
      font-weight: 700;
      margin-bottom: 20px;
      text-align: center;
    }

    .subtitle {
      font-size: clamp(1rem, 2.5vw, 1.5rem);
      text-align: center;
      opacity: 0.9;
      margin-bottom: 40px;
    }

    /* ===== Список воронок (выбор воронки) ===== */

    .funnels-container {
      display: none;
    }

    .funnels-container.visible {
      display: block;
    }

    .funnels-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 20px;
      margin-top: 30px;
    }

    .funnel-card {
      background: rgba(255, 255, 255, 0.15);
      border-radius: 16px;
      overflow: hidden;
      transition: all 0.3s ease;
      border: 2px solid rgba(255, 255, 255, 0.2);
      display: flex;
      flex-direction: column;
      cursor: pointer;
    }

    .funnel-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      border-color: rgba(255, 255, 255, 0.4);
    }

    .funnel-image {
      width: 100%;
      height: 200px;
      object-fit: cover;
      background: rgba(255, 255, 255, 0.1);
    }

    .funnel-content {
      padding: 20px;
      flex-grow: 1;
      display: flex;
      flex-direction: column;
    }

    .funnel-title {
      font-size: 1.5rem;
      font-weight: 600;
      margin-bottom: 10px;
      color: #ffffff;
    }

    .funnel-description {
      font-size: 1rem;
      opacity: 0.9;
      margin-bottom: 20px;
      flex-grow: 1;
      line-height: 1.5;
    }

    .funnel-button {
      display: inline-block;
      background: rgba(255, 255, 255, 0.3);
      color: white;
      padding: 12px 24px;
      border-radius: 8px;
      text-decoration: none;
      font-weight: 600;
      text-align: center;
      transition: all 0.3s ease;
      border: 2px solid transparent;
    }

    .funnel-button:hover {
      background: rgba(255, 255, 255, 0.4);
      border-color: rgba(255, 255, 255, 0.5);
      transform: scale(1.05);
    }

    .funnel-button:active {
      transform: scale(0.98);
    }

    /* ===== Шаги воронки (прогресс пользователя) ===== */

    .funnel-steps-container {
      display: none;
    }

    .funnel-steps-container.visible {
      display: block;
    }

    .funnel-steps-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin-top: 30px;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
    }
    .step-card {
      color: inherit;
      text-decoration: none;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 12px;
      padding: 12px;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      border: 2px solid rgba(255, 255, 255, 0.2);
      transition: all 0.3s ease;
      position: relative;
      min-height: 120px;
      height: 120px;
      overflow: hidden;
    }
    .step-card.success {
      border-color: rgba(74, 222, 128, 0.4);
      background: rgba(74, 222, 128, 0.08);
    }

    .step-card.failed {
      border-color: rgba(239, 68, 68, 0.4);
      background: rgba(239, 68, 68, 0.06);
      opacity: 0.85;
    }

    .success-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 28px;
      height: 28px;
      background: #4ade80;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      line-height: 1;
      color: white;
      font-weight: bold;
      box-shadow: 0 2px 8px rgba(74, 222, 128, 0.4);
      animation: successPop 0.5s ease-out;
    }

    @keyframes successPop {
      0% {
        transform: scale(0);
        opacity: 0;
      }
      50% {
        transform: scale(1.2);
      }
      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .failed-badge {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 28px;
      height: 28px;
      background: #ef4444;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      line-height: 1;
      color: white;
      font-weight: bold;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
      animation: failedPop 0.5s ease-out;
      font-family: Arial, sans-serif;
    }

    @keyframes failedPop {
      0% {
        transform: scale(0);
        opacity: 0;
      }
      50% {
        transform: scale(1.2);
      }
      100% {
        transform: scale(1);
        opacity: 1;
      }
    }

    .step-card.clickable {
      cursor: pointer;
      position: relative;
    }

    .step-card.clickable::after {
      content: '›';
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 32px;
      color: rgba(255, 255, 255, 0.6);
      font-weight: 300;
      line-height: 1;
      transition: all 0.3s ease;
    }

    .step-card.clickable:hover {
      transform: translateX(5px);
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      border-color: rgba(255, 255, 255, 0.4);
      background: rgba(255, 255, 255, 0.2);
    }

    .step-card.clickable:hover::after {
      color: rgba(255, 255, 255, 0.9);
      right: 12px;
    }

    .step-card.clickable:active {
      transform: translateX(2px);
    }

    .step-card.clickable.pressed {
      transform: translateX(2px) scale(0.995);
      filter: brightness(1.06);
    }

    .step-card.clickable:focus-visible {
      outline: 2px solid rgba(255, 255, 255, 0.75);
      outline-offset: 2px;
    }

    .step-card.disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .step-image {
      width: 60px;
      height: 60px;
      border-radius: 8px;
      object-fit: cover;
      background: rgba(255, 255, 255, 0.1);
      flex-shrink: 0;
      align-self: flex-start;
    }

    .step-image-fallback {
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 28px;
      background: rgba(255, 255, 255, 0.12);
    }

    .step-content {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      gap: 4px;
      min-width: 0;
      overflow: hidden;
    }

    .step-card.clickable .step-content {
      padding-right: 40px;
    }

    .step-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-height: 24px;
    }

    .now-indicator {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.75rem;
      font-weight: 500;
      color: #ffffff;
      white-space: nowrap;
      margin-left: auto;
    }

    .live-indicator {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.7rem;
      font-weight: 700;
      color: #22c55e;
      white-space: nowrap;
      margin-left: auto;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .live-dot {
      width: 8px;
      height: 8px;
      background: #22c55e;
      border-radius: 50%;
      animation: live-pulse 1.5s infinite;
    }

    @keyframes live-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.7; transform: scale(0.6); }
    }

    .step-card.live {
      border-color: rgba(34, 197, 94, 0.6);
      background: rgba(34, 197, 94, 0.15);
      cursor: pointer;
    }

    .step-card.live:hover {
      transform: translateX(5px);
      box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
    }

    /* Следующий вебинар с таймером — выделение */
    .step-card.next-webinar {
      border: 2px solid transparent;
      background:
        linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08)) padding-box,
        linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) border-box;
      box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
      cursor: default;
    }

    .step-card.next-webinar.clickable {
      cursor: pointer;
    }

    .step-card.next-webinar.clickable:hover {
      transform: translateX(5px);
      box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
    }

    .step-card.next-webinar .webinar-timer {
      color: #f093fb;
      font-weight: 600;
    }

    .webinar-time-block {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      margin-left: auto;
    }

    .webinar-time {
      font-size: 0.7rem;
      color: rgba(255, 255, 255, 0.8);
      white-space: nowrap;
    }

    .webinar-timer {
      font-size: 0.7rem;
      color: rgba(255, 255, 255, 0.9);
      font-weight: 500;
      margin-top: 2px;
    }

    .step-type-badge {
      display: inline-block;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.25);
      width: fit-content;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .step-title {
      font-size: 1rem;
      font-weight: 600;
      color: #ffffff;
      line-height: 1.3;
      height: 2.6em; /* Ровно 2 строки (1.3 * 2) */
      overflow: hidden;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      text-overflow: ellipsis;
    }

    .step-status {
      display: flex;
      flex-direction: column;
      gap: 3px;
      font-size: 0.85rem;
      overflow: hidden;
      flex-shrink: 1;
      width: 100%;
    }

    .step-status-item {
      display: flex;
      align-items: center;
      gap: 5px;
      opacity: 0.9;
      line-height: 1.4;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      height: 20px;
      min-height: 20px;
      max-width: 100%;
    }

    /* Пустые строки не занимают места */
    .step-status-item:empty {
      display: none;
      height: 0;
      min-height: 0;
    }

    /* Метка "Смотреть повтор" для завершённых вебинаров */
    .replay-label {
      font-size: 0.8rem;
      font-weight: 700;
      color: #22c55e;
      margin-left: auto;
      text-align: right;
      line-height: 1.3;
      max-width: 100px;
    }

    /* Модальное окно подтверждения повтора */
    .replay-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .replay-modal-overlay.visible {
      opacity: 1;
    }

    .replay-modal {
      background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
      backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,0.2);
      border-radius: 20px;
      padding: 30px;
      max-width: 400px;
      width: 90%;
      text-align: center;
      transform: scale(0.9);
      transition: transform 0.3s ease;
    }

    .replay-modal-overlay.visible .replay-modal {
      transform: scale(1);
    }

    .replay-modal-title {
      font-size: 1.3rem;
      font-weight: 700;
      margin: 0 0 15px 0;
      color: white;
    }

    .replay-modal-text {
      font-size: 1rem;
      line-height: 1.5;
      color: rgba(255,255,255,0.9);
      margin: 0 0 25px 0;
    }

    .replay-modal-text strong {
      color: #f093fb;
    }

    .replay-modal-buttons {
      display: flex;
      gap: 12px;
      justify-content: center;
    }

    .replay-modal-btn {
      padding: 12px 28px;
      border: none;
      border-radius: 25px;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .replay-modal-btn:disabled {
      opacity: 0.7;
      cursor: wait;
      transform: none !important;
    }

    .replay-modal-cancel {
      background: rgba(255,255,255,0.15);
      color: white;
    }

    .replay-modal-cancel:hover {
      background: rgba(255,255,255,0.25);
    }

    .replay-modal-confirm {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }

    .replay-modal-confirm:hover {
      transform: scale(1.05);
      box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }

    .replay-modal-confirm.loading {
      position: relative;
      padding-left: 46px;
    }

    .replay-modal-confirm.loading::before {
      content: '';
      position: absolute;
      left: 18px;
      top: 50%;
      width: 16px;
      height: 16px;
      margin-top: -8px;
      border: 2px solid rgba(255, 255, 255, 0.4);
      border-top-color: #ffffff;
      border-radius: 50%;
      animation: spin 0.9s linear infinite;
    }

    .replay-modal-overlay.loading {
      cursor: progress;
    }

    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #4ade80;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }

    .status-checkmark {
      color: #4ade80;
      font-weight: bold;
    }

    .status-cross {
      color: #ef4444;
      font-weight: bold;
    }

    .failed-badge {
      color: #cbd5e1;
      font-style: italic;
    }

    .loading-spinner {
      text-align: center;
      padding: 60px 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 20px;
    }

    .loader {
      width: 60px;
      height: 60px;
      border: 4px solid rgba(255, 255, 255, 0.2);
      border-top: 4px solid #ffffff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    .loader-dots {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .loader-dot {
      width: 12px;
      height: 12px;
      background: rgba(255, 255, 255, 0.8);
      border-radius: 50%;
      animation: bounce 1.4s ease-in-out infinite;
    }

    .loader-dot:nth-child(1) {
      animation-delay: 0s;
    }

    .loader-dot:nth-child(2) {
      animation-delay: 0.2s;
    }

    .loader-dot:nth-child(3) {
      animation-delay: 0.4s;
    }

    .loading-text {
      font-size: 1.1rem;
      color: rgba(255, 255, 255, 0.9);
      font-weight: 500;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    @keyframes bounce {
      0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
      }
      40% {
        transform: scale(1.2);
        opacity: 1;
      }
    }

    .empty-state {
      text-align: center;
      padding: 60px 40px;
      color: rgba(255, 255, 255, 0.8);
      font-size: 1.1rem;
    }

    .empty-state-icon {
      font-size: 3rem;
      margin-bottom: 15px;
      opacity: 0.6;
    }

    .error-state {
      text-align: center;
      padding: 60px 40px;
      color: #ffcccb;
      font-size: 1.1rem;
    }

    .error-state-icon {
      font-size: 3rem;
      margin-bottom: 15px;
    }

    /* Главный лоадер на весь экран при первой загрузке */
    .page-loader {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      z-index: 11000;
      transition: opacity 0.5s ease, visibility 0.5s ease;
    }

    .page-loader.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .page-loader-spinner {
      width: 80px;
      height: 80px;
      border: 6px solid rgba(255, 255, 255, 0.2);
      border-top: 6px solid #ffffff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin-bottom: 30px;
    }

    .page-loader-text {
      font-size: 1.3rem;
      color: #ffffff;
      font-weight: 500;
      margin-bottom: 15px;
    }

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

    .page-loader-dot {
      width: 14px;
      height: 14px;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 50%;
      animation: bounce 1.4s ease-in-out infinite;
    }

    .page-loader-dot:nth-child(1) {
      animation-delay: 0s;
    }

    .page-loader-dot:nth-child(2) {
      animation-delay: 0.2s;
    }

    .page-loader-dot:nth-child(3) {
      animation-delay: 0.4s;
    }
