:where(#rfwin, #rf-hud, #rf-banner, #rf-say, #rf-result, #rf-fail) { --dg: #c8a0ff; --dg-lo: #3e2a5e; --dga: #d8b8ff; }
#rf-hud { position: absolute; z-index: 3; left: 50%; top: calc(1.6rem + var(--sat)); transform: translateX(-50%); width: max-content; max-width: 96vw; }
#rf-hud.hidden, #rf-banner.hidden, #rf-say.hidden, #rf-result.hidden, #rf-fail.hidden { display: none; }
body.patch-pending #rf-hud { top: calc(var(--patch-h, 0px) + 1rem + var(--sat)); }
#rf-hud .vy-isle { color: #ffe9e0; }
#rf-hud[data-st="done"] .vy-isle { color: var(--teal); }
#rf-hud .vy-s small { font: 600 max(9px, 1.05rem) var(--sans); color: var(--ink3); }
#rf-hud .vy-s.ph { color: #7fe0ff; }
#rf-hud .vy-s.ph b { color: #fff; }
#rf-hud .vy-s.bk { color: #ff9d8a; }
#rf-hud .vy-s.bk b { color: #ffd0c4; }
#rf-hud.low .vy-s.time, #rf-hud.low .vy-s.time b { color: #ff6a52; }
#hud #rf-hud .vy-leave { border-left-color: rgba(255,138,106,.3); }
#rf-banner { position: absolute; z-index: 3; left: 50%; top: calc(13rem + var(--sat)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .4rem; width: max-content; max-width: 92vw; pointer-events: none; text-align: center; }
#rf-banner.show { animation: vy-banner var(--ms, 3600ms) ease-out both; }
#rf-banner small { font: 600 max(11px, 1.5rem)/1.3 var(--sans); letter-spacing: .25em; color: #ffd8cc; text-shadow: 0 1px 2px #000; }
#rf-banner small u { text-decoration: none; opacity: .6; }
#rf-banner .vb-name { padding: 0 6rem; font: 600 max(26px, 5.2rem)/1.2 var(--serif); letter-spacing: .08em; color: #fff0ea; text-shadow: 0 .3rem 0 #000, 0 0 2.4rem rgba(255,110,80,.75), 0 0 .6rem #000;
background: linear-gradient(90deg, transparent, rgba(18,4,2,.65) 22%, rgba(18,4,2,.65) 78%, transparent); border-top: 1px solid; border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, rgba(255,138,106,.75), transparent) 1; }
#rf-banner .vb-goal { font-size: max(12px, 1.7rem); letter-spacing: .04em; font-weight: 400; color: #fff; }
#rf-banner .vb-goal b { color: #ff9d8a; font-weight: 600; }
#rf-say { position: absolute; z-index: 4; left: 50%; top: calc(17rem + var(--sat)); transform: translateX(-50%); max-width: min(90vw, 90rem); padding: .6rem 4rem; pointer-events: none; text-align: center;
font: 700 max(15px, 2.4rem)/1.35 var(--serif); letter-spacing: .03em; color: #ffe2d8; text-shadow: 0 .2rem 0 #000, 0 0 1.4rem rgba(255,60,30,.8);
background: linear-gradient(90deg, transparent, rgba(30,4,2,.75) 18%, rgba(30,4,2,.75) 82%, transparent); }
#rf-say.show { animation: tw-say 3.4s ease-out both; }
#rf-result { position: fixed; z-index: 9050; left: 50%; top: calc(13.4rem + var(--sat)); transform: translateX(-50%); box-sizing: border-box; width: 50rem; max-width: 94vw; display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2.2rem 2.4rem 2rem; text-align: center; pointer-events: auto;
border: 0 solid transparent; border-image: url(../assets/ui/dark/panel.png) 64 / 3.2rem; background: #0e1116 url(../assets/ui/dark/panel_fill.png) 0 0 / 25.6rem 25.6rem; box-shadow: 0 1rem 2.5rem rgba(0,0,0,.6), 0 0 4rem rgba(255,110,80,.22); animation: vy-pop .35s ease-out both; }
#rf-result h3 { margin: 0; font: 600 max(20px, 3.2rem)/1.2 var(--serif); letter-spacing: .08em; color: #fff0ea; text-shadow: 0 .2rem 0 #000, 0 0 1.8rem rgba(255,110,80,.6); }
#rf-result p { margin: 0; font-size: max(12px, 1.4rem); line-height: 1.5; color: var(--ink2); }
#rf-result p b { color: var(--ink); }
#rf-result p u { text-decoration: none; color: var(--ink3); }
#rf-result .vr-isle b:first-child { color: #ff9d8a !important; }
#rf-result button { min-height: 3.8rem; min-width: 11rem; padding: 0 1.6rem; border: 1rem solid transparent; border-image: url(../assets/ui/dark/btn.png) 20 fill / 1rem; font: 700 max(12px, 1.35rem)/1.2 var(--sans); color: var(--ink); white-space: nowrap; }
#rf-fail { position: fixed; z-index: 9100; left: 50%; top: 30%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .5rem; width: max-content; max-width: 92vw; padding: 1.4rem 7rem 1.6rem; text-align: center; pointer-events: none;
background: linear-gradient(90deg, transparent, rgba(14,2,2,.92) 14%, rgba(14,2,2,.92) 86%, transparent); border-top: 1px solid; border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, rgba(224,68,58,.8), transparent) 1; transition: opacity .45s; animation: vy-pop .35s ease-out both; }
#rf-fail.out { opacity: 0; }
#rf-fail b { font: 700 max(24px, 4.4rem)/1.2 var(--serif); letter-spacing: .06em; color: #e0443a; text-shadow: 0 .3rem 1.4rem #000; }
#rf-fail span { font: 600 max(12px, 1.6rem)/1.5 var(--sans); color: var(--ink); text-shadow: 0 1px 2px #000; }
#rf-fail small { font: 400 max(11px, 1.3rem)/1.5 var(--sans); color: var(--ink2); text-shadow: 0 1px 2px #000; }
#dead em.rf-dead { display: none; font-style: normal; }
body.in-rift #dead b { visibility: visible; }
body.in-rift #dead em.rf-dead { display: block; padding: .3rem 1.8rem; font: 600 max(13px, 1.7rem)/1.5 var(--sans); color: #ffd8cc; text-shadow: 0 1px 3px #000, 0 0 .8rem #000; border: .8rem solid transparent; border-image: url(../assets/ui/dark/glass.png) 16 fill / .8rem; }
body.touch #rf-hud { top: calc(.8rem + var(--sat)); left: calc((100vw + var(--sal) - var(--sar)) / 2 + 1.5rem); max-width: 46rem; }
body.touch #rf-banner { top: calc(6.2rem + var(--sat)); left: calc((100vw + var(--sal) - var(--sar)) / 2 + 1.5rem); gap: .2rem; }
body.touch #rf-banner small { font-size: max(10px, 1.15rem); letter-spacing: .12em; }
body.touch #rf-banner .vb-name { font-size: max(20px, 3rem); padding: 0 4rem; }
body.touch #rf-say { top: calc(11.5rem + var(--sat)); left: calc((100vw + var(--sal) - var(--sar)) / 2 + 1.5rem); font-size: max(13px, 1.7rem); padding: .4rem 2.4rem; }
body.touch #rf-result { top: calc(6rem + var(--sat)); width: 48rem; padding: 1.2rem 2rem; gap: .2rem; }
body.touch #rf-result h3 { font-size: max(16px, 2.2rem); }
body.touch #rf-result p { font-size: max(11px, 1.2rem); line-height: 1.4; }
body.touch #rf-fail { top: 24%; padding: 1rem 3rem 1.2rem; }
body.touch #rf-fail b { font-size: max(20px, 3rem); }
#rfwin { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 124rem; max-width: calc(100vw - 1.6rem); max-height: calc(100vh - 1.6rem); z-index: 8; display: flex; flex-direction: column; }
#rfwin.hidden { display: none; }
#rfwin header .dg-sub { margin-left: 1rem; font: 400 max(10px, 1.2rem) var(--sans); letter-spacing: .08em; color: var(--dg); order: 1; }
#rfwin .tw-body { flex: 1; min-height: 0; display: flex; flex-direction: row; gap: 1.6rem; }
#rfwin .tw-left { flex: 0 0 52rem; overflow-y: auto; overscroll-behavior: contain; }
#rfwin .tw-skipgo { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-width: 24rem; min-height: 4rem; padding: 0 1.4rem; font-size: max(12px, 1.4rem); }
#rfwin .tw-skipgo svg { width: 2rem; height: 2rem; flex: none; }
#rfwin .tw-skipgo.armed { animation: tw-pulse 1.2s ease-in-out infinite; }
#rfwin .tw-skip.done .ghost { flex: none; min-width: 10rem; min-height: 3.4rem; }
#rfwin .tw-skipgo.armed { box-shadow: 0 0 0 2px #7fe0c4, 0 0 1.4rem rgba(127,224,196,.55); }
#rfwin .tw-join { flex: none; min-width: 11rem; }
#rfwin footer { margin-top: auto; display: flex; align-items: center; gap: 1rem; }
#rfwin footer .dg-note { flex: 1; text-align: left; font-size: max(10px, 1.1rem); line-height: 1.4; color: var(--ink3); }
#rfwin footer .dg-note .bad, #rfwin footer .dg-note .bad b { color: #ff8f80; }
#rfwin .tw-go { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-width: 22rem; min-height: 4.6rem; font-size: max(13px, 1.6rem); }
#rfwin .tw-go svg, .tw-up svg, .tw-rup svg { width: 2.4rem; height: 2.4rem; flex: none; }
#rf-hud .tw-soon { color: var(--ink3); }
#rf-hud .tw-near { color: #ffb08a; animation: tw-blink 1s ease-in-out infinite; }
#rf-hud .vy-s.wave { color: #d9cfc0; gap: .3rem; }
#rf-hud .vy-s.wave > span { font: 600 max(9px, 1.05rem) var(--sans); color: var(--ink3); }
#rf-hud .vy-s.hold { color: #7fe0c4; font: 600 max(10px, 1.15rem) var(--sans); animation: tw-blink 1.6s ease-in-out infinite; }
#rf-banner .tw-hint { color: #7fe0c4; }
#hud #rf-hud .tw-up { flex: none; display: inline-flex; align-items: center; gap: .6rem; margin: .4rem .2rem .4rem .6rem; padding: 0 1.4rem; min-height: 3.6rem; border: .8rem solid transparent; border-image: url(../assets/ui/dark/btn_primary.png) 20 fill / .8rem; color: #1a1206; font: 700 max(12px, 1.35rem)/1 var(--sans); cursor: pointer; animation: tw-pulse 1.6s ease-in-out infinite; }
#hud #rf-hud .tw-up.hidden { display: none; }
#rf-result .tw-rup { display: inline-flex; align-items: center; gap: .6rem; border-image-source: url(../assets/ui/dark/btn_primary.png); color: #1a1206; }
body.touch #rfwin { left: calc(.8rem + var(--sal)); right: calc(.8rem + var(--sar)); top: calc(.8rem + var(--sat)); bottom: calc(.8rem + var(--sab)); width: auto; height: auto; max-width: none; max-height: none; transform: none; }
body.touch #rfwin .tw-left { flex: 0 0 40rem; }
body.touch #rfwin .tw-skipgo { min-width: 13rem; min-height: 3.4rem; padding: 0 .8rem; font-size: max(10px, 1.1rem); }
body.touch #rf-hud .vy-s.hold { font-size: max(9px, 1rem); }
body.touch #rfwin .tw-go { min-width: 15rem; min-height: 4.2rem; }
body.touch #rf-hud { transform: translateX(-50%) scale(.8); transform-origin: 50% 0; }
body.touch #rf-banner { top: calc(50% + 2.4rem); }
body.touch #rf-banner small { font-size: max(8px, .9rem); letter-spacing: .06em; }
body.touch #rf-banner .vb-name { font-size: max(14px, 2rem); padding: 0 2.4rem; letter-spacing: .04em; }
body.touch #rf-banner .vb-goal { font-size: max(9px, 1rem); letter-spacing: 0; }
#rfwin header .rf-back { order: 2; margin-left: auto; margin-right: .6rem; min-height: 3rem; padding: 0 1.2rem; font: 600 max(10px, 1.2rem) var(--sans); }
#rfwin .rf-right { display: flex; flex-direction: column; gap: .6rem; min-height: 0; }
#rfwin .rf-boards { grid-template-columns: 1fr; }
#rfwin .rf-boards li small { flex: none; font: 400 max(9px, 1.05rem) var(--sans); color: var(--ink3); }
#rfwin .rf-boards li em span { font: 400 max(9px, 1rem) var(--sans); color: var(--ink3); }
#rfwin .rf-prizes { flex: 1; min-height: 0; overflow-y: auto; padding: .6rem .8rem; border: 0 solid transparent; border-image: url(../assets/ui/dark/inset.png) 16 fill / .8rem; }
#rfwin .rf-prizes .dg-note { margin: 0 0 .6rem; font-size: max(10px, 1.15rem); line-height: 1.45; color: var(--ink2); }
#rfwin .rf-prizes ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; }
#rfwin .rf-prizes li { display: flex; gap: .8rem; align-items: baseline; padding: .4rem .6rem; background: rgba(255,255,255,.03); font-size: max(11px, 1.3rem); }
#rfwin .rf-prizes li u { flex: none; width: 4.2rem; text-decoration: none; font: 700 max(11px, 1.3rem) var(--serif); color: var(--dg); }
#rfwin .rf-go svg { width: 2.4rem; height: 2.4rem; flex: none; }
.rf-top { background: radial-gradient(ellipse at 15% 50%, rgba(200,160,255,.22), transparent 70%); }
#rf-hud .vy-isle { color: #efe4ff; }
#rf-hud .rf-c { color: #d9cfc0; gap: .3rem; } #rf-hud .rf-c > span { font: 600 max(9px, 1.05rem) var(--sans); color: var(--ink3); }
#rf-hud .rf-fl { position: relative; gap: .3rem; }
#rf-hud .rf-bar { position: relative; display: inline-block; width: 6rem; height: .6rem; margin-left: .3rem; background: rgba(255,255,255,.1); border-radius: .3rem; overflow: hidden; }
#rf-hud .rf-bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #8a6cff, #c8a0ff); transition: width .3s; }
#rf-hud .rf-fl.warm .rf-bar > i { background: linear-gradient(90deg, #ffb060, #ff8a50); }
#rf-hud .rf-fl.danger .rf-bar > i { background: linear-gradient(90deg, #ff5a3a, #ff2a1a); }
#rf-hud .rf-fl.danger, #rf-hud .rf-fl.danger b { color: #ff6a52; }
#rf-hud .rf-flood { font-style: normal; font: 700 max(10px, 1.15rem) var(--sans); color: #ff6a52; animation: tw-blink .6s ease-in-out infinite; white-space: nowrap; }
#rf-say.good { color: #e6dcff; text-shadow: 0 .2rem 0 #000, 0 0 1.4rem rgba(170,120,255,.85); }
#rf-result .rf-big { font-size: max(15px, 2.2rem) !important; } #rf-result .rf-big b { color: #fff0ea; font-family: var(--serif); }
#rf-result .vr-acts { display: flex; gap: .8rem; margin-top: .4rem; }
body.touch #rf-hud .rf-bar { width: 4rem; }
body.touch #rfwin .rf-rules { display: none; }
.tw-rift { flex: none; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; background: linear-gradient(90deg, rgba(200,160,255,.16), rgba(200,160,255,.03)); border: 1px solid rgba(200,160,255,.45); }
.tw-rift > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.tw-rift > span > b { font: 600 max(12px, 1.45rem) var(--serif); color: #efe4ff; }
.tw-rift small { font: 400 max(10px, 1.1rem)/1.4 var(--sans); color: var(--ink2); }
#twwin .tw-riftgo { flex: none; min-width: 13rem; min-height: 3.6rem; padding: 0 1.2rem; border: .8rem solid transparent; border-image: url(../assets/ui/dark/btn_primary.png) 20 fill / .8rem; color: #1a1206; font: 700 max(11px, 1.3rem)/1 var(--sans); cursor: pointer; filter: hue-rotate(220deg) saturate(.8) brightness(1.1); }
body.touch .tw-rift { padding: .3rem .6rem; } body.touch .tw-rift small { display: none; } body.touch #twwin .tw-riftgo { min-width: 10rem; min-height: 3.2rem; }