/* 酒館 */
#sec-tavern { gap: 8px; }

/* ── 大廳 ── */
.tv-hall { position: relative; flex: 1; min-height: 330px; margin: -6px -12px; overflow: hidden; background: #3a2c4a; }
.tv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tv-tip { position: absolute; left: 0; right: 0; top: 34%; z-index: 3; text-align: center; color: var(--gold); text-shadow: 0 2px 0 #07061a; animation: blink 1.4s steps(1) infinite; pointer-events: none; }
.tv-guests, .tv-desk { position: absolute; inset: 0; }
.tv-guests { z-index: 2; }
.tv-counter { z-index: 3; clip-path: inset(60% 0 0 0); pointer-events: none; }
.tv-desk { z-index: 4; pointer-events: none; }
.tv-deskslot { pointer-events: auto; }
.tv-guest { position: absolute; left: calc(4% + var(--i) * 23%); width: 23%; top: calc(60% - 56px); display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.tv-deskslot { top: 60%; }
.tv-guest .fig { width: 48px; height: 64px; animation: tvBob 1.2s steps(2) infinite; }
.tv-guest .fig.cold { filter: grayscale(.9) brightness(.55); animation: none; }
.tv-deskslot > img { width: 18px; height: 18px; margin-top: -10px; }
.tv-tag { --rc: var(--line); margin-top: 4px; padding: 3px 5px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12px; line-height: 1.2; background: rgba(7,6,26,.8); box-shadow: 0 0 0 2px var(--rc); white-space: nowrap; }
.tv-tag b { font-weight: normal; color: var(--text); font-size: 14px; }
.tv-tag i { font-style: normal; color: var(--rc); }
.tv-tag .tv-stars { margin-top: 1px; }
.tv-guest:active .fig { transform: translateY(2px); }

/* ── 博感情場景 ── */
.tv-chat { display: flex; flex-direction: column; gap: 8px; }
.tv-scene { position: relative; flex: none; height: 210px; margin: -6px -12px 0; overflow: hidden; background: #3a2c4a; }
.tv-scene .tv-bg { object-position: center 40%; }
.tv-fig { position: absolute; left: 50%; bottom: 46px; width: 60px; height: 80px; margin-left: -30px; z-index: 2; animation: tvBob 1.2s steps(2) infinite; }
.tv-back { position: absolute; left: 10px; top: 8px; z-index: 4; padding: 4px 8px; }
@keyframes tvBob { 50% { margin-bottom: 2px; } }
.tv-bubble { position: absolute; z-index: 3; max-width: 168px; min-height: 30px; padding: 6px 8px; color: #1a1428; background: #fff3c4; line-height: 1.4;
  box-shadow: 0 -3px 0 0 #1a1428, 0 3px 0 0 #1a1428, -3px 0 0 0 #1a1428, 3px 0 0 0 #1a1428, inset 0 -3px 0 0 #e0c98a; animation: fadeIn 120ms steps(2); }
.tv-bubble::after { content: ''; position: absolute; bottom: -9px; width: 6px; height: 6px; background: #fff3c4; box-shadow: 0 3px 0 0 #1a1428, 3px 0 0 0 #1a1428, -3px 0 0 0 #1a1428; }
.tv-bubble.left { left: 8px; top: 110px; }
.tv-bubble.left::after { left: 24px; }
.tv-bubble.right { right: 8px; top: 12px; }
.tv-bubble.right::after { right: 24px; }
.tv-bubble .cur { display: inline-block; width: 6px; height: 12px; margin-left: 1px; background: #1a1428; vertical-align: -2px; animation: blink 500ms steps(1) infinite; }

/* ── 對象列 ── */
.tv-who { flex: none; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.tv-name { font-size: 24px; line-height: 1; color: var(--gold); }
.tv-rar { font-size: 12px; }
.tv-stage { color: var(--ok); }
.tv-stage.max { color: var(--gold); }
.tv-bar { flex: 1; height: 11px; overflow: visible; }
.tv-bar i { transition: width 400ms steps(8); }
.tv-bar i.up { animation: tvUp 300ms steps(3); }
@keyframes tvUp { 50% { filter: brightness(1.8); } }
.tv-bar.gold i { animation: tvGold 700ms steps(7); }
@keyframes tvGold { 0%, 100% { background: var(--ok); } 30%, 70% { background: var(--gold); } }
.bar .tv-ticks i { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--line); transition: none; }
.bar .tv-ticks i.on { background: var(--gold); }
.tv-rel { min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.tv-pv { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tv-stars { display: flex; gap: 1px; height: 8px; }
.tv-stars img { width: 8px; height: 8px; }

/* ── 拉霸 ── */
.tv-slot { flex: none; display: flex; justify-content: center; padding: 3px 0; }
.tv-slot .slot .reel { background: #1d1230; box-shadow: 0 0 0 var(--px) #07061a, inset 0 0 0 2px #4a3220; }
.tv-slot .slot .cell img { width: 52px; height: 52px; }
.tv-slot .slot .reel.locked { box-shadow: 0 0 0 var(--px) var(--gold), inset 0 0 0 2px #4a3220; }
.reach .tv-slot .slot .reel:last-child { animation: tvReach 600ms steps(2) infinite; }
@keyframes tvReach { 50% { box-shadow: 0 0 0 var(--px) var(--gold), 0 0 14px 4px rgba(255,194,61,.45); } }
.reach .tv-scene::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: rgba(5,3,14,.42); }
.joy .tv-scene { animation: tvJoy 500ms steps(5) 2; }
@keyframes tvJoy { 50% { filter: brightness(1.6); } }

/* ── 控制列 ── */
.tv-ctl { flex: none; display: flex; flex-direction: column; gap: 6px; }
.tv-ctl .row { gap: 6px; }
.tv-drink, .tv-stop { flex: 1; min-width: 0; padding: 10px 4px; }
.tv-reach { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; background: var(--panel); box-shadow: 0 0 0 var(--px) var(--gold-dk); }
.tv-ask { color: var(--gold); text-align: center; }
.tv-reach .row { justify-content: center; gap: 8px; }
.tv-reply { flex: 1; min-width: 0; padding: 10px 2px; animation: tvPulse 700ms steps(2) infinite; }
.tv-reply:disabled { animation: none; opacity: .45; }
.tv-later { align-self: center; padding: 2px 8px; }
@keyframes tvPulse { 50% { filter: brightness(1.25); } }

/* ── 演出 ── */
.tv-star { position: absolute; left: 50%; bottom: 120px; margin-left: -8px; width: 16px; height: 16px; z-index: 3; animation: tvStar 900ms steps(9) both; }
@keyframes tvStar { 0% { opacity: 0; transform: translate(0, 10px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), -46px); } }
.tv-card { position: absolute; left: 12px; right: 12px; bottom: 120px; z-index: 23; display: flex; align-items: center; gap: 12px; padding: 12px; transform: translateY(160%); transition: transform 300ms steps(6); }
.tv-card.in { transform: none; }
.tv-card.out { transform: translateY(160%); }
.tv-card-av { flex: none; width: 48px; height: 48px; background: var(--lo); box-shadow: 0 0 0 var(--px) var(--rc); }
.tv-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tv-card-name { font-size: 24px; line-height: 1.1; color: var(--gold); }
.tv-card .cur { display: inline-block; width: 6px; height: 12px; margin-left: 1px; background: var(--text); animation: blink 500ms steps(1) infinite; }
.tv-fly { position: absolute; width: 48px; height: 48px; z-index: 24; transform-origin: center; transition: transform 600ms steps(12); }
.tv-story { position: absolute; inset: 0; z-index: 31; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3,2,12,.86); animation: fadeIn 160ms steps(3); }
.tv-story-box { width: 100%; padding: 16px; animation: secIn 160ms steps(3) both; }
.tv-story-head { display: flex; align-items: baseline; gap: 8px; }
.tv-story-head b { font-size: 24px; line-height: 1; color: var(--gold); }
.tv-story p { margin: 12px 0; line-height: 1.9; animation: fadeIn 600ms steps(6); }
.tv-story-tip { text-align: center; animation: blink 1.2s steps(1) infinite; }
