/* 客語教程章節頁（tutorial_view.php）適配樣式
 *
 * 章節正文原本靠老站 public.css 的基礎 reset 與外層佈局撐著，新版式不引入老站樣式，
 * 這裡只補正文跑起來所缺的那幾塊：列表 reset、正文寬度、操作按鈕位置、窄屏不撐破。
 * 正文本身的排版（.grammar_box / .grammar_group…）仍由 css/textbook_content.css 負責。
 */

.tut-wrap { position: relative; padding: 4px 0 40px; }
.tut-wrap ul, .tut-wrap ol, .tut-wrap li { list-style: none; margin: 0; padding: 0; }
.tut-wrap a { text-decoration: none; }
.tut-wrap img { max-width: 100%; height: auto; }

/* 正文容器：老樣式 .main 寫死 660px，這裡放寬到 700 並自適應 */
.tut-wrap .content { padding-bottom: 40px; }
.tut-wrap .main { width: auto; max-width: 700px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }

/* 操作按鈕（目錄 / 上一課 / 下一課 / 分享）：老樣式絕對定位在頁面右側，靠老頁頭的高度撐開，
   新版式沒有老頁頭，改成正文上方的一排按鈕 */
.tut-wrap .operation_btn {
	position: static;
	max-width: 700px;
	margin: 0 auto 4px;
	padding: 0 16px;
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}
.tut-wrap .operation_btn li a { margin-bottom: 0; }

/* 表格：寬表格自己橫向滾，不要撐破正文 */
.tut-wrap .grammar_table { overflow-x: auto; }
.tut-wrap .grammar_table table { max-width: 100%; }

/* 拼音/音標行與說明文字：老樣式 15px 太小、說明還是淺灰，閱讀吃力，加大加深 */
.tut-wrap .grammar_group_name { font-size: 19px; font-style: italic; color: #333; }
.tut-wrap .grammar_content { margin-top: 10px; color: #444; font-size: 17px; }
.tut-wrap .grammar_content p { line-height: 1.9; margin-top: 11px; }

/* 對話體/短文裏的注音（ruby rt，老樣式寫死 12px）：加大到 15px，字色加深 */
.tut-wrap rt { font-size: 16px; color: #444; }
.tut-wrap .talk_group ruby rt,
.tut-wrap .article_box p ruby rt,
.tut-wrap .talk_box table td ruby rt { font-size: 16px; color: #444; }
/* 聲調數字是 <sup>，瀏覽器默認只給 75%，再放大一檔 */
.tut-wrap rt sup { font-size: 82%; }

/* 對話正文與短文正文：同樣加大加深（老樣式 15px 淺灰） */
.tut-wrap .talk_group, .tut-wrap .article_box { color: #444; font-size: 17px; }
.tut-wrap .talk_group h2 { color: #333; }

/* 封面目錄頁（index.htm）用 course.css，.cata 寫死 680px */
.tut-wrap .cata { max-width: 680px; margin-left: auto; margin-right: auto; box-sizing: border-box; }
.tut-wrap .cate_list li { box-sizing: border-box; }

@media (max-width: 780px) {
	.tut-wrap .main { padding: 0 12px; }
	.tut-wrap .operation_btn { padding: 0 12px; justify-content: center; }
	.tut-wrap .cata { max-width: none; margin: 24px 12px; }
	/* 目錄彈窗：老樣式 466×490 居中，窄屏改成百分比 */
	.tut-wrap .course_catalog_in { width: 92vw; height: 76vh; left: 4vw; top: 12vh; margin: 0; }
	.tut-wrap .cate_list { padding: 0 16px; }
	.tut-wrap .cate_list li { width: auto; padding: 0; }
}

/* ===== 分享本課浮層（tutorial_view.php 注入，微信二維碼 + 微博/QQ空間/複製連結） ===== */
#tutShare { position: fixed; left: 0; right: 0; top: 0; bottom: 0; display: none; z-index: 9999; }
#tutShare.on { display: block; }
#tutShare .ts-mask { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, .55); }
#tutShare .ts-card {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 320px; padding: 24px 22px 18px; box-sizing: border-box;
	background: #fff; border-radius: 10px; box-shadow: 0 10px 34px rgba(0, 0, 0, .22); text-align: center;
}
#tutShare .ts-close {
	position: absolute; right: 6px; top: 4px; width: 34px; height: 34px;
	border: 0; background: none; color: #aaa; font-size: 24px; line-height: 1; cursor: pointer;
}
#tutShare .ts-close:hover { color: #666; }
#tutShare .ts-title { margin: 0 0 14px; font-size: 17px; color: #222; }
#tutShare .ts-qr { width: 148px; height: 148px; margin: 0 auto; background: #fff; }
#tutShare .ts-qr img, #tutShare .ts-qr canvas { display: block; margin: 0 auto; }
#tutShare .ts-tip { margin: 10px 0 16px; font-size: 12.5px; color: #888; }
#tutShare .ts-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
#tutShare .ts-b {
	display: inline-block; padding: 7px 14px; border: 1px solid #e3e3e3; border-radius: 18px;
	background: #fff; color: #444; font-size: 13.5px; line-height: 1.4; cursor: pointer; text-decoration: none;
}
#tutShare .ts-b:hover { border-color: #c9c9c9; background: #fafafa; }
#tutShare .ts-weibo { color: #d52b2b; border-color: #f0c9c9; }
#tutShare .ts-qzone { color: #2b6fd5; border-color: #c9d9f0; }
#tutShare .ts-msg { margin: 10px 0 0; min-height: 16px; font-size: 12.5px; color: #3a8a3a; word-break: break-all; }

@media (max-width: 480px) {
	#tutShare .ts-card { width: 84vw; padding: 20px 16px 14px; }
}
