/* ==========================================================================
   ACCOUNT-REQUIRED MODAL — gate for the AI Chatroom
   ========================================================================== */

   .arm-modal {
    --arm-brand: #22c55e;
    --arm-brand-dark: #16a34a;
    --arm-brand-soft: #f0fdf4;
    --arm-text-1: #0f172a;
    --arm-text-2: #475569;
    --arm-text-3: #94a3b8;
    --arm-border: #e5e7eb;
    --arm-border-soft: #f1f5f9;
    --arm-surface-2: #f8fafc;
    --arm-accent: #2563eb;
  
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--arm-text-1);
    -webkit-font-smoothing: antialiased;
  }
  
  .arm-modal[hidden] { display: none; }
  
  .arm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: arm-fade 0.25s ease both;
  }
  
  @keyframes arm-fade { from { opacity: 0; } to { opacity: 1; } }
  
  .arm-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 48px);
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 60px -16px rgba(15, 23, 42, 0.4);
    padding: 32px 32px 24px;
    overflow-y: auto;
    animation: arm-rise 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  
  @keyframes arm-rise {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  
  /* ---------- Close button ---------- */
  .arm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--arm-surface-2);
    color: var(--arm-text-3);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .arm-close:hover { background: #e2e8f0; color: var(--arm-text-1); }
  .arm-close:focus-visible { outline: 2px solid var(--arm-accent); outline-offset: 2px; }
  .arm-close svg { width: 16px; height: 16px; }
  
  /* ---------- Header ---------- */
  .arm-head {
    text-align: center;
    padding: 0 8px 24px;
  }
  
  .arm-head-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--arm-brand-soft);
    color: var(--arm-brand-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .arm-head-icon svg { width: 32px; height: 32px; }
  
  .arm-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
  }
  
  .arm-head p {
    margin: 10px auto 0;
    max-width: 400px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--arm-text-2);
  }
  .arm-head p strong { color: var(--arm-text-1); font-weight: 700; }
  
  /* ---------- Option cards ---------- */
  .arm-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .arm-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--arm-border);
    background: #ffffff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.15s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.15s;
  }
  
  .arm-option:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.2);
  }
  
  .arm-option:focus-visible {
    outline: 2px solid var(--arm-accent);
    outline-offset: 2px;
  }
  
  .arm-option-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .arm-option-icon svg { width: 20px; height: 20px; }
  
  .arm-option-icon--indigo { background: #eef2ff; color: #4338ca; }
  .arm-option-icon--slate  { background: #f1f5f9; color: #334155; }
  .arm-option-icon--brand  { background: var(--arm-brand-soft); color: var(--arm-brand-dark); }
  
  .arm-option-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }
  
  .arm-option-text strong {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--arm-text-1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .arm-option-text > span {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--arm-text-2);
  }
  
  .arm-recommended {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    background: var(--arm-brand-soft);
    color: var(--arm-brand-dark);
    border: 1px solid #bbf7d0;
    padding: 2px 7px;
    border-radius: 999px;
  }
  
  .arm-option-arrow {
    flex-shrink: 0;
    color: var(--arm-text-3);
    transition: transform 0.15s, color 0.15s;
  }
  .arm-option-arrow svg { width: 16px; height: 16px; display: block; }
  .arm-option:hover .arm-option-arrow {
    color: var(--arm-text-1);
    transform: translateX(2px);
  }
  
  /* ---------- Footer note ---------- */
  .arm-foot {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--arm-border-soft);
    text-align: center;
  }
  
  .arm-foot p {
    margin: 0;
    font-size: 12.5px;
    color: var(--arm-text-3);
  }
  .arm-foot a {
    color: var(--arm-accent);
    font-weight: 600;
    text-decoration: none;
  }
  .arm-foot a:hover { text-decoration: underline; }
  
  /* ---------- Responsive ---------- */
  @media (max-width: 520px) {
    .arm-modal { padding: 12px; }
    .arm-panel { padding: 26px 20px 20px; border-radius: 18px; }
    .arm-head h2 { font-size: 19px; }
    .arm-head p { font-size: 13px; }
    .arm-option { padding: 12px 14px; gap: 12px; }
    .arm-option-icon { width: 38px; height: 38px; }
    .arm-option-text strong { font-size: 13.5px; }
    .arm-option-text > span { font-size: 12px; }
    .arm-head-icon { width: 54px; height: 54px; margin-bottom: 12px; }
    .arm-head-icon svg { width: 26px; height: 26px; }
  }
  
  /* ---------- Reduced motion ---------- */
  @media (prefers-reduced-motion: reduce) {
    .arm-modal *,
    .arm-modal *::before,
    .arm-modal *::after {
      animation: none !important;
      transition: none !important;
    }
  }
  