* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #1b1640; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; }
input { font: inherit; }

#start { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; z-index: 20; touch-action: pan-y; -webkit-overflow-scrolling: touch; user-select: text; }
.hero { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; text-align: center; background: radial-gradient(ellipse at 50% 35%, #2a1f6b99, #1b1640dd 75%); }
.logo { font-size: clamp(64px, 16vw, 140px); font-weight: 900; letter-spacing: 2px; line-height: 1; text-shadow: 0 8px 0 #0007; }
.logo span { color: #ffd23f; }
.tag { font-size: clamp(20px, 4.5vw, 32px); font-weight: 800; max-width: 680px; line-height: 1.2; }
.ticker { width: min(720px, 100%); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
#tickerTrack { display: inline-flex; gap: 10px; white-space: nowrap; animation: tick 40s linear infinite; }
#tickerTrack span { background: #ffffff18; border: 1px solid #ffffff2a; padding: 6px 12px; border-radius: 999px; font-size: 15px; }
#tickerTrack b { color: #ffd23f; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.playRow { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; margin-top: 6px; }
#name { width: min(260px, 80vw); padding: 15px 16px; border-radius: 14px; border: 3px solid #ffffff33; background: #ffffff18; color: #fff; text-align: center; font-size: 20px; outline: none; user-select: text; }
.big { padding: 16px 44px; font-size: 24px; font-weight: 900; border-radius: 16px; background: #ffd23f; color: #1b1640; box-shadow: 0 6px 0 #b8901c; }
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 #b8901c; }
.hint { font-size: 15px; opacity: .8; }
.scrollDown { color: #fff; opacity: .7; text-decoration: none; font-weight: 700; margin-top: 10px; }
.info { background: #1b1640; padding: 10px 16px 30px; }
.block { max-width: 980px; margin: 0 auto; padding: 44px 0; text-align: center; border-top: 1px solid #ffffff14; }
.block h2 { font-size: clamp(26px, 5vw, 40px); font-weight: 900; margin-bottom: 22px; }
.steps, .feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.step, .feat { background: #ffffff0f; border: 1px solid #ffffff1c; border-radius: 18px; padding: 22px; text-align: left; }
.step .num { width: 40px; height: 40px; border-radius: 50%; background: #ffd23f; color: #1b1640; font-weight: 900; display: grid; place-items: center; font-size: 20px; margin-bottom: 10px; }
.step h3, .feat h3 { font-size: 20px; margin-bottom: 6px; }
.step p, .feat p, .faq p, .sub { opacity: .85; line-height: 1.45; }
.feat .ico { font-size: 30px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }
.chips span { background: #ffd23f; color: #1b1640; font-weight: 800; padding: 8px 14px; border-radius: 999px; }
.again { margin-top: 20px; }
.faq { text-align: left; max-width: 760px; }
.faq h2 { text-align: center; }
.faq details { background: #ffffff0f; border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 800; cursor: pointer; font-size: 18px; }
.faq p { margin-top: 8px; }
footer { text-align: center; opacity: .6; padding: 26px 0 6px; font-size: 14px; }
footer a { color: #fff; }
body.cg .own { display: none !important; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: #0008; padding: 8px 16px; border-radius: 12px; font-weight: 800; display: flex; gap: 14px; font-size: 16px; white-space: nowrap; }
#timer { color: #ffd23f; }
#turnBanner { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); background: #ffd23f; color: #1b1640; padding: 8px 18px; border-radius: 12px; font-weight: 900; font-size: 18px; white-space: nowrap; }
#announce { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); text-align: center; width: 92vw; animation: pop .35s ease-out; }
#annBy { font-size: clamp(16px, 3.5vw, 24px); font-weight: 800; text-shadow: 0 3px 0 #0008; }
#annText { font-size: clamp(26px, 6.5vw, 54px); font-weight: 900; color: #ffd23f; text-shadow: 0 4px 0 #000a; line-height: 1.05; margin-top: 4px; }
#annFirst { display: inline-block; margin-top: 8px; background: #ff3b6b; padding: 6px 14px; border-radius: 10px; font-weight: 900; font-size: 18px; animation: pulse .6s infinite alternate; }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.08); } }
#feed { position: absolute; left: 10px; top: 60px; width: min(300px, 46vw); display: flex; flex-direction: column; gap: 4px; }
.fi { background: #0009; padding: 6px 10px; border-radius: 10px; font-size: 13px; line-height: 1.25; }
.fi b { color: #ffd23f; }
.fi .first { color: #ff7aa0; font-weight: 900; }
#bottom { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; align-items: center; }
#hpWrap { position: relative; width: min(260px, 50vw); height: 22px; background: #0009; border-radius: 11px; overflow: hidden; }
#hp { height: 100%; width: 100%; background: linear-gradient(90deg, #ff3b3b, #ffb13b 40%, #4cd964); transition: width .2s; }
#hpText { position: absolute; inset: 0; text-align: center; font-weight: 900; font-size: 14px; line-height: 22px; text-shadow: 0 1px 0 #000; }
#alive { background: #0009; padding: 3px 12px; border-radius: 11px; font-weight: 800; }
#mods { position: absolute; bottom: 46px; left: 50%; transform: translateX(-50%); font-weight: 800; font-size: 14px; text-shadow: 0 2px 0 #000; white-space: nowrap; }
#dead { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); background: #ff3b6bdd; padding: 10px 16px; border-radius: 12px; font-weight: 800; text-align: center; width: min(520px, 92vw); }

#ideaBox { pointer-events: auto; position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); width: min(620px, 94vw); background: #1b1640ee; border: 3px solid #ffd23f; border-radius: 18px; padding: 14px; box-shadow: 0 10px 40px #0008; }
#ideaTitle { font-weight: 900; font-size: 20px; color: #ffd23f; text-align: center; margin-bottom: 10px; }
#ideaBox .row { display: flex; gap: 8px; align-items: center; }
#ideaBox .pre { font-weight: 900; font-size: 20px; white-space: nowrap; }
#idea { flex: 1; min-width: 0; padding: 12px; font-size: 18px; border-radius: 12px; border: 0; outline: none; background: #fff; color: #1b1640; user-select: text; }
#ideaBox button { padding: 12px 18px; font-weight: 900; font-size: 18px; border-radius: 12px; background: #ffd23f; color: #1b1640; }
#ideaBar { margin-top: 10px; height: 6px; background: #ffffff22; border-radius: 3px; overflow: hidden; }
#ideaBar div { height: 100%; width: 100%; background: #ffd23f; }

#shareBtn { pointer-events: auto; position: absolute; right: 12px; bottom: 60px; background: #ff3b6b; color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 900; box-shadow: 0 4px 0 #a3203f; }
#results { pointer-events: auto; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: #1b1640f2; border: 3px solid #ffffff33; border-radius: 20px; padding: 22px; text-align: center; width: min(460px, 92vw); display: flex; flex-direction: column; gap: 12px; }
#resTitle { font-size: 30px; font-weight: 900; }
#resWinners { font-size: 20px; font-weight: 800; color: #ffd23f; }
#rewardBtn { background: #4cd964; color: #0b3d1a; padding: 12px; border-radius: 12px; font-weight: 900; }
#resNext { opacity: .8; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .6s; }

.touch { display: none; }
body.mobile .touch { display: block; }
#joy { pointer-events: auto; position: absolute; left: 24px; bottom: 70px; width: 130px; height: 130px; border-radius: 50%; background: #ffffff1a; border: 2px solid #ffffff33; }
#joyKnob { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: #ffffff66; }
#jumpBtn { pointer-events: auto; position: absolute; right: 24px; bottom: 90px; width: 92px; height: 92px; border-radius: 50%; background: #ffd23fcc; color: #1b1640; font-weight: 900; font-size: 18px; }
body.mobile #feed { top: 50px; width: 46vw; } body.mobile .fi { font-size: 11px; }
body.mobile #shareBtn { bottom: 200px; }
#alive { white-space: nowrap; }
body.mobile #ideaBox { top: 108px; bottom: auto; }
body.mobile #ideaTitle { font-size: 16px; margin-bottom: 6px; }
body.mobile #ideaBox .pre { font-size: 16px; }
body.mobile #announce { top: 30%; }

.adWrap { max-width: 980px; margin: 0 auto; min-height: 90px; text-align: center; }
.adWrap::before { content: 'Advertisement'; display: block; font-size: 11px; opacity: .45; margin-bottom: 4px; }
#resAd { width: 100%; min-height: 0; margin-top: 4px; }
#resAd:empty { display: none; }
#results { max-height: 92svh; overflow-y: auto; }
#dead { pointer-events: auto; }
#deadAd { min-height: 0; margin-top: 8px; max-height: 120px; overflow: hidden; }
#deadAd:empty { display: none; }
body.mobile #dead { bottom: 230px; }
