.studyeng-wrap { max-width: 960px; margin: 0 auto; }
.studyeng-nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 20px; padding: 12px 0; border-bottom: 2px solid #1a5f4a; }
.studyeng-nav a { color: #1a5f4a; font-weight: 600; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
.studyeng-nav a.active, .studyeng-nav a:hover { background: #1a5f4a; color: #fff; }
.studyeng-wallet { margin-left: auto; font-size: 14px; color: #333; }
.studyeng-panel { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.studyeng-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.studyeng-stats .stat { background: linear-gradient(135deg, #e8f5f0, #f7faf8); border-radius: 10px; padding: 14px; text-align: center; }
.studyeng-stats .stat span { display: block; font-size: 12px; color: #666; }
.studyeng-stats .stat strong { font-size: 22px; color: #1a5f4a; }
.btn-eng { background: #1a5f4a; color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; margin: 4px; }
.btn-eng.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-eng:hover { background: #144836; }
.studyeng-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.studyeng-table th, .studyeng-table td { border: 1px solid #e0e0e0; padding: 8px; text-align: left; font-size: 14px; }
.studyeng-table tr.ok { background: #eefaf2; }
.studyeng-table tr.bad { background: #fff0f0; }
.studyeng-actions { margin: 16px 0; }
.studyeng-hint { color: #b45309; background: #fffbeb; padding: 10px; border-radius: 8px; }
.studyeng-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.product-card { border: 1px solid #e5e5e5; border-radius: 10px; padding: 14px; }
.quiz-item { border: 1px solid #e8e8e8; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.quiz-item-head { font-weight: 600; margin-bottom: 8px; color: #1a5f4a; }
.prompt-zh { font-size: 20px; margin: 8px 0; }
.prompt-blank { font-family: Georgia, serif; font-size: 18px; letter-spacing: .02em; }
.studyeng-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.studyeng-modal-body { background: #fff; border-radius: 12px; padding: 24px; width: min(420px, 92vw); }
.studyeng-tabs { margin-bottom: 12px; }
.tab-btn { border: 1px solid #1a5f4a; background: #fff; color: #1a5f4a; padding: 6px 12px; border-radius: 6px; margin-right: 6px; cursor: pointer; }
.tab-btn.active { background: #1a5f4a; color: #fff; }
.studyeng-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.learn-table { min-width: 720px; }
.learn-table .learn-speak { margin-top: 6px; }
.learn-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: #1a5f4a; cursor: pointer; white-space: nowrap; }
.learn-sort.is-active { text-decoration: underline; }
.learn-sort-icon { margin-left: 2px; }
.studyeng-collapse > summary { cursor: pointer; font-weight: 600; color: #1a5f4a; margin: 16px 0 8px; }
.studyeng-logout { color: #a33b2d !important; }
.studyeng-logout:hover { background: #a33b2d !important; color: #fff !important; }

/* 首頁學生登入 */
.eng-login-page { margin: 0; min-height: 100vh; font-family: "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif; color: #1c2b24; background: radial-gradient(circle at top left, rgba(31,111,84,.12), transparent 40%), linear-gradient(180deg, #f7faf8 0%, #f3f6f4 100%); }
.eng-login-page *, .eng-login-page *::before, .eng-login-page *::after { box-sizing: border-box; }
.eng-login-shell { max-width: 920px; margin: 0 auto; padding: 20px 16px 48px; }
.eng-login-brand { margin-bottom: 20px; }
.eng-login-brand h1 { margin: 0 0 4px; font-size: 1.6rem; letter-spacing: .02em; }
.eng-login-brand p { margin: 0; color: #5f7268; }
.eng-login-panel { max-width: 420px; margin: 0 auto; background: #fff; border: 1px solid #cfdad3; border-radius: 14px; box-shadow: 0 10px 30px rgba(28,43,36,.08); padding: 18px; }
.eng-login-panel h2 { margin: 0 0 12px; font-size: 1.15rem; }
.eng-login-form label { display: block; margin: 12px 0 6px; color: #5f7268; font-size: .92rem; }
.eng-login-input { width: 100%; border: 1px solid #cfdad3; border-radius: 10px; padding: 10px 12px; font: inherit; }
.eng-login-input:focus { outline: 2px solid rgba(31,111,84,.35); border-color: #1f6f54; }
.eng-login-error { margin: 12px 0 0; background: #fdecea; color: #a33b2d; border: 1px solid #f3c1ba; border-radius: 10px; padding: 10px 12px; }
.eng-login-btn { display: block; width: 100%; margin-top: 18px; border: 1px solid #1f6f54; background: #1f6f54; color: #fff; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 1.05rem; cursor: pointer; transition: .15s ease; }
.eng-login-btn:hover { background: #185a44; }
.eng-login-btn:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 640px) {
	.studyeng-stats { grid-template-columns: repeat(2, 1fr); }
	.studyeng-wallet { margin-left: 0; width: 100%; }
}
