/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        & {
          color: color-mix(in oklab, currentcolor 50%, transparent);
        }
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities;
@layer base {
  html, body {
    background-color: #020202;
  }
  body {
    margin: 0;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 100%;
    height: auto;
    color: #f7f7f7;
    font-family: "Inter", "SF Pro Display", "Segoe UI", Arial, sans-serif;
  }
}
@layer components {
  .app-frame {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 100%;
    height: auto;
    background-color: #020202;
    display: flex;
    flex-direction: column;
  }
  .app-frame * {
    box-sizing: border-box;
  }
  .landing-shell {
    min-height: 100vh;
    background: #010101;
    color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 3rem;
    text-align: center;
    gap: 3rem;
    transition: background 0.3s ease, color 0.3s ease;
  }
  .landing-shell.light {
    background: #f3f4f6;
    color: #0f172a;
  }
  .landing-header {
    width: min(480px, 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .logo {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
  }
  .mode-toggle {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f5f5;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
  .landing-shell.light .mode-toggle, .chat-shell.light .mode-toggle {
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
  }
  .mode-toggle svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
  }
  .mode-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
  }
  .cta-card {
    width: min(480px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .start-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 1.25rem;
    font-size: 1.2rem;
    font-weight: 600;
    background: #ffffff;
    color: #010101;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  .landing-shell.light .start-btn {
    background: #111827;
    color: #f3f4f6;
  }
  .start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.5);
  }
  .start-btn:active {
    transform: translateY(0);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  }
  .install-btn {
    width: 100%;
    margin-top: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 1.05rem 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #f7f7fb;
    background: #1f2735;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
  }
  .install-btn:hover:not(:disabled) {
    background: #242f3f;
  }
  .install-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
  }
  .landing-shell.light .install-btn {
    background: #0f172a;
    color: #f9fafb;
    border-color: rgba(15, 23, 42, 0.15);
  }
  .landing-shell.light .install-btn:hover:not(:disabled) {
    background: #111b2a;
  }
  .guidelines {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #e8e8e8;
    font-size: 1rem;
  }
  .landing-shell.light .guidelines {
    color: #334155;
  }
  .guidelines li::before {
    content: "*";
    margin-right: 0.75rem;
    color: #8ff0d8;
  }
  .footnote {
    margin: 0;
    font-size: 0.95rem;
    color: #cfcfcf;
  }
  .landing-shell.light .footnote {
    color: #64748b;
  }
  .placeholder-copy {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
  }
  .chat-shell.light .placeholder-copy {
    color: rgba(15, 23, 42, 0.6);
  }
  .placeholder-copy .guidelines li::before {
    color: currentColor;
    opacity: 0.7;
  }
  .placeholder-copy .footnote, .placeholder-copy .empty-state {
    color: inherit;
  }
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
  .chat-shell {
    width: min(720px, 100%);
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100vh;
    height: 100dvh;
    background: #05040b;
    color: #f5f5f5;
    overflow: hidden;
  }
  .chat-shell.light {
    background: #f5f7fb;
    color: #0f172a;
  }
  .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
  }
  .chat-header-left, .chat-header-right {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
  }
  .chat-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .sub-label {
    margin: 0;
    color: #9ca3af;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }
  .partner-name {
    font-size: 1.25rem;
    font-weight: 600;
  }
  .chip {
    font-size: 0.7rem;
    padding: 0.15rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
  }
  .chip.bot {
    background: transparent;
    color: #c4c7ff;
    border-color: rgba(78, 67, 255, 0.3);
  }
  .chip.human {
    background: transparent;
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.4);
  }
  .skip-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.6rem 1.5rem;
    border-radius: 999px;
    color: #f5f5f5;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
  .chat-shell.light .skip-btn {
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
  }
  .skip-btn:disabled {
    opacity: 0.4;
  }
  .skip-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.08);
  }
  .rating-summary {
    display: flex;
    width: 100%;
    justify-content: center;
  }
  .rating-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    padding: 0.7rem 1.25rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    width: 100%;
  }
  .partner-pill {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .score {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
  }
  .score-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: inherit;
  }
  .score-icon path {
    fill: currentColor;
  }
  .my-score {
    color: #7c3aed;
  }
  .partner-score {
    color: rgba(255, 255, 255, 0.95);
  }
  .chat-shell.light .rating-pill {
    background: rgba(15, 23, 42, 0.05);
    border-color: rgba(15, 23, 42, 0.2);
    color: #0f172a;
  }
  .chat-shell.light .my-score {
    color: #7c3aed;
  }
  .chat-shell.light .partner-score {
    color: #000000;
  }
  .chat-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;
  }
  .search-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 3rem 1rem;
  }
  .chat-shell.light .search-card {
    border-color: rgba(15, 23, 42, 0.15);
    background: rgba(15, 23, 42, 0.03);
  }
  .spinner {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fdfdfd;
    animation: spin 0.85s linear infinite;
  }
  .chat-shell.light .spinner {
    border-color: rgba(15, 23, 42, 0.2);
    border-top-color: #0f172a;
  }
  .messages {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(16, 18, 24, 0.5);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .messages::-webkit-scrollbar {
    display: none;
  }
  .chat-shell.light .messages {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(15, 23, 42, 0.08);
  }
  .message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
  }
  .message.incoming {
    align-self: flex-start;
  }
  .message.outgoing {
    align-self: flex-end;
    text-align: right;
    align-items: flex-end;
  }
  .bubble {
    padding: 0.9rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    line-height: 1.5;
  }
  .message.outgoing .bubble {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: white;
    border-bottom-right-radius: 0.2rem;
    padding-right: 0.9rem;
  }
  .message.incoming .bubble {
    border-bottom-left-radius: 0.2rem;
    background: rgba(15, 23, 42, 0.85);
    color: rgba(255, 255, 255, 0.95);
  }
  .chat-shell.light .message.incoming .bubble {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
  }
  .message time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
  }
  .chat-shell.light .message time {
    color: rgba(15, 23, 42, 0.5);
  }
  .typing-indicator {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
  }
  .chat-shell.light .typing-indicator {
    color: rgba(15, 23, 42, 0.6);
  }
  .composer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(15, 18, 25, 0.9);
    padding: 0.75rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
  }
  .chat-shell.light .composer {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.08);
  }
  .composer textarea {
    flex: 1;
    border: none;
    background: transparent;
    color: inherit;
    resize: none;
    min-height: 64px;
    max-height: 220px;
    font-size: 1rem;
    line-height: 1.4;
  }
  .composer textarea:focus {
    outline: none;
  }
  .composer button {
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, opacity 0.2s ease;
  }
  .composer button:disabled {
    opacity: 0.5;
  }
  .composer button:not(:disabled):hover {
    transform: translateY(-1px);
  }
  .limited-timer-bar {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem 0.8rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
  }
  .chat-shell.light .limited-timer-bar {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
  }
  .limited-bar {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
  }
  .chat-shell.light .limited-bar {
    background: rgba(15, 23, 42, 0.12);
  }
  .limited-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #c7d2fe, #8b5cf6);
    border-radius: 999px;
    animation: triviaGlow 1.6s ease-in-out infinite alternate;
    transition: width 0.25s linear;
  }
  .limited-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
  }
  .chat-shell.light .limited-meta {
    color: rgba(15, 23, 42, 0.8);
  }
  .send-icon {
    width: 1.25rem;
    height: 1.25rem;
  }
  .status-message {
    margin: 0.5rem 0 0 0.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
  }
  .chat-shell.light .status-message {
    color: rgba(15, 23, 42, 0.7);
  }
  .disconnect-banner {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.4);
    text-align: center;
    font-size: 0.95rem;
  }
  .chat-shell.light .disconnect-banner {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.3);
  }
  .rating-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    z-index: 20;
  }
  .chat-shell.light .rating-overlay {
    background: rgba(15, 23, 42, 0.4);
  }
  .rating-card {
    background: #0f1016;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: 1rem;
    width: min(420px, 100%);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  }
  .chat-shell.light .rating-card {
    background: #f9fafb;
    border-color: rgba(15, 23, 42, 0.08);
    color: #0f172a;
  }
  .rating-card h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
  }
  .rating-card p {
    color: #b2b8c7;
    margin-top: 0.75rem;
  }
  .chat-shell.light .rating-card p {
    color: #64748b;
  }
  .scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: #9ea5b9;
  }
  .chat-shell.light .scale-labels {
    color: #94a3b8;
  }
  .rating-scale {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .rating-scale button {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    color: #fdfdfd;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  }
  .chat-shell.light .rating-scale button {
    border-color: rgba(15, 23, 42, 0.15);
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
  }
  .rating-scale button:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
  }
  .chat-shell.light .rating-scale button:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
  }
  .rating-scale button:active {
    transform: scale(0.96);
  }
  .error {
    color: #fecaca;
    margin-top: 0.75rem;
  }
  .trivia-card {
    background: linear-gradient(145deg, #0c0d11, #11131b);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px 14px 16px;
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  .chat-shell.light .trivia-card {
    background: linear-gradient(145deg, #f7f9fc, #e9edf5);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  }
  .trivia-card .trivia-progress {
    background: #1f1f22;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
  }
  .chat-shell.light .trivia-card .trivia-progress {
    background: rgba(15, 23, 42, 0.1);
  }
  .trivia-card .trivia-progress-fill {
    background: linear-gradient(90deg, #f7f7fb, #c7d2fe);
    height: 100%;
    width: 0;
    border-radius: 999px;
    transition: width 0.25s linear;
    animation: triviaGlow 1.8s ease-in-out infinite alternate;
  }
  .trivia-card .trivia-question {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    color: #f7f7fb;
    margin: 0;
  }
  .trivia-card .trivia-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #aeb2bd;
    font-size: 12px;
    letter-spacing: 0.01em;
  }
  .chat-shell.light .trivia-card .trivia-meta {
    color: #4b5563;
  }
  .trivia-card .trivia-option {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #dcdde1;
    color: #0c0c10;
    padding: 12px 16px;
    font-weight: 700;
    width: 100%;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
  .trivia-card .trivia-option:hover:enabled {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  }
  .trivia-card .trivia-option:disabled {
    opacity: 0.75;
    cursor: not-allowed;
  }
  .trivia-card .trivia-option.selected {
    border-color: #f7f7fb;
  }
  .trivia-card .trivia-option.correct {
    background: #34c759;
    color: #0a1c0a;
  }
  .trivia-card .trivia-option.incorrect {
    background: #ff3b30;
    color: #1a0a0a;
  }
  .chat-shell.light .trivia-card .trivia-option {
    background: #eef1f6;
    color: #111827;
    border-color: rgba(15, 23, 42, 0.08);
  }
  .chat-shell.light .trivia-card .trivia-option.selected {
    border-color: #2563eb;
  }
  .chat-shell.light .trivia-card .trivia-option.correct {
    background: #bbf7d0;
    color: #065f46;
  }
  .chat-shell.light .trivia-card .trivia-option.incorrect {
    background: #fecdd3;
    color: #7f1d1d;
  }
  .trivia-result-card {
    gap: 1.1rem;
    border-radius: 22px;
    background: #0f1016;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    padding: 1.75rem 1.5rem;
  }
  .chat-shell.light .trivia-result-card {
    background: #f8f8fb;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  }
  .trivia-result-header {
    text-align: center;
  }
  .trivia-result-header h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
  }
  .trivia-result-header p {
    margin: 0.3rem 0 0;
    color: #aeb2bd;
  }
  .chat-shell.light .trivia-result-header p {
    color: #6b7280;
  }
  .trivia-result-body {
    display: grid;
    gap: 0.8rem;
  }
  .trivia-result-row {
    position: relative;
    background: #1a1b24;
    border-radius: 14px;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 0.2rem;
  }
  .trivia-result-row.winner {
    border-color: rgba(52, 199, 89, 0.75);
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.18);
  }
  .chat-shell.light .trivia-result-row {
    background: #e8ebf2;
    border-color: rgba(15, 23, 42, 0.08);
  }
  .chat-shell.light .trivia-result-row.winner {
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
  }
  .trivia-result-row .row-title {
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .trivia-result-row .row-sub {
    color: #c5c7d0;
    font-size: 0.95rem;
    text-align: left;
  }
  .chat-shell.light .trivia-result-row .row-sub {
    color: #4b5563;
    text-align: left;
  }
  .trivia-result-row .trophy {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
  }
  .pill-actions {
    gap: 0.85rem;
  }
  .pill-actions button {
    flex: 1;
    border-radius: 12px;
    padding: 0.95rem 1rem;
    font-weight: 700;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  }
  .pill-actions .solid {
    background: #0b0b0f;
    color: #f7f7fb;
    border: 1px solid #0b0b0f;
  }
  .pill-actions .ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .chat-shell.light .pill-actions .solid {
    background: #0f172a;
    color: #f8fafc;
    border-color: #0f172a;
  }
  .chat-shell.light .pill-actions .ghost {
    background: #e5e7eb;
    color: #111827;
    border-color: #d1d5db;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.15);
  }
  .result-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
  }
  .result-actions button {
    padding: 0.85rem 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #f7f7fb;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
  }
  .result-actions button.ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.12);
  }
  .landing-shell.light .result-actions button {
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  }
  .landing-shell.light .result-actions button.ghost {
    background: transparent;
  }
  @keyframes triviaGlow {
    from {
      box-shadow: 0 0 0 rgba(59, 130, 246, 0.3);
    }
    to {
      box-shadow: 0 0 12px rgba(147, 197, 253, 0.55);
    }
  }
}
@layer components {
  @keyframes spin {
    from {
      transform: rotate(0deg);
    }
    to {
      transform: rotate(360deg);
    }
  }
}
@media (max-width: 600px) {
  .chat-shell {
    padding: 1rem;
  }
  .messages .bubble {
    max-width: 100%;
  }
  .composer button {
    padding: 0.75rem 1rem;
  }
}
@media (max-width: 480px) {
  .logo {
    font-size: 2rem;
  }
  .start-btn {
    font-size: 1.05rem;
    padding: 1rem;
  }
}
.mode-selector {
  width: 100%;
  display: grid;
  gap: 0.6rem;
}
.mode-selector .mode-label {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #cfd3dc;
}
.landing-shell.light .mode-selector .mode-label {
  color: #0f172a;
}
.mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.mode-pill {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #f6f6f6;
  padding: 0.85rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.landing-shell.light .mode-pill {
  border-color: rgba(15, 23, 42, 0.15);
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
}
.mode-pill input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: grid;
  place-items: center;
  background: transparent;
}
.mode-pill input[type="radio"]::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  transform: scale(0);
  transition: transform 0.15s ease;
}
.mode-pill input[type="radio"]:checked::after {
  transform: scale(1);
}
.mode-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.25);
}
.landing-shell.light .mode-pill:hover {
  border-color: rgba(15, 23, 42, 0.3);
}
.mode-pill span {
  font-weight: 600;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
