/* 烟花大会 · 常驻样式（festival.js）：聊天卡片、场次列表。来源：审核通过的 deploy/previews/fireworks-festival/festival/festival.css。
   夜空底，深浅模式共用一张剪影。播放页样式在 hanabi/player.css，点开时才加载。 */
.hf-cover { display: block; width: 100%; height: 100%; opacity: .34; transition: opacity .4s ease, filter .4s ease; }
.hf-cover.watched { opacity: 1; filter: drop-shadow(0 0 5px var(--hf-accent, #f2c46b)); }
/* 简介、说明按分句排，句子不从中间断开（「…同一片夜 / 空汇合」「…才开 / 始」）；text-wrap: balance 老版本 Safari 不认，靠分句兜底（列表行的在下面 .hf-row p .cl） */
.hf-card .rule .cl { display: inline-block; }
.hf-card { position: relative; width: 268px; letter-spacing: normal; border-radius: 18px; overflow: hidden; background: linear-gradient(160deg, #1a1d3a, #2f2850); color: #fff4de; box-shadow: 0 6px 20px #0003; font: 14px/1.5 -apple-system, "PingFang SC", sans-serif; }
.hf-card .art { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(110% 100% at 50% 10%, #1e2550, #0b1020 75%); }
.hf-card .top { padding: 12px 16px 10px; }
.hf-card small { display: block; font-size: 11px; letter-spacing: .16em; color: #d8c29a; }
.hf-card strong { display: block; margin-top: 4px; font: 500 19px/1.35 "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif; letter-spacing: .08em; }
.hf-card strong.bless { font-size: 17px; line-height: 1.5; text-wrap: balance; }
.hf-card .song { display: block; margin-top: 3px; font-size: 12px; color: #cfb98f; }
.hf-card .rule { display: block; margin-top: 6px; font-size: 11.5px; color: #ffffffa8; text-wrap: balance; }
.hf-card .bottom { padding: 10px 16px 14px; border-top: 1px solid #ffffff1a; }
/* 聊天卡片「导火索」（P-046）：按钮居中通栏。底下一层是烧过的暗底和浅色字，上面一层是金色引线和深色字，按剩余时间从右往左裁掉。
   客户端 style.css 的全局 .btn 是表单按钮，这里整套盖掉；卡片和场次列表不继承主题正文的字距 */
.hf-card .go { position: relative; display: block; width: 100%; height: 44px; padding: 0; border: 1px solid #f2c46b55; border-radius: 99px; overflow: hidden; background: #ffffff12; color: #ffe9b8; font: 600 15px/42px -apple-system, "PingFang SC", sans-serif; letter-spacing: normal; text-align: center; white-space: nowrap; cursor: pointer; }
.hf-card .go .fuse { position: absolute; inset: 0; background: #f2c46b; color: #241a05; }
.hf-card .go .label { display: block; }
.hf-card .go:disabled { opacity: .7; cursor: default; }
.hf-card .go:focus-visible { outline: 2px solid #fff4de; outline-offset: 2px; }
.hf-card .go .spark { position: absolute; top: 50%; left: 100%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: radial-gradient(circle, #fffbe8 0 30%, #ffc85a 45%, #ff8a3d00 72%); box-shadow: 0 0 10px 3px #ffb14a99; opacity: 0; pointer-events: none; }
.hf-card[data-state="theirs"] .go .spark { opacity: 1; animation: hf-spark .18s steps(2) infinite; }
@keyframes hf-spark { 50% { transform: scale(1.35); box-shadow: 0 0 14px 5px #ffb14acc; } }
/* Ta 点亮了：整颗按钮轻轻发光，催一下 */
.hf-card[data-state="theirs"] .go { animation: hf-call 1s ease-in-out infinite; }
@keyframes hf-call { 50% { box-shadow: 0 0 0 4px #f2c46b33, 0 0 18px #f2c46b55; } }
/* 熄灭：引线全灭，火星处冒三缕烟 */
.hf-card[data-state="out"] .go .fuse { clip-path: inset(0 100% 0 0); }
.hf-card[data-state="out"] .go { color: #ffffffa0; }
.hf-card .go .smoke { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ffffff55; filter: blur(2px); pointer-events: none; animation: hf-smoke 1.2s ease-out both; }
@keyframes hf-smoke { from { opacity: .8; transform: translate(0, 0) scale(.6); } to { opacity: 0; transform: translate(6px, -26px) scale(2.2); } }
/* 已开播、看过：同一种描边按钮（金字金边），已开播前面一个播放图标 */
.hf-card[data-state="playing"] .go .fuse, .hf-card[data-state="ticket"] .go .fuse { display: none; }
.hf-card[data-state="playing"] .go, .hf-card[data-state="ticket"] .go { border-color: #f2c46b99; color: #f2c46b; }
.hf-card .go .play { width: 11px; height: 11px; margin-right: 6px; vertical-align: -.5px; }
/* 封面：Ta 点亮了，Ta 那一半先亮（左 = 发起方，右 = 接收方）；开播后整张点亮。已开播右上角一枚「正在放映」，前面一个呼吸的红点 */
.hf-card .art .half { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; }
.hf-card .art .half.l { clip-path: inset(0 50% 0 0); }
.hf-card .art .half.r { clip-path: inset(0 0 0 50%); }
.hf-card .art .half.on { opacity: 1; }
.hf-card .live { position: absolute; right: 10px; top: 9px; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 11px; line-height: 1.6; color: #241a05; background: var(--hf-accent); letter-spacing: .04em; }
.hf-card .live i { width: 6px; height: 6px; border-radius: 50%; background: #d8463b; animation: hf-live 1.4s ease-in-out infinite; }
@keyframes hf-live { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .hf-card .go, .hf-card .go .spark, .hf-card .live i { animation: none !important; } }
html.still .hf-card .go, html.still .hf-card .go .spark, html.still .hf-card .live i { animation: none !important; }   /* 「我的」里关了动态效果 */
/* 火种一闪：剪影中央冒出一点主题色的火星，放大、淡出，0.9 秒，只播一次 */

/* 聊天里：卡片本身就是整个气泡，去掉互动表情卡片的白底和内边距 */
.ip-card.hf-chat-card { padding: 0; border: 0; background: none; box-shadow: none; width: 100%; max-width: 320px; text-align: left; }
/* 2026-10-22 用户嫌窄（原来 268px，又被气泡外层 78% 的上限压到约 290px）：这一行放开上限，卡片占满头像旁边的可用宽度，最宽 320px */
.row:has(.hf-chat-card) .bubble-wrap { flex: 1; max-width: none; }
/* 触屏上旁边的「引用」「回应」小按钮让出位置，长按卡片的菜单里都有；已收藏的图钉标记照旧显示 */
@media (hover: none) { .row:has(.hf-chat-card) .reply-action:not(.active) { display: none; } }
.ip-card.hf-chat-card .hf-card { width: 100%; }
.ip-card.hf-chat-card strong { margin: 4px 0 0; }
/* 场次列表：底部弹出的一张面板 */
.hf-sheet { position: fixed; inset: 0; z-index: 8000; display: flex; align-items: flex-end; justify-content: center; background: #0b1020a6; }
.hf-sheet-panel { width: min(560px, 100%); letter-spacing: normal; max-height: 86vh; overflow: auto; padding: 18px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: #0b1020; color: #fff4de; font: 14px/1.5 -apple-system, "PingFang SC", sans-serif; }
/* 抽屉打开后背后的页面不能被拖动（2026-10-22 用户反馈）：遮罩本身不接受拖动，面板只上下滚、滚到头不带动外面；背后「在一起」页锁住滚动 */
.hf-sheet { overscroll-behavior: contain; touch-action: none; }
.hf-sheet-panel { overscroll-behavior: contain; touch-action: pan-y; }
body.hf-sheet-open .v4-screen { overflow: hidden; }
/* 不用 <header>：客户端全局 header（style.css 和主题 A）带米白底、固定高度和毛玻璃，面板标题会被染成一条米白横条（2026-10-22） */
.hf-sheet-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.hf-sheet-panel h2 { margin: 0; font: 500 20px/1.35 "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif; letter-spacing: .1em; }
.hf-sheet-head p { margin: 4px 0 0; font-size: 12.5px; color: #ffffffb0; }
.hf-sheet-close { margin-left: auto; width: 34px; height: 34px; flex: none; border: 1px solid #ffffff30; border-radius: 9px; background: #ffffff10; color: #fff4de; font-size: 20px; line-height: 1; cursor: pointer; }
/* 场次列表：横排（审核稿 P-031，2026-10-22 用户定先用到线上）。整行不是按钮，只有「邀请 Ta 一起看」会发出邀请 */
.hf-rows { display: flex; flex-direction: column; gap: 10px; }
.hf-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid #ffffff1a; border-radius: 16px; background: #0b1020; color: #fff4de; font: 13px/1.5 -apple-system, "PingFang SC", sans-serif; letter-spacing: normal; }
.hf-row .cover { position: relative; min-height: 104px; border-radius: 11px; overflow: hidden; background: radial-gradient(120% 90% at 50% 20%, #1c2348, #0b1020 70%); }
.hf-row .cover .hf-cover { position: absolute; inset: 0; }
.hf-row .seen { position: absolute; right: 6px; top: 5px; font-size: 10.5px; padding: 0 7px; border-radius: 99px; color: #241a05; background: var(--hf-accent); }
.hf-row .body { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hf-row strong { display: block; font: 500 16px/1.35 "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif; letter-spacing: .06em; }
.hf-row small { display: block; margin-top: 2px; font-size: 11px; color: #cfb98f; }
.hf-row p { margin: 5px 0 0; font-size: 12px; color: #ffffffb0; text-wrap: balance; }
.hf-row p .cl { display: inline-block; }
/* 底行两段各自不断开，放不下整段换行（「2026- / 10-21」） */
.hf-row footer { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-top: 5px; font-size: 10.5px; color: #ffffff80; }
.hf-row footer span { white-space: nowrap; }
.hf-row.watched footer span { color: var(--hf-accent); }
.hf-invite { margin-top: 9px; padding: 7px 14px; border: 0; border-radius: 99px; background: var(--hf-accent, #f2c46b); color: #241a05; font: 600 13px/1.4 -apple-system, "PingFang SC", sans-serif; white-space: nowrap; cursor: pointer; }
.hf-invite:focus-visible { outline: 2px solid #fff4de; outline-offset: 2px; }

/* 场次详情（T-037，原审核稿 P-047，2026-10-24 上线）：列表面板 .hf-sheet-panel 里点一行切到详情，夜空底；来源 deploy/previews/fireworks-festival/detail/detail.css。
   切过去时标题区和列表加 hidden，它们本身写了 display，这里补一条才藏得住 */
.hf-sheet-panel > [hidden] { display: none !important; }
.hf-sheet .hf-row { cursor: pointer; }
.hf-sheet .hf-row:focus-visible { outline: 2px solid #f2c46b; outline-offset: 2px; }
.hf-detail { color: #fff4de; letter-spacing: normal; }
.hf-detail:focus { outline: none; }
.hf-detail-back:focus-visible { outline: 2px solid #f2c46b; outline-offset: 2px; border-radius: 6px; }
.hf-detail-back { padding: 2px 0; margin: 0 0 10px; border: 0; background: none; color: #cfb98f; font: 14px/1.6 -apple-system, "PingFang SC", sans-serif; cursor: pointer; }
.hf-detail-hero { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: radial-gradient(120% 90% at 50% 25%, #1c2348, #0b1020 72%); }
.hf-detail-hero .hf-cover { position: absolute; inset: 0; }
.hf-detail-hero .seen { position: absolute; right: 10px; top: 9px; font-size: 11px; padding: 1px 8px; border-radius: 99px; color: #241a05; background: var(--hf-accent); }
.hf-detail h3 { margin: 14px 0 0; font: 500 22px/1.35 "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif; letter-spacing: .08em; }
.hf-detail .song { display: block; margin-top: 2px; font-size: 12.5px; color: #cfb98f; }
.hf-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.hf-facts span { padding: 1px 9px; border: 1px solid #ffffff24; border-radius: 99px; font-size: 11.5px; color: #ffffffb8; white-space: nowrap; }
.hf-facts span.on { border-color: transparent; color: #241a05; background: var(--hf-accent); }
.hf-detail section { margin-top: 20px; }
.hf-detail h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .16em; color: #d8c29a; }
.hf-detail section p, .hf-detail li { font-size: 13.5px; line-height: 1.85; color: #ffffffd0; }
.hf-detail section p { margin: 0; }
.hf-detail ul { margin: 0; padding-left: 1.1em; }
.hf-detail ul li + li { margin-top: 4px; }
.hf-timeline { margin: 0; padding: 0; list-style: none; border-left: 1px solid #ffffff24; }
.hf-timeline li { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 0 0 8px 14px; }
.hf-timeline li::before { content: ""; position: absolute; left: -4px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--hf-accent); }
.hf-timeline time { font: 600 12px/2.1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--hf-accent); }
.hf-detail-todo { color: #ffffff99 !important; font-size: 12.5px !important; }
.hf-timeline + .hf-detail-todo { margin-top: 2px !important; padding-left: 14px; }
/* 「邀请 Ta 一起看」贴在面板底部，滚动长内容时一直够得着 */
.hf-detail-cta { position: sticky; bottom: calc(-20px - env(safe-area-inset-bottom)); margin: 18px -16px calc(-20px - env(safe-area-inset-bottom)); padding: 14px 16px calc(20px + env(safe-area-inset-bottom)); background: linear-gradient(#0b102000, #0b1020 30%); }
.hf-detail-cta .hf-invite { display: block; width: 100%; margin: 0; padding: 11px 0; font-size: 15px; }
.hf-detail ul li b { font-weight: 600; color: #fff4de; }
.hf-detail section p + p { margin-top: 8px; }   /* 背景故事几段之间留一点空 */
