@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Cinzel+Decorative:wght@700;900&display=swap');

:root {
  --ww-ink: #0b1026;
  --ww-panel: rgba(13, 17, 42, .78);
  --ww-panel-2: rgba(22, 26, 58, .86);
  --ww-line: rgba(232, 193, 112, .32);
  --ww-gold: #e8c170;
  --ww-gold-2: #f7dc8f;
  --ww-blood: #c2183a;
  --ww-moon: #f4efd8;
  --ww-text: #f3ead7;
  --ww-muted: #a9b0d0;
  --ww-love: #ff6fa3;
  --ww-ok: #5fd39a;
  --ww-title: 'Cinzel', Georgia, 'Times New Roman', serif;
  --ww-deco: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
}

/* ---------- floating bubble ---------- */
.quest-widget.ww-widget { background: linear-gradient(135deg, #1b2150, #0d1030); border-color: #e8c170; box-shadow: 0 4px 18px rgba(10, 8, 40, .45), 0 0 0 1px rgba(232, 193, 112, .25) inset; }
.ww-widget .quest-title { color: var(--ww-gold-2); font-family: var(--ww-title); letter-spacing: .5px; }
.ww-widget .quest-timer { color: #cfd4f3; font-family: Arial, sans-serif; letter-spacing: 0; }
.ww-widget .quest-remaining { color: #cfd4f3; }
.ww-widget .quest-remaining.ww-hot { color: #ffd98a; font-weight: 700; }
.ww-seal { width: 46px; height: 46px; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(244, 239, 216, .45)); animation: wwSealFloat 4s ease-in-out infinite; }
.ww-widget.ww-hot .ww-seal { animation: wwSealFloat 4s ease-in-out infinite, wwSealPulse 1.6s ease-in-out infinite; }
@keyframes wwSealFloat { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-3px) } }
@keyframes wwSealPulse { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 217, 138, .5)) } 50% { filter: drop-shadow(0 0 16px rgba(255, 217, 138, .95)) } }
@media (max-width: 600px) { body .ww-seal { width: 30px; height: 30px; } }

/* ---------- root overlay: the sky stays visible ---------- */
.ww-root { position: fixed; inset: 0; z-index: 900; display: none; color: var(--ww-text); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: radial-gradient(120% 70% at 50% 110%, rgba(5, 6, 20, .72), rgba(5, 6, 20, .18) 60%, rgba(5, 6, 20, 0) 80%); overflow-y: auto; overscroll-behavior: contain; }
.ww-root.ww-open { display: block; animation: wwFadeIn .45s ease-out; }
/* While playing, only the village scene stays behind the game. */
body.ww-playing { overflow: hidden; }
body.ww-playing > *:not(.vs-scene):not(.vs-ctl):not(.ww-root):not(.ww-cardview):not(.ww-modal):not(.ww-cine):not(.ww-debug):not(.ww-debug-flag):not(.ww-toast):not(script):not(style) { visibility: hidden !important; }
/* No village scene (before the event window): the game paints its own sky. */
.ww-root.ww-ownsky { background:
  radial-gradient(circle at 82% 12%, rgba(255, 244, 214, .95) 0 34px, rgba(255, 244, 214, .25) 36px, rgba(255, 244, 214, 0) 120px),
  radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 44% 22%, #fff, transparent),
  radial-gradient(1px 1px at 63% 6%, #fff, transparent), radial-gradient(1px 1px at 71% 28%, #fff, transparent), radial-gradient(1.5px 1.5px at 92% 34%, #fff, transparent),
  radial-gradient(1px 1px at 6% 40%, #fff, transparent), radial-gradient(1px 1px at 35% 44%, #fff, transparent), radial-gradient(1px 1px at 55% 38%, #fff, transparent),
  radial-gradient(ellipse 70% 38% at 50% 100%, rgba(110, 72, 150, .38), rgba(110, 72, 150, 0) 70%),
  linear-gradient(180deg, #0c1130 0%, #1b2252 55%, #2f3568 100%); background-attachment: fixed; }
.ww-root.ww-ownsky.ww-sky-day { background:
  radial-gradient(circle at 82% 14%, rgba(255, 250, 230, 1) 0 30px, rgba(255, 226, 160, .45) 34px, rgba(255, 214, 140, 0) 140px),
  linear-gradient(180deg, #3d4b88 0%, #7d6aa6 32%, #d497a8 62%, #f4bf95 86%, #fbe1b6 100%); background-attachment: fixed; }
.ww-root *, .ww-modal * { box-sizing: border-box; }
.ww-ico { display: inline-block; vertical-align: -3px; flex-shrink: 0; }
.ww-phase-title .ww-ico { vertical-align: -2px; color: var(--ww-gold-2); }
.ww-panel h4 .ww-ico { color: var(--ww-gold); }
.ww-log div { display: flex; gap: 7px; align-items: flex-start; align-self: flex-start; max-width: 100%; }
.ww-log div .ww-ico { margin-top: 2px; color: var(--ww-gold); opacity: .85; }
.ww-log div.ww-log-death .ww-ico { color: #ff7a90; }
.ww-chip.ww-used { opacity: .45; }
.ww-chip .ww-ico { color: var(--ww-gold-2); }
.ww-comp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.ww-comp-row { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: #dfe2f5; flex-wrap: wrap; }
.ww-comp-row b { margin-left: auto; font-family: var(--ww-title); color: var(--ww-gold-2); }
.ww-comp-row em { flex-basis: 100%; font-style: normal; font-size: .68rem; color: #ff9aab; padding-left: 31px; margin-top: -3px; }
.ww-comp-row .ww-mini-role { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: #141833; border: 1px solid var(--ww-line); color: var(--ww-gold-2); }
@keyframes wwFadeIn { from { opacity: 0 } to { opacity: 1 } }
.ww-shell { max-width: 1180px; margin: 0 auto; padding: 14px 16px 90px; min-height: 100%; }

.ww-glass { background: var(--ww-panel); border: 1px solid var(--ww-line); border-radius: 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }

.ww-top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.ww-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ww-brand svg { width: 42px; height: 42px; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(244, 239, 216, .5)); }
.ww-title { font-family: var(--ww-deco); font-weight: 900; font-size: 1.35rem; line-height: 1; letter-spacing: .5px;
  background: linear-gradient(180deg, #fff3cf, #e8c170 55%, #b98a35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ww-sub { font-size: .78rem; color: var(--ww-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ww-phase { flex: 1; min-width: 220px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ww-phase-title { font-family: var(--ww-title); font-weight: 800; font-size: 1.02rem; letter-spacing: .4px; color: var(--ww-moon); }
.ww-phase-sub { font-size: .8rem; color: var(--ww-muted); margin-top: 2px; }
.ww-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: .72rem; font-weight: 700; color: var(--ww-gold-2); background: rgba(232, 193, 112, .1); border: 1px solid var(--ww-line); padding: 2px 10px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.ww-tools { display: flex; gap: 6px; margin-left: auto; }
.ww-ibtn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--ww-line); background: rgba(255, 255, 255, .05); color: var(--ww-text); cursor: pointer; display: grid; place-items: center; font-size: 1.05rem; transition: background .15s, transform .15s; }
.ww-ibtn:hover { background: rgba(232, 193, 112, .16); transform: translateY(-1px); }
.ww-ibtn svg { width: 20px; height: 20px; }
.ww-ibtn.ww-debug-btn { color: #ffb86b; border-color: rgba(255, 184, 107, .5); }

/* week strip */
.ww-timeline { padding: 12px 14px 14px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }

/* --- horizontal day/night timeline (fills left -> right) --- */
.ww-tl-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ww-cell { position: relative; border-radius: 14px; padding: 10px 12px 11px; background: rgba(10, 12, 32, .5); border: 1px solid rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .3s ease; }
.ww-cell.ww-past { opacity: .58; }
.ww-cell.ww-future { opacity: .5; }
.ww-cell.ww-now { border-color: var(--ww-gold); box-shadow: 0 0 18px rgba(232, 193, 112, .24); }
.ww-cell-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ww-cell-nm { font-family: var(--ww-title); font-size: .9rem; color: #efe9d6; display: flex; align-items: center; gap: 6px; }
.ww-cell.ww-now .ww-cell-nm { color: #fff3cf; }
.ww-cell-nm .ww-ico { color: var(--ww-gold); }
.ww-cell-dt { font-size: .6rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ww-muted); white-space: nowrap; }
.ww-hbar { position: relative; display: flex; border-radius: 10px; background: rgba(8, 10, 28, .55); border: 1px solid rgba(255, 255, 255, .08); min-height: 46px; }
.ww-hbar-fill { position: absolute; top: 0; left: 0; bottom: 0; width: var(--fill, 0%); border-radius: 10px 0 0 10px; transition: width .6s ease; background: linear-gradient(90deg, rgba(232, 193, 112, .3), rgba(232, 193, 112, .12)); }
.ww-hbar.ww-p-night .ww-hbar-fill { background: linear-gradient(90deg, rgba(126, 96, 210, .42), rgba(160, 130, 240, .16)); }
.ww-hseg { position: relative; z-index: 1; flex: 1; min-width: 0; padding: 5px 8px; display: flex; flex-direction: column; justify-content: center; gap: 3px; border-left: 1px solid rgba(255, 255, 255, .09); }
.ww-hseg:first-child { border-left: none; }
.ww-hseg .ww-seg-t { font-style: normal; font-size: .55rem; letter-spacing: .3px; opacity: .8; }
.ww-hseg .ww-seg-l { display: flex; align-items: center; gap: 4px; font-size: .66rem; line-height: 1.15; }
.ww-hseg .ww-seg-l .ww-ico { flex: none; color: var(--ww-gold); opacity: .9; }
.ww-hseg.ww-seg-done { color: #e7ead9; }
.ww-hseg.ww-seg-active { color: #fff3cf; }
.ww-hseg.ww-seg-active .ww-seg-l { font-weight: 600; }
.ww-hseg.ww-seg-todo { color: var(--ww-muted); opacity: .72; }
.ww-hbar-cursor { position: absolute; z-index: 2; top: -4px; bottom: -4px; left: var(--fill, 0%); width: 2px; background: var(--ww-gold); box-shadow: 0 0 9px rgba(232, 193, 112, .95); transition: left .6s ease; }
.ww-hbar-cursor .ww-ico { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); color: var(--ww-gold); }
@media (max-width: 620px) { .ww-tl-track { grid-template-columns: 1fr; } }
.ww-setup-banner { margin: 12px 0; padding: 12px 16px; text-align: center; font-size: .86rem; }
.ww-setup-banner strong { font-family: var(--ww-title); color: var(--ww-gold-2); }

.ww-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.ww-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 860px) { .ww-main { grid-template-columns: 1fr; } .ww-side { order: -1; } .ww-phase { order: 3; flex-basis: 100%; } }

/* ---------- village square ---------- */
.ww-square { padding: 14px 14px 18px; }
.ww-square-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 12px; flex-wrap: wrap; }
.ww-square-head h3 { margin: 0; font-family: var(--ww-title); font-size: 1rem; color: var(--ww-moon); letter-spacing: .5px; }
.ww-square-head span { font-size: .75rem; color: var(--ww-muted); }
.ww-square-head .ww-legend { margin-left: auto; display: flex; gap: 10px; }
.ww-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 12px 8px; }
@media (max-width: 600px) { .ww-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 4px; } }
.ww-tok { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 2px 4px; border-radius: 14px; cursor: default; transition: transform .18s, background .18s; -webkit-tap-highlight-color: transparent; }
.ww-av { position: relative; width: 64px; height: 64px; border-radius: 50%; background: #f7ecd9; box-shadow: 0 0 0 2px rgba(232, 193, 112, .55), 0 6px 14px rgba(0, 0, 0, .35); overflow: visible; }
.ww-av img { width: 100%; height: 100%; border-radius: 50%; display: block; }
@media (max-width: 600px) { .ww-av { width: 54px; height: 54px; } }
.ww-name { font-size: .7rem; font-weight: 600; text-align: center; line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #eef0ff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.ww-tok.ww-me .ww-av { box-shadow: 0 0 0 2px var(--ww-gold-2), 0 0 16px rgba(247, 220, 143, .6); }
.ww-tok.ww-me .ww-name { color: var(--ww-gold-2); }
.ww-tok.ww-dead .ww-av img { filter: grayscale(1) brightness(.55) contrast(1.1); }
.ww-tok.ww-dead .ww-av { box-shadow: 0 0 0 2px rgba(150, 150, 170, .35); background: #3a3d4f; }
.ww-tok.ww-dead .ww-name { color: #8d92ad; text-decoration: line-through rgba(255, 255, 255, .25); }
.ww-role-reveal { position: absolute; inset: 3px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(9, 12, 30, .35), rgba(9, 12, 30, .68)); }
.ww-role-reveal svg { width: 52%; height: 52%; color: var(--ww-gold-2); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .75)); }
.ww-tomb { position: absolute; right: -8px; bottom: -6px; width: 28px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.ww-badge { position: absolute; display: grid; place-items: center; border-radius: 50%; font-size: .68rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.ww-badge svg { width: 70%; height: 70%; }
.ww-b-mayor { top: -6px; left: -6px; width: 26px; height: 26px; background: radial-gradient(circle at 35% 30%, #fff3cf, #e8c170 55%, #a8741f); color: #4a2d07; border: 1.5px solid #fff3cf; }
.ww-b-love { top: -5px; right: -5px; width: 22px; height: 22px; background: radial-gradient(circle at 35% 30%, #ffd1e2, #ff6fa3 60%, #b82463); color: #fff; animation: wwBeat 1.4s ease-in-out infinite; }
.ww-b-role { bottom: -5px; left: -7px; width: 26px; height: 26px; background: #141833; border: 1.5px solid var(--ww-gold); color: var(--ww-gold-2); }
.ww-b-votes { top: -8px; right: -10px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 99px; background: var(--ww-blood); color: #fff; border: 1.5px solid #ffd0d8; font-size: .72rem; animation: wwPop .35s cubic-bezier(.3, 1.6, .5, 1); }
.ww-b-votes.ww-b-mayorvote { background: linear-gradient(135deg, #e8c170, #b98a35); color: #3a2405; border-color: #fff3cf; }
@keyframes wwBeat { 0%, 100% { transform: scale(1) } 15% { transform: scale(1.22) } 30% { transform: scale(1) } 45% { transform: scale(1.14) } }
@keyframes wwPop { from { transform: scale(0) } to { transform: scale(1) } }
.ww-tok.ww-target { cursor: pointer; }
.ww-tok.ww-target:hover { transform: translateY(-3px); background: rgba(255, 255, 255, .06); }
.ww-tok.ww-target .ww-av::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed rgba(247, 220, 143, .55); animation: wwSpin 9s linear infinite; }
.ww-tok.ww-chosen .ww-av::before { border: 3px solid var(--ww-gold-2); inset: -7px; animation: none; box-shadow: 0 0 18px rgba(247, 220, 143, .8); }
.ww-mode-wolf .ww-tok.ww-chosen .ww-av::before, .ww-mode-white_wolf .ww-tok.ww-chosen .ww-av::before, .ww-mode-witch_poison .ww-tok.ww-chosen .ww-av::before, .ww-mode-hunter .ww-tok.ww-chosen .ww-av::before { border-color: #ff4d6d; box-shadow: 0 0 18px rgba(255, 77, 109, .85); }
.ww-mode-cupid .ww-tok.ww-chosen .ww-av::before { border-color: var(--ww-love); box-shadow: 0 0 18px rgba(255, 111, 163, .85); }
@keyframes wwSpin { to { transform: rotate(360deg) } }
.ww-voters { display: flex; justify-content: center; margin-top: -2px; min-height: 0; }
.ww-voters img { width: 16px; height: 16px; border-radius: 50%; margin-left: -5px; box-shadow: 0 0 0 1.5px #1b1f45; background: #f7ecd9; }
.ww-voters img:first-child { margin-left: 0; }

/* ---------- side column ---------- */
.ww-side { display: flex; flex-direction: column; gap: 14px; }
.ww-panel { padding: 14px 16px; }
.ww-panel h4 { margin: 0 0 8px; font-family: var(--ww-title); font-size: .95rem; color: var(--ww-gold-2); letter-spacing: .4px; display: flex; align-items: center; gap: 8px; }
.ww-panel p { margin: 0 0 10px; font-size: .84rem; line-height: 1.45; color: #dfe2f5; }
.ww-panel .ww-small { font-size: .74rem; color: var(--ww-muted); }
.ww-mycard { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.ww-mycard .ww-card-mini { width: 76px; flex-shrink: 0; transform: rotate(-6deg); transition: transform .25s; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)); }
.ww-mycard:hover .ww-card-mini { transform: rotate(0) translateY(-4px) scale(1.04); }
.ww-mycard-txt { flex: 1; min-width: 0; }
.ww-mycard-txt b { display: block; font-family: var(--ww-title); font-size: 1rem; color: var(--ww-moon); }
.ww-mycard.ww-unseen .ww-card-mini { animation: wwUnseen 2.2s ease-in-out infinite; }
@keyframes wwUnseen { 0%, 100% { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .5)) } 50% { filter: drop-shadow(0 0 16px rgba(247, 220, 143, .85)) } }

/* ---------- vision: the role card, grown out of its slot ---------- */
.ww-cardview { position: fixed; inset: 0; z-index: 972; display: none; color: var(--ww-text); cursor: pointer; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
.ww-cardview.ww-open { display: block; }
.ww-vis-bg { position: absolute; inset: 0; background: radial-gradient(circle at 38% 45%, rgba(20, 16, 58, .94), rgba(3, 3, 12, .98)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: wwFadeIn .5s ease-out; }
.ww-cardview.ww-closing .ww-vis-bg { animation: wwFadeOut .7s ease-in forwards; }
@keyframes wwFadeOut { to { opacity: 0 } }
.ww-vis { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 44px; padding: 24px; max-width: 1120px; margin: 0 auto; }
.ww-vis-card { width: min(360px, 34vw); flex-shrink: 0; transform-origin: top left; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .65)); }
.ww-vis-txt { flex: 1; max-width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; opacity: 0; transform: translateX(16px); transition: opacity .45s, transform .45s; padding-right: 6px; }
.ww-vis.ww-shown .ww-vis-txt { opacity: 1; transform: none; }
.ww-cardview.ww-closing .ww-vis-txt { opacity: 0; transition-duration: .15s; }
.ww-vis-txt .ww-kicker { font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ww-muted); }
.ww-vis-txt h2 { font-family: var(--ww-deco); font-size: 2.2rem; margin: 4px 0 8px; line-height: 1.05; background: linear-gradient(180deg, #fff3cf, #e8c170 60%, #b98a35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ww-vis-txt > p { font-size: .98rem; line-height: 1.55; color: #e3e6f7; margin: 10px 0 14px; }
.ww-vis-block { margin: 12px 0; padding: 12px 14px; border-radius: 14px; background: rgba(24, 28, 64, .94); border: 1px solid var(--ww-line); cursor: default; }
.ww-vis-block h4 { margin: 0 0 8px; font-family: var(--ww-title); font-size: .95rem; color: var(--ww-gold-2); display: flex; align-items: center; gap: 8px; }
.ww-vis-block h4 .ww-ico { color: var(--ww-gold); }
.ww-vis-block p { margin: 0 0 8px; font-size: .84rem; line-height: 1.45; color: #dfe2f5; }
.ww-vis-act { border-color: var(--ww-gold); box-shadow: 0 0 22px rgba(232, 193, 112, .18); }
.ww-vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px 6px; }
.ww-vt { appearance: none; border: 0; background: none; color: #e7e9f8; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; border-radius: 10px; font-size: .68rem; font-family: inherit; transition: background .15s, transform .15s; }
.ww-vt:hover { background: rgba(255, 255, 255, .07); transform: translateY(-2px); }
.ww-vt img { width: 44px; height: 44px; border-radius: 50%; background: #f7ecd9; box-shadow: 0 0 0 2px rgba(232, 193, 112, .5); }
.ww-vt span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ww-vt.ww-on img { box-shadow: 0 0 0 3px var(--ww-gold-2), 0 0 14px rgba(247, 220, 143, .8); }
.ww-vis-act [data-vk=wolf].ww-on img, .ww-vis-act [data-vk=white_wolf].ww-on img, .ww-vis-act [data-vk=witch_poison].ww-on img { box-shadow: 0 0 0 3px #ff4d6d, 0 0 14px rgba(255, 77, 109, .85); }
.ww-vis-act [data-vk=cupid].ww-on img { box-shadow: 0 0 0 3px var(--ww-love), 0 0 14px rgba(255, 111, 163, .85); }
.ww-vis-hint { margin: 16px 0 4px; font-size: .78rem; color: var(--ww-muted); display: flex; align-items: center; gap: 6px; }
#wwDialog { z-index: 988; }
.ww-aura-won { text-align: center; position: relative; }
.ww-aura-won .ww-aura-art { font-size: 72px; line-height: 1; margin: 4px 0 10px; color: #ffa94d; filter: drop-shadow(0 0 18px rgba(255, 150, 60, .7)); animation: wwSealFloat 3s ease-in-out infinite; }
.ww-aura-won h3 { justify-content: center; }
@media (max-width: 760px) {
  .ww-vis { flex-direction: column; justify-content: flex-start; gap: 16px; overflow-y: auto; padding: 20px 16px 40px; }
  .ww-vis-card { width: min(230px, 58vw); }
  .ww-vis-txt { max-height: none; overflow: visible; max-width: 100%; transform: translateY(12px); }
  .ww-vis-txt h2 { font-size: 1.8rem; text-align: center; }
  .ww-vis-txt .ww-kicker, .ww-vis-hint { justify-content: center; text-align: center; }
}
.ww-btn { appearance: none; border: 1px solid rgba(255, 243, 207, .55); background: linear-gradient(180deg, #f1cd7f, #c9953f); color: #2c1a04; font-weight: 800; font-size: .86rem; padding: 10px 16px; border-radius: 12px; cursor: pointer; font-family: var(--ww-title); letter-spacing: .4px; box-shadow: 0 6px 16px rgba(201, 149, 63, .35), inset 0 1px 0 rgba(255, 255, 255, .6); transition: transform .15s, filter .15s; }
.ww-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.ww-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ww-btn.ww-ghost { background: rgba(255, 255, 255, .06); color: var(--ww-text); border-color: var(--ww-line); box-shadow: none; }
.ww-btn.ww-red { background: linear-gradient(180deg, #ff5a78, #b3122e); color: #fff; border-color: #ffb3c0; box-shadow: 0 6px 16px rgba(179, 18, 46, .4); }
.ww-btn.ww-green { background: linear-gradient(180deg, #7ff0b8, #2f9e68); color: #06301b; border-color: #c7ffe3; }
.ww-btn.ww-pink { background: linear-gradient(180deg, #ff9cc2, #d23c7c); color: #fff; border-color: #ffd1e2; }
.ww-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ww-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 99px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); font-size: .76rem; margin: 2px 4px 2px 0; }
.ww-chip img { width: 22px; height: 22px; border-radius: 50%; background: #f7ecd9; }
.ww-chip.ww-chip-red { border-color: rgba(255, 77, 109, .5); background: rgba(194, 24, 58, .18); }
.ww-chip.ww-chip-love { border-color: rgba(255, 111, 163, .55); background: rgba(255, 111, 163, .14); }
.ww-sleep { text-align: center; padding: 6px 0 2px; }
.ww-sleep .ww-moonface { width: 74px; height: 74px; margin: 0 auto 6px; display: block; animation: wwSealFloat 5s ease-in-out infinite; }
.ww-zzz { font-family: var(--ww-title); color: #cfd4f3; font-size: 1.1rem; letter-spacing: 3px; }
.ww-zzz span { display: inline-block; animation: wwZ 2.4s ease-in-out infinite; }
.ww-zzz span:nth-child(2) { animation-delay: .4s; } .ww-zzz span:nth-child(3) { animation-delay: .8s; }
@keyframes wwZ { 0%, 100% { transform: translateY(0); opacity: .35 } 50% { transform: translateY(-6px); opacity: 1 } }
.ww-info-list { display: flex; flex-direction: column; gap: 6px; }
.ww-vision { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.ww-vision .ww-mini-role { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: #141833; border: 1px solid var(--ww-line); color: var(--ww-gold-2); }
.ww-vision .ww-mini-role svg { width: 16px; height: 16px; }
.ww-lovers-panel { border-color: rgba(255, 111, 163, .5); background: linear-gradient(160deg, rgba(90, 20, 60, .78), rgba(20, 14, 42, .82)); }
.ww-lovers-panel h4 { color: #ffc2d9; }
.ww-hearts { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 4px; }
.ww-hearts img { width: 52px; height: 52px; border-radius: 50%; background: #f7ecd9; box-shadow: 0 0 0 2px var(--ww-love), 0 0 18px rgba(255, 111, 163, .5); }
.ww-hearts svg { width: 34px; height: 34px; color: var(--ww-love); animation: wwBeat 1.4s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255, 111, 163, .8)); }
.ww-log { max-height: 320px; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.ww-log div { font-size: .78rem; line-height: 1.4; color: #d6daf0; padding: 6px 9px; border-radius: 10px; background: rgba(255, 255, 255, .04); border-left: 2px solid var(--ww-line); }
.ww-log div.ww-log-death { border-left-color: var(--ww-blood); }
.ww-log div.ww-log-round { background: none; border: none; padding: 6px 0 0; font-family: var(--ww-title); color: var(--ww-gold-2); font-size: .74rem; letter-spacing: 1px; text-transform: uppercase; }
.ww-winner { text-align: center; padding: 18px; }
.ww-winner h2 { margin: 0 0 6px; font-family: var(--ww-deco); font-size: 1.7rem; color: var(--ww-gold-2); }
.ww-winner .ww-reward { margin: 10px 0 0; font-weight: 700; font-size: 1.05rem; color: var(--ww-gold-2); }
.ww-dialog .ww-intro-art { text-align: center; color: var(--ww-gold-2); margin-bottom: 6px; }
.ww-vis-wait { text-align: center; color: var(--ww-muted); font-style: italic; }

/* ---------- 3D cards ---------- */
.ww-card3d { perspective: 1200px; width: 100%; aspect-ratio: 300 / 420; position: relative; }
.ww-card-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .95s cubic-bezier(.2, .85, .25, 1); }
.ww-card3d.ww-flipped .ww-card-inner { transform: rotateY(180deg); }
.ww-face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 6%/4.3%; overflow: hidden; }
.ww-face svg, .ww-face img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ww-front { transform: rotateY(180deg); }
.ww-shine { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 45%, rgba(255, 255, 255, 0) 60%); transform: translateX(-120%); mix-blend-mode: soft-light; }
.ww-card3d.ww-flipped .ww-front .ww-shine { animation: wwShine 1.4s .75s ease-out forwards; }
@keyframes wwShine { to { transform: translateX(120%) } }

/* ---------- modals ---------- */
.ww-modal { position: fixed; inset: 0; z-index: 970; display: none; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(20, 16, 60, .72), rgba(3, 3, 12, .9)); color: var(--ww-text); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
.ww-modal.ww-open { display: flex; animation: wwFadeIn .3s ease-out; }
.ww-close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.ww-reveal { display: flex; gap: 28px; align-items: center; max-width: 820px; width: 100%; }
.ww-reveal-card { width: min(300px, 70vw); flex-shrink: 0; cursor: pointer; }
.ww-reveal-card .ww-card3d { filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); transition: transform .2s; }
.ww-reveal-txt { flex: 1; min-width: 0; opacity: 0; transform: translateY(10px); transition: opacity .4s .1s, transform .4s .1s; }
.ww-reveal.ww-revealed .ww-reveal-txt { opacity: 1; transform: none; }
.ww-reveal-txt .ww-kicker { font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ww-muted); }
.ww-reveal-txt h2 { font-family: var(--ww-deco); font-size: 2.1rem; margin: 4px 0 6px; line-height: 1.05; background: linear-gradient(180deg, #fff3cf, #e8c170 60%, #b98a35); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ww-camp { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: .74rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 12px; }
.ww-camp-village { background: rgba(95, 211, 154, .16); color: #9ff0c6; border: 1px solid rgba(95, 211, 154, .45); }
.ww-camp-wolves { background: rgba(194, 24, 58, .2); color: #ff9aab; border: 1px solid rgba(255, 77, 109, .5); }
.ww-camp-solo { background: rgba(200, 220, 255, .14); color: #e6eeff; border: 1px solid rgba(200, 220, 255, .5); }
.ww-reveal-txt p { font-size: .95rem; line-height: 1.55; color: #e3e6f7; margin: 0 0 12px; }
.ww-tap { text-align: center; margin-top: 14px; font-size: .8rem; color: var(--ww-muted); animation: wwZ 2.4s ease-in-out infinite; }
@media (max-width: 700px) { .ww-reveal { flex-direction: column; gap: 14px; } .ww-reveal-card { width: min(250px, 66vw); } .ww-reveal-txt { text-align: center; } .ww-reveal-txt h2 { font-size: 1.7rem; } }
.ww-burst { position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; }
.ww-dialog { max-width: 440px; width: 100%; padding: 20px; }
.ww-dialog h3 { margin: 0 0 8px; font-family: var(--ww-title); color: var(--ww-gold-2); }
.ww-dialog p { font-size: .9rem; line-height: 1.5; color: #e3e6f7; }
.ww-toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); z-index: 995; background: var(--ww-panel-2); color: var(--ww-text); border: 1px solid var(--ww-line); padding: 10px 16px; border-radius: 14px; font-size: .86rem; opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; max-width: calc(100vw - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.ww-toast.ww-show { opacity: 1; transform: translateX(-50%); }

/* rules */
.ww-rules { max-width: 900px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; }
.ww-rules h3 { font-family: var(--ww-deco); color: var(--ww-gold-2); margin: 0 0 10px; font-size: 1.4rem; }
.ww-rules h4 { font-family: var(--ww-title); color: var(--ww-moon); margin: 18px 0 8px; }
.ww-rules li, .ww-rules p { font-size: .86rem; line-height: 1.55; color: #dfe2f5; }
.ww-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.ww-gallery figure { margin: 0; cursor: pointer; }
.ww-gallery figcaption { font-size: .72rem; text-align: center; color: var(--ww-muted); margin-top: 6px; line-height: 1.3; }
.ww-credits { font-size: .7rem !important; color: #8d93b8 !important; margin-top: 16px; }

/* ---------- cinematic ---------- */
.ww-cine { position: fixed; inset: 0; z-index: 975; display: none; background: radial-gradient(circle at 50% 45%, rgba(24, 12, 30, .88), rgba(2, 2, 8, .96)); color: var(--ww-text); overflow: hidden; }
.ww-cine.ww-open { display: block; animation: wwFadeIn .5s ease-out; }
.ww-cine-head { position: absolute; top: 9%; left: 0; right: 0; text-align: center; padding: 0 20px; }
.ww-cine-head h2 { margin: 0; font-family: var(--ww-deco); font-size: clamp(1.4rem, 4.5vw, 2.4rem); color: var(--ww-gold-2); text-shadow: 0 0 24px rgba(232, 193, 112, .45); opacity: 0; animation: wwTitleIn .9s ease-out forwards; }
.ww-cine-head p { margin: 8px 0 0; color: var(--ww-muted); font-size: .95rem; opacity: 0; animation: wwTitleIn .9s .3s ease-out forwards; }
@keyframes wwTitleIn { from { opacity: 0; transform: translateY(-10px); letter-spacing: 6px } to { opacity: 1; transform: none; letter-spacing: 1px } }
.ww-stage { position: absolute; left: 50%; top: 50%; width: 220px; height: 220px; margin: -110px 0 0 -110px; }
@media (max-width: 600px) { .ww-stage { transform: scale(.82); } }
.ww-cine-cap { position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; padding: 0 20px; }
.ww-cine-cap .ww-cap-name { font-family: var(--ww-title); font-size: clamp(1.2rem, 4vw, 1.9rem); font-weight: 800; color: #fff; opacity: 0; transform: translateY(8px); transition: all .5s; }
.ww-cine-cap .ww-cap-role { margin-top: 6px; font-size: 1rem; color: var(--ww-muted); opacity: 0; transition: all .5s .25s; }
.ww-cine-cap .ww-cap-role b { color: var(--ww-gold-2); font-family: var(--ww-title); }
.ww-cine-cap.ww-show .ww-cap-name, .ww-cine-cap.ww-show .ww-cap-role { opacity: 1; transform: none; }
.ww-cine-card { position: absolute; left: 50%; top: 50%; width: 170px; margin: -119px 0 0 -85px; opacity: 0; pointer-events: none; }
.ww-skip { position: absolute; right: 18px; bottom: 18px; z-index: 5; }
.ww-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }

/* ---------- death FX primitives ---------- */
.wwfx-av { position: absolute; left: 10px; top: 10px; width: 200px; height: 200px; border-radius: 50%; background: #f7ecd9; box-shadow: 0 0 0 3px rgba(232, 193, 112, .7), 0 14px 40px rgba(0, 0, 0, .55); }
.wwfx-av img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.wwfx-abs { position: absolute; pointer-events: none; }
.wwfx-flame { position: absolute; bottom: -10px; width: 60px; height: 110px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%; background: radial-gradient(ellipse at 50% 80%, #fff6b0 0%, #ffcc33 25%, #ff7a18 55%, rgba(200, 30, 0, 0) 75%); mix-blend-mode: screen; filter: blur(2px); transform-origin: 50% 100%; }
.wwfx-tile { position: absolute; background-repeat: no-repeat; }
.wwfx-bubble { position: absolute; border-radius: 50%; border: 2px solid rgba(160, 255, 140, .85); background: radial-gradient(circle at 35% 35%, rgba(230, 255, 220, .7), rgba(90, 220, 90, .25)); }
.wwfx-spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; }
.wwfx-petal { position: absolute; width: 12px; height: 18px; border-radius: 60% 0 60% 0; background: linear-gradient(135deg, #ffd1e2, #ff6fa3); }

/* ---------- debug drawer ---------- */
.ww-debug { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 985; transform: translateX(105%); transition: transform .3s ease; background: #11142f; border-left: 1px solid rgba(255, 184, 107, .5); color: var(--ww-text); overflow-y: auto; padding: 16px; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; box-shadow: -20px 0 50px rgba(0, 0, 0, .5); }
.ww-debug.ww-open { transform: none; }
.ww-debug h3 { margin: 0 0 4px; font-family: var(--ww-title); color: #ffb86b; }
.ww-debug h5 { margin: 16px 0 6px; font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase; color: #ffb86b; }
.ww-debug .ww-btn { font-size: .74rem; padding: 7px 10px; font-family: system-ui, sans-serif; }
.ww-debug select, .ww-debug input { background: #1c2046; color: var(--ww-text); border: 1px solid var(--ww-line); border-radius: 8px; padding: 6px 8px; font-size: .78rem; max-width: 100%; }
.ww-debug .ww-kv { font-size: .76rem; color: var(--ww-muted); line-height: 1.6; }
.ww-debug .ww-kv b { color: var(--ww-text); }
.ww-debug-flag { position: fixed; left: 50%; top: 0; transform: translateX(-50%); z-index: 986; background: #ffb86b; color: #2a1600; font-size: .68rem; font-weight: 800; padding: 2px 12px; border-radius: 0 0 10px 10px; letter-spacing: 1px; display: none; }
.ww-root.ww-open ~ .ww-debug-flag.ww-on { display: block; }
.ww-comp { display: grid; grid-template-columns: 1fr 60px; gap: 4px 8px; align-items: center; font-size: .76rem; }

@media (prefers-reduced-motion: reduce) {
  .ww-seal, .ww-b-love, .ww-zzz span, .ww-tok.ww-target .ww-av::before, .ww-hearts svg { animation: none !important; }
}

/* --- village chronicle: full-width block (like the top blocks), grid fills the width --- */
.ww-chron { margin-top: 14px; }
.ww-chron .ww-log { max-height: 300px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 14px; align-content: start; }
.ww-chron .ww-log .ww-log-round { grid-column: 1 / -1; }
