/* Recallr — memo.cards-style clean UI: soft gradients, rounded, friendly */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --ink: #0f172a;
  --ink-2: #475569;
  --ink-3: #94a3b8;
  --line: #e2e8f0;
  --brand: #6d5ef3;
  --brand-2: #8b7cf8;
  --brand-soft: #efedfe;
  --accent: #ec4899;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow: 0 4px 20px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.14);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang HK",
          "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 600; border-radius: 999px;
  padding: 11px 22px; transition: transform .12s, box-shadow .12s, background .12s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 4px 14px rgba(109,94,243,.35); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(109,94,243,.45); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: #e3defc; text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; text-decoration: none; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.3px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 3px 8px rgba(109,94,243,.35); }
.topbar .nav { display: flex; gap: 6px; margin-left: 8px; }
.topbar .nav a { color: var(--ink-2); font-size: 14.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; }
.topbar .nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.topbar .spacer { flex: 1; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: #fff; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink-3); cursor: pointer; font-family: inherit; }
.lang-switch button.on { background: var(--brand); color: #fff; }
.points-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand);
  font-weight: 700; font-size: 13.5px; padding: 6px 14px; border-radius: 999px; }
.points-pill b { font-size: 15px; }

/* ---------- hero (landing) ---------- */
.hero { padding: 84px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(109,94,243,.14), transparent 60%),
    radial-gradient(700px 340px at 85% 10%, rgba(236,72,153,.12), transparent 60%),
    radial-gradient(500px 300px at 50% 100%, rgba(20,184,166,.10), transparent 60%); }
.hero .eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 700;
  padding: 6px 16px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.12; letter-spacing: -1.2px; font-weight: 800; max-width: 820px; margin: 0 auto 20px; }
.hero h1 .grad { background: linear-gradient(120deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { font-size: 18px; color: var(--ink-2); max-width: 620px; margin: 0 auto 34px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .mini { margin-top: 22px; font-size: 13.5px; color: var(--ink-3); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-title { text-align: center; font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; letter-spacing: -.6px; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--ink-2); font-size: 16px; max-width: 560px; margin: 0 auto 44px; }

/* feature cards */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 15px; }
.f1 .ico { background: #ede9fe; } .f2 .ico { background: #fce7f3; } .f3 .ico { background: #ccfbf1; }
.f4 .ico { background: #fef3c7; } .f5 .ico { background: #dbeafe; }
.feature h3 { font-size: 17px; margin-bottom: 7px; letter-spacing: -.2px; }
.feature p { color: var(--ink-2); font-size: 14px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 18px; right: 20px;
  font-size: 44px; font-weight: 800; color: var(--brand-soft); }
.step .s-ico { font-size: 26px; margin-bottom: 12px; }
.step h3 { font-size: 16.5px; margin-bottom: 7px; }
.step p { color: var(--ink-2); font-size: 14px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; max-width: 880px; margin: 0 auto; }
.plan { background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; transition: border .15s, box-shadow .15s; }
.plan:hover { box-shadow: var(--shadow); }
.plan.hot { border-color: var(--brand); box-shadow: 0 8px 30px rgba(109,94,243,.16); }
.plan .p-name { font-weight: 800; font-size: 17px; }
.plan .p-badge { align-self: flex-start; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .p-price { font-size: 38px; font-weight: 800; letter-spacing: -1px; }
.plan .p-price small { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.plan .p-points { color: var(--ink-2); font-size: 14.5px; }
.plan ul { list-style: none; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.plan ul li { font-size: 13.5px; color: var(--ink-2); display: flex; gap: 8px; }
.plan .btn { margin-top: auto; }
.footnote { text-align: center; color: var(--ink-3); font-size: 12.5px; margin-top: 20px; }

/* ---------- auth card ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px;
  background:
    radial-gradient(600px 280px at 10% 0%, rgba(109,94,243,.14), transparent 60%),
    radial-gradient(600px 280px at 90% 100%, rgba(236,72,153,.10), transparent 60%), var(--bg-soft); }
.auth-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; padding: 36px 32px; }
.auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.4px; }
.auth-card .auth-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); transition: border .12s, box-shadow .12s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(109,94,243,.15); }
.field textarea { resize: vertical; min-height: 90px; }
.auth-alt { text-align: center; font-size: 14px; margin-top: 16px; color: var(--ink-2); }
.err-msg { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px; display: none; }

/* ---------- app shell ---------- */
.app-main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.5px; }
.page-head .crumb { color: var(--ink-3); font-size: 13.5px; margin-bottom: 4px; }
.page-head .crumb a { color: var(--ink-3); }
.page-head .crumb a:hover { color: var(--brand); }

/* ---------- cards grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.src-card { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer;
  transition: transform .14s, box-shadow .14s, border-color .14s; display: flex; flex-direction: column; gap: 10px; }
.src-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-2); }
.src-card .s-ico { font-size: 24px; }
.src-card h3 { font-size: 16px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.src-card .s-meta { color: var(--ink-3); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.src-card .s-kinds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.kind-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); border: 1px solid var(--line); }
.kind-chip.done { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.kind-chip.wait { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.src-card .tools-row { margin-top: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.tool-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.tt-chat { background: #ede9fe; color: #6d28d9; } .tt-card { background: #fce7f3; color: #be185d; }
.tt-map { background: #ccfbf1; color: #0f766e; } .tt-test { background: #fef3c7; color: #b45309; }
.tt-sum { background: #dbeafe; color: #1d4ed8; }
.empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--ink-3); }
.empty .e-ico { font-size: 46px; margin-bottom: 14px; }
.empty p { font-size: 15px; }

/* ---------- upload / new source ---------- */
.new-source { background: #fff; border: 2px dashed var(--line); border-radius: var(--radius); padding: 26px; margin-bottom: 26px; transition: border .15s; }
.new-source:hover { border-color: var(--brand-2); }
.tabs-mini { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tab-mini { border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-family: inherit; font-size: 13.5px; font-weight: 600;
  padding: 8px 18px; border-radius: 999px; cursor: pointer; transition: all .12s; }
.tab-mini.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.dropzone { border: 2px dashed var(--brand-2); border-radius: var(--radius-sm); background: var(--brand-soft); padding: 26px;
  text-align: center; color: var(--brand); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .12s; }
.dropzone:hover { background: #e6e1fb; }
.dropzone small { display: block; font-weight: 500; color: var(--ink-3); margin-top: 4px; }

/* ---------- tabs (workspace) ---------- */
.ws-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.ws-tab { border: 0; background: none; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink-3);
  padding: 12px 18px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.ws-tab:hover { color: var(--ink); }
.ws-tab.on { color: var(--brand); border-bottom-color: var(--brand); }

/* ---------- summary panel ---------- */
.panel { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h3 { font-size: 16px; margin-bottom: 12px; }
.sum-overview { font-size: 15.5px; color: var(--ink); line-height: 1.75; }
.sum-block { margin-top: 22px; }
.sum-block h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 10px; }
.sum-block ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sum-block li { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; padding: 5px 13px; border-radius: 999px; }

/* ---------- flashcards ---------- */
.deck-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }
.card-stage { max-width: 560px; margin: 10px auto 0; perspective: 1200px; }
.flashcard { background: #fff; border: 1.5px solid var(--line); border-radius: 20px; min-height: 250px; display: flex; align-items: center;
  justify-content: center; padding: 36px; cursor: pointer; box-shadow: var(--shadow-sm); text-align: center; user-select: none;
  transition: transform .16s, box-shadow .16s; font-size: 18px; line-height: 1.7; }
.flashcard:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.flashcard .side-label { position: absolute; top: 16px; left: 20px; font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: 1px; }
.card-count { color: var(--ink-3); font-size: 13px; text-align: center; margin-top: 12px; }
.rate-row { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.rate-row .btn { flex: 1; max-width: 130px; justify-content: center; }
.rate-good { background: var(--green); } .rate-again { background: var(--red); } .rate-easy { background: var(--brand); }
.rate-good:hover, .rate-again:hover, .rate-easy:hover { filter: brightness(1.05); text-decoration: none; }
.card-list { margin-top: 30px; display: flex; flex-direction: column; gap: 10px; }
.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.card-row .b { color: var(--ink-2); }
.card-row .b b { display: block; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }

/* ---------- chat ---------- */
.chat-box { display: flex; flex-direction: column; height: 560px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); overflow: hidden; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 78%; padding: 12px 17px; border-radius: 16px; font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.ai .cite-srcs { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.msg.ai .cite-srcs summary { font-size: 12px; color: var(--brand); cursor: pointer; font-weight: 600; }
.msg.ai .cite-srcs details p { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.chat-input { display: flex; gap: 10px; padding: 14px; background: #fff; border-top: 1.5px solid var(--line); }
.chat-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 12px 18px; font-size: 14.5px; font-family: inherit; }
.chat-input input:focus { outline: none; border-color: var(--brand); }
.chat-hint { color: var(--ink-3); font-size: 13px; padding: 18px; text-align: center; margin: auto; }
.chat-hint .c-ico { font-size: 40px; margin-bottom: 10px; }

/* ---------- mindmap ---------- */
.map-wrap { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: 640px; padding: 30px; }
.map-tree { text-align: center; }
.map-node { display: inline-block; background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 7px 15px; font-size: 13.5px; font-weight: 600; margin: 5px; position: relative; }
.map-root { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; font-size: 16px; padding: 10px 20px; }
.map-children { display: flex; flex-wrap: wrap; justify-content: center; max-width: 900px; margin: 0 auto; }
.map-branch { flex: 1 1 200px; max-width: 260px; padding: 8px; }
.map-branch .map-node { width: 100%; }
.map-branch-lv2 { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 4px; }
.map-lv2-node { background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12px; margin: 3px; }

/* ---------- test ---------- */
.quiz-q { background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.quiz-q .q-text { font-size: 16px; font-weight: 600; margin-bottom: 16px; line-height: 1.6; }
.quiz-q .q-num { color: var(--ink-3); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.opt { display: flex; align-items: flex-start; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px;
  margin-bottom: 9px; cursor: pointer; font-size: 14.5px; transition: border .12s, background .12s; }
.opt:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.opt .k { width: 26px; height: 26px; min-width: 26px; border-radius: 50%; background: var(--bg-soft); border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); }
.opt.sel .k { background: var(--brand); color: #fff; border-color: var(--brand); }
.opt.correct { border-color: var(--green); background: #f0fdf4; }
.opt.correct .k { background: var(--green); color: #fff; border-color: var(--green); }
.opt.wrong { border-color: var(--red); background: #fef2f2; }
.opt.wrong .k { background: var(--red); color: #fff; border-color: var(--red); }
.opt:disabled { cursor: default; }
.q-explain { display: none; font-size: 13.5px; color: var(--ink-2); background: var(--bg-soft); border-radius: 10px; padding: 10px 14px; margin-top: 6px; }
.quiz-score { text-align: center; padding: 30px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; }
.quiz-score .big { font-size: 52px; font-weight: 800; background: linear-gradient(120deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- generic ---------- */
.gen-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.gen-bar .left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cost-note { font-size: 12.5px; color: var(--ink-3); }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-bar { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 14px; padding: 18px; background: var(--brand-soft);
  border-radius: 12px; margin-bottom: 20px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* ---------- toast ---------- */
#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--ink); color: #fff;
  padding: 13px 24px; border-radius: 999px; font-size: 14px; font-weight: 600; z-index: 200; transition: transform .25s; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; max-width: 90vw; text-align: center; }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.err { background: var(--red); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); z-index: 150;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 20px; max-width: 460px; width: 100%; padding: 30px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; }
.modal h3 { font-size: 20px; margin-bottom: 6px; }
.modal .m-sub { color: var(--ink-2); font-size: 14px; margin-bottom: 20px; }
#stripe-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; margin-top: 40px; }
.footer-in { max-width: 1180px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--ink-3); font-size: 13px; }

@media (max-width: 640px) {
  .hero { padding: 56px 0 40px; }
  .topbar .nav { display: none; }
  .card-row { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
}
