/* 酒殺隊線上版說明書。手機優先，左右留白 16px。
   render.mjs 的 class（cfg、items、role-card…）跟 PDF 共用、沒有前綴，所以一律掛在 .fhp 底下，
   避免撞到主題的同名 class；h2/h3/a 明寫顏色（主題有裸元素規則會蓋過繼承）。 */
:root {
	--fhp-bg: #f4f5f7; --fhp-ink: #161616; --fhp-mute: #5f5f5f; --fhp-rust: #b4542c; --fhp-line: #dcdcdf;
	--fhp-good: #e7d9bb; --fhp-goodInk: #4a3519; --fhp-bad: #5d3a78; --fhp-badInk: #f3e8ff; --fhp-host: #6f9e72; --fhp-hostInk: #0f220f;
	--fhp-night: #111214; --fhp-nightInk: #f4f5f7;
}
html.fhp-lock, html.fhp-lock body { overflow: hidden; }
body.fhp-body {
	margin: 0; background: var(--fhp-bg); color: var(--fhp-ink);
	font-family: "Noto Sans TC", system-ui, sans-serif; font-size: 17px; line-height: 1.7;
	-webkit-text-size-adjust: 100%; overflow-x: hidden;
}
.fhp-body [hidden] { display: none !important; }

/* 頁首／頁尾 */
.fhp-top { display: flex; align-items: center; justify-content: space-between; max-width: 720px; margin: 0 auto; padding: 14px 16px; box-sizing: border-box; }
.fhp-top__logo img { display: block; width: auto; height: 22px; }
.fhp-top__buy { color: var(--fhp-rust); font-weight: 700; font-size: 15px; text-decoration: none; }
.fhp-foot { max-width: 720px; margin: 0 auto; padding: 8px 16px 40px; box-sizing: border-box; display: grid; gap: 12px; }
.fhp-foot__warn { margin: 8px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: var(--fhp-mute); }
.fhp-btn { display: block; text-align: center; padding: 14px 16px; border-radius: 12px; background: var(--fhp-ink); color: #fff; font-weight: 700; text-decoration: none; }
.fhp-btn--ghost { background: transparent; color: var(--fhp-ink); border: 2px solid var(--fhp-ink); }

/* 主體 */
.fhp { max-width: 720px; margin: 0 auto; padding: 0 16px 24px; box-sizing: border-box; }
/* 主題（Blocksy）給 table／th／td 四邊框、h1–h4 品牌英文字型；這頁的表格只要底線，標題跟內文同字型（上線實測才看到） */
.fhp table, .fhp th, .fhp td { border: 0; }
.fhp h1, .fhp h2, .fhp h3, .fhp h4 { font-family: inherit; }
.fhp img { display: block; max-width: 100%; height: auto; mix-blend-mode: multiply; }
.fhp h1, .fhp h2, .fhp h3, .fhp h4 { color: var(--fhp-ink); margin: 0; line-height: 1.3; }
.fhp a { color: var(--fhp-rust); }
.fhp p { margin: 0; }
.fhp button { font: inherit; cursor: pointer; }

.fhp-hero { padding: 8px 0 24px; }
.fhp-k { font-size: 12px; letter-spacing: .2em; font-weight: 700; color: var(--fhp-mute); }
.fhp-hero h1 { font-size: 34px; font-weight: 900; margin-top: 4px; }
.fhp-players { margin-top: 4px; font-size: 18px; font-weight: 700; }
.fhp-hero__img { margin: 16px 0; width: 100%; }
.fhp-warn { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--fhp-ink); color: #fff; font-weight: 700; font-size: 15px; text-align: center; }
.fhp-prec { margin-top: 12px; padding: 10px 12px; border: 2px dashed var(--fhp-rust); border-radius: 10px; font-size: 15px; font-weight: 700; }
#fhp-host-open { margin-top: 16px; width: 100%; padding: 16px; border: 0; border-radius: 14px; background: var(--fhp-rust); color: #fff; font-size: 18px; font-weight: 900; }

.fhp-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--fhp-bg); border-bottom: 1px solid var(--fhp-line); scrollbar-width: none; }
.fhp-nav::-webkit-scrollbar { display: none; }
.fhp-nav a { flex: none; padding: 6px 12px; border-radius: 99px; background: #fff; color: var(--fhp-ink); font-size: 14px; font-weight: 700; text-decoration: none; }

.fhp-sec { padding-top: 32px; }
/* 主題對 :target 把 scroll-margin 歸零，點導覽列跳過去標題會被黏住的導覽列蓋住；要比它權重高 */
.fhp .fhp-sec, .fhp .fhp-sec:target { scroll-margin-top: 56px; }
.fhp-sec h2 { font-size: 26px; font-weight: 900; margin-bottom: 12px; }
.fhp-sec h3 { font-size: 19px; font-weight: 900; margin: 24px 0 8px; }
.fhp-hint { color: var(--fhp-mute); font-size: 15px; margin-bottom: 10px; }
.fhp-note { margin-top: 16px; padding: 12px 14px; border: 2px dashed var(--fhp-rust); border-radius: 12px; background: #fff; font-weight: 700; }

.fhp .items { margin: 0; padding-left: 1.3em; }
.fhp .items li { margin: 0 0 6px; }
.fhp .items li::marker { color: var(--fhp-rust); font-weight: 900; }

.fhp .side { border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.fhp .side h3 { margin: 0 0 4px; font-size: 19px; color: inherit; }
.fhp .side-good { background: var(--fhp-good); color: var(--fhp-goodInk); }
.fhp .side-bad { background: var(--fhp-bad); color: var(--fhp-badInk); }

.fhp .tag { display: inline-block; font-size: 13px; font-weight: 700; padding: 1px 10px; border-radius: 99px; }
.fhp .tag-good { background: var(--fhp-good); color: var(--fhp-goodInk); }
.fhp .tag-bad { background: var(--fhp-bad); color: var(--fhp-badInk); }
.fhp .tag-host { background: var(--fhp-host); color: var(--fhp-hostInk); }

/* 配牌 */
.fhp-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fhp-pick button { flex: 1 0 calc(25% - 8px); padding: 10px 0; border: 2px solid var(--fhp-ink); border-radius: 10px; background: #fff; color: var(--fhp-ink); font-weight: 900; }
.fhp-pick button[aria-pressed="true"] { background: var(--fhp-ink); color: #fff; }
.fhp-pick button small { display: block; font-size: 12px; font-weight: 700; opacity: .7; }
.fhp-team { min-height: 1.7em; font-weight: 700; margin-bottom: 8px; }
.fhp-scroll { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.fhp .cfg { border-collapse: collapse; width: 100%; min-width: 440px; font-size: 14px; line-height: 1.3; }
.fhp .cfg th, .fhp .cfg td { padding: 7px 2px; border-bottom: 1px solid var(--fhp-line); text-align: center; }
.fhp .cfg thead th { font-weight: 900; border-bottom: 2px solid var(--fhp-ink); }
.fhp .cfg tbody th { text-align: left; font-weight: 700; white-space: nowrap; }
.fhp .cfg td { font-weight: 900; }
.fhp .cfg tr.cfg-bad th, .fhp .cfg tr.cfg-bad td { color: var(--fhp-bad); }
.fhp .cfg tr.cfg-host th, .fhp .cfg tr.cfg-host td { color: #3e6b41; }
.fhp .cfg .is-on { background: #fff3c4; }
.fhp .cfg thead .is-on { background: var(--fhp-ink); color: #fff; }

/* 夜晚台詞 */
.fhp .night-skip { color: var(--fhp-mute); margin-bottom: 8px; }
.fhp .night { list-style: none; margin: 0; padding: 0; }
.fhp .night-step { margin-bottom: 14px; }
.fhp .night-step h4 { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 900; }
.fhp .night-n { width: 24px; height: 24px; border-radius: 50%; background: var(--fhp-ink); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fhp .night-step ul { list-style: none; margin: 4px 0 0 32px; padding: 0; }
.fhp .night-step .say { font-weight: 900; }
.fhp .night-step .do { color: var(--fhp-mute); font-size: 15px; }
.fhp .cond { color: var(--fhp-rust); font-size: 13px; font-weight: 700; }

/* 角色 */
.fhp-role { background: #fff; border-radius: 14px; margin-bottom: 10px; }
.fhp-role summary { list-style: none; cursor: pointer; padding: 10px 12px; }
.fhp-role summary::-webkit-details-marker { display: none; }
.fhp .role-card { display: flex; gap: 12px; align-items: center; }
.fhp .role-card .card-img { width: 64px; flex: none; border-radius: 6px; aspect-ratio: 727 / 1000; object-fit: cover; }
.fhp .role-card__body { flex: 1; min-width: 0; }
.fhp .role-card h3 { font-size: 18px; font-weight: 900; margin: 0; }
.fhp .role-card p { color: var(--fhp-mute); font-size: 14px; margin-top: 2px; }
.fhp-role summary .role-card::after { content: "＋"; margin-left: auto; color: var(--fhp-rust); font-weight: 900; }
.fhp-role[open] summary .role-card::after { content: "－"; }
.fhp-role[open] summary .card-img { display: none; } /* 展開後下面有大張的，不重複 */
.fhp .role-detail { padding: 0 12px 14px; }
.fhp .role-detail__cards { display: flex; gap: 8px; margin-bottom: 4px; }
.fhp .role-detail__cards .card-img { width: calc(50% - 4px); max-width: 140px; border-radius: 10px; aspect-ratio: 727 / 1000; }
.fhp-role .role-detail h3, .fhp-role .role-detail .tag { display: none; }
.fhp .role-detail h4 { font-size: 16px; font-weight: 900; color: var(--fhp-rust); margin: 12px 0 4px; }
.fhp .role-detail .notes { color: var(--fhp-mute); font-size: 14px; }

/* 喝酒 */
.fhp .drinks { width: 100%; border-collapse: collapse; }
.fhp .drinks thead th { font-size: 13px; color: var(--fhp-mute); text-align: left; border-bottom: 2px solid var(--fhp-ink); padding: 4px 0; }
.fhp .drinks tbody th, .fhp .drinks tbody td { text-align: left; vertical-align: top; padding: 10px 0; border-bottom: 1px solid var(--fhp-line); }
.fhp .drinks tbody th { width: 38%; padding-right: 12px; font-weight: 700; }
.fhp .drinks tbody td { font-weight: 900; }

/* 主持人帶局（全螢幕、深色，桌上燈暗也看得清楚） */
/* 只有中間的卡片會捲；上面的列與下面的按鈕固定在畫面內（iPhone SE 扣掉網址列只剩 548px 高） */
.fhp-host { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: var(--fhp-night); color: var(--fhp-nightInk); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); box-sizing: border-box; overflow: hidden; }
.fhp-host button { border: 0; border-radius: 12px; font-weight: 700; }
.fhp-host__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.fhp-host__where { font-weight: 700; color: #b9bcc2; }
.fhp-host__bar button { padding: 8px 14px; background: #2a2c31; color: var(--fhp-nightInk); }
.fhp-host__pick { flex: 1; min-height: 0; overflow-y: auto; margin-top: 24px; }
.fhp-host .fhp-host__resume { width: 100%; margin-bottom: 24px; padding: 16px; background: var(--fhp-rust); color: #fff; font-size: 18px; font-weight: 900; }
.fhp-host__pick p { font-size: 22px; font-weight: 900; margin-bottom: 12px; }
.fhp-host .fhp-pick button { background: #2a2c31; color: var(--fhp-nightInk); border: 2px solid #3a3d44; padding: 14px 0; font-size: 18px; }
.fhp-host__card { flex: 1; min-height: 0; overflow-y: auto; margin-top: 20px; }
.fhp-host__phase { color: #e08a63; font-weight: 700; font-size: 14px; letter-spacing: .1em; }
.fhp-host__card h2 { color: var(--fhp-nightInk); font-size: 30px; font-weight: 900; margin: 4px 0 16px; }
.fhp-host__lines { list-style: none; margin: 0; padding: 0; }
.fhp-host__lines li { margin-bottom: 14px; }
.fhp-host__lines .say { font-size: 24px; font-weight: 900; line-height: 1.45; }
.fhp-host__lines .do { font-size: 17px; color: #c9ccd1; }
.fhp-host__nav { flex: none; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 12px; }
.fhp-host__nav button { padding: 16px; font-size: 18px; background: #2a2c31; color: var(--fhp-nightInk); }
.fhp-host__nav [data-act="next"] { background: var(--fhp-rust); color: #fff; font-weight: 900; }
.fhp-host__nav button:disabled { opacity: .35; }
.fhp-host__more { flex: none; display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.fhp-host__more button { flex: 1; padding: 10px; background: transparent; color: #b9bcc2; border: 1px solid #3a3d44; }

@media (min-width: 720px) {
	.fhp-hero h1 { font-size: 44px; }
	.fhp-pick button { flex-basis: calc(12.5% - 8px); }
	.fhp-host { max-width: 560px; margin: 0 auto; }
}
