/* ================= 联机派对玩法（js/online-party.js） ================= */
/* 头像兜底（没有 js/avatar.js 时）：名字首字放在 data-i，DOM 翻译不会碰它 */
.olp-av { --s: 34px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: inline-grid; place-items: center; position: relative;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 55%, #2a0b16), #140a0e); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  box-shadow: 0 0 14px -6px var(--c); }
.olp-av::before { content: attr(data-i); font: 600 calc(var(--s) * .44)/1 var(--serif); color: #fff3e3; }
.olp-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.olp-who b { font: 600 15px/1.3 var(--serif); letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 顶部横幅：玫瑰 / 受罚 */
.olp-pen, .olp-rose { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 22px; animation: rise .45s var(--ease) both;
  background: radial-gradient(120% 90% at 50% 0%, #d93a5e2a, transparent 70%), #12080d; border: 1px solid #d93a5e66; box-shadow: 0 0 34px -14px #d93a5e; }
.olp-rose { border-color: #e6809a88; background: radial-gradient(120% 90% at 50% 0%, #e6809a26, transparent 70%), #12080d; }
.olp-pen .card, .olp-rose .card { margin: 0; }
.olp-band { display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap; font: 600 14px/1.4 var(--serif); letter-spacing: .1em; color: #ffd9de; }
.olp-band small { font: 400 11.5px var(--sans); letter-spacing: .06em; color: var(--mute); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line2); }
.olp-band em { font: italic 600 12px var(--latin); color: var(--gold); }
.olp-chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.olp-chips > span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--gold2); padding: 4px 10px; border-radius: 999px; background: #d9b26f12; border: 1px solid #d9b26f33; }
.olp-chips i { font-style: normal; }

/* 打字任务 */
.olp-type { display: flex; gap: 8px; align-items: stretch; }
.olp-type textarea, .olp-box textarea { flex: 1; min-width: 0; resize: none; font: 15px/1.5 var(--sans); color: var(--text); padding: 11px 13px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--line2); }
.olp-type textarea:focus, .olp-box textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px #d9b26f1f; }
.olp-type button { flex: none; padding: 0 16px; }
.olp-bubble { align-self: center; max-width: 92%; padding: 12px 16px; border-radius: 18px 18px 18px 6px; background: linear-gradient(170deg, #3a1424, #1d0b13); border: 1px solid #d9b26f44;
  animation: rise .4s var(--ease) both; }
.olp-bubble small { display: block; color: var(--gold); font-size: 11.5px; letter-spacing: .08em; margin-bottom: 4px; }
.olp-bubble p { margin: 0; font: 500 17px/1.6 var(--serif); overflow-wrap: anywhere; white-space: pre-wrap; }

/* 通用：排行 / 计票条 */
.olp-board, .olp-votes { display: flex; flex-direction: column; gap: 7px; }
.olp-bd, .olp-vb { display: grid; grid-template-columns: auto auto minmax(0, 1fr) 70px 30px; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); text-align: left; }
.olp-vb { grid-template-columns: auto minmax(0, 1fr) 76px 24px; width: 100%; }
.olp-bd em { font: italic 600 15px/1 var(--latin); color: var(--mute); width: 16px; text-align: center; }
.olp-bd.r1 { border-color: #d9b26f88; box-shadow: 0 0 22px -10px var(--gold); } .olp-bd.r1 em { color: var(--gold2); }
.olp-bd.r2 em, .olp-bd.r3 em { color: var(--gold); }
.olp-bd b, .olp-vb b { font: 600 14.5px/1.3 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olp-bd strong, .olp-vb strong, .olp-qr strong { font: 600 17px/1 var(--latin); color: var(--gold2); text-align: right; }
.olp-bar { height: 6px; border-radius: 99px; background: #ffffff0d; overflow: hidden; }
.olp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent2), var(--accent), var(--gold)); transition: width .5s var(--ease); }
.olp-vb.on { border-color: var(--gold); box-shadow: 0 0 20px -8px var(--gold); background: linear-gradient(180deg, #3a1424, #1b0e15); }
.olp-prog { font: italic 500 13px var(--latin); letter-spacing: .14em; color: var(--gold); }
.olp-win { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 16px; border-radius: 22px; text-align: center;
  background: radial-gradient(100% 120% at 50% 0%, #d9b26f2a, transparent 70%), linear-gradient(170deg, var(--card2), #12080d); border: 1px solid #d9b26f55; animation: rise .5s var(--ease) both; }
.olp-win > small, .olp-hot > small, .olp-land > small, .olp-turn > small { font: italic 500 12px var(--latin); letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.olp-win .big { margin: 0; font: 600 21px var(--serif); letter-spacing: .1em; }
.olp-tops { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; }
.olp-tops .olp-who { flex-direction: column; gap: 6px; }
.olp-tops .olp-who b { font-size: 18px; color: var(--gold2); }
.olp-hot, .olp-land, .olp-turn { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.olp-hot .olp-who, .olp-land .olp-who { flex-direction: column; gap: 6px; }
.olp-hot .olp-who b, .olp-land .olp-who b { font-size: 19px; color: var(--gold2); letter-spacing: .1em; }
.olp-turn { flex-direction: row; justify-content: center; gap: 10px; }
.olp-qn { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 0 4px; }
.olp-qn span { font: 600 14px var(--serif); letter-spacing: .14em; color: var(--gold2); white-space: nowrap; }
.olp-qn small { font-size: 11.5px; color: var(--mute); text-align: right; }

/* 倒计时 */
.olp-clock { display: flex; align-items: center; gap: 10px; }
.olp-clock span { font: 600 20px/1 var(--latin); color: var(--gold2); min-width: 44px; font-variant-numeric: tabular-nums; }
.olp-time { flex: 1; height: 6px; border-radius: 99px; background: #ffffff0d; overflow: hidden; }
.olp-time i { display: block; height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--gold), var(--accent)); animation: olpDrain linear both; }
.olp-clock.end span { color: #ffb3c0; animation: olBlink .8s ease-in-out infinite; }
@keyframes olpDrain { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* 真心话轮盘 */
.olp-wheel { position: relative; width: min(280px, 78vw); aspect-ratio: 1; margin: 6px auto 0; }
.olp-wheel svg { width: 100%; height: 100%; display: block; transition: transform 3.2s cubic-bezier(.12, .72, .1, 1); filter: drop-shadow(0 18px 30px #000a); }
.olp-wheel path { stroke: #0b0609; stroke-width: 1.5; opacity: .82; }
.olp-wheel text { fill: #1a0a10; font: 700 12px var(--serif); letter-spacing: .04em; text-anchor: middle; dominant-baseline: middle; }
.olp-rim { fill: none; stroke: var(--gold); stroke-width: 2; opacity: .8; }
.olp-hub { fill: #160a10; stroke: var(--gold); stroke-width: 1.5; }
.olp-ptr { position: absolute; z-index: 2; left: 50%; top: -6px; width: 0; height: 0; transform: translateX(-50%);
  border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 20px solid var(--gold2); filter: drop-shadow(0 3px 6px #000c); }
.olp-go { animation: olPulse 1.8s ease-in-out infinite; }
.olp-late { animation: olpLate .45s 3.05s var(--ease) both; }
@keyframes olpLate { from { opacity: 0; transform: translateY(8px); } }
.olp-crown { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }

/* 快问快答 */
.olp-q p.big { margin: 12px 0 6px; }
.olp-opts button { text-align: left; }
.olp-qr { display: grid; grid-template-columns: auto minmax(0, 1fr) 60px 22px; grid-template-rows: auto auto; align-items: center; gap: 4px 9px; padding: 10px 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line); }
.olp-qr > i { font: italic 600 15px var(--latin); color: var(--gold); font-style: normal; }
.olp-qr b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olp-qr .olp-avs { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 3px; }
.olp-qr.maj { border-color: var(--gold); box-shadow: 0 0 20px -8px var(--gold); }
.olp-qr.maj b::after { content: " ✓"; color: var(--gold2); }
.olp-qr.me { background: linear-gradient(180deg, #3a1424, #1b0e15); }
.olp-got { text-align: center; font: 700 26px/1.2 var(--latin); letter-spacing: .08em; color: var(--mute); padding: 6px; }
.olp-got.on { color: var(--gold2); text-shadow: 0 0 18px #d9b26f88; animation: rise .4s var(--ease) both; }
.olp-done { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.olp-done > span { opacity: .3; transition: opacity .3s, transform .3s; }
.olp-done > span.on { opacity: 1; transform: scale(1.08); }

/* 心动配对 */
.olp-intro .big { margin: 10px 0 6px; }
.olp-hearts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.olp-hearts button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 10px; border-radius: 18px; }
.olp-hearts b { font: 600 13.5px/1.2 var(--serif); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.olp-hearts i { font-style: normal; font-size: 18px; color: var(--mute); line-height: 1; }
.olp-hearts button.on { border-color: var(--accent); background: radial-gradient(100% 100% at 50% 0%, #d93a5e44, #1b0e15); box-shadow: 0 0 24px -8px var(--accent); }
.olp-hearts button.on i { color: #fff; animation: rise .3s var(--ease) both; }
.olp-match { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px; border-radius: 24px; text-align: center;
  background: radial-gradient(110% 120% at 50% 0%, #d93a5e55, #2a0510 70%); border: 1px solid #e6809a88; box-shadow: 0 0 44px -10px #d93a5e; animation: olpBeat .9s var(--ease) both; }
.olp-match .big { margin: 4px 0 0; font: 600 20px/1.5 var(--serif); }
.olp-match .big b { color: var(--gold2); }
.olp-pair { display: flex; align-items: center; gap: 12px; font-size: 28px; }
.olp-nomatch .big { margin: 0 0 8px; font-size: 19px; }
@keyframes olpBeat { 0% { transform: scale(.9); opacity: 0; } 55% { transform: scale(1.03); opacity: 1; } 100% { transform: scale(1); } }

/* 提问箱 */
.olp-box { display: flex; flex-direction: column; gap: 10px; }
.olp-sug { display: flex; flex-wrap: wrap; gap: 6px; }
.olp-sug .chip { font-size: 12.5px; padding: 6px 11px; text-align: left; }
.olp-boxq p.big { overflow-wrap: anywhere; }

/* 惩罚拍卖 */
.olp-lot { padding-top: 26px; }
.olp-gavel { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); font-size: 18px; z-index: 1; }
.olp-bid { display: flex; flex-direction: column; gap: 10px; }
.olp-step { display: flex; align-items: center; justify-content: center; gap: 18px; }
.olp-step button { width: 54px; height: 54px; border-radius: 50%; font: 600 24px/1 var(--latin); padding: 0; }
.olp-step strong { font: 600 46px/1 var(--latin); color: var(--gold2); min-width: 64px; text-align: center; text-shadow: 0 0 20px #d9b26f55; }
.olp-bids { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.olp-bids span { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: #ffffff08; border: 1px solid #ffffff12; color: var(--mute); }
.olp-bids b { color: var(--gold2); }

/* 秘密任务 */
.olp-mission { font: 600 20px/1.6 var(--serif) !important; margin: 4px 0 !important; }
.olp-claim { text-align: center; font: 600 15px var(--serif); letter-spacing: .1em; color: var(--mute); padding: 10px; border-radius: 14px; border: 1px dashed var(--line2); }
.olp-claim.on { color: var(--gold2); border-style: solid; border-color: var(--gold); }
.olp-mlist { display: flex; flex-direction: column; gap: 7px; }
.olp-mlist > div { display: grid; grid-template-columns: auto auto 1fr; grid-template-rows: auto auto; gap: 2px 9px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.olp-mlist > div.ok { border-color: #d9b26f77; }
.olp-mlist b { font: 600 14px var(--serif); }
.olp-mlist em { font-style: normal; justify-self: end; color: var(--mute); font-size: 13px; }
.olp-mlist .ok em { color: var(--gold2); }
.olp-mlist p { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--mute); line-height: 1.5; }

/* 速配包厢 */
.olp-booth { display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 22px; padding: 6px 0 0; }
.olp-rooms { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.olp-rooms > span { display: inline-flex; align-items: center; gap: 2px; padding: 4px 8px 4px 6px; border-radius: 999px; background: #ffffff07; border: 1px solid #ffffff10; }
.olp-rooms > span.me { border-color: var(--gold); }
.olp-rooms em { font: italic 600 12px var(--latin); color: var(--gold); margin-right: 3px; font-style: normal; }
.olp-rate { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.olp-rate button { padding: 18px 8px; font: 600 16px var(--serif); letter-spacing: .08em; }

/* 礼物（占位，默认隐藏） */
.olp-gifts { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: #0c0609; border: 1px dashed #d9b26f44; }
.olp-gifts-h { display: flex; justify-content: space-between; align-items: baseline; font: 600 13px var(--serif); letter-spacing: .2em; color: var(--gold); }
.olp-gifts-h small { font: 400 11.5px var(--sans); letter-spacing: .04em; color: var(--mute); }
.olp-gift-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.olp-gift-row button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; }
.olp-gift-row span { font-size: 22px; line-height: 1.1; }
.olp-gift-row b { font-size: 12px; font-weight: 500; color: var(--mute); }

@media (max-width: 359px) {
  .olp-hearts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .olp-bd { grid-template-columns: auto auto minmax(0, 1fr) 48px 26px; gap: 7px; }
  .olp-vb { grid-template-columns: auto minmax(0, 1fr) 54px 22px; }
}
@media (prefers-reduced-motion: reduce) { .olp-wheel svg { transition: none; } .olp-late { animation: none; } }
.olp-mate b { margin-left: .25em; }
:lang(zh-CN) .olp-mate b { margin-left: 0; }
