@charset "UTF-8";
/*
 * hy-flow.css — 圖書薦購系統前台版面改版（2026-09-21）
 * 目標：和 FLOW（館藏資源探索系統）同一套視覺語言；把首頁的大片留白填滿；手機優先。
 * 只用覆蓋的方式，不動 Next.js 原始碼；要還原只要把 nginx 注入的那行拿掉。
 * 對應的既有標記：.main-header / .navbar-right / .breadcrumb / .layout /
 *                 section.recommendation / section.search_bookstore / section.news /
 *                 section.newbook / section.cp_data .side_r01 / footer.mustache
 */

:root {
	--hy-brand: #B33C3C;
	--hy-brand-dark: #962F2F;
	--hy-brand-soft: #FBF3F2;
	--hy-mauve: #A97C7A;
	--hy-sand: #EFE5DE;
	--hy-sand-50: #FAF7F4;
	/* 線條專用色票（2026-11-13）。原本邊框跟頁尾底、書封底、頁尾文字共用 --hy-sand，
	   一個值要同時滿足「線要深、底要淺、字要能讀」做不到，所以把線拆出來。
	   --hy-line      #8E857C → 白底 3.62:1、頁底 3.39:1（WCAG 1.4.11 要 3:1）
	   --hy-line-soft #BFB1A4 → 清單分隔線用，純裝飾不受 1.4.11 規範，但比原本的 #F3EDE7 清楚得多 */
	--hy-line: #8E857C;
	--hy-line-soft: #BFB1A4;
	--hy-ink: #332926;
	--hy-ink-2: #6B5A54;
	--hy-ink-3: #998880;
	--hy-gold: #f8b551;
	--hy-hero-image: url("../images/flow/hero.png");
	--hy-footer-image: url("../images/flow/footerbg.jpg");
	--hy-content: 1400px;
	--hy-vw: 100vw;          /* 由 hy-enhance.js 換成不含捲軸的實際寬度 */
	--hy-radius: 12px;
	--hy-shadow: 0 1px 2px rgba(46, 36, 34, .05), 0 6px 18px -10px rgba(46, 36, 34, .28);
}

/* ── 基本：字大一點、行距鬆一點 ─────────────────── */
body {
	font-size: 15px;
	line-height: 1.7;
	background: var(--hy-sand-50);
	color: var(--hy-ink);
}
a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 頁首（.header_wrap）：滿版白底、下緣大圓角、捲動固定，內容置中 1200 ── */
.header_wrap {
	max-width: none !important;
	height: auto !important;
	max-height: none !important;
	background: rgba(255, 255, 255, .95) !important;
	padding: 10px max(16px, calc((100% - 1200px) / 2)) 12px !important;
	border-radius: 0 0 50px 50px;
	box-shadow: 0 2px 5px -1px rgba(50, 50, 93, .18);
	position: sticky;
	top: 0;
	z-index: 55;
	display: flex;
	align-items: center;
	gap: 16px;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	overflow: visible;
}
.header_wrap::after { content: ""; display: none; }
.header_wrap .header_logo {
	float: none !important;
	width: auto !important;
	height: auto !important;
	flex: 0 0 auto;
}
.header_wrap .header_logo a > img { width: auto !important; height: 58px !important; }
.header_wrap .header_nav_wrap { float: none !important; margin: 0 0 0 auto !important; }
.header_wrap .header_nav_wrap ul.navbar-nav { display: flex; align-items: center; gap: 4px; margin: 0; float: none; }
.header_wrap .header_nav_wrap ul.navbar-nav > li { float: none; }
.header_wrap .header_nav_wrap ul li a {
	color: #333 !important;
	padding-top: 4px !important;
	padding-bottom: 4px !important;
	padding-right: 14px !important;
	border-radius: 6px;
	display: inline-block;
}
.header_wrap .header_nav_wrap ul li.guess a { padding-left: 40px !important; }
.header_wrap .header_nav_wrap ul li.person > a { padding-left: 48px !important; }
.header_wrap .header_nav_wrap ul li.logout > a { padding-left: 14px !important; }
/* 使用者名稱做成深色膠囊，跟 FLOW 一致 */
.header_wrap .header_nav_wrap ul li.person > a {
	background-color: #241d1c !important;
	color: #fff !important;
	border-radius: 999px;
	padding-top: 7px !important;
	padding-bottom: 7px !important;
	padding-right: 18px !important;
	background-position: 14px center !important;
	margin-left: 6px;
	/* 文字垂直置中（2026-11-13）。原本吃外層繼承的 line-height:30px，
	   但膠囊加了 7px 上下留白後內容區只剩 16px，30px 的行高撐不下，
	   文字會被擠到下緣外 3px。改用 flex 置中，不受行高影響。 */
	display: inline-flex !important;
	align-items: center !important;
	line-height: 1.2 !important;
}
.header_wrap .header_nav_wrap ul li.person > a:hover { background-color: #3b2f2d !important; color: #fff !important; }
.header_wrap .header_nav_wrap ul li a:hover { color: var(--hy-brand) !important; background: var(--hy-brand-soft); }
/* ── 主視覺：玫瑰褐色塊 ＋ FLOW 同一張底圖 ───────── */
.layout {
	position: relative;
	background: transparent !important;
	padding-left: 0 !important;
	padding-top: 10px;
}
.layout::before {
	content: none;
}
html.hy-home-doc .layout::before {
	content: "";
	position: absolute;
	left: calc(50% - var(--hy-vw) / 2);
	width: var(--hy-vw);
	top: 0;
	height: 262px;
	/* 底圖 1920x1200，用高度鋪滿、靠右對齊，鍵盤和滑鼠才看得到 */
	background: var(--hy-mauve) var(--hy-hero-image) right -10px / auto 500px no-repeat;
	border-radius: 0 0 0 100px;
	box-shadow: rgba(0, 0, 0, .25) 0 4px 12px;
	z-index: 0;
}
.layout > * { position: relative; z-index: 1; }
.layout .row { padding-left: 0; margin-left: 0; margin-right: 0; }
.layout .row > [class^="col-"] { padding-left: 0; padding-right: 0; }
.layout .row > .col-md-9 { padding-right: 24px; }
@media (max-width: 991px) { .layout .row > .col-md-9 { padding-right: 0; } }

/* 麵包屑壓在色塊上 */
.breadcrumb {
	background: none !important;
	padding: 14px 0 10px !important;
	margin: 0 !important;
	list-style: none;
	font-size: 14px;
}
body.hy-home .breadcrumb a, body.hy-home .breadcrumb > li, body.hy-home .breadcrumb > .active { color: rgba(255, 255, 255, .92) !important; }
body.hy-home .breadcrumb a:hover { color: #fff !important; }

/* ── 搜尋區：分頁與搜尋列合成一整塊黑色面板（FLOW 同款） ── */
body.hy-home section.recommendation,
section.recommendation {
	background: rgba(0, 0, 0, .8);
	border-radius: 40px 40px 0 0;
	padding: 26px 34px 4px;
	margin: 0;
}
section.recommendation .nav-tabs {
	border: 0;
	display: flex;
	gap: 10px;
	padding: 0;
	margin: 0;
	background: none;
}
section.recommendation .nav-tabs > li { float: none; margin: 0; }
section.recommendation .nav-tabs > li > a,
section.recommendation .nav-tabs > li a {
	border: 0 !important;
	border-radius: 999px !important;
	background: #E9E6E4;
	color: #333;
	font-weight: 700;
	font-size: 15px;
	padding: 9px 24px;
	margin: 0;
	display: block;
}
section.recommendation .nav-tabs > li a:hover { background: #fff; color: var(--hy-brand); }
section.recommendation .nav-tabs > li a.on,
section.recommendation .nav-tabs > li.active > a {
	background: var(--hy-brand) !important;
	color: #fff !important;
}
section.recommendation .nav-tabs .arrow { display: none; }

form[name=qform] { margin: 0 0 26px; }
section.search_bookstore {
	background: rgba(0, 0, 0, .8);
	border-radius: 0 0 40px 40px;
	padding: 16px 34px 26px;
	margin: 0;
	border: 0;
}
section.search_bookstore .input-group {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fff;
	border-radius: 50px;
	padding: 6px 6px 6px 20px;
	width: 100%;
}
section.search_bookstore .input-group-btn { display: flex; align-items: center; gap: 8px; width: auto; flex: none; }
section.search_bookstore select,
section.search_bookstore .selectpicker {
	border: 0 !important;
	background: none !important;
	box-shadow: none !important;
	font-size: 15px;
	color: #333;
	height: auto;
	padding: 6px 2px;
	width: auto !important;
	outline: none;
}
/* 分隔線，跟 FLOW 一樣區隔下拉與輸入框 */
section.search_bookstore .falseinput {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
	border-left: 1px solid var(--hy-line);
	padding-left: 14px;
}
section.search_bookstore .switch_input { flex: 1; min-width: 0; position: relative; }
/* 虛擬鍵盤圖示：keyboard.js 用絕對座標擺，改版後會壓到 GO 按鈕，先收起來 */
img.keyboardInputInitiator, .keyboardInputInitiator { display: none !important; }
section.search_bookstore .switch_input input,
section.search_bookstore input[type=text] {
	border: 0 !important;
	box-shadow: none !important;
	width: 100%;
	font-size: 15.5px;
	padding: 9px 4px;
	background: none;
}
/* 查詢按鈕：比照 FLOW 的「查詢」——灰底圓角、前面放大鏡，不貼齊右邊 */
section.search_bookstore #qbtn,
section.search_bookstore .btn {
	background: #E9E6E4 !important;
	color: #333 !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-weight: 600;
	padding: 9px 22px !important;
	font-size: 15px;
	flex: none;
	margin: 0 6px 0 4px !important;
	line-height: 1.5;
	display: inline-flex;
	align-items: center;
	box-shadow: none !important;
}
section.search_bookstore #qbtn::before {
	content: "\f002";                  /* font-awesome 放大鏡，網站本來就有載 */
	font-family: FontAwesome;
	font-weight: normal;
	margin-right: 8px;
	font-size: 14px;
	color: #555;
}
section.search_bookstore #qbtn:hover { background: var(--hy-brand) !important; color: #fff !important; }
section.search_bookstore #qbtn:hover::before { color: #fff; }


/* ── 內容區塊：卡片化，把空白填起來 ────────────── */
.layout .col-md-9 > section,
.layout .col-md-9 > div > section { margin-bottom: 22px; }
section.news, section.newbook {
	margin: 0 0 22px !important;
	height: auto !important;
	overflow: visible !important;
	border-bottom: 1px solid var(--hy-line) !important;
	background: #fff;
	border: 1px solid var(--hy-line);
	border-radius: var(--hy-radius);
	box-shadow: var(--hy-shadow);
	padding: 18px 20px 20px;
	position: relative;
	min-height: 0;
}
section.news h1, section.newbook h1, .hy-sec h1 {
	float: none !important;
	font-size: 19px;
	font-weight: 700;
	color: var(--hy-ink);
	margin: 0 0 12px;
	padding-left: 12px;
	border-left: 4px solid var(--hy-brand);
	line-height: 1.4;
	background: none;
}
section.news .more, section.newbook .more, .hy-sec .more {
	float: none !important;
	margin: 0 !important;
	position: absolute;
	right: 20px;
	top: 20px;
	font-size: 13.5px;
	color: var(--hy-ink-2);
	background: none;
}
section.news .more:hover, section.newbook .more:hover { color: var(--hy-brand); }
section.news br { display: none; }
section.news ul li, section.newbook ul li { border-bottom: 1px solid var(--hy-line-soft); }
section.news ul li:last-child { border-bottom: 0; }

/* 到館新書：Slick 輪播，只調書卡外觀，不動排版 */
#newbook.main .myBook, section.newbook .myBook {
	padding: 0 6px;
	text-align: center;
}
#newbook.main .myBook img, section.newbook .myBook img {
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(46, 36, 34, .18);
	margin: 0 auto;
}
#newbook.main .myBook p, section.newbook .myBook p {
	font-size: 13px;
	line-height: 1.5;
	margin: 8px 0 0;
	color: var(--hy-ink-2);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── 最新消息清單 ─────────────────────────────── */
#newsList { margin: 0; padding: 0; list-style: none; }
#newsList > li { list-style: none; border-bottom: 1px solid var(--hy-line-soft); float: none; width: auto; font-size: 1em; }
#newsList > li:last-child { border-bottom: 0; }
#newsList > li > a {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 11px 4px;
	color: var(--hy-ink) !important;
	font-size: 14.5px;
	text-decoration: none;
}
#newsList > li > a:hover { color: var(--hy-brand) !important; background: var(--hy-sand-50); text-decoration: none; }
#newsList .fa-caret-right { color: var(--hy-brand); }
#newsList:empty::after {
	content: "目前沒有最新消息";
	display: block;
	padding: 24px 4px;
	color: var(--hy-ink-3);
	font-size: 14px;
}

/* ── 查詢列表（推薦書籍總覽、線上閱選） ─────────── */
.book_list {
	background: #fff;
	border: 1px solid var(--hy-line) !important;
	border-radius: var(--hy-radius);
	box-shadow: var(--hy-shadow);
	padding: 16px 18px !important;
	margin: 0 0 14px !important;
	display: flex;
	gap: 16px;
	align-items: flex-start;
}
.book_list:hover { border-color: #E3D2CB !important; }
.book_list .book_list_left { flex: none; width: auto !important; margin: 0 !important; }
.book_list .book_list_left img { border-radius: 8px; box-shadow: 0 2px 8px rgba(46, 36, 34, .15); }
.book_list .book_list_right { flex: 1; min-width: 0; width: auto !important; margin: 0 !important; }
.book_list .num_list { color: var(--hy-ink-3); font-weight: 400; margin-right: 4px; }
.book_list h1, .book_list .book_list_right h1 {
	font-size: 17px !important;
	font-weight: 700;
	line-height: 1.5;
	margin: 0 0 8px !important;
	padding: 0 !important;
	background: none !important;
	color: var(--hy-ink);
}
.book_list h1 a { color: var(--hy-ink) !important; text-decoration: none; }
.book_list h1 a:hover { color: var(--hy-brand) !important; }
.book_list .book_info { margin: 0; padding: 0; list-style: none; }
.book_list .book_info > li {
	list-style: none;
	font-size: 13.5px;
	color: var(--hy-ink-2);
	line-height: 1.8;
	float: none;
	width: auto;
}
.book_list .book_list_bottom { margin-top: 10px; }
.book_list .btn, .book_list a.btn {
	background: var(--hy-brand) !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #fff !important;
	padding: 6px 18px !important;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
}
.book_list .btn:hover { background: var(--hy-brand-dark) !important; }

/* ── 左側篩選 ─────────────────────────────────── */
.book_filter .book_filter_item, .book_filter .book_filter_item_main {
	background: #fff;
	border: 1px solid var(--hy-line);
	border-radius: var(--hy-radius);
	box-shadow: var(--hy-shadow);
	padding: 14px 16px;
	margin: 0 0 14px;
}
.book_filter .title, .book_filter .subtitle {
	font-size: 15px;
	font-weight: 700;
	color: var(--hy-ink);
	margin: 0 0 10px;
	padding: 0 0 8px;
	border-bottom: 1px solid var(--hy-line);
}
.book_filter ul { margin: 0; padding: 0; list-style: none; }
.book_filter ul li { list-style: none; padding: 5px 0; font-size: 14px; }
.book_filter ul li a { color: var(--hy-ink-2); text-decoration: none; }
.book_filter ul li a:hover { color: var(--hy-brand); }

/* ── 分頁 ─────────────────────────────────────── */
.page { margin: 20px 0; }
.page li { list-style: none; }
.page li a {
	border: 1px solid var(--hy-line) !important;
	border-radius: 8px !important;
	background: #fff !important;
	color: var(--hy-ink-2) !important;
	padding: 6px 12px !important;
	text-decoration: none;
}
.page li a:hover { border-color: var(--hy-brand) !important; color: var(--hy-brand) !important; }
.page li.here a, .page li.here span {
	background: var(--hy-brand) !important;
	border-color: var(--hy-brand) !important;
	color: #fff !important;
	border-radius: 8px !important;
}

/* ── 主要按鈕（查詢、確定等） ───────────────────── */
.btn-warning, .btn-warning:active, .btn-warning:focus {
	background: var(--hy-brand) !important;
	border: 0 !important;
	border-radius: 999px !important;
	color: #fff !important;
	padding: 8px 22px !important;
	box-shadow: none !important;
}
.btn-warning:hover { background: var(--hy-brand-dark) !important; }

/* ── 右側欄 ──────────────────────────────────── */
.col-md-3 { margin-top: 52px; }
.col-md-3 section.cp_data {
	background: #fff;
	border: 1px solid var(--hy-line);
	border-radius: var(--hy-radius);
	box-shadow: var(--hy-shadow);
	padding: 6px 0;
	margin-top: 0;
}
.cp_data .side_r01 { margin: 0; padding: 0; }
.cp_data .side_r01 > li { border-bottom: 1px solid var(--hy-line-soft); margin: 0; }
.cp_data .side_r01 > li:last-child { border-bottom: 0; }
.cp_data .side_r01 > li > a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	font-size: 15px;
	font-weight: 600;
	color: var(--hy-ink);
}
.cp_data .side_r01 > li > a:hover { background: var(--hy-brand-soft); color: var(--hy-brand); text-decoration: none; }
.cp_data .side_r01 img { width: 20px; height: 20px; }

/* ── 主題推薦（由 hy-enhance.js 插入，比照 FLOW 服務卡） ── */
.hy-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.hy-themes:has(> :nth-child(2)):not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hy-themes:not(:has(> :nth-child(2))) { grid-template-columns: 1fr; }
.hy-theme, .hy-theme:hover, .hy-theme * { text-decoration: none !important; }
.hy-theme {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: rgba(100, 100, 111, .2) 0 0 20px 0;
	transition: .4s;
	color: inherit;
}
.hy-theme:hover { transform: translateY(-10px); box-shadow: 0 20px 30px rgba(0, 0, 0, .28); text-decoration: none; color: inherit; }
.hy-theme:hover .hy-theme-title { color: var(--hy-brand); }
.hy-theme .hy-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--hy-sand); }
.hy-theme .hy-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hy-theme .hy-icon {
	position: absolute;
	left: 22px;
	bottom: -24px;
	width: 70px;
	height: 70px;
	background: var(--hy-brand);
	border-radius: 24px 0 24px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: rgba(100, 100, 111, .3) 0 7px 24px 0;
	transition: .4s;
}
.hy-theme:hover .hy-icon { background: #be5923; }
.hy-theme .hy-theme-in { padding: 40px 22px 22px; }
.hy-theme .hy-theme-title { margin: 0; font-size: 19px; font-weight: 700; color: #333 !important; transition: .3s; }
.hy-theme:hover .hy-theme-title { color: var(--hy-brand) !important; }
.hy-theme hr { width: 100%; border: 0; border-top: 3px solid #333; margin: 12px 0; }
.hy-theme .hy-theme-desc {
	margin: 0 0 10px;
	color: #404040 !important;
	font-size: 14.5px;
	line-height: 1.8;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 3.6em;
}
.hy-theme .hy-count {
	background: var(--hy-brand-soft);
	color: var(--hy-brand);
	font-weight: 700;
	padding: 3px 12px;
	border-radius: 999px;
	font-size: 13px;
}
/* 只有一個主題時改成橫幅大卡，不留空格 */
.hy-themes:not(:has(> :nth-child(2))) .hy-theme { flex-direction: row; }
.hy-themes:not(:has(> :nth-child(2))) .hy-cover { flex: 0 0 42%; aspect-ratio: auto; }
.hy-themes:not(:has(> :nth-child(2))) .hy-icon { left: auto; right: -34px; bottom: 22px; }
.hy-themes:not(:has(> :nth-child(2))) .hy-theme-in { flex: 1; padding: 28px 30px; display: flex; flex-direction: column; justify-content: center; }
.hy-themes:not(:has(> :nth-child(2))) .hy-theme-title { font-size: 22px; }

/* ── 頁尾：比照 FLOW（米底 ＋ 黑色圓角區塊 ＋ 金色連結） ── */
footer.mustache {
	position: relative;
	width: 100%;
	max-width: none !important;
	color: var(--hy-sand);
	background: var(--hy-sand) var(--hy-footer-image) left top / cover no-repeat;
	padding: 110px 0 0;
	margin-top: 40px;
	border: 0;
}
footer.mustache::before {
	content: "";
	position: absolute;
	top: 110px;
	left: 0;
	bottom: 0;
	width: 100%;
	background: rgba(0, 0, 0, .85);
	border-radius: 0 120px 0 0;
	z-index: 0;
}
footer.mustache .row { position: relative; z-index: 1; padding: 40px 0 34px; margin: 0 auto; max-width: 1140px; }
footer.mustache .logo { display: none; }
footer.mustache p, footer.mustache p span {
	color: var(--hy-sand);
	font-size: 14px;
	text-align: left !important;
	margin: 0;
	opacity: .9;
	line-height: 1.9;
}
footer.mustache a { color: var(--hy-gold); }
footer.mustache a:hover { text-decoration: underline; }
.hy-footlinks { display: flex; flex-wrap: wrap; gap: 46px; margin-bottom: 26px; }
.hy-footlinks .hy-fcol { flex: 0 0 auto; }
.hy-footlinks .hy-ftitle { font-weight: 600; font-size: 16px; margin-bottom: 14px; color: #fff; }
.hy-footlinks ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hy-footlinks li { line-height: 1.5; }

/* ── 手機 ───────────────────────────────────── */
@media (max-width: 991px) {
	/* 手機版：選單按鈕在左、logo 在右，跟 FLOW 一樣 */
	.header_wrap {
		display: flex !important;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px;
		padding: 8px 14px !important;
		border-radius: 0 0 24px 24px;
		position: static;
	}
	.header_wrap .header_nav_rwd {
		display: block !important;
		float: none !important;
		order: 1;
		margin: 0 !important;
		width: 44px;
		height: 44px;
	}
	.header_wrap .header_nav_rwd .navbar-toggle { margin: 0; padding: 10px 8px; border-radius: 10px; }
	.header_wrap .header_logo { float: none !important; order: 2; flex: 1 1 auto; max-width: none; min-width: 0; }
	.header_wrap .header_logo a > img { height: 34px !important; }
	.header_wrap .header_nav_wrap { order: 3; flex: 1 0 100%; margin: 4px 0 0 !important; float: none !important; width: 100%; }
	.header_wrap .header_nav_wrap ul.navbar-nav { display: block; }
	.header_wrap .header_nav_wrap ul.navbar-nav > li { width: 100%; }
	.main-header { border-radius: 0; padding: 8px 0; }
	.main-header .navbar-brand > img, .main-header .navbar-header img { height: 32px; }
	html.hy-home-doc .layout::before { border-radius: 0; height: 230px; background-size: auto 420px; background-position: right -10px; }
	.col-md-3 { margin-top: 18px; }
	section.search_bookstore { border-radius: 24px; padding: 18px 16px; }
	section.search_bookstore .input-group { flex-wrap: wrap; border-radius: 20px; padding: 12px; gap: 8px; }
	section.search_bookstore .input-group-btn { width: 100%; }
	section.search_bookstore select {
		flex: 1;
		border: 1px solid var(--hy-line) !important;
		border-radius: 10px;
		padding: 9px 10px !important;
		background: #fff !important;
	}
	section.search_bookstore .falseinput { flex: 1 0 100%; flex-wrap: wrap; }
	section.search_bookstore .switch_input { flex: 1 0 100%; border-left: 0; padding-left: 0; border: 1px solid var(--hy-line); border-radius: 12px; padding: 2px 10px; }
	section.search_bookstore #qbtn { flex: 1 0 100%; border-radius: 12px !important; }
	section.recommendation .nav-tabs { padding-left: 0; }
	section.recommendation .nav-tabs > li { flex: 1; }
	section.recommendation .nav-tabs > li a { display: block; text-align: center; padding: 9px 6px; font-size: 14px; }
	.hy-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.hy-themes:not(:has(> :nth-child(2))) .hy-theme { flex-direction: column; }
	.hy-themes:not(:has(> :nth-child(2))) .hy-cover { flex: none; aspect-ratio: 16 / 9; }
	.hy-themes:not(:has(> :nth-child(2))) .hy-icon { left: 22px; right: auto; bottom: -24px; }
	section.newbook .myBook { width: calc((100% - 14px) / 2); }
	footer.mustache .row { padding: 30px 22px; }
	footer.mustache::before { border-radius: 0 70px 0 0; }
	.hy-footlinks { gap: 26px; }
	.hy-footlinks .hy-fcol { flex-basis: 100%; }
}
@media (max-width: 575px) {
	.hy-themes { grid-template-columns: 1fr; }
}

/* ── PWA：安裝／通知提示（固定在畫面下方，不影響版面） ── */
.hy-install {
	display: none;
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 16px;
	z-index: 90;
	width: calc(100% - 32px);
	max-width: 520px;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid var(--hy-line);
	border-left: 4px solid var(--hy-brand);
	border-radius: var(--hy-radius);
	box-shadow: 0 10px 30px rgba(46, 36, 34, .25);
}
.hy-install.is-on { display: flex; }
.hy-install b { display: block; font-size: 14.5px; }
.hy-install small { color: var(--hy-ink-3); font-size: 12.5px; }
.hy-install .hy-btn {
	margin-left: auto;
	flex: none;
	background: var(--hy-brand);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 8px 18px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
}
.hy-install .hy-btn:hover { background: var(--hy-brand-dark); }
.hy-install .hy-close { background: none; border: 0; color: var(--hy-ink-3); font-size: 20px; cursor: pointer; padding: 0 4px; }
.hy-offline {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	bottom: 18px;
	background: #332926;
	color: #fff;
	font-size: 13.5px;
	padding: 8px 18px;
	border-radius: 999px;
	z-index: 91;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

/* ── 彈出視窗（最新消息） ───────────────────────── */
.popup_wrap {
	width: min(680px, 92vw) !important;
	max-height: 82vh;
	overflow: auto;
	border-radius: 16px !important;
	padding: 0 !important;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.popup_wrap .subtitle {
	margin: 0;
	padding: 16px 20px;
	background: var(--hy-sand-50);
	border-bottom: 1px solid var(--hy-line);
	font-size: 17px;
	font-weight: 700;
	color: var(--hy-ink);
	line-height: 1.5;
}
.popup_wrap .popup_contain_wrap { padding: 18px 20px 24px; }
.popup_wrap .popup_contain_wrap h4 {
	display: inline-block;
	background: var(--hy-brand-soft);
	color: var(--hy-brand);
	font-size: 12.5px;
	font-weight: 700;
	padding: 3px 12px;
	border-radius: 999px;
	margin: 0 10px 0 0;
}
.popup_wrap .popup_contain_wrap h6 { display: inline-block; color: var(--hy-ink-3); font-size: 13px; margin: 0; font-weight: 400; }
.popup_wrap .popup_contain_wrap > p { margin: 16px 0 0; font-size: 15px; line-height: 1.9; color: var(--hy-ink); }

/* ── 排序、每頁顯示等小工具列 ───────────────────── */
.btn-default, .btn-default:focus {
	background: #fff !important;
	border: 1px solid var(--hy-line) !important;
	border-radius: 999px !important;
	color: var(--hy-ink-2) !important;
	padding: 7px 16px !important;
	box-shadow: none !important;
}
.btn-default:hover { border-color: var(--hy-brand) !important; color: var(--hy-brand) !important; }
select.form-control, .form-control {
	border: 1px solid var(--hy-line) !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	height: auto !important;
	padding: 7px 10px !important;
}
select.form-control:focus, .form-control:focus { border-color: var(--hy-brand) !important; box-shadow: 0 0 0 3px var(--hy-brand-soft) !important; }

/* ── 版面寬度：比照 FLOW（內容 1400 + 左右 90 留白） ── */
.container-fluid {
	max-width: calc(var(--hy-content) + 180px) !important;
	padding-left: 90px !important;
	padding-right: 90px !important;
}
.header_wrap {
	padding-left: max(20px, calc((100% - var(--hy-content) - 180px) / 2 + 90px)) !important;
	padding-right: max(20px, calc((100% - var(--hy-content) - 180px) / 2 + 90px)) !important;
}
footer.mustache .row { max-width: var(--hy-content) !important; }

/* 字級與間距放大一點，跟 FLOW 的分量接近 */
body { font-size: 15.5px; }
section.news h1, section.newbook h1, .hy-sec h1 { font-size: 21px; padding-left: 14px; border-left-width: 5px; }
section.news, section.newbook, .hy-sec { padding: 22px 26px 26px !important; }
.hy-theme .hy-theme-title { font-size: 21px; }
.hy-theme .hy-theme-desc { font-size: 15px; }
.hy-theme .hy-theme-in { padding: 44px 26px 26px; }
.hy-themes { gap: 30px; }
section.recommendation { padding: 30px 40px 6px; }
section.search_bookstore { padding: 18px 40px 30px; }
section.search_bookstore .input-group { padding: 8px 8px 8px 24px; }
section.search_bookstore .switch_input input { font-size: 16px; padding: 11px 4px; }
section.search_bookstore #qbtn { padding: 11px 26px !important; font-size: 15.5px; }
section.recommendation .nav-tabs > li a { padding: 10px 28px; font-size: 15.5px; }
html.hy-home-doc .layout::before { height: 300px; background-size: auto 600px; }
.cp_data .side_r01 > li > a { padding: 14px 18px; font-size: 15.5px; }
.book_list { padding: 20px 22px !important; gap: 20px; }
.book_list h1, .book_list .book_list_right h1 { font-size: 18.5px !important; }
.book_list .book_info > li { font-size: 14.5px; }
#newsList > li > a { padding: 13px 6px; font-size: 15.5px; }

@media (max-width: 1200px) {
	.container-fluid { padding-left: 40px !important; padding-right: 40px !important; }
	.header_wrap { padding-left: 40px !important; padding-right: 40px !important; }
}
@media (max-width: 991px) {
	.container-fluid { padding-left: 16px !important; padding-right: 16px !important; }
	.header_wrap { padding-left: 14px !important; padding-right: 14px !important; }
	section.recommendation { padding: 20px 18px 4px; }
	section.search_bookstore { padding: 12px 18px 20px; }
	section.news, section.newbook, .hy-sec { padding: 16px 16px 20px !important; }
	html.hy-home-doc .layout::before { height: 240px; background-size: auto 430px; }
}

/* ── 查詢區塊修正（結果頁只有一欄時要滿寬，兩塊要連在一起） ── */
.layout .row > .col-md-9:only-child,
.layout .row > .col-md-10:only-child { width: 100% !important; flex: 1 0 100% !important; }
section.recommendation { margin: 0 !important; border-radius: 40px 40px 0 0 !important; }
form[name=qform] { margin: 0 0 26px !important; }
section.search_bookstore, section.search_bookstore.block { margin: 0 !important; border-radius: 0 0 40px 40px !important; }
/* GO 按鈕推到最右邊，輸入框吃滿剩下的空間 */
section.search_bookstore .falseinput { flex: 1 1 auto !important; }
section.search_bookstore .switch_input { flex: 1 1 auto !important; }
section.search_bookstore .switch_input input,
section.search_bookstore input.form-control { width: 100% !important; }
section.search_bookstore #qbtn { margin-left: auto !important; }

/* ── 首頁的麵包屑只寫「首頁」，沒有意義，收起來 ── */
body.hy-home .breadcrumb { display: none !important; }
body.hy-home .layout { padding-top: 26px; }

/* ── 我的推薦（個人化卡片） ───────────────────── */
.hy-mine {
	background: #fff;
	border: 1px solid var(--hy-line);
	border-radius: var(--hy-radius);
	box-shadow: var(--hy-shadow);
	padding: 16px 18px 10px;
	margin-bottom: 14px;
}
.hy-mine-head { display: flex; align-items: baseline; gap: 8px; }
.hy-mine-head b { font-size: 15.5px; font-weight: 700; color: var(--hy-ink); }
.hy-mine-head a { margin-left: auto; font-size: 13px; color: var(--hy-ink-3); text-decoration: none; }
.hy-mine-head a:hover { color: var(--hy-brand); }
.hy-mine-num { margin: 6px 0 10px; color: var(--hy-ink-3); font-size: 13px; }
.hy-mine-num span { font-size: 28px; font-weight: 700; color: var(--hy-brand); margin-right: 4px; font-variant-numeric: tabular-nums; }
.hy-mine-list { margin: 0; padding: 0; list-style: none; }
.hy-mine-list li { border-top: 1px solid var(--hy-line-soft); }
.hy-mine-list a { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; text-decoration: none; }
.hy-mine-list a:hover { text-decoration: none; }
.hy-mine-list a:hover b { color: var(--hy-brand); }
.hy-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hy-brand); flex: none; margin-top: 7px; }
.hy-dot.ok { background: #0F766E; }
.hy-dot.no { background: #98867F; }
.hy-mine-bk { min-width: 0; }
.hy-mine-bk b { display: block; font-size: 14px; font-weight: 600; color: var(--hy-ink); line-height: 1.45;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hy-mine-bk small { color: var(--hy-ink-3); font-size: 12.5px; }

/* ── 搜尋列：rwd.css 把輸入框寫死 90%，GO 才會卡在中間 ── */
section.search_bookstore .input-group { display: flex !important; }
section.search_bookstore .falseinput { display: flex !important; flex: 1 1 auto !important; width: auto !important; align-items: center; }
section.search_bookstore .switch_input { flex: 1 1 auto !important; width: auto !important; margin: 0 !important; }
section.search_bookstore .falseinput input[type=text],
section.search_bookstore .switch_input input[type=text],
section.search_bookstore input.keyboardInput { width: 100% !important; float: none !important; margin: 0 !important; }
section.search_bookstore #qbtn { margin-left: auto !important; margin-right: 10px !important; float: none !important; position: static !important; }

/* GO → 搜尋（英文版 Search） */
section.search_bookstore #qbtn { font-size: 0 !important; }
section.search_bookstore #qbtn::before { font-size: 14px; }
section.search_bookstore #qbtn::after { content: "搜尋"; font-size: 15.5px; font-weight: 600; }
html[lang^="en"] section.search_bookstore #qbtn::after { content: "Search"; }

/* ── 搜尋按鈕不要壓到膠囊的圓角 ─────────────────── */
section.search_bookstore .input-group {
	padding: 8px 20px 8px 24px !important;
	overflow: hidden;                        /* 任何東西都不會跑出圓角外 */
}
section.search_bookstore #qbtn {
	margin-left: auto !important;
	margin-right: 0 !important;
	flex: 0 0 auto !important;
	white-space: nowrap;
}
section.search_bookstore .falseinput { padding-right: 6px !important; }

/* ── 搜尋按鈕：文字被裁到按鈕外，改用 flex 置中、寬度自動 ── */
section.search_bookstore .input-group { overflow: visible !important; padding-right: 10px !important; }
section.search_bookstore #qbtn,
section.search_bookstore .btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	padding: 10px 20px !important;
	line-height: 1.2 !important;
	font-size: 0 !important;
	overflow: visible !important;
	text-indent: 0 !important;
}
section.search_bookstore #qbtn::before { margin: 0 !important; font-size: 15px; line-height: 1; }
section.search_bookstore #qbtn::after { font-size: 15.5px; line-height: 1.2; }
section.search_bookstore .input-group-btn { max-width: none !important; }

/* ── 最新到館書籍：比照 FLOW 新書通報的書卡 ───────── */
.hy-nb { position: relative; padding: 6px 44px 4px; }
.hy-nb-track {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 10px 2px 6px;
	scrollbar-width: none;
}
.hy-nb-track::-webkit-scrollbar { display: none; }
.hy-nb-item {
	flex: 0 0 auto;
	width: 168px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none !important;
	color: inherit;
}
.hy-nb-card {
	background: #fff;
	border-radius: 18px;
	padding: 18px 16px;
	box-shadow: rgba(100, 100, 111, .2) 0 0 18px 0;
	width: 100%;
	height: 214px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all .3s ease;
	margin-bottom: 14px;
}
.hy-nb-item:hover .hy-nb-card { transform: translateY(-10px); box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.hy-nb-card img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; outline: 1px solid #eee; }
.hy-nb-title {
	font-size: 14.5px;
	font-weight: 600;
	color: #555;
	text-align: center;
	width: 100%;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color .3s ease;
}
.hy-nb-item:hover .hy-nb-title { color: var(--hy-brand); }
.hy-nb-arrow {
	position: absolute;
	top: 96px;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(51, 41, 38, .55);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	transition: background .2s;
}
.hy-nb-arrow:hover { background: var(--hy-brand); }
.hy-nb-prev { left: 0; }
.hy-nb-next { right: 0; }
@media (max-width: 991px) {
	.hy-nb { padding: 4px 8px; }
	.hy-nb-arrow { display: none; }
	.hy-nb-item { width: 136px; }
	.hy-nb-card { height: 176px; padding: 12px 10px; }
}

/* ── 通知紀錄（右下角鈴鐺） ───────────────────────── */
.hy-bell { position: fixed; right: 20px; bottom: 20px; z-index: 900; }
.hy-bell-btn {
	position: relative; width: 52px; height: 52px; border: 0; border-radius: 50%;
	background: var(--hy-brand, #8f2d2d); color: #fff; font-size: 20px; cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22); transition: transform .15s ease;
}
.hy-bell-btn:hover { transform: translateY(-2px); }
.hy-bell-dot {
	position: absolute; top: 10px; right: 11px; width: 11px; height: 11px;
	border: 2px solid #fff; border-radius: 50%; background: #e0b400;
}

@media (max-width: 767px) {
	.hy-bell { right: 14px; bottom: 76px; }
	.hy-bell-btn { width: 48px; height: 48px; font-size: 18px; }
}

/* 裝到桌面後不給縮放，順便關掉點擊的灰色高亮 */
html.hy-standalone { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; }
html.hy-standalone * { -webkit-tap-highlight-color: transparent; }

/* ── 手機版選單：漢堡按鈕開合，功能清單在上、帳號列在下 ── */
.hy-mnav { display: none; }
@media (max-width: 991px) {
	.header_wrap .header_nav_wrap { display: none !important; }
	html.hy-nav-open .header_wrap .header_nav_wrap { display: block !important; order: 4; padding: 8px 0 4px !important; border-top: 1px solid #efe7e2; }
	html.hy-nav-open .hy-mnav { display: block; order: 3; flex: 1 0 100%; width: 100%; padding: 4px 0 6px; }
	.hy-mnav-title { font-size: 12px; letter-spacing: .1em; color: #a3938c; padding: 2px 4px 6px; }
	.hy-mnav ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	.hy-mnav a {
		display: flex; align-items: center; min-height: 48px; padding: 10px 14px;
		border-radius: 14px; background: #f7f1ee; color: #3f3330 !important;
		font-size: 16px; font-weight: 600; text-decoration: none !important; line-height: 1.35;
	}
	.hy-mnav a:active, .hy-mnav a.is-on { background: var(--hy-brand, #8f2d2d); color: #fff !important; }
	/* 帳號列：一行排開，不要一個一個疊很高 */
	.header_wrap .header_nav_wrap ul.navbar-nav { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px; }
	.header_wrap .header_nav_wrap ul.navbar-nav > li { width: auto !important; }
	.header_wrap .header_nav_wrap ul li a { font-size: 15px; padding-top: 8px !important; padding-bottom: 8px !important; }
	/* 「我的推薦清單」已經在功能清單裡，原本的浮動子選單在手機上會壓到「登出」，直接收掉 */
	.header_wrap .header_nav_wrap ul.nav_sub { display: none !important; }
	.header_wrap .header_nav_rwd .navbar-toggle { cursor: pointer; }
	html.hy-nav-open .header_wrap .header_nav_rwd .navbar-toggle { background: var(--hy-brand, #8f2d2d) !important; border-color: var(--hy-brand, #8f2d2d) !important; }
}
@media (max-width: 991px) {
	/* 手機版功能都在左上選單了，下面側欄的同一組連結不用再列一次（注意事項還是保留） */
	.cp_data .side_r01 { display: none !important; }
}

/* ── 會員訊息匣 ───────────────────────────────────── */
.hy-inbox {
	position: absolute; right: 0; bottom: 64px; width: min(420px, calc(100vw - 32px));
	height: min(78vh, 640px); display: flex; flex-direction: column;
	background: #fff; border-radius: 20px; box-shadow: 0 20px 56px rgba(0, 0, 0, .24); overflow: hidden;
}
.hy-inbox[hidden] { display: none; }
.hy-inbox-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px 20px; }
.hy-inbox-head b { font-size: 18px; color: #2f2523; }
.hy-inbox-who { font-size: 13px; color: #8b7a73; }
.hy-inbox-close { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f5efec; color: #6b5a54; font-size: 22px; line-height: 1; cursor: pointer; }
.hy-inbox-tabs { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.hy-inbox-tabs::-webkit-scrollbar { display: none; }
.hy-inbox-tab {
	position: relative; flex: 0 0 auto; border: 0; border-radius: 999px; padding: 8px 14px;
	background: #f5efec; color: #5c4b45; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.hy-inbox-tab.is-on { background: var(--hy-brand, #8f2d2d); color: #fff; }
.hy-inbox-tab[data-count]:not([data-count=""])::after {
	content: attr(data-count); margin-left: 6px; display: inline-block; min-width: 18px; padding: 0 5px;
	border-radius: 9px; background: #e0b400; color: #2f2523; font-size: 11px; line-height: 18px; text-align: center;
}
.hy-inbox-tools { display: flex; justify-content: flex-end; padding: 0 18px; min-height: 4px; }
.hy-inbox-link { border: 0; background: none; color: var(--hy-brand, #8f2d2d); font-size: 13px; padding: 2px 0 6px; cursor: pointer; }
.hy-inbox-body { flex: 1; overflow-y: auto; border-top: 1px solid #efe7e2; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.hy-inbox-item { position: relative; display: block; padding: 14px 20px 14px 22px; border-bottom: 1px solid #f4efec; color: #3f3330; text-decoration: none; }
a.hy-inbox-item:hover { background: #faf6f4; color: #3f3330; text-decoration: none; }
.hy-inbox-item.is-unread { background: #fffaf3; }
.hy-inbox-item.is-unread::before { content: ""; position: absolute; left: 9px; top: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--hy-brand, #8f2d2d); }
.hy-inbox-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hy-inbox-top time { margin-left: auto; font-size: 12px; color: #a3938c; white-space: nowrap; }
.hy-inbox-item b { display: block; font-size: 15px; line-height: 1.5; }
.hy-inbox-item small { display: block; margin-top: 3px; font-size: 13px; line-height: 1.65; color: #6f5f59; }
.hy-inbox-meta { display: block; margin-top: 3px; font-size: 13px; color: #6f5f59; }
.hy-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1ece9; color: #6b5a54; }
.hy-chip.is-hold { background: #e7f5ee; color: #1f7a4d; }
.hy-chip.is-mail { background: #f8e9e7; color: #9a2f2f; }
.hy-chip.is-staff { background: #fdf2da; color: #8a6200; }
.hy-chip.is-wait { background: #eef1f6; color: #4a5a78; }
.hy-chip.is-news { background: #f1ece9; color: #6b5a54; }
.hy-inbox-empty { padding: 40px 26px; font-size: 14px; line-height: 1.9; color: #8b7a73; text-align: center; }
.hy-inbox-login { display: inline-block; margin-top: 10px; padding: 8px 20px; border-radius: 999px; background: var(--hy-brand, #8f2d2d); color: #fff !important; text-decoration: none !important; }
.hy-inbox-warn { margin: 12px 16px 0; padding: 10px 14px; border-radius: 12px; background: #fdf6e3; color: #7a5a00; font-size: 13px; }
.hy-inbox-more { display: block; padding: 16px 20px; font-size: 13px; color: var(--hy-brand, #8f2d2d); text-align: center; }
@media (max-width: 767px) {
	/* 手機：訊息匣整頁打開，比較好讀 */
	.hy-inbox { position: fixed; inset: 0; width: auto; height: auto; bottom: 0; border-radius: 0;
		padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); z-index: 1000; }
	.hy-inbox-head { padding-top: 16px; }
	html.hy-inbox-open { overflow: hidden; }
	html.hy-inbox-open .hy-bell-btn { visibility: hidden; }
}

/* ── 行動借閱證 ───────────────────────────────────── */
.hy-card-fab {
	position: fixed; right: 20px; bottom: 84px; z-index: 900; width: 64px; height: 64px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	border: 0; border-radius: 50%; background: #3f6f6a; color: #fff; cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25); font-size: 11px; font-weight: 700; line-height: 1.15; letter-spacing: .05em;
}
.hy-card-fab span { display: block; text-align: center; }
.hy-card-fab:hover { transform: translateY(-2px); }
.hy-card-screen {
	position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center;
	background: rgba(24, 20, 19, .72); padding: 20px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.hy-card-screen[hidden] { display: none; }
.hy-cs-sheet { position: relative; width: min(400px, 100%); }
.hy-cs-close {
	display: block; margin: 0 0 12px auto; border: 0; background: none; color: #8fc3ff;
	font-size: 18px; font-weight: 700; cursor: pointer; padding: 6px 4px;
}
.hy-cs-card { background: #fff; border-radius: 18px; padding: 26px 22px 20px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.hy-cs-code { position: relative; min-height: 96px; display: flex; align-items: center; justify-content: center; }
.hy-cs-img { width: 100%; max-width: 330px; height: 100px; }
.hy-cs-img svg { width: 100%; height: 100%; display: block; }
.hy-cs-img.is-blur { filter: blur(7px); opacity: .35; }
.hy-cs-expired { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.hy-cs-expired[hidden] { display: none; }
.hy-cs-expired span { font-weight: 700; color: #3f3330; }
.hy-cs-again { border: 0; border-radius: 999px; padding: 8px 22px; background: var(--hy-brand, #8f2d2d); color: #fff; font-weight: 700; cursor: pointer; }
.hy-cs-no { margin-top: 4px; font-size: 14px; letter-spacing: .18em; color: #6f5f59; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.hy-cs-left { margin-top: 10px; font-size: 19px; font-weight: 700; color: #d9771f; font-variant-numeric: tabular-nums; min-height: 1.4em; }
.hy-card-screen.is-soon .hy-cs-left { color: #c62828; }
.hy-cs-title { margin-top: 12px; font-size: 15px; color: #6f5f59; letter-spacing: .1em; }
.hy-cs-name { margin-top: 10px; font-size: 20px; font-weight: 700; color: #2f2523; }
.hy-cs-status { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.6; }
.hy-cs-status[hidden] { display: none; }
.hy-cs-status.is-bad { background: #fdecea; color: #a12622; }
.hy-cs-terms { margin: 14px 0 0; font-size: 14px; line-height: 1.7; color: #3f3330; text-align: justify; text-align-last: center; }
.hy-cs-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #efe7e2; font-size: 12px; color: #8b7a73; }
html.hy-card-open { overflow: hidden; }
@media (max-width: 767px) {
	.hy-card-fab { right: 14px; bottom: 136px; width: 60px; height: 60px; }
}
/* 條碼／QR Code 切換 */
.hy-cs-switch { display: inline-flex; gap: 4px; margin: 0 auto 16px; padding: 4px; border-radius: 999px; background: #f1ece9; }
.hy-cs-switch button { border: 0; border-radius: 999px; padding: 7px 18px; background: none; color: #6b5a54; font-size: 14px; font-weight: 700; cursor: pointer; }
.hy-cs-switch button.is-on { background: #3f6f6a; color: #fff; }
.hy-card-screen.is-qr .hy-cs-code { min-height: 210px; }
.hy-cs-img.is-qr { width: 200px; height: 200px; max-width: 70vw; max-height: 70vw; }

/* ── 空區塊不要先閃一下再隱藏（2026-11-13）──────────────────────
   section.news / section.newbook 是 SSR 出來的，瀏覽器第一次繪製就看得到；
   hy-enhance.js 是 defer 載入、還要等 run() 輪詢才隱藏，中間那段空窗
   就是使用者看到的「閃一下」。改用 CSS 在第一次繪製當下就判斷，零延遲。
   :has() 不支援的舊瀏覽器會整條忽略，退回原本由 JS 隱藏的行為，不會壞。 */
section.news:not(:has(#newsList li)) { display: none !important; }
section.newbook:not(:has(.hy-nb-item)) { display: none !important; }
