/* Kaptain Account dialog (account-ui.js). Obsidian + one mint accent, per DESIGN.md. */
.kac-overlay {
  position: fixed; inset: 0; z-index: 100050; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.kac-overlay[hidden] { display: none; }
.kac-panel {
  position: relative; width: min(100%, 460px); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 28px 28px 24px; border-radius: 16px; color: hsl(0 0% 98%);
  background: hsl(240 10% 7%); border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6); font: 400 0.95rem/1.5 'Inter', -apple-system, 'Segoe UI', sans-serif;
  animation: kac-in 0.3s cubic-bezier(0.2,0,0,1);
}
@keyframes kac-in { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }
.kac-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: none; color: hsl(240 5% 75%); font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.kac-close:hover { background: rgba(255,255,255,0.06); color: #fff; }
.kac-title { margin: 0 40px 12px 0; font: 700 1.3rem/1.2 'Outfit', 'Inter', sans-serif; }
.kac-lead { margin: 0 0 16px; color: hsl(240 5% 75%); }
.kac-lead strong { color: hsl(0 0% 98%); font-weight: 600; }
.kac-msg { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: 0.88rem; border: 1px solid rgba(255,255,255,0.1); }
.kac-msg.is-error { color: hsl(0 80% 78%); background: rgba(229,57,53,0.1); border-color: rgba(229,57,53,0.35); }
.kac-msg.is-ok { color: hsl(142 70% 62%); background: rgba(0,245,160,0.08); border-color: rgba(0,245,160,0.3); }
.kac-label { display: block; margin: 14px 0 6px; font: 600 0.88rem/1.3 'Inter', sans-serif; color: hsl(240 5% 75%); }
.kac-input {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; color: inherit; font: inherit;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.12);
}
select.kac-input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9aa 50%), linear-gradient(135deg, #9aa 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.kac-input:focus-visible, .kac-btn:focus-visible, .kac-mini:focus-visible, .kac-link:focus-visible, .kac-row-btn:focus-visible, .kac-tab:focus-visible {
  outline: 2px solid #6dfac4; outline-offset: 2px;
}
.kac-pw { display: flex; gap: 8px; }
.kac-pw .kac-input { flex: 1 1 auto; min-width: 0; }
.kac-mini {
  flex: none; min-width: 56px; min-height: 44px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); color: hsl(240 5% 75%); font: 600 0.88rem 'Inter', sans-serif;
}
.kac-mini:hover { background: rgba(255,255,255,0.07); color: #fff; }
.kac-hint { margin: 6px 0 0; font-size: 0.8rem; color: hsl(240 5% 62%); }
.kac-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; color: hsl(240 5% 75%); cursor: pointer; min-height: 44px; }
.kac-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: #00f5a0; flex: none; }
.kac-check small { display: block; color: hsl(240 5% 58%); font-size: 0.8rem; }
.kac-actions { display: flex; gap: 10px; margin-top: 20px; }
.kac-actions.kac-row { margin-top: 12px; }
.kac-btn {
  flex: 1 1 0; min-height: 44px; padding: 0 18px; border-radius: 8px; cursor: pointer; font: 600 0.9rem 'Inter', sans-serif;
  color: hsl(240 5% 75%); background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s cubic-bezier(0.2,0,0,1), background 0.15s cubic-bezier(0.2,0,0,1);
}
.kac-btn:hover:not(:disabled) { background: rgba(255,255,255,0.07); color: #fff; transform: translateY(-1.5px); }
.kac-btn:disabled { opacity: 0.5; cursor: default; }
.kac-btn.kac-primary { color: #04130d; background: #00f5a0; border-color: transparent; box-shadow: 0 14px 34px -10px rgba(0,245,160,0.55); }
.kac-btn.kac-primary:hover:not(:disabled) { background: #6dfac4; color: #04130d; }
.kac-btn.kac-danger { color: hsl(0 80% 78%); border-color: rgba(229,57,53,0.4); }
.kac-link {
  background: none; border: 0; padding: 0; min-height: 44px; cursor: pointer; font: 500 0.88rem 'Inter', sans-serif;
  color: hsl(240 5% 75%); text-decoration: underline; text-underline-offset: 3px;
}
.kac-link:hover { color: #6dfac4; }
.kac-foot { margin: 14px 0 0; font-size: 0.88rem; color: hsl(240 5% 58%); text-align: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 10px; }
.kac-sep { opacity: 0.5; }
@media (max-width: 480px) { .kac-sep { display: none; } .kac-foot { flex-direction: column; gap: 0; } }
.kac-code {
  margin: 4px 0 4px; padding: 16px; border-radius: 12px; text-align: center; user-select: all;
  font: 600 1.2rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.06em;
  background: rgba(0,245,160,0.06); border: 1px dashed rgba(0,245,160,0.4); color: #6dfac4; overflow-wrap: anywhere;
}
.kac-tabs { display: flex; gap: 4px; margin: 0 0 16px; padding: 4px; border-radius: 10px; background: rgba(255,255,255,0.03); }
.kac-tab { flex: 1; min-height: 40px; border: 0; border-radius: 8px; cursor: pointer; background: none; color: hsl(240 5% 70%); font: 600 0.88rem 'Inter', sans-serif; }
.kac-tab.is-on { background: rgba(255,255,255,0.08); color: #fff; }
.kac-h3 { margin: 22px 0 0; font: 600 1rem 'Outfit', 'Inter', sans-serif; }
.kac-h3 small { color: hsl(240 5% 58%); font-weight: 400; }
.kac-list { display: flex; flex-direction: column; gap: 8px; }
.kac-row-btn {
  display: flex; flex-direction: column; gap: 2px; text-align: left; min-height: 56px; padding: 12px 14px; cursor: pointer;
  border-radius: 12px; color: hsl(0 0% 98%); background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.08);
  font: 400 0.88rem/1.4 'Inter', sans-serif;
}
.kac-row-btn:hover { border-color: rgba(0,245,160,0.25); }
.kac-row-btn span { color: hsl(240 5% 62%); }
.kac-row-btn.is-danger strong { color: hsl(0 80% 78%); }
.kac-list-plain { margin: 0; padding-left: 20px; color: hsl(240 5% 75%); display: flex; flex-direction: column; gap: 8px; }
.kac-meta { margin-top: 22px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.08); }
.kac-meta .kac-h3 { margin: 0 0 4px; }
.kac-meta-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.kac-meta-row span { flex: 0 0 64px; font-size: 0.88rem; color: hsl(240 5% 62%); }
.kac-meta-row code { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; font: 500 0.85rem ui-monospace, Menlo, Consolas, monospace; }
@media (max-width: 480px) {
  .kac-panel { padding: 24px 18px 20px; }
  .kac-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .kac-panel { animation: none; } .kac-btn { transition: none; } .kac-btn:hover:not(:disabled) { transform: none; } }

/* Wizard banner links (index.html wizard) */
.wiz-acct-banner .wiz-link { background: none; border: 0; padding: 0; min-height: 0; font: inherit; color: #6dfac4; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wiz-acct-banner svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; color: #6dfac4; }

/* Turnstile challenge: invisible unless Cloudflare needs a click, then it sits above the dialog. */
.kac-captcha { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100070; }
.kac-captcha.is-visible { top: 50%; bottom: auto; transform: translate(-50%, -50%); padding: 12px; border-radius: 12px; background: hsl(240 10% 7%); border: 1px solid rgba(0,245,160,0.4); box-shadow: 0 20px 50px rgba(0,0,0,0.6); }

/* Privacy & data panel */
.kac-priv-list { display: flex; flex-direction: column; gap: 14px; }
.kac-priv { padding: 14px 16px; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; background: rgba(255,255,255,0.02); }
.kac-priv .kac-h3 { margin-top: 0; }
.kac-priv .kac-btn { margin-top: 12px; }
.kac-priv-cats { margin: 8px 0 0; font-size: 0.85rem; }
.kac-priv-confirm { margin-top: 10px; }
.kac-priv-confirm[hidden] { display: none; }
.kac-btn.kac-danger:hover:not(:disabled) { background: rgba(229,57,53,0.14); color: hsl(0 90% 86%); border-color: rgba(229,57,53,0.6); }
