/* leave70: the "จะออกจากเกมจริงหรือ?" popup (public/js/leave70core.js) — game + website pages. Above every window,
   sheet and toast of the game (modal-root backdrops count up from 1, toasts ~ 10^4). */
.lv70-back {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: radial-gradient(120% 90% at 50% 40%, rgba(40, 20, 70, .55), rgba(4, 6, 20, .82));
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .2s ease; font-family: Kanit, 'Noto Sans Thai', system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; overscroll-behavior: contain;
}
.lv70-back.on { opacity: 1; }
.lv70-back.off { opacity: 0; pointer-events: none; }
.lv70-box {
  position: relative; width: min(380px, 100%); box-sizing: border-box;
  padding: 64px 18px 14px; margin-top: 40px; text-align: center; color: #f6f1ff;
  background: linear-gradient(180deg, #1d2a5e 0%, #121b44 55%, #0d1433 100%);
  border: 2px solid #e8c25a; border-radius: 22px;
  box-shadow: 0 0 0 4px rgba(232, 194, 90, .18), 0 18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .15);
  transform: translateY(18px) scale(.94); transition: transform .28s cubic-bezier(.2, 1.4, .4, 1);
}
.lv70-back.on .lv70-box { transform: none; }
.lv70-box::before { /* gold corner shine */
  content: ''; position: absolute; inset: 6px; border-radius: 16px; pointer-events: none;
  border: 1px solid rgba(255, 230, 160, .25);
}
.lv70-art { position: absolute; left: 50%; top: -58px; width: 124px; height: 116px; transform: translateX(-50%); pointer-events: none; }
.lv70-pet { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.lv70-body { transform-origin: 60px 100px; animation: lv70-bob 1.6s ease-in-out infinite; }
.lv70-tear { animation: lv70-tear 1.8s ease-in infinite; }
.lv70-tear.t2 { animation-delay: .9s; }
.lv70-hand { transform-origin: 100px 62px; animation: lv70-wave 1.1s ease-in-out infinite; }
.lv70-hearts path { animation: lv70-float 2.4s ease-in-out infinite; }
.lv70-hearts path + path { animation-delay: 1.2s; }
.lv70-spark { position: absolute; color: #ffe08a; font-size: 14px; animation: lv70-tw 1.6s ease-in-out infinite; text-shadow: 0 0 6px #ffcf4a; }
.lv70-spark.s1 { left: -8px; top: 30px; }
.lv70-spark.s2 { right: -10px; top: 52px; animation-delay: .5s; font-size: 11px; }
.lv70-spark.s3 { right: 6px; top: 0; animation-delay: 1s; }
.lv70-t { margin: 2px 0 4px; font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: .2px;
  background: linear-gradient(180deg, #fff6d6, #f0c75a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lv70-s { margin: 0 0 10px; font-size: 14px; color: #c9d1f5; line-height: 1.4; }
.lv70-rs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; text-align: start; }
.lv70-r { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: 13.5px; line-height: 1.3;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.lv70-r.hot { background: linear-gradient(90deg, rgba(255, 120, 170, .22), rgba(255, 200, 90, .14)); border-color: rgba(255, 170, 120, .45); }
.lv70-ri { flex: none; width: 24px; text-align: center; font-size: 17px; }
.lv70-rt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lv70-b { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; box-sizing: border-box;
  border-radius: 14px; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; padding: 8px 12px; line-height: 1.2; }
.lv70-b:focus-visible { outline: 3px solid #9fd0ff; outline-offset: 2px; }
.lv70-b.stay { min-height: 52px; font-size: 18px; color: #3b2300; margin-bottom: 8px;
  background: linear-gradient(180deg, #ffe58a, #f2b53a 60%, #e09a1c); box-shadow: 0 4px 0 #a96b0c, 0 8px 18px rgba(240, 170, 40, .35);
  animation: lv70-glow 2.2s ease-in-out infinite; }
.lv70-b.stay:active { transform: translateY(2px); box-shadow: 0 2px 0 #a96b0c; }
.lv70-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lv70-b.tab { color: #e6f3ff; background: linear-gradient(180deg, #3a63c9, #2a479a); box-shadow: 0 3px 0 #1b2f6a; font-size: 13.5px; }
.lv70-b.out { color: #c7cbe0; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); font-size: 13.5px; font-weight: 500; }
.lv70-b.tab:active, .lv70-b.out:active { transform: translateY(1px); }
.lv70-bi { flex: none; }
.lv70-bl { min-width: 0; overflow-wrap: anywhere; }
.lv70-n { margin: 10px 0 0; font-size: 11.5px; color: #8f98c4; }
/* the scrolling inside (the mascot sits above the box, outside the scroll) */
.lv70-in { max-height: calc(100dvh - 150px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; margin: 0 -6px; padding: 0 6px; }
/* live player count (owner 17:33) */
.lv70-on { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 8px; padding: 4px 12px 4px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #c8ffd8; background: rgba(40, 200, 110, .14); border: 1px solid rgba(80, 230, 140, .4); }
.lv70-on[hidden] { display: none; }
.lv70-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ee07f; box-shadow: 0 0 0 0 rgba(62, 224, 127, .7); animation: lv70-ping 1.6s ease-out infinite; }
/* the Offline Farming card */
.lv70-ex[hidden] { display: none; }
.lv70-fc { margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; text-align: start;
  background: linear-gradient(135deg, rgba(110, 90, 220, .32), rgba(40, 60, 140, .3)); border: 1px solid rgba(170, 150, 255, .45); }
.lv70-fc.ready { background: linear-gradient(135deg, rgba(60, 190, 130, .28), rgba(40, 80, 140, .3)); border-color: rgba(110, 230, 170, .5); }
.lv70-fc-h { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 14.5px; color: #efeaff; }
.lv70-fc-ic { display: inline-flex; width: 20px; height: 20px; color: #ffe08a; flex: none; }
.lv70-fc-ic svg { width: 100%; height: 100%; }
.lv70-fc-time { margin-inline-start: auto; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #2a1d00; background: linear-gradient(180deg, #ffe58a, #f2b53a); }
.lv70-fc-m { margin: 5px 0 8px; font-size: 12.5px; line-height: 1.4; color: #d6dcff; }
.lv70-fc-b { width: 100%; min-height: 38px; border: 0; border-radius: 11px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600;
  color: #fff; background: linear-gradient(180deg, #8a6cf0, #5d43c9); box-shadow: 0 3px 0 #3a2a8a; }
.lv70-fc.none .lv70-fc-b { color: #e6e0ff; background: rgba(255, 255, 255, .1); box-shadow: none; border: 1px solid rgba(200, 190, 255, .35); }
.lv70-fc-b:active { transform: translateY(1px); }
.lv70-fc-b:focus-visible { outline: 3px solid #9fd0ff; outline-offset: 2px; }
/* "don't go yet — open a new tab instead" above the new-tab button */
.lv70-nudge { margin: 2px 0 6px; font-size: 13px; font-weight: 600; color: #ffd27a; }
.lv70-nudge::after { content: ' 👇'; }
/* the small "opened in a new tab" hint */
.lv70-hint { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 2147483001; max-width: calc(100% - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  padding: 8px 14px; border-radius: 999px; font: 500 13px/1.3 Kanit, 'Noto Sans Thai', system-ui, sans-serif; color: #fff;
  background: rgba(16, 24, 60, .92); border: 1px solid rgba(232, 194, 90, .6); box-shadow: 0 6px 18px rgba(0, 0, 0, .4); text-align: center; }
.lv70-hint.on { opacity: 1; transform: translate(-50%, 0); }
/* phone landscape / short screens: smaller mascot, one row of buttons */
@media (max-height: 500px) {
  .lv70-box { width: min(560px, 100%); padding: 10px 14px 10px 112px; margin-top: 0; text-align: start; }
  .lv70-art { left: 8px; top: 50%; width: 96px; height: 90px; transform: translateY(-50%); }
  .lv70-t { font-size: 19px; }
  .lv70-s { margin-bottom: 6px; font-size: 13px; }
  .lv70-rs { margin-bottom: 8px; gap: 4px; }
  .lv70-r { padding: 4px 8px; font-size: 12.5px; }
  .lv70-b.stay { min-height: 42px; font-size: 16px; margin-bottom: 6px; }
  .lv70-b { min-height: 38px; }
  .lv70-n { margin-top: 6px; }
  .lv70-in { max-height: calc(100dvh - 44px); }
  .lv70-on { margin-bottom: 4px; padding: 2px 10px 2px 8px; font-size: 12px; }
  .lv70-s { display: none; } /* keep the buttons on screen: one reason, the card on two lines */
  .lv70-r:nth-child(n+2) { display: none; }
  .lv70-fc { margin-bottom: 8px; padding: 7px 10px; display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; }
  .lv70-fc-h { grid-column: 1 / -1; }
  .lv70-fc-m { margin: 3px 0 0; font-size: 12px; }
  .lv70-fc-b { min-height: 34px; width: auto; padding: 0 14px; white-space: nowrap; }
  .lv70-nudge { margin: 0 0 4px; font-size: 12px; }
}
/* light theme of the website */
html[data-theme="light"] .lv70-back, html.light .lv70-back { background: radial-gradient(120% 90% at 50% 40%, rgba(255, 220, 235, .5), rgba(30, 30, 60, .6)); }
[dir="rtl"] .lv70-rs { text-align: right; }
@keyframes lv70-bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-5px) scale(1.03, .97); } }
@keyframes lv70-tear { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
@keyframes lv70-wave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-22deg); } }
@keyframes lv70-float { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-6px); opacity: .5; } }
@keyframes lv70-tw { 0%, 100% { opacity: .2; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes lv70-ping { 0% { box-shadow: 0 0 0 0 rgba(62, 224, 127, .7); } 80%, 100% { box-shadow: 0 0 0 7px rgba(62, 224, 127, 0); } }
@keyframes lv70-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .lv70-body, .lv70-tear, .lv70-hand, .lv70-hearts path, .lv70-spark, .lv70-b.stay, .lv70-dot { animation: none; }
  .lv70-box, .lv70-back { transition: none; }
}
