:root {
  --fcp-red: #e5322d;
  --fcp-red-dark: #c9231f;
  --fcp-ink: #171717;
  --fcp-muted: #667085;
  --fcp-line: #e6e8ec;
  --fcp-soft: #f7f8fa;
  --fcp-white: #fff;
  --fcp-shadow: 0 16px 45px rgba(16, 24, 40, .08);
}

.fcp-app, .fcp-dashboard, .fcp-decks, .fcp-tools, .fcp-history, .fcp-review {
  box-sizing: border-box;
  color: var(--fcp-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fcp-app *, .fcp-dashboard *, .fcp-decks *, .fcp-tools *, .fcp-history *, .fcp-review * { box-sizing: border-box; }
.fcp-app, .fcp-review { width: 100%; max-width: 1180px; margin: 0 auto; overflow: hidden; }
.fcp-shell { max-width: 1040px; margin: 0 auto; padding: 20px 16px 52px; }
.fcp-tool-hero { max-width: 720px; margin: 0 auto 20px; text-align: center; }
.fcp-tool-hero h1 { margin: 0 0 8px; font-size: clamp(32px, 4vw, 44px); line-height: 1.12; letter-spacing: -.035em; font-weight: 800; }
.fcp-tool-hero p { margin: 0 auto; max-width: 620px; color: var(--fcp-muted); font-size: 16px; line-height: 1.45; }

.fcp-upload-stage { min-height: 228px; padding: 9px; border-radius: 10px; background: var(--fcp-red); }
.fcp-dropzone { display: flex; min-height: 210px; align-items: center; justify-content: center; flex-direction: column; border: 1.5px dashed rgba(255,255,255,.92); border-radius: 6px; color: #fff; text-align: center; cursor: pointer; transition: background .2s; }
.fcp-dropzone:hover, .fcp-dropzone.is-dragging { background: rgba(112, 0, 0, .1); }
.fcp-dropzone.has-file { background: rgba(102, 0, 0, .14); }
.fcp-dropzone input { display: none; }
.fcp-file-button { display: inline-flex; min-width: 250px; min-height: 54px; align-items: center; justify-content: center; gap: 9px; padding: 13px 22px; border-radius: 6px; background: #fff; color: #171717; box-shadow: 0 6px 14px rgba(91,0,0,.12); font-size: 15px; font-weight: 800; text-transform: uppercase; }
.fcp-file-button b { font-size: 20px; line-height: 1; }
.fcp-dropzone small { margin-top: 10px; color: #fff; font-size: 14px; }
.fcp-dropzone em { min-height: 0; margin-top: 7px; color: #fff; font-size: 13px; font-style: normal; font-weight: 700; }

.fcp-workspace, .fcp-preview { max-width: 900px; margin: 16px auto 0; padding: 18px; border: 1px solid var(--fcp-line); border-radius: 12px; background: #fff; box-shadow: 0 8px 24px rgba(16,24,40,.05); }
.fcp-text-stage { max-width: 900px; margin-top: 0; padding: 16px 18px; }
.fcp-settings-panel { box-shadow: 0 10px 35px rgba(16,24,40,.06); }
.fcp-file-actions { width: 100%; max-width: none; margin-top: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.fcp-file-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 32%); gap: 10px; align-items: stretch; }
.fcp-voc-actions .fcp-file-controls { grid-template-columns: minmax(0, 1fr) auto minmax(220px, 32%); }
.fcp-file-actions .fcp-field { margin: 0; }
.fcp-file-actions .fcp-field label { display: none; }
.fcp-file-actions .fcp-field input { height: 44px; padding: 8px 12px; font-size: 15px; }
.fcp-file-actions .fcp-primary { width: 100%; min-height: 44px; padding: 9px 14px; font-size: 15px; }
.fcp-text-actions { max-width: 900px; }
.fcp-field { margin-bottom: 14px; }
.fcp-field label, .fcp-options label, .fcp-edit-card label { display: block; margin-bottom: 8px; color: #344054; font-size: 13px; font-weight: 750; }
.fcp-field input, .fcp-field textarea, .fcp-options select, .fcp-edit-card textarea { width: 100%; border: 1px solid #d5d9e0; border-radius: 8px; outline: none; background: #fff; color: var(--fcp-ink); padding: 10px 12px; font: inherit; transition: border-color .2s, box-shadow .2s; }
.fcp-field input:focus, .fcp-field textarea:focus, .fcp-options select:focus, .fcp-edit-card textarea:focus { border-color: var(--fcp-red); box-shadow: 0 0 0 4px rgba(229,50,45,.1); }
.fcp-field textarea { min-height: 125px; resize: vertical; }
.fcp-text-stage .fcp-field { margin-bottom: 11px; }
.fcp-text-stage .fcp-field label { margin-bottom: 6px; font-size: 13px; }
.fcp-text-stage .fcp-title-field input { height: 42px; padding: 8px 11px; font-size: 15px; }
.fcp-text-stage .fcp-field textarea { width: 100%; height: 180px; min-height: 180px; max-height: 340px; padding: 11px 13px; font-size: 16px; line-height: 1.5; }
.fcp-input-guide { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #fff4f4; color: #475467; font-size: 12px; line-height: 1.45; }
.fcp-input-guide strong { flex: 0 0 auto; color: var(--fcp-red-dark, #c9231f); }
.fcp-input-guide code { padding: 2px 5px; border-radius: 4px; background: #fff; color: #1f2937; font-size: 12px; }
.fcp-upload-guide { margin-top: 12px; background: #f8fafc; }
.fcp-upload-guide strong { color: #344054; }
.fcp-text-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.fcp-text-examples strong { font-size: 12px; color: #667085; margin-right: 2px; }
.fcp-text-examples button { border: 1px solid #e4e7ec; background: #fff; color: #475467; font-size: 12px; line-height: 1; padding: 8px 12px; border-radius: 999px; cursor: pointer; transition: border-color .15s, color .15s; }
.fcp-text-examples button:hover { border-color: var(--fcp-red); color: var(--fcp-red); }
.fcp-or { display: flex; align-items: center; gap: 12px; margin: 12px 0; color: #98a2b3; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.fcp-or::before, .fcp-or::after { content: ""; height: 1px; flex: 1; background: var(--fcp-line); }
.fcp-options { display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--fcp-line); }
.fcp-options label { display: flex; width: auto; align-items: center; gap: 9px; margin: 0; white-space: nowrap; font-size: 12px; }
.fcp-options label select { width: 132px; height: 44px; padding: 0 10px; font-size: 14px; font-weight: 650; }
.fcp-options .fcp-primary { width: 270px; min-height: 44px; padding: 9px 16px; font-size: 15px; }
.fcp-primary, .fcp-secondary, .fcp-deck button { appearance: none; border: 0; border-radius: 8px; padding: 11px 17px; font: inherit; font-weight: 750; cursor: pointer; transition: .18s; }
.fcp-primary { background: var(--fcp-red); color: #fff; box-shadow: 0 8px 18px rgba(229,50,45,.2); }
.fcp-primary:hover { background: var(--fcp-red-dark); transform: translateY(-1px); }
.fcp-primary:disabled { opacity: .58; cursor: not-allowed; transform: none; }
.fcp-primary b { margin-left: 15px; }
.fcp-secondary { background: #f0f2f5; color: var(--fcp-ink); }
.fcp-status { margin-top: 18px; line-height: 1.5; }
.fcp-status.is-error, .fcp-status.is-success { padding: 12px 14px; border-radius: 9px; }
.fcp-status.is-error { background: #fff0f1; color: #a31224; }
.fcp-status.is-success { background: #effaf3; color: #17653b; }
.fcp-status a { color: inherit; font-weight: 750; }

.fcp-preview { scroll-margin-top: 20px; }
.fcp-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.fcp-preview-head h2 { margin: 3px 0 0; font-size: 25px; }
.fcp-kicker, .eyebrow { color: var(--fcp-red); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.fcp-preview-actions { display: flex; align-items: flex-end; gap: 10px; }
.fcp-preview-size { display: flex; min-width: 145px; flex-direction: column; gap: 5px; color: #475467; font-size: 12px; font-weight: 700; }
.fcp-preview-size select { height: 42px; border: 1px solid #d5d9e0; border-radius: 8px; background: #fff; padding: 0 10px; color: var(--fcp-ink); font: inherit; }
.fcp-edit-card { display: grid; grid-template-columns: 38px 1fr 34px; gap: 15px; align-items: start; padding: 18px 14px; border-top: 1px solid var(--fcp-line); }
.fcp-card-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #f1f3f6; color: #667085; font-size: 13px; font-weight: 800; }
.fcp-card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fcp-edit-card label { margin: 0; }
.fcp-edit-card textarea { margin-top: 7px; resize: vertical; }
.fcp-delete { border: 0; background: transparent; color: #98a2b3; font-size: 25px; cursor: pointer; }
.fcp-delete:hover { color: var(--fcp-red); }

.fcp-dashboard, .fcp-decks, .fcp-tools, .fcp-history { max-width: 1100px; margin: 42px auto 72px; padding: 0 22px; }
.fcp-page-intro { max-width: 720px; margin: 42px auto 34px; text-align: center; }
.fcp-page-intro span { color: var(--fcp-red); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.fcp-page-intro h1 { margin: 7px 0 12px; font-size: clamp(34px,5vw,52px); letter-spacing: -.045em; }
.fcp-page-intro p { color: var(--fcp-muted); font-size: 17px; }
.fcp-hero { overflow: hidden; padding: 54px; border-radius: 24px; background: radial-gradient(circle at 85% 15%,#ffd8dc 0,transparent 34%),linear-gradient(135deg,#fff4f5,#f3f6ff); }
.fcp-hero h1 { max-width: 700px; margin: 10px 0 18px; font-size: clamp(36px,6vw,62px); line-height: 1; letter-spacing: -.05em; }
.fcp-hero p { max-width: 650px; color: var(--fcp-muted); font-size: 18px; }
.fcp-link { display: inline-block; margin-top: 12px; padding: 12px 18px; border-radius: 8px; background: var(--fcp-red); color: #fff !important; text-decoration: none; font-weight: 750; }
.fcp-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 22px 0; }
.fcp-stats div, .fcp-empty, .fcp-job-list { padding: 22px; border: 1px solid var(--fcp-line); border-radius: 14px; background: #fff; }
.fcp-stats strong, .fcp-stats span { display: block; }
.fcp-stats strong { font-size: 32px; }
.fcp-stats span { color: var(--fcp-muted); }
.fcp-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.fcp-job-list div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--fcp-line); }
.fcp-job-list div:last-child { border: 0; }
.fcp-tool-grid, .fcp-deck-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 18px; }
.fcp-tool, .fcp-deck { padding: 25px; border: 1px solid var(--fcp-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(25,35,58,.05); transition: .2s; }
.fcp-tool:hover, .fcp-deck:hover { transform: translateY(-3px); box-shadow: var(--fcp-shadow); }
.fcp-tool-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #fff0f1; color: var(--fcp-red); font-size: 18px; font-weight: 850; }
.fcp-tool h2, .fcp-deck h3 { margin: 15px 0 9px; }
.fcp-tool p, .fcp-deck p { min-height: 48px; color: var(--fcp-muted); }
.fcp-badge { display: inline-block; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.fcp-badge.ready { background: #e8f8ee; color: #176b3d; }
.fcp-badge.soon { background: #f1f3f6; color: #667085; }
.fcp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.fcp-actions button, .fcp-deck button { padding: 8px 10px; background: #eef1f5; color: var(--fcp-ink); box-shadow: none; font-size: 12px; }
.fcp-actions .danger { background: #fff0f1; color: #aa1c2e; }
.fcp-deck-detail { margin-top: 28px; }
.fcp-card { margin: 10px 0; padding: 18px; border: 1px solid var(--fcp-line); border-radius: 12px; background: #fff; }
.fcp-history { overflow-x: auto; }
.fcp-history table { width: 100%; overflow: hidden; border: 1px solid var(--fcp-line); border-radius: 14px; border-spacing: 0; background: #fff; }
.fcp-history th, .fcp-history td { padding: 14px; border-bottom: 1px solid var(--fcp-line); text-align: left; }
.fcp-history th { background: #f7f8fa; }
.fcp-admin-stats { display: flex; gap: 15px; flex-wrap: wrap; }
.fcp-admin-stats div { min-width: 145px; padding: 18px; border: 1px solid #dcdcde; border-radius: 10px; background: #fff; }
.fcp-admin-stats strong { display: block; font-size: 28px; }

@media (max-width: 700px) {
  .fcp-app { width: 100%; max-width: 100%; }
  .fcp-shell { padding: 16px 10px 40px; }
  .fcp-tool-hero { margin-bottom: 16px; }
  .fcp-tool-hero h1 { font-size: 29px; }
  .fcp-tool-hero p { font-size: 14px; }
  .fcp-upload-stage { min-height: 205px; padding: 7px; border-radius: 8px; }
  .fcp-dropzone { min-height: 191px; padding: 18px 12px; }
  .fcp-file-button { min-width: 0; width: min(100%, 250px); min-height: 50px; padding: 12px 14px; font-size: 14px; }
  .fcp-dropzone small { margin-top: 9px; font-size: 13px; }
  .fcp-workspace, .fcp-preview { margin-top: 12px; padding: 13px; border-radius: 10px; }
  .fcp-text-stage .fcp-field textarea { height: 160px; min-height: 160px; }
  .fcp-input-guide { align-items: flex-start; flex-direction: column; gap: 3px; }
  .fcp-file-controls { grid-template-columns: 1fr; gap: 9px; }
  .fcp-voc-actions .fcp-file-controls { grid-template-columns: 1fr; }
  .fcp-file-actions .fcp-primary { width: 100%; }
  .fcp-options { align-items: stretch; flex-direction: column; }
  .fcp-options label, .fcp-options .fcp-primary { width: 100%; }
  .fcp-options label { justify-content: space-between; }
  .fcp-options label select { width: 150px; }
  .fcp-primary { min-height: 48px; }
  .fcp-preview-head { align-items: flex-start; flex-direction: column; }
  .fcp-preview-actions { width: 100%; flex-wrap: wrap; }
  .fcp-preview-size { width: 100%; }
  .fcp-preview-actions button { flex: 1; }
  .fcp-edit-card { grid-template-columns: 30px 1fr 28px; padding: 16px 0; }
  .fcp-card-fields { grid-template-columns: 1fr; }
  .fcp-dashboard, .fcp-decks, .fcp-tools, .fcp-history { margin: 24px auto 52px; padding: 0 12px; }
  .fcp-hero { padding: 30px 22px; }
  .fcp-stats, .fcp-tool-grid, .fcp-deck-grid { grid-template-columns: 1fr; }
  .fcp-job-list div { display: block; }
  .fcp-job-list span { display: block; margin-top: 5px; color: var(--fcp-muted); }
}

/* Compact application dashboard */
.fcp-dashboard:has(.fcp-dashboard-app) { max-width: 1180px; margin: 24px auto 70px; padding: 0 18px; }
.fcp-dashboard-app { overflow: visible; border: 1px solid #e4e7ec; border-radius: 18px; background: #f7f8fa; box-shadow: 0 18px 55px rgba(16,24,40,.08); }
.fcp-dash-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 28px 22px; background: #fff; }
.fcp-dash-kicker, .fcp-dash-panel-head span, .fcp-dash-tools > div > span, .fcp-dash-detail-head span { color: var(--fcp-red); font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.fcp-dash-top h1 { margin: 4px 0 5px; font-size: 30px; line-height: 1.1; letter-spacing: -.035em; }
.fcp-dash-top p, .fcp-dash-section-head p { margin: 0; color: #667085; font-size: 13px; }
.fcp-dash-create, .fcp-dash-section-head > a { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 0 16px; border-radius: 8px; background: var(--fcp-red); color: #fff !important; text-decoration: none; font-size: 13px; font-weight: 750; white-space: nowrap; }
.fcp-dash-tabs { display: flex; gap: 4px; padding: 0 22px; border-top: 1px solid #f0f1f3; border-bottom: 1px solid #e4e7ec; background: #fff; }
.fcp-dash-tabs button { position: relative; min-height: 48px; border: 0; background: transparent; color: #667085; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fcp-dash-tabs button::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: transparent; }
.fcp-dash-tabs button.active { color: #101828; }
.fcp-dash-tabs button.active::after { background: var(--fcp-red); }
.fcp-dash-tabs button span { display: inline-grid; min-width: 20px; height: 20px; margin-left: 5px; place-items: center; border-radius: 99px; background: #f0f2f5; color: #667085; font-size: 10px; }
.fcp-dash-content { padding: 20px; }
.fcp-dash-pane { display: none; }
.fcp-dash-pane.active { display: block; }
.fcp-dash-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 14px; }
.fcp-dash-metrics article { padding: 16px 17px; border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; }
.fcp-dash-metrics article > span { display: block; color: #667085; font-size: 11px; font-weight: 700; }
.fcp-dash-metrics strong { display: block; margin: 4px 0 2px; color: #101828; font-size: 28px; line-height: 1; }
.fcp-dash-metrics small { color: #98a2b3; font-size: 10px; }
.fcp-dash-panel, .fcp-dash-tools, .fcp-dash-all-decks, .fcp-dash-history-list, .fcp-dash-detail { border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; }
.fcp-dash-panel { padding: 17px; }
.fcp-dash-panel-head, .fcp-dash-section-head, .fcp-dash-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fcp-dash-panel-head { margin-bottom: 8px; }
.fcp-dash-panel-head h2, .fcp-dash-tools h2, .fcp-dash-section-head h2, .fcp-dash-detail-head h2 { margin: 2px 0 0; font-size: 17px; letter-spacing: -.02em; }
.fcp-dash-panel-head > button { border: 0; background: transparent; color: var(--fcp-red); padding: 5px; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.fcp-dash-deck-list, .fcp-dash-job-list { min-width: 0; }
.fcp-dash-deck { position: relative; display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 10px; align-items: center; min-height: 58px; padding: 9px 0; border-bottom: 1px solid #f0f1f3; }
.fcp-dash-deck:last-child, .fcp-dash-job:last-child { border-bottom: 0; }
.fcp-dash-deck-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: #fff0f1; color: var(--fcp-red); font-size: 13px; font-weight: 850; }
.fcp-dash-deck-copy { min-width: 0; }
.fcp-dash-deck-copy h3 { overflow: hidden; margin: 0 0 3px; color: #101828; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.fcp-visibility-badge { display: inline-flex; height: 18px; align-items: center; margin-left: 5px; padding: 0 6px; border-radius: 99px; vertical-align: 1px; font-size: 8px; font-weight: 800; }
.fcp-visibility-badge.private { background: #f2f4f7; color: #667085; }
.fcp-visibility-badge.public { background: #ecfdf3; color: #027a48; }
.fcp-visibility-badge.pending { background: #fffaeb; color: #b54708; }
.fcp-visibility-badge.purchased { background: #eff8ff; color: #175cd3; }
.fcp-visibility-badge.expired { background: #fff4ed; color: #c4320a; }
.fcp-purchased-note { font-size: 11px; color: #98a2b3; margin-left: 10px; font-weight: 600; }
.fcp-renew { color: #c4320a; font-weight: 700; text-decoration: none; font-size: 13px; margin-left: 12px; }
.fcp-study-locked { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; width: min(100%,720px); height: 330px; border: 1px dashed #cbd5e1; border-radius: 22px; background: #fff; padding: 32px; box-sizing: border-box; }
.fcp-study-locked[hidden] { display: none; }
.fcp-study-locked span { font-size: 34px; }
.fcp-study-locked h2 { margin: 10px 0 6px; font-size: 22px; color: #101828; }
.fcp-study-locked p { margin: 0 0 18px; color: #667085; font-size: 14px; max-width: 360px; line-height: 1.5; }
.fcp-study-locked a { padding: 11px 22px; border-radius: 999px; background: #175cd3; color: #fff; font-weight: 700; text-decoration: none; }
.fcp-study-groups button.is-locked { opacity: .75; }
.fcp-study-groups button.is-locked small { color: #f79009; }
.fcp-study-app.fcp-dark .fcp-study-locked { background: #101826; border-color: #243049; }
.fcp-study-app.fcp-dark .fcp-study-locked h2 { color: #f1f5f9; }
.fcp-study-app.fcp-dark .fcp-study-locked p { color: #7d8aa3; }
.fcp-study-expired-app { display: flex; align-items: center; justify-content: center; min-height: calc(100svh - 20px); padding: 20px 14px calc(26px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.fcp-study-expired { max-width: 420px; width: 100%; text-align: center; padding: 48px 24px; }
.fcp-study-expired > span { font-size: 44px; }
.fcp-study-expired h1 { margin: .5em 0 .25em; font-size: 26px; color: #101828; }
.fcp-study-expired p { color: #667085; line-height: 1.6; margin-bottom: 24px; }
.fcp-study-expired-actions { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.fcp-study-app.fcp-dark .fcp-study-expired h1 { color: #f1f5f9; }
.fcp-study-app.fcp-dark .fcp-study-expired p { color: #7d8aa3; }
.fcp-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 9999; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 12px; background: #101828; color: #fff; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(16,24,40,.28); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.fcp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.fcp-toast.is-error { background: #b42318; }
.fcp-review-notice { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #fffaeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; line-height: 1.5; }
.fcp-review-notice a { color: #b45309; font-weight: 700; }
.fcp-status.is-error a { color: #b42318; font-weight: 700; text-decoration: underline; margin-left: 4px; }
.fcp-dash-deck-copy p { overflow: hidden; margin: 0; color: #98a2b3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fcp-dash-deck-copy p span { margin: 0 3px; color: #d0d5dd; }
.fcp-dash-menu { position: relative; display: flex; gap: 4px; }
.fcp-dash-menu > button, .fcp-open-study { display: inline-flex; height: 30px; align-items: center; justify-content: center; border: 1px solid #e4e7ec; border-radius: 7px; background: #fff; color: #475467 !important; padding: 0 10px; font: inherit; font-size: 10px; font-weight: 700; text-decoration: none; cursor: pointer; }
.fcp-dash-menu .fcp-more { width: 30px; padding: 0; letter-spacing: 1px; }
.fcp-dash-popover { position: absolute; top: 35px; right: 0; z-index: 10; width: 145px; padding: 5px; border: 1px solid #e4e7ec; border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(16,24,40,.14); }
.fcp-dash-popover button { width: 100%; border: 0; border-radius: 5px; background: transparent; padding: 7px 8px; color: #344054; text-align: left; font: inherit; font-size: 11px; cursor: pointer; }
.fcp-dash-popover button:hover { background: #f7f8fa; }
.fcp-dash-popover button:disabled { opacity: .38; cursor: not-allowed; }
.fcp-dash-popover button:disabled:hover { background: transparent; }
.fcp-dash-popover button.danger { color: #b42318; }
.fcp-dash-job { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 9px; align-items: center; min-height: 54px; padding: 8px 0; border-bottom: 1px solid #f0f1f3; }
.fcp-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #f79009; }
.fcp-status-dot.completed { background: #12b76a; }
.fcp-status-dot.failed { background: #f04438; }
.fcp-dash-job strong { color: #344054; font-size: 11px; }
.fcp-dash-job p { margin: 2px 0 0; color: #98a2b3; font-size: 10px; }
.fcp-dash-job time { color: #98a2b3; font-size: 9px; white-space: nowrap; }
.fcp-dash-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 14px; padding: 15px 17px; }
.fcp-dash-tool-links { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.fcp-dash-tool-links a { display: inline-flex; height: 34px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #e4e7ec; border-radius: 8px; color: #344054 !important; text-decoration: none; font-size: 10px; font-weight: 700; }
.fcp-dash-tool-links a:hover { border-color: #f7a0a0; background: #fff7f7; }
.fcp-dash-tool-links b { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 5px; background: #fff0f1; color: var(--fcp-red); font-size: 9px; }
.fcp-dash-section-head { margin-bottom: 12px; }
.fcp-dash-all-decks { padding: 6px 17px; }
.fcp-dash-all-decks .fcp-dash-deck { min-height: 66px; }
.fcp-dash-history-head { display: grid; grid-template-columns: 80px 1fr 110px; padding: 0 16px 7px; color: #98a2b3; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.fcp-dash-history-list { padding: 5px 17px; }
.fcp-dash-history-list .fcp-dash-job { grid-template-columns: 80px minmax(0,1fr) 110px; }
.fcp-dash-history-list .fcp-status-dot { position: relative; width: auto; height: auto; border-radius: 0; background: transparent; color: #667085; font-size: 10px; }
.fcp-dash-history-list .fcp-status-dot::after { content: "Status"; display: inline-flex; height: 22px; align-items: center; padding: 0 8px 0 18px; border-radius: 99px; background: #fff7ed; color: #b54708; }
.fcp-dash-history-list .fcp-status-dot::before { content: ""; position: absolute; top: 8px; left: 8px; width: 6px; height: 6px; border-radius: 50%; background: #f79009; }
.fcp-dash-history-list .fcp-status-dot.completed::after { content: "Completed"; background: #ecfdf3; color: #027a48; }
.fcp-dash-history-list .fcp-status-dot.completed::before { background: #12b76a; }
.fcp-dash-history-list .fcp-status-dot.failed::after { content: "Failed"; background: #fef3f2; color: #b42318; }
.fcp-dash-history-list .fcp-status-dot.failed::before { background: #f04438; }
.fcp-dash-empty { display: flex; min-height: 100px; align-items: center; justify-content: center; flex-direction: column; color: #667085; text-align: center; }
.fcp-dash-empty strong { color: #344054; font-size: 13px; }
.fcp-dash-empty span { margin-top: 3px; font-size: 10px; }
.fcp-dash-detail { margin-top: 14px; padding: 17px; scroll-margin-top: 20px; }
.fcp-dash-detail-head > button { border: 0; background: transparent; color: #98a2b3; font-size: 24px; cursor: pointer; }
.fcp-dash-detail-head p { margin: 3px 0 0; color: #98a2b3; font-size: 10px; }
.fcp-dash-card-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.fcp-dash-card-grid article { position: relative; padding: 13px 14px 12px 34px; border: 1px solid #eaecf0; border-radius: 9px; background: #fcfcfd; }
.fcp-dash-card-grid small { position: absolute; top: 13px; left: 12px; color: #98a2b3; font-size: 9px; }
.fcp-dash-card-grid strong { font-size: 12px; }
.fcp-dash-card-grid p { margin: 5px 0 0; color: #667085; font-size: 11px; line-height: 1.45; }
.fcp-dash-edit-title { display: block; margin-top: 14px; color: #475467; font-size: 11px; font-weight: 700; }
.fcp-dash-edit-title input { display: block; width: 100%; height: 40px; margin-top: 5px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 11px; font: inherit; font-size: 13px; }
.fcp-dash-edit-title select { display: block; width: 100%; height: 40px; margin-top: 5px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13px; background: #fff; color: #344054; }
.fcp-dash-edit-title small { display: block; margin-top: 5px; color: #98a2b3; font-size: 10px; font-weight: 400; line-height: 1.45; }
.fcp-dash-edit-tools { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.fcp-dash-edit-tools input { flex: 1; height: 38px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 11px; font: inherit; font-size: 13px; }
.fcp-dash-edit-tools input:focus { outline: none; border-color: var(--fcp-red); box-shadow: 0 0 0 3px rgba(229, 50, 45, .1); }
.fcp-dash-edit-count { flex: 0 0 auto; color: #667085; font-size: 11px; font-weight: 700; white-space: nowrap; }
.fcp-dash-edit-list { margin-top: 12px; max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.fcp-dash-edit-card { display: grid; grid-template-columns: 24px minmax(0,1fr) minmax(0,1fr) 28px; gap: 9px; align-items: start; padding: 10px 0; border-top: 1px solid #eaecf0; content-visibility: auto; contain-intrinsic-size: auto 104px; }
.fcp-dash-edit-card small { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 6px; background: #f2f4f7; color: #667085; font-size: 9px; font-weight: 800; }
.fcp-dash-edit-card label { color: #667085; font-size: 10px; font-weight: 700; }
.fcp-dash-edit-card textarea { display: block; width: 100%; min-height: 62px; margin-top: 4px; border: 1px solid #d0d5dd; border-radius: 7px; padding: 8px 9px; font: inherit; font-size: 12px; line-height: 1.4; resize: vertical; }
.fcp-dash-edit-card > button { width: 27px; height: 27px; border: 0; border-radius: 6px; background: #fff1f0; color: #b42318; font-size: 17px; cursor: pointer; }
.fcp-dash-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.fcp-dash-edit-actions button { min-height: 38px; padding: 0 13px; font-size: 11px; }
.fcp-dash-loading-screen { display: grid; min-height: 360px; place-items: center; align-content: center; gap: 12px; }
.fcp-dash-loading-screen span { width: 24px; height: 24px; border: 2px solid #fee4e2; border-top-color: var(--fcp-red); border-radius: 50%; animation: fcp-spin .7s linear infinite; }
.fcp-dash-loading-screen p, .fcp-dash-loading { color: #667085; font-size: 12px; }
.fcp-dash-error { padding: 18px; border-radius: 10px; background: #fef3f2; color: #b42318; font-size: 12px; }
@keyframes fcp-spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .fcp-dashboard:has(.fcp-dashboard-app) { margin: 16px auto 45px; padding: 0 10px; }
  .fcp-dashboard-app { border-radius: 13px; }
  .fcp-dash-top { align-items: flex-start; padding: 20px 16px 16px; }
  .fcp-dash-top h1 { font-size: 24px; }
  .fcp-dash-top p { max-width: 210px; }
  .fcp-dash-create { min-height: 38px; padding: 0 11px; font-size: 11px; }
  .fcp-dash-tabs { overflow-x: auto; padding: 0 8px; }
  .fcp-dash-tabs button { flex: 0 0 auto; min-height: 44px; }
  .fcp-dash-content { padding: 12px; }
  .fcp-dash-metrics { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .fcp-dash-metrics article { padding: 13px; }
  .fcp-dash-panel { padding: 13px; }
  .fcp-dash-tools { align-items: flex-start; flex-direction: column; padding: 13px; }
  .fcp-dash-tool-links { justify-content: flex-start; }
  .fcp-dash-deck { grid-template-columns: 32px minmax(0,1fr) auto; }
  .fcp-dash-menu > button:first-child { display: none; }
  .fcp-dash-history-head { display: none; }
  .fcp-dash-history-list .fcp-dash-job { grid-template-columns: 82px minmax(0,1fr); }
  .fcp-dash-history-list .fcp-dash-job time { display: none; }
  .fcp-dash-card-grid { grid-template-columns: 1fr; }
  .fcp-dash-edit-card { grid-template-columns: 22px minmax(0,1fr) 28px; }
  .fcp-dash-edit-card label { grid-column: 2; }
  .fcp-dash-edit-card > button { grid-column: 3; grid-row: 1; }
}

@media (max-width: 430px) {
  .fcp-dash-top { gap: 10px; }
  .fcp-dash-top p { display: none; }
  .fcp-dash-create { font-size: 0; }
  .fcp-dash-create::after { content: "+ Create"; font-size: 11px; }
  .fcp-dash-metrics strong { font-size: 23px; }
  .fcp-dash-deck-copy p { max-width: 190px; }
}

/* Dedicated flip-card study experience */
.fcp-study-document { min-width: 320px; margin: 0; background: #f4f6f8; }
.fcp-study-document .fcp-shared-page { min-height: 100svh; padding: 18px 0; }
.fcp-dashboard:has(.fcp-study-app) { max-width: 1040px; margin: 24px auto 70px; padding: 0 18px; }
.fcp-study-document .fcp-dashboard:has(.fcp-study-app) { width: 100%; margin: 0 auto; }
.fcp-study-app { position: relative; min-height: 620px; overflow: hidden; border: 1px solid #e4e7ec; border-radius: 18px; background: radial-gradient(circle at 10% 0,#fff0f1 0,transparent 30%),#f8f9fb; box-shadow: 0 18px 55px rgba(16,24,40,.09); }
.fcp-study-top { display: grid; grid-template-columns: 120px 1fr 120px; align-items: center; gap: 16px; padding: 18px 24px; border-bottom: 1px solid #e4e7ec; background: rgba(255,255,255,.94); text-align: center; }
.fcp-study-top > a { color: #667085 !important; text-align: left; text-decoration: none; font-size: 12px; font-weight: 700; }
.fcp-study-top span { color: var(--fcp-red); font-size: 9px; font-weight: 850; letter-spacing: .14em; }
.fcp-study-top h1 { overflow: hidden; margin: 3px 0 0; color: #101828; font-size: 20px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.fcp-study-top > button { justify-self: end; height: 34px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #475467; padding: 0 12px; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.fcp-study-layout { display: grid; grid-template-columns: 190px minmax(0,1fr); min-height: 550px; }
.fcp-study-groups { padding: 18px 12px; border-right: 1px solid #e4e7ec; background: rgba(255,255,255,.72); }
.fcp-study-groups > header { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 10px; }
.fcp-study-groups > header span { color: #98a2b3; font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.fcp-study-groups > header strong { color: #667085; font-size: 9px; font-weight: 700; }
#fcp-study-group-list { display: grid; gap: 6px; }
#fcp-study-group-list > button { position: relative; display: grid; width: 100%; gap: 7px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 10px; color: #475467; text-align: left; font: inherit; cursor: pointer; }
#fcp-study-group-list > button:hover { background: #fff; }
#fcp-study-group-list > button.active { border-color: #f7b4b6; background: #fff; box-shadow: 0 6px 16px rgba(16,24,40,.06); }
#fcp-study-group-list > button > span { display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: center; gap: 7px; }
#fcp-study-group-list b { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; background: #f2f4f7; color: #667085; font-size: 9px; }
#fcp-study-group-list button.active b { background: #fff0f1; color: var(--fcp-red); }
#fcp-study-group-list button.complete b { background: #ecfdf3; color: #027a48; }
#fcp-study-group-list em { overflow: hidden; font-size: 11px; font-style: normal; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
#fcp-study-group-list small { color: #98a2b3; font-size: 9px; text-align: right; }
#fcp-study-group-list > button > i { overflow: hidden; height: 3px; border-radius: 99px; background: #eaecf0; }
#fcp-study-group-list > button > i u { display: block; height: 100%; border-radius: inherit; background: var(--fcp-red); text-decoration: none; transition: width .2s; }
#fcp-study-group-list button.complete > i u { background: #12b76a; }
.fcp-study-workspace { min-width: 0; padding-top: 15px; }
.fcp-study-section-title { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 22px; padding: 0 20px; }
.fcp-study-section-title span { color: var(--fcp-red); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.fcp-study-section-title strong { overflow: hidden; color: #475467; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.fcp-study-meta { display: grid; grid-template-columns: 56px 1fr 44px; align-items: center; gap: 12px; max-width: 760px; margin: 18px auto 0; padding: 0 20px; }
.fcp-study-meta strong, .fcp-study-meta > span { color: #667085; font-size: 11px; }
.fcp-study-meta > span { text-align: right; }
.fcp-study-progress { overflow: hidden; height: 6px; border-radius: 99px; background: #e4e7ec; }
.fcp-study-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f04438,var(--fcp-red)); transition: width .25s ease; }
.fcp-study-stage { display: flex; align-items: center; flex-direction: column; padding: 24px 22px 34px; }
.fcp-study-card { width: min(100%,720px); height: 330px; border: 0; outline: 0; background: transparent; padding: 0; perspective: 1400px; cursor: pointer; }
.fcp-study-card:focus-visible { border-radius: 20px; box-shadow: 0 0 0 4px rgba(229,50,45,.2); }
.fcp-study-card-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.fcp-study-card.is-flipped .fcp-study-card-inner { transform: rotateY(180deg); }
/* Robust flip: hide/show the faces explicitly so the back text ALWAYS displays
   on flip, even in browsers/webviews where backface-visibility is unreliable. */
.fcp-study-card.is-flipped .fcp-study-front { visibility: hidden; }
.fcp-study-card.is-flipped .fcp-study-back { visibility: visible; }
.fcp-study-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; overflow: hidden; border: 1px solid #e4e7ec; border-radius: 22px; padding: 48px; backface-visibility: hidden; box-shadow: 0 22px 55px rgba(16,24,40,.13); }
.fcp-study-front { background: radial-gradient(circle at 90% 10%,#fff1f2 0,transparent 28%),#fff; color: #101828; }
.fcp-study-back { transform: rotateY(180deg); visibility: hidden; border-color: #26364f; background: radial-gradient(circle at 85% 12%,#344866 0,transparent 32%),#172338; color: #fff; }
.fcp-study-face small { position: absolute; top: 24px; left: 26px; color: var(--fcp-red); font-size: 9px; font-weight: 850; letter-spacing: .16em; }
.fcp-study-back small { color: #fda4af; }
.fcp-study-face > div { max-width: 620px; font-size: clamp(25px,3.4vw,40px); font-weight: 700; line-height: 1.28; letter-spacing: -.025em; text-align: center; }
.fcp-study-back > div { font-size: clamp(22px,3vw,34px); }
.fcp-study-face > div .fcp-flip-line { display: block; }
.fcp-study-face > div .fcp-flip-line + .fcp-flip-line { margin-top: 4px; }
.fcp-study-face > div .fcp-flip-line-sub { font-size: .72em; font-weight: 600; opacity: .82; letter-spacing: .005em; }
.fcp-study-face > p { max-width: 580px; margin: 16px 0 0; color: #cbd5e1; font-size: 13px; line-height: 1.5; text-align: center; }
.fcp-study-face em { position: absolute; right: 20px; bottom: 18px; left: 20px; color: #98a2b3; font-size: 10px; font-style: normal; font-weight: 600; text-align: center; }
.fcp-study-back em { color: #94a3b8; }
.fcp-study-ratings { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; width: min(100%,560px); margin-top: 16px; }
.fcp-study-ratings button { min-height: 54px; border: 1px solid #e4e7ec; border-radius: 10px; background: #fff; padding: 8px 12px; color: #344054; font: inherit; cursor: pointer; }
.fcp-study-ratings button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.fcp-study-ratings b, .fcp-study-ratings span { display: block; }
.fcp-study-ratings b { font-size: 12px; }
.fcp-study-ratings span { margin-top: 2px; color: #98a2b3; font-size: 9px; }
.fcp-study-ratings button[data-rate="again"] b { color: #d92d20; }
.fcp-study-ratings button[data-rate="hard"] b { color: #b54708; }
.fcp-study-ratings button[data-rate="good"] b { color: #027a48; }
.fcp-study-controls { display: grid; grid-template-columns: 120px 160px 120px; gap: 10px; margin-top: 16px; }
.fcp-study-controls button { min-height: 42px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: #475467; padding: 0 14px; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.fcp-study-controls button:disabled { opacity: .4; cursor: default; }
.fcp-study-controls .fcp-study-flip { border-color: var(--fcp-red); background: var(--fcp-red); color: #fff; }
.fcp-study-complete { width: min(100%,620px); margin: 35px auto; padding: 45px 30px; border: 1px solid #e4e7ec; border-radius: 20px; background: #fff; box-shadow: 0 18px 45px rgba(16,24,40,.08); text-align: center; }
.fcp-study-complete > span { color: var(--fcp-red); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.fcp-study-complete h2 { margin: 7px 0 6px; font-size: 32px; }
.fcp-study-complete > p { margin: 0; color: #667085; font-size: 13px; }
.fcp-study-complete > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin: 24px 0; }
.fcp-study-complete article { padding: 14px; border-radius: 10px; background: #f7f8fa; }
.fcp-study-complete strong, .fcp-study-complete small { display: block; }
.fcp-study-complete strong { font-size: 24px; }
.fcp-study-complete small { color: #667085; font-size: 10px; }
.fcp-study-complete button, .fcp-study-complete a { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 0 15px; font: inherit; font-size: 11px; font-weight: 750; text-decoration: none; cursor: pointer; }
.fcp-study-complete button { background: var(--fcp-red); color: #fff; }
.fcp-study-complete a { margin-left: 6px; background: #f2f4f7; color: #475467 !important; }
.fcp-study-group-complete { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.56); backdrop-filter: blur(7px); }
.fcp-study-group-complete[hidden] { display: none; }
.fcp-study-group-complete > div { width: min(100%,430px); padding: 34px 28px; border-radius: 18px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.22); text-align: center; }
.fcp-study-group-complete span { color: var(--fcp-red); font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.fcp-study-group-complete h2 { margin: 7px 0 6px; color: #101828; font-size: 25px; }
.fcp-study-group-complete p { margin: 0 0 20px; color: #667085; font-size: 12px; }
.fcp-study-group-complete button { min-height: 40px; border: 0; border-radius: 8px; background: var(--fcp-red); color: #fff; padding: 0 18px; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }

/* Calm, content-first study view. The theme owns the page header and footer. */
.fcp-shared-page { background: transparent; }
.fcp-shared-page .fcp-dashboard:has(.fcp-study-app),
.fcp-dashboard.fcp-shared-page:has(.fcp-study-app) { max-width: 1080px; margin: 30px auto 64px; padding: 0 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.fcp-shared-page .fcp-study-app { min-height: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.fcp-study-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.fcp-study-titlebar h1 { margin: 0; color: #182230; font-size: clamp(22px,2.3vw,30px); line-height: 1.2; letter-spacing: -.025em; }
.fcp-study-titlebar p { margin: 5px 0 0; color: #667085; font-size: 12px; }
.fcp-study-titlebar > button { min-height: 38px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: #344054; padding: 0 16px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.fcp-study-titlebar > button:hover { border-color: #98a2b3; background: #f9fafb; }
.fcp-shared-page .fcp-study-layout { grid-template-columns: 180px minmax(0,1fr); min-height: 0; gap: 22px; }
.fcp-shared-page .fcp-study-groups { align-self: start; padding: 0 16px 0 0; border: 0; border-right: 1px solid #eaecf0; border-radius: 0; background: transparent; }
.fcp-shared-page #fcp-study-group-list > button { border: 0; border-left: 2px solid transparent; border-radius: 0; background: transparent; }
.fcp-shared-page #fcp-study-group-list > button.active { border-color: #4255b9; background: transparent; box-shadow: none; }
.fcp-shared-page #fcp-study-group-list button.active b { background: #eaf0ff; color: #3448c5; }
.fcp-shared-page #fcp-study-group-list > button > i u,
.fcp-shared-page .fcp-study-progress i { background: #4255b9; }
.fcp-shared-page .fcp-study-workspace { padding: 0; }
.fcp-shared-page .fcp-study-section-title { justify-content: flex-start; min-height: 18px; padding: 0; }
.fcp-shared-page .fcp-study-section-title span { color: #667085; }
.fcp-shared-page .fcp-study-meta { max-width: none; margin: 10px 0 0; padding: 0; }
.fcp-shared-page .fcp-study-stage { padding: 18px 0 0; }
.fcp-shared-page .fcp-study-card { width: min(100%,760px); height: 330px; }
.fcp-shared-page .fcp-study-face { border-color: #dfe3e8; border-radius: 14px; background: #fff; color: #182230; box-shadow: 0 8px 24px rgba(16,24,40,.08); }
.fcp-shared-page .fcp-study-back { border-color: #bac6e8; background: #fff; color: #182230; }
.fcp-shared-page .fcp-study-face small,
.fcp-shared-page .fcp-study-back small { color: #667085; }
.fcp-shared-page .fcp-study-back > p { color: #667085; }
.fcp-shared-page .fcp-study-back em { color: #98a2b3; }
.fcp-shared-page .fcp-study-controls .fcp-study-flip { border-color: #2f3f9f; background: #2f3f9f; }
.fcp-shared-page .fcp-study-ratings button,
.fcp-shared-page .fcp-study-controls button { box-shadow: none; }

@media (max-width: 700px) {
  .fcp-shared-page .fcp-dashboard:has(.fcp-study-app),
  .fcp-dashboard.fcp-shared-page:has(.fcp-study-app) { margin: 20px auto 42px; padding: 0 12px; }
  .fcp-study-titlebar { margin-bottom: 14px; }
  .fcp-study-titlebar h1 { font-size: 21px; }
  .fcp-study-titlebar > button { min-height: 34px; padding: 0 12px; font-size: 11px; }
  .fcp-shared-page .fcp-study-layout { grid-template-columns: 1fr; gap: 12px; }
  .fcp-shared-page .fcp-study-groups { overflow: hidden; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid #eaecf0; border-radius: 0; }
  .fcp-shared-page .fcp-study-card { height: 300px; }
  .fcp-study-document .fcp-shared-page { padding: 0; }
  .fcp-dashboard:has(.fcp-study-app) { margin: 14px auto 45px; padding: 0 9px; }
  .fcp-study-document .fcp-dashboard:has(.fcp-study-app) { margin: 0 auto; padding: 0; }
  .fcp-study-app { min-height: 100svh; border-width: 0; border-radius: 0; }
  .fcp-study-top { grid-template-columns: 70px 1fr 70px; gap: 8px; padding: 13px 12px; }
  .fcp-study-top > a { font-size: 0; }
  .fcp-study-top > a::after { content: "← Back"; font-size: 10px; }
  .fcp-study-top h1 { font-size: 16px; }
  .fcp-study-top > button { height: 31px; padding: 0 8px; font-size: 9px; }
  .fcp-study-layout { grid-template-columns: 1fr; min-height: 530px; }
  .fcp-study-groups { overflow: hidden; padding: 9px 10px; border-right: 0; border-bottom: 1px solid #e4e7ec; }
  .fcp-study-groups > header { display: none; }
  #fcp-study-group-list { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  #fcp-study-group-list::-webkit-scrollbar { display: none; }
  #fcp-study-group-list > button { min-width: 128px; flex: 0 0 128px; padding: 8px; background: #fff; }
  #fcp-study-group-list > button > span { grid-template-columns: 22px minmax(0,1fr); }
  #fcp-study-group-list b { width: 21px; height: 21px; }
  .fcp-study-workspace { padding-top: 11px; }
  .fcp-study-section-title { padding: 0 12px; }
  .fcp-study-meta { margin-top: 13px; padding: 0 14px; }
  .fcp-study-stage { padding: 17px 12px 25px; }
  .fcp-study-card { height: 330px; }
  .fcp-study-face { border-radius: 16px; padding: 38px 22px; }
  .fcp-study-face > div { font-size: clamp(23px,8vw,32px); }
  .fcp-study-back > div { font-size: clamp(20px,7vw,28px); }
  .fcp-study-ratings { gap: 6px; margin-top: 12px; }
  .fcp-study-ratings button { min-height: 50px; padding: 7px; }
  .fcp-study-controls { grid-template-columns: 1fr 1.25fr 1fr; width: 100%; gap: 6px; margin-top: 12px; }
  .fcp-study-controls button { min-height: 40px; padding: 0 7px; font-size: 10px; }
}
.fcp-shared-page { width: 100%; margin: 0 auto; padding: 1px 0; }

/* === Study app enhancements (immersive, progress, ratings, tour, dark) === */
.fcp-dashboard.fcp-study-active { position: fixed; inset: 0; z-index: 99998; margin: 0 !important; padding: 0 !important; max-width: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: #f6f7f9 !important; overflow: auto; }
.fcp-dashboard.fcp-study-active .fcp-study-app { min-height: calc(100svh - 20px); padding-top: 20px; padding-bottom: 28px; border: 0; border-radius: 0; box-shadow: none; }
.fcp-dashboard.fcp-study-active .fcp-study-groups { padding-left: 20px; }
.fcp-study-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 22px; margin: 0; background: rgba(255,255,255,.88); border-bottom: 1px solid #e4e7ec; backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 12; }
.fcp-study-titlebar .fcp-study-exit { color: #667085; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.fcp-study-titlebar .fcp-study-exit:hover { color: var(--fcp-red); }
.fcp-study-title { min-width: 0; text-align: left; }
.fcp-study-title h1 { margin: 0; overflow: hidden; color: #182230; font-size: clamp(18px,2.2vw,26px); line-height: 1.2; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.fcp-study-title p { margin: 4px 0 0; color: #667085; font-size: 12px; }
.fcp-study-streak { color: var(--fcp-red); }
.fcp-study-title-actions { display: flex; align-items: center; gap: 8px; }
.fcp-study-title-actions button { min-height: 36px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: #475467; padding: 0 13px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.fcp-study-title-actions button:hover { border-color: #98a2b3; background: #f9fafb; }
.fcp-study-streak-chip { display: inline-flex; align-items: center; height: 34px; padding: 0 11px; border-radius: 99px; background: #fff7ed; color: #b54708; font-size: 12px; font-weight: 800; border: 1px solid #fed7aa; white-space: nowrap; }
.fcp-study-groups { display: flex; flex-direction: column; }
.fcp-study-deck-info { padding: 2px 6px 12px; border-bottom: 1px solid #eef0f3; margin-bottom: 10px; }
.fcp-study-deck-info h1 { margin: 0; font-size: 15px; letter-spacing: -.01em; color: #182230; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcp-study-deck-info p { margin: 4px 0 0; color: #98a2b3; font-size: 11px; }
.fcp-study-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; }
.fcp-study-side-actions button, .fcp-study-side-actions .fcp-study-exit { min-height: 36px; border: 1px solid #d0d5dd; border-radius: 9px; background: #fff; color: #475467; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fcp-study-side-actions button:hover, .fcp-study-side-actions .fcp-study-exit:hover { border-color: #98a2b3; background: #f9fafb; }
.fcp-study-side-actions .fcp-study-exit { color: #667085; }
.fcp-study-side-actions .fcp-study-exit:hover { color: var(--fcp-red); }
.fcp-study-side-actions .fcp-study-streak-chip { justify-content: center; }
.fcp-study-app.fcp-dark .fcp-study-deck-info h1 { color: #f1f5f9; }
.fcp-study-app.fcp-dark .fcp-study-deck-info p { color: #7d8aa3; }
.fcp-study-app.fcp-dark .fcp-study-deck-info, .fcp-study-app.fcp-dark .fcp-study-side-actions { border-color: #1e293b; }
.fcp-study-app.fcp-dark .fcp-study-side-actions button, .fcp-study-app.fcp-dark .fcp-study-side-actions .fcp-study-exit { background: #131c2e; border-color: #2b3a55; color: #cbd5e1; }
@media (max-width: 700px){ .fcp-study-deck-info { display: none; } .fcp-study-side-actions { display: flex; gap: 8px; margin: 0 0 10px; } .fcp-study-side-actions button, .fcp-study-side-actions .fcp-study-exit { flex: 1; min-height: 34px; font-size: 11px; } .fcp-study-side-actions .fcp-study-streak-chip { display: none; } }
.fcp-study-global { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 9px 22px; border-bottom: 1px solid #eef0f3; background: rgba(255,255,255,.62); color: #667085; font-size: 11px; font-weight: 700; }
.fcp-study-global-bar { height: 7px; border-radius: 99px; background: #e4e7ec; overflow: hidden; }
.fcp-study-global-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f97066,var(--fcp-red)); transition: width .3s ease; }
.fcp-study-hint { margin-top: 14px; min-height: 34px; border: 1px solid #e4e7ec; border-radius: 99px; background: #fff; color: #667085; padding: 0 14px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.fcp-study-hint:hover { border-color: #f7b4b6; color: var(--fcp-red); }
.fcp-study-hintbox { margin-top: 10px; max-width: 720px; width: 100%; padding: 12px 14px; border-radius: 10px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 13px; line-height: 1.5; text-align: center; }
.fcp-study-ratings button[data-rate="again"] { background: #fef2f2; border-color: #fecdca; }
.fcp-study-ratings button[data-rate="hard"] { background: #fffaeb; border-color: #fedf89; }
.fcp-study-ratings button[data-rate="good"] { background: #ecfdf3; border-color: #abefc6; }
.fcp-study-complete article.good { background: #ecfdf3; } .fcp-study-complete article.good strong { color: #027a48; }
.fcp-study-complete article.hard { background: #fffaeb; } .fcp-study-complete article.hard strong { color: #b54708; }
.fcp-study-complete article.again { background: #fef2f2; } .fcp-study-complete article.again strong { color: #d92d20; }
.fcp-study-streak-line { margin-top: 14px !important; color: #b54708 !important; font-weight: 700 !important; }
.fcp-study-tour { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.62); backdrop-filter: blur(6px); }
.fcp-study-tour-card { width: min(100%,400px); padding: 34px 30px; border-radius: 20px; background: #fff; text-align: center; box-shadow: 0 25px 70px rgba(0,0,0,.25); }
.fcp-study-tour-step { color: var(--fcp-red); font-size: 10px; font-weight: 850; letter-spacing: .14em; }
.fcp-study-tour-card h2 { margin: 8px 0; color: #101828; font-size: 24px; }
.fcp-study-tour-card p { margin: 0 0 22px; color: #667085; font-size: 13.5px; line-height: 1.5; }
.fcp-study-tour-actions { display: grid; gap: 10px; }
.fcp-study-tour-actions button { min-height: 42px; border-radius: 9px; font: inherit; font-weight: 750; cursor: pointer; }
.fcp-study-tour-actions button:first-child { border: 0; background: var(--fcp-red); color: #fff; }
.fcp-study-tour-actions button:last-child { border: 1px solid #e4e7ec; background: #fff; color: #667085; }
/* dark mode */
.fcp-study-app.fcp-dark { background: #0f1522; border-color: #1e293b; }
.fcp-study-app.fcp-dark .fcp-study-titlebar { background: rgba(15,21,34,.92); border-color: #1e293b; }
.fcp-study-app.fcp-dark .fcp-study-title h1 { color: #f1f5f9; }
.fcp-study-app.fcp-dark .fcp-study-title p, .fcp-study-app.fcp-dark .fcp-study-global { color: #94a3b8; }
.fcp-study-app.fcp-dark .fcp-study-global { background: rgba(15,21,34,.6); border-color: #1e293b; }
.fcp-study-app.fcp-dark .fcp-study-global-bar { background: #1e293b; }
.fcp-study-app.fcp-dark .fcp-study-groups { background: rgba(15,21,34,.5); border-color: #1e293b; }
.fcp-study-app.fcp-dark #fcp-study-group-list > button { color: #cbd5e1; }
.fcp-study-app.fcp-dark #fcp-study-group-list > button.active { background: #16203a; border-color: #3b4a6b; }
.fcp-study-app.fcp-dark .fcp-study-section-title strong, .fcp-study-app.fcp-dark .fcp-study-meta strong { color: #94a3b8; }
.fcp-study-app.fcp-dark .fcp-study-front { background: radial-gradient(circle at 90% 10%,#1c2742 0,transparent 30%),#101826; color: #f1f5f9; border-color: #243049; }
.fcp-study-app.fcp-dark .fcp-study-back { border-color: #2f3f66; background: radial-gradient(circle at 85% 12%,#1e2c4e 0,transparent 34%),#0d1421; color: #fff; }
.fcp-study-app.fcp-dark .fcp-study-face > p, .fcp-study-app.fcp-dark .fcp-study-face em { color: #7d8aa3; }
.fcp-study-app.fcp-dark .fcp-study-ratings button, .fcp-study-app.fcp-dark .fcp-study-controls button { background: #131c2e; border-color: #2b3a55; color: #e2e8f0; }
.fcp-study-app.fcp-dark .fcp-study-hint { background: #131c2e; border-color: #2b3a55; color: #cbd5e1; }
.fcp-study-app.fcp-dark .fcp-study-complete { background: #121a2b; border-color: #243049; }
.fcp-study-app.fcp-dark .fcp-study-complete h2 { color: #f1f5f9; }
.fcp-study-app.fcp-dark .fcp-study-complete article { background: #1b2740; }
.fcp-study-app.fcp-dark .fcp-study-complete small { color: #94a3b8; }
.fcp-study-app.fcp-dark .fcp-study-title-actions button, .fcp-study-app.fcp-dark .fcp-study-titlebar .fcp-study-exit { background: #131c2e; border-color: #2b3a55; color: #cbd5e1; }
.fcp-study-app.fcp-dark .fcp-study-streak-chip { background: #3a2812; border-color: #6b4a1d; color: #fbbf24; }
.fcp-dashboard.fcp-study-active.fcp-dark { background: #0f1522 !important; }
.fcp-dashboard.fcp-dark .fcp-demo-banner { background: #1a2337; border-color: #2b3a55; color: #cbd5e1; box-shadow: none; }
.fcp-dashboard.fcp-dark .fcp-demo-banner a { color: #f97066; }
@media (max-width: 700px){ .fcp-study-titlebar { padding: 12px 14px; } .fcp-study-global { padding: 8px 14px; } .fcp-study-title h1 { font-size: 18px; } .fcp-study-streak-chip { display: none; } .fcp-dashboard.fcp-study-active .fcp-study-app { padding: 20px 14px calc(26px + env(safe-area-inset-bottom)); } .fcp-dashboard.fcp-study-active .fcp-study-groups { padding-left: 0; } }

/* === Preview editor enhancements (card move / extra fields / bulk select) === */
.fcp-edit-card { display: block !important; border: 1px solid var(--fcp-line); border-radius: 12px; margin-bottom: 14px; background: #fff; }
.fcp-card-top { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; }
.fcp-card-sel { width: 17px; height: 17px; accent-color: var(--fcp-red); cursor: pointer; }
.fcp-card-number { flex: 0 0 auto; }
.fcp-card-move { margin-left: auto; display: inline-flex; gap: 4px; }
.fcp-move { appearance: none; border: 1px solid #e2e6ec; background: #f9fafb; color: #475467; border-radius: 7px; width: 30px; height: 30px; font-size: 14px; cursor: pointer; line-height: 1; }
.fcp-move:hover:not(:disabled) { border-color: var(--fcp-red); color: var(--fcp-red); }
.fcp-move:disabled { opacity: .35; cursor: default; }
.fcp-delete { margin-left: 2px; }
.fcp-edit-card.is-selected { border-color: var(--fcp-red); box-shadow: 0 0 0 3px rgba(229,50,45,.12); }
.fcp-card-extra { margin-top: 12px; border-top: 1px dashed #e4e7ec; padding-top: 10px; }
.fcp-card-extra summary { cursor: pointer; font-weight: 750; font-size: 13px; color: #475467; padding: 4px 0; }
.fcp-card-extra summary:hover { color: var(--fcp-red); }
.fcp-card-extra .fcp-card-fields { margin-top: 10px; }
.fcp-card-extra input { width: 100%; border: 1px solid #d5d9e0; border-radius: 8px; outline: none; background: #fff; color: var(--fcp-ink); padding: 10px 12px; font: inherit; }
.fcp-preview-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fcp-danger { appearance: none; border: 0; border-radius: 8px; padding: 11px 17px; font: inherit; font-weight: 750; cursor: pointer; transition: .18s; background: #fef2f2; color: #b42318; border: 1px solid #fecdca; }
.fcp-danger:hover:not(:disabled) { background: #fee4e2; }
.fcp-danger:disabled { opacity: .5; cursor: default; }
.fcp-preview-tools { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f9fafb; border: 1px solid var(--fcp-line); border-radius: 10px; margin-bottom: 14px; }
.fcp-preview-tools[hidden] { display: none; }
.fcp-preview-tools span { font-size: 13px; font-weight: 750; color: #475467; }
.fcp-regen { appearance: none; border: 1px solid #e2e6ec; background: #fff; color: #475467; border-radius: 7px; padding: 8px 12px; font: inherit; font-weight: 700; cursor: pointer; margin-top: 10px; }
.fcp-regen:hover:not(:disabled) { border-color: var(--fcp-red); color: var(--fcp-red); }
.fcp-regen:disabled { opacity: .6; cursor: not-allowed; }
.fcp-dash-section-row{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid var(--fcp-border,#e2e6ec);border-radius:8px;margin-bottom:8px;background:#fff}
.fcp-dash-section-row input{flex:1;border:1px solid #e2e6ec;border-radius:6px;padding:8px 10px;font:inherit}
.fcp-sec-move{appearance:none;border:1px solid #e2e6ec;background:#fff;border-radius:6px;width:34px;height:34px;cursor:pointer;font-weight:700}
.fcp-sec-move:disabled{opacity:.4;cursor:default}
.fcp-sec-move:hover:not(:disabled){border-color:#667085}
.fcp-dash-account-form{display:grid;gap:12px;padding:16px;max-width:520px}
.fcp-account-field{display:grid;gap:4px;font-weight:600}
.fcp-account-field small{color:var(--fcp-muted,#64748b);font-weight:400}
.fcp-account-key{padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;font-family:ui-monospace,monospace}
.fcp-dash-table-head{display:grid;grid-template-columns:1fr 120px 120px;gap:8px;padding:10px 16px;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--fcp-muted,#64748b);border-bottom:1px solid #e5e7eb}
.fcp-dash-pane[data-pane="usage"] .fcp-dash-job{grid-template-columns:1fr 100px 120px}
/* ===== Flashcard Tools redesign ===== */
.fcp-tools { max-width: 1080px; margin: 0 auto; padding: 8px 16px 8px; }
.fcp-tools-head { text-align: center; margin: 6px 0 26px; }
.fcp-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--fcp-red); margin-bottom: 6px; }
.fcp-tools-head h1 { margin: 0 0 8px; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; color: var(--fcp-ink); }
.fcp-tools-head p { margin: 0 auto; max-width: 460px; color: var(--fcp-muted); font-size: 14.5px; line-height: 1.5; }

.fcp-tools .fcp-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.fcp-tools .fcp-tool {
  display: flex; flex-direction: column; padding: 18px 18px 16px;
  border: 1px solid var(--fcp-line); border-radius: 14px; background: #fff;
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(25,35,58,.04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.fcp-tools .fcp-tool:hover { border-color: var(--fcp-red); box-shadow: 0 10px 28px rgba(25,35,58,.10); transform: translateY(-2px); }

.fcp-tool-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.fcp-tool-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; }
.fcp-tool-emoji { font-size: 21px; line-height: 1; }
.tint-blue { background: #eef4ff; }
.tint-emerald { background: #e7f7ee; }
.tint-rose { background: #fff0f2; }
.tint-violet { background: #f1ecff; }
.tint-amber { background: #fff5e6; }
.tint-cyan { background: #e6f7fa; }

.fcp-tools .fcp-tool h2 { margin: 0 0 6px; font-size: 16px; font-weight: 750; letter-spacing: -.01em; color: var(--fcp-ink); }
.fcp-tools .fcp-tool p { margin: 0 0 14px; flex: 1; font-size: 13.5px; line-height: 1.5; color: var(--fcp-muted); min-height: 0; }

.fcp-tool-cta { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--fcp-red); }
.fcp-tool-cta span { transition: transform .18s ease; }
.fcp-tools .fcp-tool:hover .fcp-tool-cta span { transform: translateX(3px); }

/* Desktop <= 3 per row already above via repeat(3,1fr) */
/* Tablet/small: switch to 2-column when too narrow */
@media (max-width: 900px) {
  .fcp-tools .fcp-tool-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Mobile: 2 columns (per requirement) */
@media (max-width: 768px) {
  .fcp-tools { padding: 4px 12px 8px; }
  .fcp-tools-head { margin: 4px 0 18px; }
  .fcp-tools .fcp-tool-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fcp-tools .fcp-tool { padding: 14px 13px 12px; }
  .fcp-tool-top { margin-bottom: 10px; }
  .fcp-tool-ico { width: 36px; height: 36px; border-radius: 10px; }
  .fcp-tool-emoji { font-size: 19px; }
  .fcp-tools .fcp-tool h2 { font-size: 14.5px; }
  .fcp-tools .fcp-tool p { font-size: 12.5px; line-height: 1.4; margin-bottom: 10px; }
  .fcp-tool-cta { font-size: 12.5px; }
}
/* Very narrow phones: keep 2 compact columns */
@media (max-width: 360px) {
  .fcp-tools .fcp-tool-grid { gap: 8px; }
  .fcp-tools .fcp-tool { padding: 12px 11px 10px; }
}
/* Custom uploaded tool icon */
.fcp-tool-ico img.fcp-tool-img { width: 26px; height: 26px; object-fit: contain; }
/* ===== Pricing page ===== */
.fcp-pricing { max-width: 960px; margin: 0 auto; padding: 8px 16px 48px; }
.fcp-billing { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 8px 0 24px; }
.fcp-bill-label { font-size: 13px; color: var(--fcp-muted); font-weight: 600; margin-right: 4px; }
.fcp-bill-btn { border: 1px solid var(--fcp-line); background: #fff; border-radius: 99px; padding: 8px 18px; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--fcp-muted); transition: .15s; }
.fcp-bill-btn em { font-style: normal; font-weight: 600; font-size: 12px; color: var(--fcp-red); }
.fcp-bill-btn.is-active { background: var(--fcp-red); border-color: var(--fcp-red); color: #fff; }
.fcp-bill-btn.is-active em { color: #fff; }
.fcp-price-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; max-width: 960px; margin: 0 auto; }
.fcp-pricing .fcp-tools-head { margin-bottom: 28px; }
.fcp-price-card { position: relative; border: 1px solid var(--fcp-line); border-radius: 16px; padding: 24px 22px; background: #fff; box-shadow: 0 8px 30px rgba(25,35,58,.05); display: flex; flex-direction: column; }
.fcp-price-card::before { content: "Current"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--fcp-red); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 12px; border-radius: 99px; display: none; }
.fcp-price-card.is-current { border-color: var(--fcp-red); box-shadow: 0 10px 34px rgba(196,30,48,.14); }
.fcp-price-card.is-current::before { display: block; }
.fcp-price-card h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.fcp-price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 2px; }
.fcp-price-amt { font-size: 32px; font-weight: 850; letter-spacing: -.02em; color: var(--fcp-ink); }
.fcp-price-per { color: var(--fcp-muted); font-size: 14px; }
.fcp-price-credits { color: var(--fcp-muted); font-size: 13.5px; margin: 0 0 22px; flex: 1; }
.fcp-btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 14px; background: var(--fcp-red); color: #fff; transition: .15s; }
.fcp-btn:hover { box-shadow: 0 8px 20px rgba(196,30,48,.3); transform: translateY(-1px); }
.fcp-btn.is-current { background: #eef1f5; color: var(--fcp-muted); cursor: default; }
.fcp-btn.is-custom { background: #17161d; color: #fff; }
.fcp-price-note { text-align: center; color: var(--fcp-muted); font-size: 13px; margin-top: 22px; }
@media (max-width: 600px){ .fcp-price-grid { grid-template-columns: 1fr; } }
/* ===== Credit badge ===== */
.fcp-credit-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 12px; border-radius: 99px; background: rgba(196,30,48,.08); color: var(--fcp-red); font-size: 13px; font-weight: 700; border: 1px solid rgba(196,30,48,.25); }
@media (max-width: 700px){ .fcp-price-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }

/* ===== Review page (post-generate preview) ===== */
.fcp-review-app { max-width: 1000px; margin: 0 auto; padding: 28px 16px 64px; }
.fcp-review-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.fcp-review-head h1 { margin: 2px 0 6px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; color: var(--fcp-ink); }
.fcp-review-head p { margin: 0; color: var(--fcp-muted); font-size: 15px; }
.fcp-review-head p strong { color: var(--fcp-ink); }
.fcp-review-back { color: var(--fcp-muted); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.fcp-review-back:hover { color: var(--fcp-red); }
.fcp-review-settings { display: grid; grid-template-columns: 1fr 220px; gap: 14px; padding: 18px; border: 1px solid var(--fcp-line); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(25,35,58,.04); margin-bottom: 16px; }
.fcp-review-field { display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 700; color: #475467; }
.fcp-review-field input, .fcp-review-field select { width: 100%; border: 1px solid #d5d9e0; border-radius: 8px; background: #fff; padding: 10px 12px; color: var(--fcp-ink); font: inherit; }
.fcp-review-field input:focus, .fcp-review-field select:focus { outline: 2px solid rgba(229,50,45,.22); border-color: var(--fcp-red); }
.fcp-review-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fcp-review-toolbar-left, .fcp-review-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fcp-review-selectbar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #f9fafb; border: 1px solid var(--fcp-line); border-radius: 10px; margin-bottom: 14px; }
.fcp-review-selectbar[hidden] { display: none; }
.fcp-review-selectbar span { font-size: 13px; font-weight: 750; color: #475467; }
.fcp-review-cards { display: grid; gap: 14px; }
.fcp-edit-card.is-selected { border-color: var(--fcp-red); box-shadow: 0 0 0 2px rgba(229,50,45,.14); }
.fcp-review-empty { text-align: center; padding: 80px 20px; }
.fcp-review-empty h1 { font-size: clamp(26px, 3vw, 34px); margin: 8px 0 10px; color: var(--fcp-ink); }
.fcp-review-empty p { color: var(--fcp-muted); max-width: 460px; margin: 0 auto 22px; }
@media (max-width: 640px){ .fcp-review-settings { grid-template-columns: 1fr; } .fcp-review-head { align-items: flex-start; flex-direction: column; } }

/* ===== Demo banner (shown to guests at the top) ===== */
.fcp-demo-banner-slot { width: 100%; }
.fcp-demo-banner { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; text-align: center; padding: 12px 18px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 14px; font-weight: 600; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(25,35,58,.04); }
.fcp-demo-banner a { color: #b45309; font-weight: 800; text-decoration: underline; }
.fcp-demo-banner a:hover { color: #92400e; }

/* ===== Login / Register popup (gate for guests on dashboard management) ===== */
.fcp-login-overlay { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
.fcp-login-modal { position: relative; width: 100%; max-width: 400px; padding: 40px 34px 32px; border-radius: 22px; background: #fff; text-align: center; box-shadow: 0 24px 70px rgba(16,24,40,.3); border: 1px solid #f0f1f4; }
.fcp-login-icon { width: 60px; height: 60px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 26px; border-radius: 18px; background: linear-gradient(135deg,#e5322d,#f97066); color: #fff; box-shadow: 0 10px 26px rgba(229,50,45,.3); }
.fcp-login-modal .fcp-kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fcp-red); margin-bottom: 8px; }
.fcp-login-modal h2 { margin: 8px 0 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.02em; color: var(--fcp-ink); }
.fcp-login-modal p { margin: 0 0 22px; color: var(--fcp-muted); font-size: 14.5px; line-height: 1.55; }
.fcp-login-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #98a2b3; font-size: 26px; line-height: 1; cursor: pointer; }
.fcp-login-close:hover { color: var(--fcp-red); }
.fcp-login-actions { display: grid; gap: 12px; }
.fcp-login-modal .fcp-login-actions { display: flex; gap: 12px; }
.fcp-login-modal .fcp-login-actions .fcp-btn { flex: 1; width: auto; padding: 12px 16px; }
.fcp-login-btn-secondary { flex: 1; display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--fcp-ink); border: 1px solid #d5d9e0; background: #fff; transition: .15s; }
.fcp-login-btn-secondary:hover { border-color: var(--fcp-red); color: var(--fcp-red); }

.fcp-login-link { color: var(--fcp-muted); font-size: 14px; font-weight: 700; text-decoration: none; }
.fcp-login-link:hover { color: var(--fcp-red); }

/* ===== Dashboard account tab (app-like) ===== */
.fcp-dash-top-actions { display: flex; align-items: center; gap: 10px; }
.fcp-dash-account-btn { appearance: none; border: 1px solid var(--fcp-line); background: #fff; color: var(--fcp-ink); border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.fcp-dash-account-btn:hover { border-color: var(--fcp-red); color: var(--fcp-red); }
.fcp-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.fcp-account-grid .fcp-dash-panel { border-radius: 16px; box-shadow: 0 6px 24px rgba(16,24,40,.06); padding: 20px; }
.fcp-account-grid .fcp-dash-panel:nth-child(3) { grid-column: 1 / -1; }
.fcp-account-profile { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 0 0 16px; border-radius: 14px; background: linear-gradient(135deg,#fff7ed,#fff1f2); border: 1px solid #fee2e2; }
.fcp-account-profile .fcp-dash-deck-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; background: var(--fcp-red); color: #fff; }
.fcp-account-profile strong { font-size: 17px; display: block; }
.fcp-account-profile p { margin: 3px 0; color: var(--fcp-muted); font-size: 13px; }
.fcp-account-form { display: grid; gap: 12px; }
.fcp-account-form p { margin: 3px 0; color: var(--fcp-muted); font-size: 13.5px; line-height: 1.5; }
.fcp-account-field { display: grid; gap: 5px; font-weight: 600; font-size: 13px; color: #475467; }
.fcp-account-field input { width: 100%; border: 1px solid #d5d9e0; border-radius: 10px; background: #fff; padding: 11px 12px; color: var(--fcp-ink); font: inherit; }
.fcp-account-field input:focus { outline: 2px solid rgba(229,50,45,.22); border-color: var(--fcp-red); }
.fcp-account-logout { margin-top: 16px; text-align: right; }
.fcp-account-gate { text-align: center; padding: 26px 30px; }
.fcp-account-gate .fcp-login-actions { max-width: 340px; margin: 0 auto; display: flex; justify-content: center; gap: 10px; }
.fcp-account-gate .fcp-btn { min-width: 150px; padding: 10px 20px; font-size: 14px; }
.fcp-account-grid .fcp-primary, .fcp-account-grid .fcp-btn { width: fit-content; padding: 8px 16px; font-size: 13px; border-radius: 9px; }
.fcp-account-grid .fcp-btn { box-shadow: none; }
.fcp-account-form .fcp-status { margin-top: 6px; font-size: 13px; }
.fcp-account-field input { padding: 9px 11px; }
@media (max-width: 720px){ .fcp-account-grid { grid-template-columns: 1fr; } .fcp-dash-top { flex-direction: column; align-items: flex-start; } }

/* ===== Auth pages (login / register / forgot password) ===== */
.fcp-auth { width: 100%; max-width: 1180px; margin: 0 auto; padding: 48px 20px 72px; box-sizing: border-box; }
.fcp-auth-card { width: 100%; max-width: 430px; margin: 0 auto; padding: 40px 34px 30px; border-radius: 22px; background: #fff; box-shadow: 0 24px 70px rgba(16,24,40,.12); border: 1px solid #f0f1f4; text-align: center; }

.fcp-auth-card h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; color: var(--fcp-ink); }
.fcp-auth-sub { margin: 0 0 24px; color: var(--fcp-muted); font-size: 14.5px; line-height: 1.55; }
.fcp-auth-body { text-align: left; }
.fcp-auth-field { display: grid; gap: 6px; margin-bottom: 14px; font-weight: 700; font-size: 13px; color: #344054; }
.fcp-auth-input { position: relative; display: flex; align-items: center; }
.fcp-auth-input input { width: 100%; border: 1px solid #d5d9e0; border-radius: 12px; background: #f9fafb; padding: 13px 14px; font-size: 15px; color: var(--fcp-ink); font: inherit; transition: .15s; }
.fcp-auth-input input:focus { outline: none; border-color: var(--fcp-red); background: #fff; box-shadow: 0 0 0 3px rgba(229,50,45,.12); }
.fcp-auth-eye { position: absolute; right: 10px; border: 0; background: transparent; color: #98a2b3; font-size: 16px; cursor: pointer; padding: 6px; }
.fcp-auth-eye:hover { color: var(--fcp-red); }
.fcp-auth-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 18px; font-size: 13px; }
.fcp-auth-check { display: flex; align-items: center; gap: 7px; color: #475467; font-weight: 600; }
.fcp-auth-check input { width: 16px; height: 16px; accent-color: var(--fcp-red); }
.fcp-auth-link { color: var(--fcp-red); font-weight: 700; text-decoration: none; }
.fcp-auth-link:hover { text-decoration: underline; }
.fcp-auth-btn { width: 100%; appearance: none; border: 0; border-radius: 12px; padding: 14px; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; background: var(--fcp-red); color: #fff; box-shadow: 0 10px 22px rgba(229,50,45,.25); transition: .15s; }
.fcp-auth-btn:hover { background: var(--fcp-red-dark); transform: translateY(-1px); }
.fcp-auth-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.fcp-auth-alt { margin: 22px 0 0; color: var(--fcp-muted); font-size: 13.5px; }
.fcp-auth-alt a { color: var(--fcp-red); font-weight: 800; text-decoration: none; }
.fcp-auth-alt a:hover { text-decoration: underline; }

/* Nextend Social Login buttons on auth pages */
.fcp-social { width: 100%; max-width: 430px; margin: 0 auto 14px; text-align: center; }
.fcp-social .nsl-container-buttons { text-align: center; }
.fcp-social .nsl-container-buttons a { display: inline-flex; margin-bottom: 8px; }
.fcp-social-or { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; color: var(--fcp-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.fcp-social-or::before, .fcp-social-or::after { content: ""; flex: 1; height: 1px; background: var(--fcp-line); }

/* ============ Dashboard type scale (redesign) ============ */
/* Coherent hierarchy: eyebrow 11 · body/meta 12-13 · title 26 · metric 25 */
.fcp-visibility-badge { font-size: 10px; height: 20px; padding: 0 8px; }
.fcp-dash-kicker, .fcp-dash-panel-head span, .fcp-dash-tools > div > span, .fcp-dash-detail-head span { font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.fcp-dash-top h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; }
.fcp-dash-top p, .fcp-dash-section-head p { font-size: 14px; }
.fcp-dash-tabs button { font-size: 14px; }
.fcp-dash-tabs button span { font-size: 11px; }
.fcp-dash-metrics article > span { font-size: 12px; }
.fcp-dash-metrics strong { font-size: 25px; }
.fcp-dash-metrics small { font-size: 12px; }
.fcp-dash-panel-head h2, .fcp-dash-tools h2, .fcp-dash-section-head h2, .fcp-dash-detail-head h2 { font-size: 16px; }
.fcp-dash-panel-head > button { font-size: 12px; }
.fcp-dash-deck-copy h3 { font-size: 14px; }
.fcp-dash-deck-copy p { font-size: 12px; }
.fcp-dash-expiry { display: inline-block; margin-top: 4px; color: #b54708; font-size: 11px; font-weight: 700; }
.fcp-audio-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-top: 10px; border: 0; border-radius: 999px; background: #fff0f1; color: var(--fcp-red); font-size: 17px; cursor: pointer; box-shadow: 0 2px 8px rgba(16,24,40,.12); }
.fcp-audio-btn:hover { transform: scale(1.08); }
.fcp-study-app.fcp-dark .fcp-audio-btn { background: #1f2a44; color: #f97066; }
.fcp-voc-lang { display: inline-flex; align-items: center; gap: 6px; }
.fcp-voc-lang select { height: 44px; border: 1px solid #d5d9e0; border-radius: 8px; background: #fff; padding: 0 10px; color: var(--fcp-ink); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.fcp-retention-notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fffaeb; border-bottom: 1px solid #fde68a; color: #92400e; }
.fcp-retention-ico { font-size: 20px; line-height: 1.2; }
.fcp-retention-copy { flex: 1; min-width: 0; }
.fcp-retention-copy > strong { display: block; font-size: 13px; color: #78350f; }
.fcp-retention-copy p { margin: 3px 0 0; font-size: 12px; color: #92400e; line-height: 1.5; }
.fcp-retention-copy a { color: #b45309; font-weight: 700; }
.fcp-retention-close { appearance: none; border: 0; background: transparent; color: #b45309; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px; }
.fcp-dash-menu > button, .fcp-open-study { font-size: 12px; }
.fcp-dash-popover button { font-size: 12px; }
.fcp-dash-job strong { font-size: 13px; }
.fcp-dash-job p { font-size: 12px; }
.fcp-dash-job time { font-size: 12px; }
.fcp-dash-tool-links a { font-size: 12px; }
.fcp-dash-tool-links b { font-size: 11px; }
.fcp-dash-history-head { font-size: 11px; }
.fcp-dash-history-list .fcp-status-dot { font-size: 11px; }
.fcp-dash-empty strong { font-size: 14px; }
.fcp-dash-empty span { font-size: 12px; }
.fcp-dash-detail-head p { font-size: 12px; }
.fcp-dash-card-grid strong { font-size: 13px; }
.fcp-dash-card-grid p { font-size: 12px; }
.fcp-dash-edit-title { font-size: 12px; }
.fcp-dash-edit-card label { font-size: 12px; }
.fcp-dash-edit-card textarea { font-size: 13px; }
.fcp-dash-section-row input { font-size: 13px; }
.fcp-dash-account-btn { font-size: 13px; }
.fcp-dash-loading-screen p, .fcp-dash-loading { font-size: 13px; }
@media (max-width: 700px){
  .fcp-dash-top h1 { font-size: 22px; }
  .fcp-dash-create::after { font-size: 12px; }
  .fcp-dash-metrics strong { font-size: 22px; }
}
/* === Text/Vocab tool page prominence (recolor so they stand out like the 4 file tools) === */
.fcp-shell:has(.fcp-text-stage) .fcp-tool-hero h1 {
  background: linear-gradient(120deg, #b42318 0%, #e5322d 55%, #f06a45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fcp-text-stage {
  background: linear-gradient(180deg, #fff1f0 0%, #fffafa 55%, #ffffff 100%);
  border: 1px solid #f4d3d1;
  box-shadow: 0 14px 34px rgba(229, 50, 45, .09);
}
.fcp-text-stage .fcp-field label { color: #b42318; font-weight: 800; }
.fcp-text-stage .fcp-field textarea {
  border: 1.5px solid #efc9c7;
  background: #fff;
}
.fcp-text-stage .fcp-field textarea:focus {
  border-color: var(--fcp-red);
  box-shadow: 0 0 0 4px rgba(229, 50, 45, .13);
}
.fcp-input-guide {
  background: #ffeceb;
  border: 1px solid #f7d3d1;
  color: #7a2420;
}
.fcp-input-guide strong { color: #c9231f; }
.fcp-shell:has(.fcp-text-stage) .fcp-file-actions {
  background: #fff6f5;
  border: 1px solid #f4d3d1;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(229, 50, 45, .07);
}
.fcp-shell:has(.fcp-text-stage) .fcp-file-actions .fcp-primary {
  box-shadow: 0 10px 22px rgba(229, 50, 45, .3);
}
/* === Vocabulary tool: unified app-like card === */
.fcp-voc-card {
  width: 100%;
  max-width: none;
  margin: 16px 0 0;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  overflow: hidden;
}
.fcp-voc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  padding: 18px;
}
.fcp-voc-main { min-width: 0; display: flex; flex-direction: column; }
.fcp-voc-main .fcp-field { flex: 1; display: flex; flex-direction: column; margin: 0; }
.fcp-voc-main label { margin-bottom: 6px; color: #b42318; font-size: 13px; font-weight: 800; }
.fcp-voc-main textarea {
  flex: 1;
  width: 100%;
  min-height: 160px;
  border: 1.5px solid #e2e6eb;
  border-radius: 8px;
  background: #fff;
  color: var(--fcp-ink);
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.fcp-voc-main textarea:focus { border-color: var(--fcp-red); box-shadow: 0 0 0 4px rgba(229, 50, 45, .1); }
.fcp-voc-side { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.fcp-voc-side-title { font-size: 13px; font-weight: 800; color: #b42318; }
.fcp-voc-dropzone {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 112px;
  padding: 12px;
  border: 1.5px dashed #e2c9c7;
  border-radius: 8px;
  background: #fafbfc;
  color: #7a2420;
  text-align: center;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.fcp-voc-dropzone:hover,
.fcp-voc-dropzone.is-dragging { background: #fff1f0; border-color: var(--fcp-red); }
.fcp-voc-dropzone.has-file { background: #fff6f5; border-color: #e5322d; }
.fcp-voc-dropzone input { display: none; }
.fcp-voc-file-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 6px;
  background: var(--fcp-red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(229, 50, 45, .25);
}
.fcp-voc-dropzone small { margin-top: 8px; font-size: 11px; color: #7a2420; }
.fcp-voc-dropzone em { min-height: 0; margin-top: 6px; font-size: 12px; font-style: normal; font-weight: 700; color: #b42318; }
.fcp-voc-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 18px;
  border-top: 1px solid #eef0f3;
  background: #fafbfc;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.5;
}
.fcp-voc-hint code { padding: 1px 5px; border-radius: 4px; background: #fff; border: 1px solid #e6e9ee; color: #1f2937; font-size: 12px; }
.fcp-voc-card .fcp-file-actions {
  margin: 0;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid #eef0f3;
  border-radius: 0;
  background: #fafbfc;
  box-shadow: none;
}
.fcp-shell:has(.fcp-voc-card) .fcp-tool-hero h1 {
  background: linear-gradient(120deg, #b42318 0%, #e5322d 55%, #f06a45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 760px){
  .fcp-voc-body { grid-template-columns: 1fr; }
}
/* === Text tool: unified app-like card (mirrors vocab) === */
.fcp-text-card {
  width: 100%;
  max-width: none;
  margin: 16px 0 0;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  overflow: hidden;
}
.fcp-text-body { padding: 18px 18px 14px; }
.fcp-text-body .fcp-field { margin: 0; }
.fcp-text-body label { margin-bottom: 6px; color: #b42318; font-size: 13px; font-weight: 800; }
.fcp-text-body textarea {
  width: 100%;
  min-height: 180px;
  border: 1.5px solid #e2e6eb;
  border-radius: 8px;
  background: #fff;
  color: var(--fcp-ink);
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  transition: border-color .2s, box-shadow .2s;
}
.fcp-text-body textarea:focus { border-color: var(--fcp-red); box-shadow: 0 0 0 4px rgba(229, 50, 45, .1); }
.fcp-text-body .fcp-text-examples { margin-top: 12px; }
.fcp-text-hint {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 10px 18px;
  border-top: 1px solid #eef0f3;
  background: #fafbfc;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.5;
}
.fcp-text-hint code { padding: 1px 5px; border-radius: 4px; background: #fff; border: 1px solid #e6e9ee; color: #1f2937; font-size: 12px; }
.fcp-text-card .fcp-file-actions {
  margin: 0;
  max-width: none;
  padding: 14px 18px;
  border: 0;
  border-top: 1px solid #eef0f3;
  border-radius: 0;
  background: #fafbfc;
  box-shadow: none;
}
.fcp-shell:has(.fcp-text-card) .fcp-tool-hero h1 {
  background: linear-gradient(120deg, #b42318 0%, #e5322d 55%, #f06a45 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 760px){
  .fcp-text-body { padding: 14px 14px 10px; }
}

/* Center-screen modal (FCP_UI) */
.fcp-modal-overlay { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(16, 24, 40, .45); backdrop-filter: blur(2px); }
.fcp-modal { width: min(92vw, 400px); background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(16, 24, 40, .25); padding: 22px 22px 18px; animation: fcpModalIn .16s ease; }
@keyframes fcpModalIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.fcp-modal-title { color: #101828; font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.fcp-modal-msg { color: #475467; font-size: 14px; line-height: 1.55; }
.fcp-modal-input { display: block; width: 100%; height: 40px; margin-top: 12px; border: 1px solid #d0d5dd; border-radius: 8px; padding: 0 11px; font: inherit; font-size: 13px; box-sizing: border-box; }
.fcp-modal-input:focus { outline: none; border-color: var(--fcp-red); box-shadow: 0 0 0 3px rgba(229, 50, 45, .1); }
.fcp-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.fcp-modal-btn { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.fcp-modal-btn.secondary { background: #fff; border-color: #d0d5dd; color: #344054; }
.fcp-modal-btn.primary { background: var(--fcp-red); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.fcp-modal-btn.danger { background: #b42318; color: #fff; }
/* Generate button loading spinner + small progress bar (v0.9.45) */
.fcp-primary .fcp-btn-spinner { display: none; width: 13px; height: 13px; margin-right: 8px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: fcpSpin .7s linear infinite; vertical-align: -2px; }
.fcp-primary.is-busy .fcp-btn-spinner { display: inline-block; }
.fcp-primary.is-busy b { display: none; }
@keyframes fcpSpin { to { transform: rotate(360deg); } }
.fcp-title-wrap { position: relative; }
.fcp-title-pct { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 800; color: var(--fcp-red); display: none; pointer-events: none; z-index: 2; font-variant-numeric: tabular-nums; }
.fcp-title-wrap.is-progressing .fcp-title-pct { display: block; }
.fcp-title-wrap.is-progressing input { padding-right: 46px; }
.fcp-dash-credits { max-width: 720px; }
.fcp-credits-body { padding: 18px; }
.fcp-credits-body p { margin: 0 0 14px; color: #475467; font-size: 14px; line-height: 1.6; }
.fcp-credits-body .fcp-btn { margin-top: 4px; }
.fcp-credits-table { width: 100%; border-collapse: collapse; margin: 4px 0 18px; }
.fcp-credits-table th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #667085; background: #f9fafb; border-bottom: 1px solid #e4e7ec; }
.fcp-credits-table td { padding: 12px; border-bottom: 1px solid #eef0f3; color: #344054; font-size: 14px; }
.fcp-credits-table .fcp-credits-num strong { font-size: 16px; color: var(--fcp-red); }
.fcp-credits-table tr:last-child td { border-bottom: 0; }
.fcp-dash-credits { max-width: 720px; }
.fcp-credits-body { padding: 18px; }
.fcp-credits-body p { margin: 0 0 14px; color: #475467; font-size: 14px; line-height: 1.6; }
.fcp-credits-body .fcp-btn { margin-top: 4px; }
.fcp-credits-table { width: 100%; border-collapse: collapse; margin: 4px 0 18px; }
.fcp-credits-table th { text-align: left; padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #667085; background: #f9fafb; border-bottom: 1px solid #e4e7ec; }
.fcp-credits-table td { padding: 12px; border-bottom: 1px solid #eef0f3; color: #344054; font-size: 14px; }
.fcp-credits-table .fcp-credits-num strong { font-size: 16px; color: var(--fcp-red); }
.fcp-credits-table tr:last-child td { border-bottom: 0; }

.fcp-payments { margin-top: 18px; border-top: 1px solid #eaecf0; padding-top: 14px; }
.fcp-payments h3 { margin: 0 0 10px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #98a2b3; }
.fcp-payment-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f2f4f7; }
.fcp-payment-row:last-child { border-bottom: 0; }
.fcp-payment-info { flex: 1; min-width: 0; }
.fcp-payment-info strong { display: block; font-size: 13px; color: #101828; }
.fcp-payment-info p { margin: 2px 0 0; font-size: 12px; color: #667085; }
.fcp-payment-total { font-weight: 700; font-size: 13px; color: #344054; white-space: nowrap; }
.fcp-invoice-link { padding: 6px 12px; border: 1px solid #d0d5dd; border-radius: 8px; color: #e5322d; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.fcp-invoice-link:hover { background: #fff1f0; border-color: #fda29b; }
.fcp-payments-empty { margin: 8px 0 0; font-size: 13px; color: #98a2b3; }

.fcp-btn-danger { display: inline-block; padding: 10px 16px; border: 1px solid #fda29b; border-radius: 10px; background: #fff1f0; color: #b42318; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fcp-btn-danger:hover { background: #fecdd4; }
.fcp-btn-danger:disabled { opacity: .6; cursor: not-allowed; }
