    :root {
      --bg-a: #f4fbff;
      --bg-b: #eaf2ff;
      --bg-c: #d6ebff;
      --ink: #13203b;
      --ink-soft: #4f5d78;
      --direction: #2058ff;
      --direction-strong: #113fe0;
      --direction-soft: #dfe8ff;
      --accent: #ffaf3d;
      --card: rgba(255, 255, 255, 0.94);
      --line: rgba(27, 72, 199, 0.14);
      --shadow-strong: 0 24px 70px rgba(17, 47, 143, 0.2);
      --shadow-soft: 0 8px 26px rgba(12, 31, 84, 0.12);
      --bubble-user: linear-gradient(135deg, #2c67ff, #5e8dff);
      --bubble-bot: #ffffff;
      --ok: #0b8d4a;
      --error: #b12020;
      --radius-xl: 30px;
      --radius-l: 20px;
      --radius-m: 14px;
      --tap-target: 44px;
      --app-height: 100vh;
    }

    /* Ensure hidden attribute hides elements (author styles may override UA rules) */
    [hidden] { display: none !important; }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      max-width: 100%;
      overflow-x: hidden;
    }

    body {
      font-family: "Sora", "Manrope", "Trebuchet MS", sans-serif;
      color: var(--ink);
      background:
        radial-gradient(1200px 540px at 10% 0%, rgba(114, 170, 255, 0.35), transparent 65%),
        radial-gradient(900px 500px at 95% 100%, rgba(255, 183, 92, 0.22), transparent 62%),
        linear-gradient(140deg, var(--bg-a), var(--bg-b) 52%, var(--bg-c));
      -webkit-font-smoothing: antialiased;
      text-rendering: optimizeLegibility;
      position: fixed;
      inset: 0;
      width: 100%;
      overflow: hidden;
    }

    @supports (height: 100dvh) {
      body {
        height: 100dvh;
      }
    }

    body.direction-loading {
      background:
        radial-gradient(900px 480px at 50% 28%, rgba(0, 0, 0, 0.02), transparent 58%),
        radial-gradient(900px 480px at 50% 100%, rgba(0, 0, 0, 0.02), transparent 58%),
        linear-gradient(140deg, var(--bg-a), var(--bg-b) 52%, var(--bg-c));
    }

    button {
      -webkit-tap-highlight-color: transparent;
    }

    .app-shell {
      height: var(--app-height);
      min-height: var(--app-height);
      display: grid;
      place-items: center;
      padding: 10px;
      position: relative;
      isolation: isolate;
      overflow: hidden;
      max-width: 100%;
    }

    .direction-loading .app-shell,
    .direction-loading .modal-backdrop {
      opacity: 0;
      pointer-events: none;
      user-select: none;
    }

    .direction-loader {
      position: fixed;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      background: rgba(255, 255, 255, 0.85);
      color: var(--ink);
      text-align: center;
      overflow: hidden;
    }

    .direction-loading .direction-loader {
      display: flex;
    }

    .direction-loader-card {
      width: min(92vw, 360px);
      padding: 26px 22px 24px;
      border-radius: 28px;
      border: 1px solid rgba(16, 24, 40, 0.06);
      background: var(--card);
      box-shadow: var(--shadow-soft);
      backdrop-filter: blur(10px);
    }

    .direction-loader-mark {
      width: 60px;
      height: 60px;
      margin: 0 auto 14px;
      border-radius: 18px;
      background: linear-gradient(135deg, #ffffff, #f3f4f6);
      display: grid;
      place-items: center;
      box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
      position: relative;
    }

    .direction-loader-mark::before {
      content: "";
      width: 28px;
      height: 28px;
      border-radius: 10px;
      border: 3px solid rgba(19, 32, 59, 0.12);
      border-top-color: transparent;
      animation: spin 1s linear infinite;
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%) rotate(45deg);
      z-index: 0;
    }

    .direction-loader-icon {
      width: 28px;
      height: 28px;
      object-fit: contain;
      position: relative;
      z-index: 1;
      display: none;
    }

    .direction-loader-icon[src] {
      display: block;
    }

    .direction-loader-title {
      margin: 0;
      font-size: 18px;
      line-height: 1.2;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .direction-loader-subtitle {
      margin: 10px 0 0;
      font-size: 14px;
      line-height: 1.45;
      color: var(--ink-soft);
    }

    .direction-loader-skeleton {
      margin-top: 18px;
      display: grid;
      gap: 10px;
    }

    .direction-loader-skeleton span {
      display: block;
      height: 10px;
      border-radius: 999px;
      background: linear-gradient(90deg, rgba(19, 32, 59, 0.03), rgba(19, 32, 59, 0.06), rgba(19, 32, 59, 0.03));
      background-size: 220% 100%;
      animation: shimmer 1.4s ease-in-out infinite;
    }

    .direction-loader-skeleton span:nth-child(1) { width: 78%; }
    .direction-loader-skeleton span:nth-child(2) { width: 92%; }
    .direction-loader-skeleton span:nth-child(3) { width: 66%; }
    .direction-loader-skeleton span:nth-child(4) { width: 84%; }

    @keyframes spin {
      from { transform: rotate(45deg); }
      to { transform: rotate(405deg); }
    }

    @keyframes shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    .ambient {
      position: absolute;
      border-radius: 999px;
      pointer-events: none;
      z-index: -1;
      filter: blur(2px);
    }

    .ambient.one {
      width: 210px;
      height: 210px;
      top: 6%;
      left: -48px;
      background: radial-gradient(circle at 35% 35%, rgba(255, 194, 110, 0.74), rgba(255, 194, 110, 0) 72%);
      animation: driftY 6s ease-in-out infinite;
    }

    .ambient.two {
      width: 250px;
      height: 250px;
      right: -72px;
      bottom: 10%;
      background: radial-gradient(circle at 30% 30%, rgba(55, 118, 255, 0.38), rgba(55, 118, 255, 0) 72%);
      animation: driftY 8s ease-in-out infinite reverse;
    }

    .chat-stage {
      width: min(100%, 520px);
      height: calc(var(--app-height) - 20px);
      display: flex;
      align-items: stretch;
      justify-content: center;
      max-width: 100%;
      overflow: hidden;
    }

    .chat-card {
      width: 100%;
      height: 100%;
      max-width: 100%;
      background: var(--card);
      border: 1px solid rgba(255, 255, 255, 0.65);
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow-strong);
      backdrop-filter: blur(10px);
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }

    .chat-header {
      padding: 12px 14px;
      display: flex;
      align-items: center;
      gap: 10px;
      background: linear-gradient(135deg, var(--direction), #6f95ff 74%);
      color: #fff;
      border-bottom: 1px solid rgba(255, 255, 255, 0.16);
      overflow: hidden;
    }

    .flow-progress {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 14px 6px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.98));
      border-bottom: 1px solid rgba(33, 83, 218, 0.08);
    }

    .flow-progress-track {
      position: relative;
      height: 10px;
      flex: 1;
      overflow: hidden;
      border-radius: 999px;
      background: rgba(32, 88, 255, 0.08);
      border: 1px solid rgba(32, 88, 255, 0.12);
    }

    .flow-progress-fill {
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--direction), #7aa2ff 70%, var(--accent));
      box-shadow: 0 0 18px rgba(32, 88, 255, 0.28);
      transition: width 0.35s ease;
    }

    .flow-progress-label {
      min-width: 42px;
      text-align: right;
      font-size: 12px;
      font-weight: 800;
      letter-spacing: 0.03em;
      color: var(--direction-strong);
    }

    .mascot-wrap {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: radial-gradient(circle at 30% 25%, #ffe38f, var(--accent));
      border: 2px solid rgba(255, 255, 255, 0.5);
      box-shadow: 0 8px 18px rgba(14, 34, 100, 0.28);
      display: grid;
      place-items: center;
      flex: 0 0 auto;
    }

    .mascot-img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
    }

    .header-copy {
      min-width: 0;
      flex: 1;
    }

    .header-title {
      margin: 0;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.2;
      letter-spacing: 0.01em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .header-subtitle {
      margin: 3px 0 0;
      font-size: 12px;
      color: rgba(255, 255, 255, 0.9);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .header-actions {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex: 0 0 auto;
      min-width: 0;
      max-width: 100%;
    }

    .status-pill {
      min-height: 30px;
      padding: 7px 10px;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.28);
      background: rgba(255, 255, 255, 0.13);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.03em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .status-pill[data-mode="sending"] {
      background: rgba(255, 190, 93, 0.24);
      border-color: rgba(255, 190, 93, 0.5);
      color: #6e3f08;
    }

    .status-pill[data-mode="error"] {
      background: rgba(255, 116, 116, 0.2);
      border-color: rgba(255, 116, 116, 0.45);
      color: #821a1a;
    }

    .intro-skip {
      min-height: 30px;
      border: 1px solid rgba(255, 255, 255, 0.38);
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.12);
      color: #fff;
      font: inherit;
      font-size: 12px;
      font-weight: 600;
      line-height: 1;
      padding: 7px 10px;
      cursor: pointer;
    }

    .intro-skip[hidden] {
      display: none;
    }

    .chat-body {
      flex: 1;
      overflow: auto;
      padding: 16px 12px 10px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      background:
        linear-gradient(rgba(248, 251, 255, 0.56), rgba(243, 247, 255, 0.64)),
        url('../assets/background.jpeg');
      background-size: 100% auto;
      background-position: center top;
      background-repeat: no-repeat;
    }

    .msg {
      max-width: 88%;
      border-radius: 18px;
      padding: 11px 13px;
      font-size: 15px;
      line-height: 1.42;
      box-shadow: var(--shadow-soft);
      word-wrap: break-word;
      animation: messageRise 0.25s ease-out;
    }

    .msg.bot {
      align-self: flex-start;
      background: var(--bubble-bot);
      color: var(--ink);
      border: 1px solid rgba(33, 83, 218, 0.08);
      border-top-left-radius: 8px;
    }

    .msg.user {
      align-self: flex-end;
      background: var(--bubble-user);
      color: #fff;
      border-top-right-radius: 8px;
    }

    .msg.msg-photo {
      padding: 0;
      background: transparent;
      border: none;
      box-shadow: none;
      width: min(88%, 360px);
      max-width: 88%;
      align-self: flex-start;
      overflow: hidden;
    }

    .msg.msg-photo img {
      display: block;
      width: 100%;
      height: auto;
      border-radius: 16px;
      border: 1px solid rgba(33, 83, 218, 0.12);
      box-shadow: var(--shadow-soft);
      background: #fff;
    }

    .msg > img {
      display: block;
      width: 100%;
      max-width: 100%;
      height: auto;
      border-radius: 12px;
    }

    .msg.system {
      align-self: center;
      max-width: 100%;
      border-radius: 999px;
      padding: 8px 12px;
      font-size: 12px;
      line-height: 1.35;
      background: var(--direction-soft);
      color: #26428d;
      border: 1px solid rgba(28, 77, 208, 0.2);
      box-shadow: none;
    }

    .msg.error {
      align-self: flex-start;
      background: rgba(255, 235, 238, 0.98);
      color: var(--error);
      border: 1px solid rgba(177, 32, 32, 0.18);
      border-left: 4px solid var(--error);
    }

    .ai-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 26px;
      height: 20px;
      padding: 0 6px;
      margin-right: 6px;
      border-radius: 999px;
      background: rgba(32, 88, 255, 0.12);
      border: 1px solid rgba(32, 88, 255, 0.22);
      color: #1f49b7;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.02em;
      vertical-align: middle;
    }

    .typing {
      display: inline-flex;
      gap: 4px;
      align-items: center;
      min-height: 14px;
    }

    .typing span {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #8aa0d8;
      animation: pulse 1s ease-in-out infinite;
    }

    .typing span:nth-child(2) {
      animation-delay: 0.15s;
    }

    .typing span:nth-child(3) {
      animation-delay: 0.3s;
    }

    .quick-replies {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      padding: 8px 12px 10px;
      background: linear-gradient(180deg, rgba(247, 251, 255, 0.8), rgba(241, 247, 255, 0.9));
    }

    .quick-btn {
      min-height: var(--tap-target);
      border: 1px solid rgba(32, 88, 255, 0.2);
      border-radius: 999px;
      padding: 10px 12px;
      background: #fff;
      color: #17306c;
      font: inherit;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.22;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(22, 57, 155, 0.1);
      transition: transform 0.12s ease, border-color 0.12s ease;
    }

    .quick-btn:active {
      transform: translateY(1px) scale(0.99);
    }

    .quick-replies--checklist {
      grid-template-columns: 1fr;
      gap: 10px;
    }

    .device-checklist {
      display: grid;
      gap: 8px;
    }

    .device-check-item {
      display: flex;
      align-items: center;
      gap: 10px;
      min-height: var(--tap-target);
      border: 1px solid rgba(32, 88, 255, 0.2);
      border-radius: 14px;
      padding: 10px 12px;
      background: #fff;
      color: #17306c;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.22;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(22, 57, 155, 0.1);
    }

    .device-check-item input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 0;
      accent-color: var(--direction);
      flex: 0 0 auto;
    }

    .device-check-item span {
      flex: 1;
    }

    .quick-btn--submit {
      justify-self: end;
      min-width: 160px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .quick-btn--submit .quick-btn__icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
    }

    .quick-btn--submit .quick-btn__icon svg {
      width: 18px;
      height: 18px;
      display: block;
    }

    .quick-btn--submit .quick-btn__text {
      line-height: 1;
    }

    .chat-input-wrap {
      padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
      border-top: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(6px);
    }

    /* Ensure hiding the input-wrap via [hidden] always works */
    .chat-input-wrap[hidden] {
      display: none !important;
    }

    .chat-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 8px;
      align-items: center;
    }

    .chat-input {
      width: 100%;
      min-width: 0;
      min-height: var(--tap-target);
      border-radius: 14px;
      border: 1px solid rgba(27, 66, 175, 0.22);
      padding: 11px 12px;
      font: inherit;
      font-size: 16px;
      color: var(--ink);
      background: #fff;
    }

    .send-btn {
      min-width: var(--tap-target);
      min-height: var(--tap-target);
      border: none;
      border-radius: 14px;
      background: linear-gradient(135deg, var(--direction), var(--direction-strong));
      color: #fff;
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      padding: 10px 14px;
      cursor: pointer;
      box-shadow: 0 9px 18px rgba(22, 63, 186, 0.32);
    }

    /* Responsive send button: icon + text. On small viewports hide text. */
    .send-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .send-btn .send-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 20px;
      height: 20px;
    }

    .send-btn .send-icon svg {
      width: 18px;
      height: 18px;
      display: block;
    }

    .send-btn .send-text {
      display: inline-block;
      line-height: 1;
    }

    .send-btn[disabled],
    .quick-btn[disabled] {
      opacity: 0.6;
      cursor: not-allowed;
      box-shadow: none;
    }

    .consent {
      margin: 8px 0 0;
      font-size: 11px;
      line-height: 1.4;
      color: var(--ink-soft);
    }

    .consent[hidden] {
      display: none;
    }

    .contact-strip {
      padding: 8px 12px 8px;
      border-top: 1px solid rgba(27, 72, 199, 0.1);
      background: linear-gradient(180deg, rgba(247, 251, 255, 0.95), rgba(240, 246, 255, 0.98));
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .contact-copy {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
      flex-wrap: nowrap;
      overflow: visible;
      flex: 1 1 auto;
    }

    .contact-link {
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(27, 66, 175, 0.12);
      border-radius: 50%;
      background: #fff;
      color: var(--ink);
      text-decoration: none;
      box-shadow: 0 4px 10px rgba(22, 57, 155, 0.08);
      flex: 0 0 auto;
    }

    .contact-copy .social-link {
      width: 36px;
      height: 36px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      border: 1px solid rgba(27, 66, 175, 0.12);
      border-radius: 50%;
      background: #fff;
      box-shadow: 0 4px 10px rgba(22, 57, 155, 0.08);
      flex: 0 0 auto;
    }

    .contact-link svg,
    .contact-link img,
    .contact-copy .social-link svg,
    .contact-copy .social-link img {
      width: 18px;
      height: 18px;
      display: block;
      flex: 0 0 auto;
    }

    .contact-action {
      min-height: 36px;
      border: none;
      border-radius: 999px;
      padding: 8px 12px;
      background: #eef3fb;
      color: var(--ink);
      border: 1px solid rgba(27, 66, 175, 0.16);
      font: inherit;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 4px 10px rgba(22, 57, 155, 0.08);
      white-space: nowrap;
      flex: 0 0 auto;
    }

    .contact-action:focus-visible {
      outline-color: rgba(20, 70, 213, 0.8);
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 50;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(10, 18, 38, 0.46);
      backdrop-filter: blur(8px);
    }

    .modal-backdrop.is-open {
      display: flex;
    }

    .modal-dialog {
      width: min(100%, 420px);
      border-radius: 28px;
      border: 1px solid rgba(255, 255, 255, 0.7);
      background: #fff;
      box-shadow: var(--shadow-strong);
      overflow: hidden;
    }

    .modal-header {
      padding: 16px 16px 10px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 12px;
    }

    .modal-title-wrap {
      min-width: 0;
      display: grid;
      gap: 4px;
    }

    .modal-title {
      margin: 0;
      font-size: 20px;
      line-height: 1.2;
      font-weight: 800;
      color: var(--ink);
    }

    .modal-subtitle {
      margin: 0;
      font-size: 13px;
      line-height: 1.4;
      color: var(--ink-soft);
    }

    .modal-close {
      border: none;
      background: transparent;
      color: var(--ink-soft);
      font: inherit;
      font-size: 24px;
      line-height: 1;
      padding: 4px 8px;
      cursor: pointer;
      flex: 0 0 auto;
    }

    .modal-body {
      padding: 0 16px 16px;
      display: grid;
      gap: 12px;
    }

    .modal-field {
      display: grid;
      gap: 6px;
    }

    .modal-role-field {
      display: grid;
      gap: 8px;
    }

    .modal-role-group {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .modal-role {
      min-height: 44px;
      border-radius: 14px;
      border: 1px solid rgba(27, 66, 175, 0.18);
      background: #f4f7ff;
      color: var(--ink);
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      padding: 10px 14px;
    }

    .modal-role.is-selected {
      border-color: rgba(20, 70, 213, 0.38);
      background: rgba(20, 70, 213, 0.1);
      color: var(--direction-strong);
    }

    .modal-role-note {
      margin: 0;
      font-size: 12px;
      line-height: 1.4;
      color: var(--ink-soft);
    }

    .modal-label {
      font-size: 13px;
      font-weight: 700;
      color: var(--ink-soft);
    }

    .modal-input {
      width: 100%;
      min-height: 44px;
      border-radius: 14px;
      border: 1px solid rgba(27, 66, 175, 0.22);
      padding: 11px 12px;
      font: inherit;
      font-size: 16px;
      color: var(--ink);
      background: #fff;
    }

    .modal-input:focus-visible {
      outline-color: rgba(20, 70, 213, 0.8);
    }

    .modal-actions {
      display: grid;
      gap: 10px;
      margin-top: 4px;
    }

    .modal-secondary,
    .modal-primary {
      width: 100%;
      min-height: 44px;
      border-radius: 999px;
      padding: 10px 16px;
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
    }

    /* Video embed for chat: ensures iframe is visible and responsive */
    .about-video {
      display: block;
      width: 100%;
      box-sizing: border-box;
    }

    .about-video .video-wrap {
      position: relative;
      width: 100%;
      padding-top: 56.25%; /* 16:9 aspect */
      margin-bottom: 8px;
      overflow: hidden;
      border-radius: 12px;
      background: #000;
    }

    /* Taller aspect for vertical videos (e.g. Kinescope vertical content) */
    .about-video .video-wrap--vertical {
      padding-top: 177.78%; /* ~9:16 (vertical) */
    }

    .chat-media--video.chat-media--portrait {
      width: min(100%, 420px);
      margin-left: auto;
      margin-right: auto;
    }

    .chat-media--video.chat-media--portrait iframe {
      aspect-ratio: 9 / 16;
      min-height: 520px;
      max-height: 78vh;
    }

    .about-video .video-wrap iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: 0;
      display: block;
    }

    .about-video p {
      margin: 0;
      font-size: 14px;
      color: inherit;
      line-height: 1.35;
    }

    .about-video a {
      color: inherit;
      text-decoration: underline;
    }

    /* Follow-up social links block after video */
    .about-social {
      margin-top: 8px;
    }

    .about-social p {
      margin: 0;
      font-size: 14px;
      color: inherit;
      line-height: 1.35;
    }

    .about-social a {
      color: inherit;
      text-decoration: underline;
    }

    .modal-secondary {
      border: 1px solid rgba(27, 66, 175, 0.18);
      background: #fff;
      color: var(--ink);
    }

    .modal-primary {
      border: none;
      background: linear-gradient(135deg, var(--direction), var(--direction-strong));
      color: #fff;
      box-shadow: 0 9px 18px rgba(22, 63, 186, 0.28);
    }

    .modal-primary[disabled],
    .modal-secondary[disabled] {
      opacity: 0.65;
      cursor: not-allowed;
      box-shadow: none;
    }

    body[data-direction="academy-cybersport"] {
      background:
        radial-gradient(780px 420px at 84% 76%, rgba(255, 114, 0, 0.14), transparent 62%),
        radial-gradient(620px 420px at 18% 14%, rgba(255, 172, 92, 0.06), transparent 60%),
        linear-gradient(180deg, #111111 0%, #202020 100%);
    }

    body[data-direction="academy-cybersport"] .app-shell {
      padding: 24px;
    }

    body[data-direction="academy-cybersport"] .ambient.one {
      width: 320px;
      height: 320px;
      top: 8%;
      left: 3%;
      background: radial-gradient(circle at 35% 35%, rgba(255, 118, 21, 0.16), rgba(255, 118, 21, 0) 72%);
    }

    body[data-direction="academy-cybersport"] .ambient.two {
      width: 520px;
      height: 520px;
      right: -160px;
      bottom: -60px;
      background: radial-gradient(circle at 30% 30%, rgba(255, 106, 0, 0.34), rgba(255, 106, 0, 0) 72%);
      filter: blur(12px);
    }

    body[data-direction="academy-cybersport"] .chat-stage {
      width: min(100%, 1260px);
      height: min(860px, calc(var(--app-height) - 48px));
    }

    body[data-direction="academy-cybersport"] .chat-card {
      border: 1px solid rgba(255, 255, 255, 0.22);
      background:
        radial-gradient(1000px 620px at 74% 56%, rgba(255, 106, 0, 0.13), transparent 34%),
        radial-gradient(620px 440px at 80% 76%, rgba(255, 173, 94, 0.08), transparent 36%),
        linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.98));
      box-shadow: 0 34px 100px rgba(0, 0, 0, 0.56);
      position: relative;
    }

    body[data-direction="academy-cybersport"] .chat-card::before {
      content: '';
      position: absolute;
      inset: 18px;
      border-radius: inherit;
      pointer-events: none;
      background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 25%);
      border: 1px solid rgba(255, 255, 255, 0.05);
      opacity: 0.9;
    }

    body[data-direction="academy-cybersport"] .chat-header {
      padding: 18px 18px 16px;
      background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.98)),
        linear-gradient(135deg, rgba(255, 106, 0, 0.08), rgba(255, 106, 0, 0));
      border-bottom-color: rgba(255, 255, 255, 0.08);
    }

    body[data-direction="academy-cybersport"] .mascot-wrap {
      width: 52px;
      height: 52px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.04);
      border: 1px solid rgba(255, 255, 255, 0.14);
      box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
    }

    body[data-direction="academy-cybersport"] .mascot-img {
      width: 100%;
      height: 100%;
    }

    body[data-direction="academy-cybersport"] .header-title {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: 0.01em;
    }

    body[data-direction="academy-cybersport"] .header-subtitle {
      color: rgba(255, 255, 255, 0.72);
    }

    body[data-direction="academy-cybersport"] .status-pill {
      border-color: rgba(255, 106, 0, 0.36);
      background: rgba(255, 106, 0, 0.12);
      color: #ffd7b0;
    }

    body[data-direction="academy-cybersport"] .intro-skip {
      border-color: rgba(255, 255, 255, 0.14);
      background: rgba(255, 255, 255, 0.05);
      color: #f4f4f4;
    }

    body[data-direction="academy-cybersport"] .chat-body {
      padding: 24px 22px 18px;
      gap: 14px;
      background:
        linear-gradient(180deg, rgba(17, 17, 17, 0.72), rgba(32, 32, 32, 0.84)),
        radial-gradient(840px 560px at 82% 76%, rgba(255, 106, 0, 0.12), transparent 52%),
        radial-gradient(700px 480px at 84% 74%, rgba(255, 162, 84, 0.06), transparent 45%);
      background-size: auto;
      background-position: center center;
      background-repeat: no-repeat;
    }

    body[data-direction="academy-cybersport"] .msg.bot {
      background: rgba(255, 255, 255, 0.08);
      color: #f3f3f3;
      border-color: rgba(255, 255, 255, 0.1);
    }

    body[data-direction="academy-cybersport"] .msg.user {
      background: linear-gradient(135deg, #ff6a00, #ff8f34);
      color: #fff;
    }

    body[data-direction="academy-cybersport"] .msg.system {
      background: rgba(255, 106, 0, 0.12);
      color: #ffd8b6;
      border-color: rgba(255, 106, 0, 0.22);
    }

    body[data-direction="academy-cybersport"] .ai-badge {
      background: rgba(255, 106, 0, 0.14);
      border-color: rgba(255, 106, 0, 0.26);
      color: #ffd6af;
    }

    body[data-direction="academy-cybersport"] .quick-replies {
      padding: 12px 22px 14px;
      background: linear-gradient(180deg, rgba(17, 17, 17, 0.4), rgba(32, 32, 32, 0.8));
    }

    body[data-direction="academy-cybersport"] .quick-btn {
      border-color: rgba(255, 255, 255, 0.16);
      background: rgba(255, 255, 255, 0.05);
      color: #f2f2f2;
      box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    }

    body[data-direction="academy-cybersport"] .quick-btn.is-selected {
      background: rgba(255, 106, 0, 0.18);
      border-color: rgba(255, 106, 0, 0.34);
      color: #ffd8b7;
      box-shadow: 0 12px 22px rgba(255, 106, 0, 0.14);
    }

    body[data-direction="academy-cybersport"] .device-check-item {
      border-color: rgba(255, 255, 255, 0.16);
      background: rgba(255, 255, 255, 0.05);
      color: #f2f2f2;
      box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    }

    body[data-direction="academy-cybersport"] .quick-btn--submit {
      background: linear-gradient(135deg, #ff6a00, #ff8f34);
      border-color: rgba(255, 255, 255, 0.1);
      color: #fff;
      box-shadow: 0 12px 22px rgba(255, 106, 0, 0.2);
    }

    body[data-direction="academy-cybersport"] .chat-input-wrap {
      padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
      border-top-color: rgba(255, 255, 255, 0.12);
      background: rgba(17, 17, 17, 0.94);
    }

    body[data-direction="academy-cybersport"] .chat-input {
      border-color: rgba(255, 255, 255, 0.16);
      background: rgba(255, 255, 255, 0.04);
      color: #f4f4f4;
    }

    body[data-direction="academy-cybersport"] .chat-input::placeholder {
      color: rgba(244, 244, 244, 0.45);
    }

    body[data-direction="academy-cybersport"] .send-btn {
      background: linear-gradient(135deg, #ff6a00, #ff8f34);
      box-shadow: 0 16px 28px rgba(255, 106, 0, 0.24);
    }

    body[data-direction="academy-cybersport"] .consent {
      color: rgba(244, 244, 244, 0.64);
    }

    body[data-direction="academy-cybersport"] .contact-strip {
      padding: 12px 22px 16px;
      background: rgba(17, 17, 17, 0.98);
      border-top-color: rgba(255, 255, 255, 0.12);
    }

    body[data-direction="academy-cybersport"] .contact-link,
    body[data-direction="academy-cybersport"] .contact-copy .social-link {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.14);
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
    }

    body[data-direction="academy-cybersport"] .contact-action {
      background: linear-gradient(135deg, #ff6a00, #ff8f34);
      border-color: rgba(255, 255, 255, 0.08);
      color: #fff;
      box-shadow: 0 14px 24px rgba(255, 106, 0, 0.2);
    }

    body[data-direction="academy-cybersport"] .modal-backdrop {
      background: rgba(0, 0, 0, 0.78);
    }

    body[data-direction="academy-cybersport"] .modal-dialog {
      background: linear-gradient(180deg, rgba(17, 17, 17, 0.98), rgba(32, 32, 32, 0.98));
      border-color: rgba(255, 255, 255, 0.12);
    }

    body[data-direction="academy-cybersport"] .modal-title,
    body[data-direction="academy-cybersport"] .modal-subtitle,
    body[data-direction="academy-cybersport"] .modal-label,
    body[data-direction="academy-cybersport"] .modal-input,
    body[data-direction="academy-cybersport"] .modal-note,
    body[data-direction="academy-cybersport"] .modal-close {
      color: #f4f4f4;
    }

    body[data-direction="academy-cybersport"] .modal-subtitle,
    body[data-direction="academy-cybersport"] .modal-label,
    body[data-direction="academy-cybersport"] .modal-note,
    body[data-direction="academy-cybersport"] .modal-close {
      color: rgba(244, 244, 244, 0.68);
    }

    body[data-direction="academy-cybersport"] .modal-input,
    body[data-direction="academy-cybersport"] .modal-secondary {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.14);
    }

    body[data-direction="academy-cybersport"] .modal-primary {
      background: linear-gradient(135deg, #ff6a00, #ff8f34);
    }

    body[data-direction="academy-cybersport"] .modal-header {
      padding: 20px 20px 8px;
    }

    body[data-direction="academy-cybersport"] .modal-body {
      padding: 0 20px 18px;
      gap: 10px;
    }

    body[data-direction="academy-cybersport"] .modal-actions {
      justify-content: flex-start;
      margin-top: 0;
    }

    body[data-direction="academy-cybersport"] .modal-role-field {
      display: grid;
      gap: 8px;
    }

    body[data-direction="academy-cybersport"] .modal-role-group {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    body[data-direction="academy-cybersport"] .modal-role {
      min-height: 44px;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.14);
      background: rgba(255, 255, 255, 0.04);
      color: #f4f4f4;
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      padding: 10px 14px;
    }

    body[data-direction="academy-cybersport"] .modal-role.is-selected {
      border-color: rgba(255, 106, 0, 0.38);
      background: rgba(255, 106, 0, 0.14);
      color: #ffd6af;
    }

    body[data-direction="academy-cybersport"] .modal-role-note {
      margin: 0;
      font-size: 12px;
      line-height: 1.4;
      color: rgba(244, 244, 244, 0.68);
    }

    .modal-note {
      margin: 0;
      font-size: 11px;
      line-height: 1.4;
      color: var(--ink-soft);
    }

    .modal-error {
      min-height: 18px;
      margin: 0;
      font-size: 12px;
      line-height: 1.4;
      color: var(--error);
    }

    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      margin: -1px;
      padding: 0;
      border: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
    }

    :focus-visible {
      outline: 3px solid rgba(255, 175, 61, 0.95);
      outline-offset: 2px;
    }

    .quick-btn:focus-visible,
    .chat-input:focus-visible,
    .send-btn:focus-visible {
      outline-color: rgba(20, 70, 213, 0.8);
    }

    @media (max-width: 420px) {
      .app-shell {
        padding: 0;
      }

      .chat-stage {
        width: 100%;
        height: var(--app-height);
      }

      .chat-card {
        border-radius: 0;
        border: none;
      }

      .chat-header {
        padding: 10px 10px;
        gap: 8px;
      }

      .mascot-wrap {
        width: 40px;
        height: 40px;
      }

      .mascot-img {
        width: 100%;
        height: 100%;
      }

      .header-title {
        font-size: 13px;
      }

      .header-subtitle {
        display: none;
      }

      .header-actions {
        gap: 4px;
      }

      .intro-skip {
        min-height: 28px;
        padding: 6px 8px;
        font-size: 11px;
      }

      #intro-skip {
        display: none;
      }

      .msg.msg-photo {
        width: 92%;
        max-width: 92%;
      }

      .send-btn {
        padding: 10px 12px;
        font-size: 13px;
      }

      .send-btn .send-text {
        display: none;
      }

      .status-pill {
        display: none;
      }

    }

    @media (min-width: 768px) {
      :root {
        --radius-xl: 24px;
        --radius-l: 18px;
        --radius-m: 12px;
      }

      .chat-stage {
        padding: 8px;
        height: min(920px, calc(var(--app-height) - 32px));
      }

        width: min(100%, 520px);
        height: calc(var(--app-height) - 16px);
      }

      .chat-header {
        padding: 14px 16px;
      }

      .chat-header {
        padding: 12px 12px 10px;
        gap: 8px;
      }

      .header-title {
        font-size: 18px;
      }

      .header-subtitle {
        font-size: 12px;
        line-height: 1.35;
      }

      .header-actions {
        gap: 6px;
      }

      .intro-skip,
      .status-pill {
        min-height: 34px;
        padding: 0 12px;
        font-size: 12px;
      }

      .chat-body {
        padding: 12px 12px 10px;
        gap: 10px;
      }

      .msg {
        max-width: 92%;
        padding: 12px 14px;
        font-size: 15px;
        line-height: 1.5;
      }

      .quick-replies {
        padding: 10px 12px 12px;
        gap: 8px;
      }

      .quick-btn,
      .device-check-item {
        min-height: 40px;
        padding: 10px 12px;
        font-size: 13px;
      }

      .chat-input-wrap,
      .contact-strip {
        padding-left: 12px;
        padding-right: 12px;
      }

      .chat-input {
        min-height: 44px;
        font-size: 16px;
      }

      .send-btn,
      .contact-action {
        min-height: 44px;
        font-size: 13px;
      }

      .contact-copy {
        gap: 8px;
      }

      .contact-link,
      .social-link {
        width: 36px;
        height: 36px;
      }

      .chat-body {
        padding: 20px 16px 12px;
      }

      .quick-replies {
        padding: 10px 16px 12px;
      }

      .chat-input-wrap {
        padding: 12px 16px 14px;
      }

      .contact-strip {
        padding: 8px 16px 8px;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation: none !important;
        transition: none !important;
      }
    }

    @keyframes messageRise {
      from {
        opacity: 0;
        transform: translateY(6px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @keyframes pulse {
      0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.45;
      }
      40% {
        transform: scale(1);
        opacity: 1;
      }
    }

    @keyframes driftY {
      0%,
      100% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-12px);
      }
    }
  
