
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
body { font-family: system-ui, -apple-system, "Noto Sans TC", sans-serif; background: #f6f8fa; color: #1f2328; padding-bottom: 32px; line-height: 1.55; }
.demo-banner { background: #fff8c5; border-bottom: 2px solid #d4a72c; color: #4d2d00; text-align: center; padding: 10px 16px; font-weight: 700; font-size: 0.95rem; }
.site-header { background: #ffffff; border-bottom: 1px solid #d0d7de; width: 100%; }
.site-header-inner { max-width: 960px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-name { font-weight: 700; font-size: 1rem; color: #1f2328; }
.subject-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.84rem; font-weight: 700; }
.subject-badge-math { background: #ddf4ff; color: #0969da; border: 1px solid #54aeff; }
.subject-badge-physics { background: #fbefff; color: #8250df; border: 1px solid #d2a8ff; }
.tier-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; background: #eaeef2; color: #57606a; font-weight: 600; }
.tier-note { font-size: 0.8rem; color: #9a6700; font-weight: 600; }
.subject-switcher { display: inline-flex; align-items: center; gap: 6px; background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 8px; padding: 4px 8px; }
.subject-tab { text-decoration: none; color: #1f2328; font-weight: 600; padding: 5px 12px; border-radius: 6px; font-size: 0.92rem; white-space: nowrap; }
.subject-tab:hover { background: #eaeef2; }
.subject-tab.active { background: #0969da; color: #ffffff; }
.subject-sep { color: #8c959f; font-weight: 600; user-select: none; }
main { max-width: 760px; margin: 24px auto; background: #fff; border: 1px solid #d0d7de; border-radius: 10px; padding: 24px; }
.entry-subject-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; }
.entry-subject-desc { font-size: 0.9rem; color: #57606a; margin-top: 4px; }
h1 { margin-top: 0; margin-bottom: 14px; font-size: 1.45rem; line-height: 1.3; }
h2 { font-size: 1.12rem; margin-top: 22px; margin-bottom: 10px; }
label { display: block; margin: 14px 0 6px; font-weight: 600; }
input[type="text"], input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid #afb8c1; border-radius: 6px; font-size: 1rem; }
.checkbox-row { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0; }
.checkbox-row label { margin: 0; font-weight: 400; line-height: 1.5; }
button { background: #1f883d; color: #fff; border: 0; padding: 10px 16px; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; }
button.secondary { background: #6e7781; }
.error { background: #ffebe9; border: 1px solid #ff8182; color: #cf222e; padding: 12px; border-radius: 6px; margin-bottom: 16px; }
.info { background: #ddf4ff; border: 1px solid #54aeff; color: #0969da; padding: 12px; border-radius: 6px; margin-bottom: 16px; }
.warn { background: #fff8c5; border: 1px solid #d4a72c; color: #4d2d00; padding: 12px; border-radius: 6px; margin-bottom: 16px; }
.cred-box { background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; padding: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.7; margin-bottom: 16px; overflow-wrap: anywhere; }
.sample-list { list-style: none; padding: 0; margin: 12px 0; }
.sample-list li { border: 1px solid #d0d7de; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; background: #fbfcfd; }
.meta { font-size: 0.9rem; color: #57606a; margin-top: 3px; }
.nav { margin-top: 18px; font-size: 0.92rem; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.terms-list li { margin-bottom: 10px; line-height: 1.6; }
.wait-box { border: 1px solid #54aeff; background: #f0f8ff; border-radius: 8px; padding: 18px; margin: 14px 0; }
.wait-status { font-weight: 700; color: #0969da; margin-bottom: 8px; }
a { color: #0969da; }
:root { --mqb-line-green: #06C755; --mqb-line-green-hover: #05B04C; }
.demo-extras { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.trial-cta { position: relative; display: inline-block; }
.trial-cta > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 30px; padding: 4px 12px; border-radius: 6px; border: 1px solid #0969da; background: #fff; color: #0969da; font-weight: 700; font-size: 13px; white-space: nowrap; user-select: none; }
.trial-cta > summary::-webkit-details-marker { display: none; }
.trial-cta[open] > summary { background: #0969da; color: #fff; }
.trial-cta-pop { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(320px, calc(100vw - 24px)); background: #fff; color: #1f2328; border: 1px solid #d0d7de; border-radius: 8px; padding: 12px 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2); font-size: 14px; line-height: 1.6; text-align: left; z-index: 5; }
.trial-cta-pop p { margin: 0 0 10px; }
.line-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 16px; border-radius: 999px; background: var(--mqb-line-green, #06C755); color: #fff !important; font-weight: 700; text-decoration: none !important; white-space: nowrap; }
.line-btn:hover { background: var(--mqb-line-green-hover, #05B04C); }
.demo-footer-note { font-size: 12px; color: #57606a; white-space: nowrap; }
.usage-note { white-space: normal; }

body > .site-header .trial-cta-pop { top: calc(100% + 8px); bottom: auto; }
form[data-auto-enter] { margin-top: 12px; }
@media (max-width: 600px) {
  .site-header-inner { padding: 10px 14px; gap: 8px; }
  main { margin: 12px; padding: 16px; border-radius: 8px; }
  h1 { font-size: 1.25rem; }
  .entry-subject-bar { padding: 10px 12px; }
  .subject-tab { padding: 5px 10px; font-size: 0.88rem; }
  button { width: 100%; }
  .nav { flex-direction: column; align-items: flex-start; gap: 8px; }
}
