/* Phone styles for the frame extras and every game's screens. */

.pscore { color: var(--yellow); font-size: 1.2rem; }
.field small { font-size: .9rem; color: #555; }

/* ---------- reaction bar ---------- */
body.has-bar .phone { padding-bottom: 4.6rem; }
#reactbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  justify-content: center;
  gap: .15rem;
  padding: .3rem .3rem max(.3rem, env(safe-area-inset-bottom));
  background: rgba(18, 0, 43, .92);
  border-top: 2px solid var(--pink);
}
#reactbar[hidden] { display: none; }
#reactbar button {
  flex: 1;
  max-width: 3rem;
  font-size: 1.5rem;
  line-height: 1;
  padding: .3rem 0;
  background: none;
  border: none;
  touch-action: manipulation;
}
#reactbar .horn { position: relative; max-width: 3.4rem; background: var(--yellow); border: 2px solid var(--ink); }
#reactbar .horn small { position: absolute; right: .1rem; bottom: 0; font-size: .75rem; color: #111; }
#reactbar .horn:disabled { opacity: .35; }
.popped { animation: popped .25s; }
@keyframes popped { 50% { transform: scale(1.5) rotate(-10deg); } }

/* ---------- writing ---------- */
#writeInput {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1.1;
  padding: .3rem .45rem;
  color: #111;
  background: #fff;
  border: 3px solid var(--violet);
  border-radius: 0;
  resize: none;
  outline: none;
}
.write-row { display: flex; justify-content: space-between; align-items: center; margin-top: .4rem; }
.write-row .btn98 { font-size: 1.6rem; padding: .15rem 1.2rem; }
.count { font-size: 1rem; color: #555; }
.sent { font-size: 1.6rem; background: #fff; border: 2px solid var(--ink); padding: .3rem .5rem; margin: .4rem 0; color: #111; }
.qtext .chip { font-size: 1rem; vertical-align: middle; }

/* ---------- VIP game picker ---------- */
.pgames { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: .3rem; }
.pgame { display: flex; align-items: center; gap: .3rem; font: inherit; font-size: 1.05rem; text-align: left; background: #e6e6e6; color: #111; border: 2px solid; border-color: #fff #222 #222 #fff; padding: .25rem .35rem; }
.pgame span { font-size: 1.4rem; }
.pgame b { font-weight: normal; line-height: 1; }
.pgame.on { background: var(--yellow); border-color: #222 #fff #fff #222; box-shadow: 0 0 0 2px var(--hot); }
.btn98.big + .btn98.big { margin-top: .4rem; }

/* ---------- 9 Lives: glitches + sabotage ---------- */
.pglitch { background: var(--hot); color: #fff; font-size: 1.05rem; padding: .2rem .5rem; animation: glitch .6s steps(2) infinite; }
.glitchcard > .bd { background: repeating-linear-gradient(45deg, #fffb96 0 14px, #ffe259 14px 28px); }
.qtext.lagged { animation: lagged 2.6s steps(12) both; }
@keyframes lagged { 0% { filter: blur(6px); letter-spacing: .4em; opacity: .4; } 60% { filter: blur(2px); } 100% { filter: none; letter-spacing: normal; opacity: 1; } }
body[data-glitch='comic'] #screen, body[data-glitch='comic'] #screen * { font-family: 'Comic Neue', 'Comic Sans MS', 'Chalkboard SE', cursive !important; }
.fakehint { background: var(--yellow); color: #111; border: 2px dashed var(--hot); padding: .3rem .5rem; font-size: 1.25rem; text-align: center; }
.fakehint small { display: block; font-size: .85rem; color: #555; }
body.flipped .phone { transform: rotate(180deg); transition: transform .4s; }
body.shrunk .popt { transform: scale(.42); transform-origin: left center; }
.weapons { display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem; }
.weapon { display: grid; justify-items: center; padding: .2rem .1rem; font-size: .85rem; line-height: 1; }
.weapon b { font-size: 1.6rem; font-weight: normal; }
.weapon small { font-size: .7rem; color: #444; }
.weapon.on { background: var(--yellow); box-shadow: 0 0 0 2px var(--hot); }
.jam {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  background: linear-gradient(160deg, #3a0ca3, #f72585);
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr;
  z-index: 85;
}
.jam-top { display: flex; justify-content: space-between; align-items: center; padding: .5rem .8rem; font-size: 1rem; background: rgba(0, 0, 0, .4); }
.jam-skip { background: rgba(255, 255, 255, .2); padding: .1rem .5rem; }
.jam-x { font-size: 1.2rem; }
.jam-body { display: grid; place-items: center; align-content: center; gap: .6rem; text-align: center; padding: 1rem; }
.jam-logo { font-size: 4rem; animation: throb .4s infinite alternate; }
.jam-title { font-family: var(--logo); font-size: 2rem; line-height: 1.05; }
.jam-text { font-size: 1.3rem; }
.jam-btn { background: var(--mint); color: #111; font-size: 1.8rem; padding: .3rem 1.5rem; border: 3px solid #111; animation: throb .5s infinite alternate; }

/* ---------- SPAM FILTER ---------- */
.votes { display: grid; gap: .4rem; margin: .3rem 0 .4rem; }
.vrow { display: grid; grid-template-columns: 1fr 2.8rem 2.8rem; gap: .3rem; align-items: center; background: #fff; border: 2px solid var(--ink); padding: .25rem .4rem; }
.vtext { font-size: 1.3rem; line-height: 1.05; color: #111; }
.vbtn { height: 2.6rem; font-size: 1.4rem; background: #e6e6e6; border: 2px solid; border-color: #fff #222 #222 #fff; filter: grayscale(1); opacity: .7; }
.vbtn.on { filter: none; opacity: 1; border-color: #222 #fff #fff #222; }
.vbtn.fav.on { background: #ffd0f2; }
.vbtn.bot.on { background: #c9f7ff; }

/* ---------- COMMENT SECTION ---------- */
.ppost { background: #fff; color: #111; border: 2px solid var(--ink); padding: .4rem .6rem; font-size: 1.5rem; line-height: 1.05; }
.ppost small { display: block; font-size: .95rem; color: #666; }
.pside { font-size: 1.25rem; text-align: center; padding: .25rem; border: 2px solid var(--ink); }
.pside.agree { background: var(--mint); color: #111; }
.pside.disagree { background: var(--hot); color: #fff; }
.pcmt { background: #fff; border: 2px solid var(--ink); padding: .4rem .5rem; font-size: 1.1rem; color: #444; }
.pcmt b { font-weight: normal; color: var(--violet); }
.pcmt div { font-size: 1.55rem; line-height: 1.05; color: #111; margin-top: .15rem; }
.pcmt .c-side { font-size: .8rem; border: 1px solid var(--ink); padding: 0 .3rem; }
.pcmt.side-agree .c-side { background: var(--mint); }
.pcmt.side-disagree .c-side { background: var(--hot); color: #fff; }
.pcmt.side-troll { background: repeating-linear-gradient(45deg, #ffe3ee 0 10px, #fff 10px 20px); }
.reacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .6rem; }
.rbtn { display: grid; justify-items: center; font: inherit; padding: .5rem 0 .3rem; border: 3px solid var(--ink); box-shadow: .2rem .2rem 0 var(--ink); color: #111; touch-action: manipulation; }
.rbtn span { font-size: 2.6rem; line-height: 1; }
.rbtn b { font-weight: normal; font-size: 1.3rem; }
.rbtn small { font-size: .85rem; color: #333; }
.rbtn.fire { background: #ffb36b; }
.rbtn.lol { background: var(--yellow); }
.rbtn.clown { background: #ffd0f2; }
.rbtn:disabled { opacity: .4; }

/* ---------- DEEPFAKE ---------- */
.qtext.news { background: #0b1236; border-color: #e10600; }
.qtext u { text-decoration: none; color: var(--yellow); }
.breaking-sm { background: #e10600; color: #fff; padding: 0 .3rem; font-size: 1rem; vertical-align: middle; }
.dfp .popt { min-height: 3rem; font-size: 1.35rem; }
.popt.cut { opacity: .25; text-decoration: line-through; }
.enhance { background: var(--cyan); }
.enhance small { display: block; font-size: .85rem; }

/* ---------- CTRL+ALT+DEFEAT ---------- */
.mg-ready, .mg-result { text-align: center; padding-top: 1.5rem; }
.mg-icon { font-size: 5.5rem; line-height: 1; animation: throb .3s infinite alternate; }
.mg-cmd {
  font-family: var(--logo);
  font-size: 2.6rem;
  line-height: 1.02;
  color: #fff;
  text-shadow: .15rem .15rem 0 var(--hot), -.1rem -.1rem 0 var(--cyan);
  margin: .4rem 0;
}
.mg-cmd.small { font-size: 1.5rem; text-align: center; margin: 0 0 .3rem; }
.mg-sub { font-size: 1.3rem; color: var(--yellow); text-align: center; text-shadow: 1px 1px 0 var(--ink); }
.mg-banner { font-family: var(--logo); font-size: 3rem; text-align: center; color: var(--yellow); padding-top: 4rem; animation: shake .15s infinite; }
.mg-result.fail .mg-cmd { color: var(--hot); }
.mg {
  position: relative;
  height: 64vh;
  min-height: 20rem;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: rgba(18, 0, 43, .55);
  border: 3px solid var(--cyan);
}
.mg.done > *:not(.mg-verdict) { pointer-events: none; opacity: .6; }
.mg-verdict {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--logo);
  font-size: 3rem;
  z-index: 5;
  pointer-events: none;
  animation: pop-in .25s;
}
.mg-verdict.pass { color: var(--mint); text-shadow: .2rem .2rem 0 var(--ink); }
.mg-verdict.fail { color: var(--hot); text-shadow: .2rem .2rem 0 var(--ink); background: rgba(255, 42, 109, .2); }
.mg :where(button) { touch-action: manipulation; font-family: var(--ui); }

.mg-pop { position: absolute; left: 6%; right: 6%; top: 12%; }
.mg-pop .tb { font-size: 1rem; }
.mg-pop .x.real { width: 1.1rem; height: 1rem; font-size: .65rem; }
.mg-pop .bd { position: relative; height: 15rem; background: linear-gradient(#fffb96, #ffd319); }
.mg-adtext { text-align: center; font-size: 1.45rem; line-height: 1.1; color: #111; }
.mg-adtext small { font-size: 1rem; }
.decoys { position: absolute; inset: 5.5rem .5rem .5rem; }
.decoy { position: absolute; font-size: 1.15rem; padding: .2rem .5rem; }

.mg-bait { display: grid; place-items: center; height: 100%; align-content: center; gap: .5rem; }
.bait { font-size: 2rem; padding: 1.2rem 1.4rem; background: var(--mint); border: 4px solid var(--ink); box-shadow: .3rem .3rem 0 var(--ink); animation: throb .3s infinite alternate; color: #111; }

.mg-mash { display: grid; place-items: center; align-content: center; gap: .8rem; height: 100%; padding: 0 1rem; }
.mg-mash .pbar { width: 100%; height: 1.8rem; }
.mash { width: 13rem; height: 13rem; border-radius: 50%; font-size: 2rem; color: #111; background: radial-gradient(#fff 0, var(--pink) 70%); border: 5px solid var(--ink); box-shadow: 0 .4rem 0 var(--ink); }
.mash:active { transform: translateY(.3rem); box-shadow: 0 .1rem 0 var(--ink); }
.tapnow { background: radial-gradient(#fff 0, var(--mint) 70%); font-size: 3rem; }

.mg-captcha { background: #fff; color: #111; margin: .6rem; border: 2px solid #ccc; }
.cap-head { background: #4a90e2; color: #fff; padding: .5rem .6rem; font-size: 1.3rem; }
.cap-head b { font-size: 1.6rem; font-weight: normal; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .25rem; padding: .3rem; }
.cap { aspect-ratio: 1; font-size: 2.6rem; background: #eee; border: none; }
.cap.on { background: #b5f5d0; outline: 4px solid #2a9d5c; outline-offset: -4px; }
.cap-foot { padding: .3rem .6rem; font-size: 1.1rem; color: #555; }

.mg-spell { display: grid; align-content: center; gap: 1.2rem; height: 100%; padding: 0 .6rem; }
.sp-word { display: flex; justify-content: center; gap: .3rem; }
.sp-word span { font-size: 2.6rem; width: 2.6rem; text-align: center; background: #000; color: var(--gray-dk); border-bottom: 3px solid var(--mint); }
.sp-word span.on { color: var(--mint); }
.sp-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.key { font-size: 2rem; padding: .5rem 0; background: var(--gray); border: 2px solid; border-color: #fff #222 #222 #fff; color: #111; }

.mg-stop { display: grid; place-items: center; align-content: center; gap: 1rem; height: 100%; padding: 0 1rem; }
.st-bar { position: relative; width: 100%; height: 3rem; background: #fff; border: 3px solid var(--ink); }
.st-zone { position: absolute; right: 0; top: 0; bottom: 0; width: 12%; background: var(--mint); }
.st-mark { position: absolute; top: -.6rem; bottom: -.6rem; width: .5rem; margin-left: -.25rem; background: var(--hot); }
.stopbtn { width: 10rem; height: 10rem; background: radial-gradient(#fff 0, var(--hot) 70%); color: #111; font-size: 2.4rem; }

.mg-imp { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: .25rem; padding: .4rem; }
.imp { aspect-ratio: 1; padding: .1rem; background: rgba(255, 255, 255, .15); border: 2px solid rgba(255, 255, 255, .25); }

.mg-color { display: grid; align-content: center; gap: 1rem; height: 100%; padding: 0 .8rem; }
.cl-word { font-family: var(--logo); font-size: 2.8rem; text-align: center; text-shadow: .2rem .2rem 0 #000; overflow-wrap: anywhere; }
.cl-word.math { font-family: var(--ui); font-size: 3.8rem; color: #fff; white-space: nowrap; }
.cl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.cl-opts[hidden] { display: none; }
.clo { font-size: 1.9rem; padding: .7rem 0; }

.mg-count { display: grid; grid-template-rows: 1fr auto; height: 100%; padding: .5rem; }
.cn-field { position: relative; }
.cn-field span { position: absolute; font-size: 2.6rem; }
.cn-field .mg-sub { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; }

.mg-swipe { display: grid; align-content: center; justify-items: center; gap: 1rem; height: 100%; }
.sw-card { width: 15rem; background: #fff; color: #111; border: 3px solid var(--ink); box-shadow: .3rem .3rem 0 var(--ink); padding: .6rem; text-align: center; touch-action: none; transition: transform .2s; }
.sw-pic { width: 7rem; height: 7rem; margin: 0 auto; }
.sw-text { font-size: 1.5rem; line-height: 1.05; }
.sw-btns { display: flex; gap: .6rem; }
.sw-btns .btn98 { font-size: 1.3rem; }
.swl { background: #ffb3c8; }
.swr { background: #b5f5d0; }

.mg-whack { padding: .5rem; }
.wk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .5rem; }
.hole { aspect-ratio: 1; font-size: 3rem; color: #fff; background: radial-gradient(#2a0845 55%, #7a1c7a 56%); border: 3px solid var(--ink); border-radius: 50%; }

.mg-dodge { position: relative; height: 100%; }
.dg-me { position: absolute; bottom: 4%; width: 4.4rem; height: 4.4rem; transform: translateX(-50%); }
.dg-drop { position: absolute; top: 0; font-size: 2.2rem; transform: translate(-50%, -100%); }
.dg-tip { position: absolute; top: .4rem; left: 0; right: 0; }

.mg-unsub { height: 100%; padding: .4rem; }
.mail-box { height: 100%; overflow-y: auto; background: #fff; color: #111; padding: .5rem .7rem; font-size: 1.15rem; line-height: 1.15; touch-action: pan-y; }
.mail-box p { margin: 0 0 1.2rem; font-size: 1.15rem; }
.mail-box a { color: #0645ad; text-decoration: underline; }
.mail-box .tiny { font-size: .75rem; color: #999; text-align: center; }
.mail-box .tiny a { color: #999; font-size: .8rem; }

.mg-snooze { position: relative; height: 100%; }
.alarm { position: absolute; width: 5.5rem; height: 5.5rem; font-size: 3.4rem; line-height: 1; background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%; animation: shake .1s infinite; }
.mg-snooze .mg-sub { position: absolute; bottom: .5rem; left: 0; right: 0; }

.mg-maj { display: grid; align-content: center; justify-items: center; gap: .6rem; height: 100%; }
.maj { width: 10rem; height: 10rem; font-size: 6rem; background: #fff; border: 4px solid var(--ink); border-radius: 1rem; box-shadow: .3rem .3rem 0 var(--ink); }
.maj.on { background: var(--yellow); }

.mg-boss { padding: .4rem; }
.boss-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem; margin-top: .4rem; }
.blk { aspect-ratio: 1; background: #3a86ff; border: 2px solid #001a4d; }
.blk.bad { background: var(--hot); animation: throb .3s infinite alternate; }
.blk.fixed { background: #4895ef; }

/* ---------- DARK MODE ---------- */
body[data-game='dark']:not([data-phase='lobby']):not([data-phase='gameover']) { background: #050505; }
.qtext.dmq { background: #050505; border-color: #7a0000; color: #d8ffd8; font-size: 1.3rem; }
.qtext.dmq b { color: #fff; font-weight: normal; letter-spacing: .05em; }
.popt.own { background: #1a1a1a; color: var(--mint); border-color: var(--mint); }
.popt.own b { background: var(--mint); color: #111; }
.dm-prompt { color: var(--violet); font-size: 1.6rem; float: left; margin-right: .3rem; }
.dmsent { font-family: var(--ui); color: #0a7a50; }
.dmfate.die > .bd { background: #1a0000; color: #fdd; }
.dmfate.die .big { color: #ff2a2a; text-shadow: 0 0 8px #ff0000; }
.dmfate.die .small { color: #caa; }
.dmfate.legend > .bd { background: linear-gradient(#fffb96, #ffd319); }
.pnight { margin: .3rem 0; font-size: 1.2rem; color: #5a2fc0; }

/* ---------- unlocks, fursonas, golden pizza roll ---------- */
.species { display: grid; grid-template-columns: repeat(4, 1fr); gap: .25rem; margin: .3rem 0; }
.sp { font: inherit; font-size: .95rem; padding: .2rem 0; background: #e6e6e6; color: #111; border: 2px solid; border-color: #fff #222 #222 #fff; }
.sp.on { background: var(--yellow); border-color: #222 #fff #fff #222; }
.locked { color: #555; }
.ptoast { position: fixed; left: 50%; top: 4.5rem; z-index: 95; transform: translateX(-50%); width: min(92vw, 24rem); text-align: center; font-size: 1.25rem; padding: .5rem; background: var(--yellow); color: #111; border: 3px solid var(--ink); box-shadow: .3rem .3rem 0 var(--ink); animation: pop-in .25s; }
.golden {
  position: fixed; left: 50%; top: 42%; z-index: 96; transform: translate(-50%, -50%);
  display: grid; justify-items: center; gap: .1rem; width: 15rem; padding: 1rem .5rem;
  font: inherit; color: #3a2600; background: radial-gradient(#fff6a8, #ffc400 60%, #c98a00); border: 4px solid #7a5200; border-radius: 1.2rem;
  box-shadow: 0 0 2.5rem #ffd319, .3rem .3rem 0 #7a5200; animation: golden .5s ease-in-out infinite alternate; touch-action: manipulation;
}
.golden span { font-size: 3.5rem; line-height: 1; }
.golden b { font-weight: normal; font-size: 1.6rem; }
@keyframes golden { from { transform: translate(-50%, -50%) rotate(-4deg) scale(1); } to { transform: translate(-50%, -50%) rotate(4deg) scale(1.06); } }

/* ---------- Haunted Mall on phones ---------- */
body[data-theme='haunted'] { --pink: #ff7518; --hot: #e10600; --cyan: #9dff6b; --mint: #9dff6b; --violet: #6a1b9a; --yellow: #ffd27f; background: linear-gradient(180deg, #050008 0%, #1b0430 40%, #4a0e4e 72%, #ff7518 100%) fixed; }
body[data-theme='haunted'] .win > .tb { background: linear-gradient(90deg, #2b0a3d, #ff7518 60%, #6a1b9a); }
body[data-theme='haunted'] .logo-sm { background: linear-gradient(#ffd27f 10%, #ff7518 55%, #9dff6b 90%); -webkit-background-clip: text; background-clip: text; }

/* ---------- lore drops and room builder ---------- */
.quests { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.quest { display: grid; font-size: 1.1rem; padding: .4rem .2rem; }
.quest small { font-size: .8rem; color: #444; }
#loreText, .build input, .build textarea, .build select { display: block; width: 100%; font: inherit; font-size: 1.2rem; padding: .25rem .4rem; color: #111; background: #fff; border: 2px solid var(--violet); border-radius: 0; margin: .15rem 0 .4rem; }
#loreText { font-size: 1.4rem; resize: none; }
.build label { display: block; font-size: .95rem; color: #333; }
.build textarea { resize: none; }
.bopt { border: 2px dashed #888; padding: .3rem .4rem 0; margin-bottom: .4rem; }
.bopt b { font-weight: normal; font-size: .9rem; color: #333; }

/* ---------- reel link ---------- */
.reel-link { position: fixed; left: 50%; bottom: 5rem; z-index: 94; transform: translateX(-50%); width: min(92vw, 22rem); display: grid; text-align: center; padding: .6rem; text-decoration: none; color: #111; background: var(--yellow); border: 3px solid var(--ink); box-shadow: .3rem .3rem 0 var(--ink); font-size: 1.4rem; animation: pop-in .3s; }
.reel-link small { font-size: 1rem; color: #444; }

/* ---------- HOT POTATO BOMB ---------- */
body.hp-hot { animation: hot-bg .5s ease-in-out infinite alternate; }
@keyframes hot-bg { from { background-color: #2a0505; } to { background-color: #6a0d0d; } }
.hp-hold { display: grid; gap: .5rem; text-align: center; }
.hp-pbomb { font-size: 5rem; line-height: 1; animation: bomb-shake .15s steps(2) infinite; }
.hp-pbomb.small { font-size: 3rem; animation: none; }
@keyframes bomb-shake { 50% { transform: rotate(8deg) translateX(2px); } }
#hpInput { width: 100%; font: inherit; font-size: 1.5rem; padding: .5rem; border: 2px inset #888; margin-bottom: .5rem; }
.hp-psaid { text-align: left; font-size: 1.1rem; max-height: 12rem; overflow: auto; }

/* ---------- THE PROPHECY ---------- */
.pr-ptext { font-family: Georgia, serif; font-style: italic; font-size: 1.35rem; line-height: 1.3; }
.pr-porb { font-size: 4rem; }
.pr-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.pr-opt { display: grid; justify-items: center; font: inherit; font-size: 1.2rem; padding: .4rem; background: #c0c0c0; border: 2px solid; border-color: #fff #222 #222 #fff; }
.pr-opt span { width: 3.4rem; height: 3.4rem; }
.pr-opt span svg { width: 100%; height: 100%; overflow: visible; }
