ins.adsbygoogle[data-ad-status='unfilled'] {
  display: none !important;
}
:root {
  --col1: #46bef9;
  --col2: #0092d9;
  --col3: #ffc91b;
  --col4: #222222;
  --br: 10px;
}
@font-face {
font-family: Myriad;
src: url('images/myriad.ttf');
}
html {
  min-height: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}
body {
  min-height: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: var(--col1);
  font-family: Myriad;
  margin: 0;
  padding: 0;
  text-align: center;
  box-sizing: border-box;
}
html.kez-preload-paint,
html.kez-preload-paint body {
  background-color: #0144b5 !important;
}
div {
  box-sizing: border-box;
}
body::-webkit-scrollbar {
background: var(--col1);
}
body::-webkit-scrollbar-thumb {
background: var(--col3);
}
p {
margin: 0;
}
img {
border: 0;
}
a {
color: var(--col2);
text-decoration: none;
}
a:hover {
color: var(--col2);
text-decoration: none;
filter: contrast(130%);
}
h1, h2, h3, h4, h5, h6 {
font-family: Myriad;
font-size: 30px;
color: var(--col2);
font-weight: normal;
margin: 5px 0;
}

.p18 {font-size: 18px !important;}


#top {
  background-color: var(--col2);
  border-radius: 0 0 25px 25px;
  height: 70px;
  width: 100%;
  margin: 0 0 10px 0;
  flex-shrink: 0;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  padding: 5px;
  z-index: 100;
}
#butmen {
  display: none;
  width: 60px; height: 60px;
  background: url('images/menu.png') no-repeat;
  position: absolute;
  top: 5px; left: 5px;
  z-index: 3;
}
#butmein {
  display: none;
  width: 60px; height: 60px;
  background: url('images/menu.png') no-repeat;
  z-index: 300;
  position: relative;
  flex-shrink: 0;
}
.logo {
  display: block;
  width: 210px; height: 41px;
  background: url('images/logo.png') no-repeat;
  margin: 0 0 0 10px;
  flex-shrink: 0;
}
.minilogo {
  display: block;
  width: 120px; height: 23px;
  background: url('images/logo.png') no-repeat;
  background-size: cover;
  margin: 10px auto;
}
.kez {
  width: 64px; height: 64px;
  flex-shrink: 0;
}
.kez img {
  width: 64px; height: 64px;
  border-radius: 20px;
}

#bottom {
  background-color: var(--col2);
  border-radius: 25px 25px 0 0;
  height: 40px;
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
  align-items: center;
  padding: 5px 5px 0 5px;
  margin-top: auto;
  flex-shrink: 0;
}
#bottom a {
  text-transform: uppercase;
  font-size: 14px;
  color: #fff;
}
.games, .games2 {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
}
.games a, .games2 a {
  margin: 5px;
  position: relative;
}
.games a img {
  border: 3px solid var(--col2);
  width: 145px; height: 145px;
  border-radius: 20px;
}
/* Ribbon: natural PNG size, not affected by .games a img sizing */
.games a.game-tile-new .game-new-label {
  position: absolute;
  top: -6px;
  left: -6px;
  z-index: 3;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border: none;
  border-radius: 0;
  pointer-events: none;
  display: block;
  object-fit: none;
  flex-shrink: 0;
}
/* Same frame as other tiles (3px var(--col2) from .games a img) */
.games a.game-tile-new .game-tile-thumb {
  border: 3px solid var(--col2);
  width: 145px;
  height: 145px;
  border-radius: 20px;
}

@font-face {
  font-family: "Starlight";
  src: url("images/starlight.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

.game-upcoming-tile {
  margin: 5px;
  position: relative;
  width: 145px;
  height: 145px;
  border-radius: 20px;
  border: 3px solid var(--col2);
  box-sizing: border-box;
  background: url("images/upcoming.png") center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: "Starlight", Arial, Helvetica, sans-serif;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.game-upcoming-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  width: 100%;
  box-sizing: border-box;
}
.game-upcoming-l1 {
  font-size: 24px;
  line-height: 1;
  font-weight: bold;
  letter-spacing: 0.02em;
}
.game-upcoming-l2 {
  font-size: 18px;
  line-height: 1.1;
  opacity: 0.95;
  margin: 8px 0;
}
.game-upcoming-countdown {
  font-size: 32px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.games a.locked {
  cursor: pointer;
}
.games a.locked .lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  z-index: 10;
}
.games a.locked .lock-overlay span {
  display: block;
  line-height: 1.3;
}
.game-lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.game-lock-content {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  margin: 20px;
}
.game-lock-content h2 {
  color: #000;
  font-size: 28px;
  margin-bottom: 20px;
}
.game-lock-content p {
  color: #333;
  font-size: 18px;
  line-height: 1.5;
}
.game-lock-content .button.home {
  display: inline-block;
  margin: 0 auto;
}
.games2 a img {
  border: 3px solid #fff;
  width: 200px; height: 200px;
  border-radius: 20px;
}
.minigames {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
}
.minigames a {
  margin: 2px;
}
.minigames a img {
  border: 2px solid #fff;
  width: 56px; height: 56px;
  border-radius: 15px;
}
.white {
  width: 100%;
  max-width: 900px;
  background-color: #fff;
  border-radius: 25px;
  padding: 10px 15px;
  margin: 0 0 5px 0;
}
.ad {
    float: left;
    margin: -5px 15px 5px 0;
    border: 1px solid #f1f1f1;
}
.ad ins {
  width: 336px;
  height: 290px;
}
.ad2 {
    width: 100%;
    max-height: 250px;
    float: left;
    margin: 5px 0 25px 0;
}
.ad p, .ad2 p, .ad3 p {
  color: #000;
  font-size: 13px;
  text-transform: uppercase;
  text-align: center;
}
.ad3 {
    border: none;
}
.ad3 ins {
  width: 336px;
  height: 290px;
}
.text {
  text-align: justify;
  font-size: 17px;
  line-height: 140%;
}
.text img {
  width: 130px; height: auto;
  float: right;
  margin: 0 0 5px 10px;
  border-radius: 15px;
}
.block1 {
  width: 100%;
  min-height: 300px;
}
.ph {
  font-size: 15px;
  color: #000;
  text-transform: uppercase;
  margin: 10px 0 0 0;
}
.phl {
  font-size: 16px;
  color: #000;
  text-transform: uppercase;
  margin: 15px 0 10px 0;
  text-align: left;
}
.hb {
  text-transform: uppercase;
  font-size: 22px;
  text-align: left;
  margin: 15px 0 10px 0;
}
.bigp {
  font-size: 24px;
  color: #999;
  margin: 10px 0;
}
.bigp font {
  color: #000;
  font-weight: bold;
}
.tags {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-items: center;
}
.tagsbig {
  width: 95%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-items: center;
}
.tags a {
  display: block;
  border: 2px solid var(--col1);
  border-radius: 0 20px 20px 20px;
  padding: 8px 20px;
  text-transform: uppercase;
  font-size: 18px;
  margin: 5px;
  color: var(--col1);
  white-space: nowrap;
  font-weight: bold;
}
.tagsbig a {
  display: block;
  border: 2px solid var(--col1);
  border-radius: 20px;
  padding: 10px 40px;
  text-transform: uppercase;
  font-size: 18px;
  margin: 5px;
  color: var(--col1);
  white-space: nowrap;
  font-weight: bold;
  background: #fff;
}
.smaller {
  justify-content: flex-start;
  height: 40px;
  overflow: hidden;
}
.smaller a {
  padding: 6px 16px !important;
  font-size: 14px !important;
}
.tagslong {
  width: 95%;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
}
.tagslong a {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  width: 280px;
  max-width: 900px;
  background: #fff;
  border-radius: 15px;
  padding: 0 20px;
  margin: 5px;
}
.tagslong a div:nth-child(1) {
  color: var(--col3);
  font-size: 24px;
  font-weight: bold;
  text-align: left;
  flex-shrink: 0;
}
.tagslong a div:nth-child(3) {
  color: #444;
  font-size: 14px;
  height: 35px;
  overflow: hidden;
  text-align: justify;
  margin: 0 10px;
}
.tagslong a div:nth-child(2) {
  color: var(--col1);
  font-size: 30px;
  font-weight: bold;
  flex-shrink: 0;
  text-align: right;
  width: 40px;
}

.block2 {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
}
.screen {
  width: 350px; height: 250px;
  border-radius: 25px;
}
.screen_small {
  width: 175px; height: 125px;
  border-radius: 25px;
  margin: 0 0 10px 0;
}
.fle {
  width: 100%;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-around;
  align-items: center;
}
.flevert {
  flex-flow: column nowrap !important;
}
.fleinfo {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-items: center;
}
.p10 {
  font-size: 10px;
}
.p16 {
  font-size: 16px;
}
.p18 {
  font-size: 18px;
}
.p20 {
  font-size: 20px;
}
.p22 {
  font-size: 22px;
}
.p24 {
  font-size: 24px;
}
.pblue {
  color: var(--col1) !important;
}
.pdarkblue {
  color: var(--col2) !important;
}
.pblack {
  color: #000 !important;
}
.info {
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}
.votes, .plays {
  width: 160px;
  height: 50px;
  padding: 0 0 0 60px;
  text-align: center;
  font-weight: bold;
}
.votes {
    background: url('images/votes.png') no-repeat;
}
.plays {
    background: url('images/plays.png') no-repeat;
}
.play {
  display: block;
  background: var(--col3);
  border-radius: 25px;
  width: 300px; height: 50px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 30px;
  text-transform: uppercase;
  font-weight: bold;
}
.play img {
  margin: 0 10px 0 0;
}
.play:hover {
  color: #fff;
}
.stars {
  width: 207px; height: 38px;
  background: url('images/stars_off.png') no-repeat;
  text-align: left;
  margin: 0 0 20px 0;
}
.stars div {
  height: 38px;
  background: url('images/stars.png') no-repeat;
}

#gameplay {
  background: #000;
  width: 100vw;
  flex: 1 1 auto;
  min-height: 100vh;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-start;
}
#game {
  width: 100%; height: 100%;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
#game2 {
	display: grid;
	grid-template-rows: 1fr 1fr;
	height: 100vh; /* або 100% від контейнера */
	overflow: hidden;
}
#game3 {
	width: 100%;
	height: 100svh;
	border-collapse: collapse;
	table-layout: fixed;
}

#game3 #tr1 {
	height: 65vh;
}
#game3 #tr2 {
	height: 35vh;
	min-height: 30vh;
}

#game3 td {
  border: none;
	padding: 0;
	margin: 0;
	border-spacing: 0;
	vertical-align: top;
	height: 100%;
}
#game3 #tr2 td {
	min-height: 0;
	overflow: hidden;
}
#iframe {
  height: 100%;
}


.menu {
  width: 140px; height: 100%;
  background: var(--col2);
  text-align: center;
  overflow-y: scroll;
  overflow-x: hidden;
  flex-shrink: 0;
}
.menu2 {
  width: 80px;
  height: 100vh !important;
  max-height: 100vh;
  min-height: 0;
  background: var(--col2);
  text-align: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none; /* Firefox: без видимої смуги */
  -ms-overflow-style: none; /* IE/Edge legacy */
  flex-shrink: 0;
  padding-top: 5px;
  box-sizing: border-box;
}
.menu2::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.menu::-webkit-scrollbar {
background: var(--col1);
width: 5px;
}
.menu::-webkit-scrollbar-thumb {
background: var(--col3);
}
#hidemenu {
  display: block;
  width: 30px; height: 50px;
  background: url('images/hide.png') 30% 50% var(--col3) no-repeat;
  border-radius: 0 15px 15px 0;
  position: absolute;
  left: 140px; top: 10px;
}
#hidemenu-2 {
  display: block;
  width: 30px; height: 50px;
  background: url('images/hide.png') 30% 50% var(--col3) no-repeat;
  border-radius: 0 15px 15px 0;
  position: absolute;
  left: 80px; top: 10px;
}
#hidemenu2 {
  display: block;
  width: 50px; height: 30px;
  background: url('images/hide2.png') 50% 50% var(--col3) no-repeat;
  border-radius: 15px 15px 0 0;
  position: absolute;
  right: 50%;
  margin: -30px -65px 0 0;
  z-index: 1000;
}
#hidemenu3 {
  display: none;
  width: 50px; height: 30px;
  background: url('images/hide-show.png') 50% 50% var(--col3) no-repeat;
  border-radius: 15px 15px 0 0;
  position: absolute;
  right: 50%; bottom: 0;
  margin: -30px -25px 0 0;
  z-index: 1000;
}
.gamerate {
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
.gamerate img {
  width: 120px; height: 120px;
  border-radius: 25px;
  border: 3px solid var(--col1);
}
.gamerate2 img {
  width: 60px; height: 60px;
  border-radius: 25px;
  border: 3px solid var(--col1);
}
.star {
  width: 100%; height: 63px;
  background: url('images/star.png') 50% 0 no-repeat;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  margin: 4px 0 0 0;
}
.star p {
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}
.ph2 {
  color: #fff;
  font-size: 20px;
  margin: 10px 0;
}
.ph3 {
  color: #fff;
  font-size: 15px;
  margin: 10px 0;
  text-transform: uppercase;
}
.button {
  display: block;
  width: 56px; height: 56px;
  border-radius: 24px;
  border: 2px solid #fff;
  background-color: var(--col1);
  margin: 2px;
}
.like {
  background: var(--col1) url('images/but_like.png') 50% 50% no-repeat;
}
.dislike {
  background: var(--col1) url('images/but_dislike.png') 50% 50% no-repeat;
}
.home {
  background: var(--col1) url('images/but_home.png') 50% 50% no-repeat;
}
.reload {
  background: var(--col1) url('images/but_reload.png') 50% 50% no-repeat;
}
.like_on {
  background: var(--col1) url('images/but_like_on.png') 50% 50% no-repeat;
}
.dislike_on {
  background: var(--col1) url('images/but_dislike_on.png') 50% 50% no-repeat;
}
.fav {
  background: var(--col1) url('images/but_fav.png') 50% 50% no-repeat;
}
.fav_on {
  background: var(--col1) url('images/but_fav_on.png') 50% 50% no-repeat;
}
.favorites-empty {
  color: #fff !important;
  font-size: 18px;
  line-height: 1.55;
  padding: 16px 22px 28px;
  margin: 0 auto;
  max-width: 520px;
  text-align: center;
  box-sizing: border-box;
}
.favorites-page .games {
  padding-left: 12px;
  padding-right: 12px;
  box-sizing: border-box;
  width: 100%;
  max-width: 920px;
}
.gamebuttons {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  margin: 3px 0;
}
#tripple {
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: flex-start;
}
.moreleft {
  width: 150px;
  margin: 0 10px 0 0;
}
.moreright {
  width: 150px;
  margin: 0 0 0 10px;
}
#double {
  width: 96%;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: flex-start;
}
.gamesbig {
  max-width: 900px;
}
.gamesbig > div {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-start;
  background: #fff;
  border-radius: 15px;
  padding: 10px;
  margin: 0 0 10px 0;
}
.gamesbig div img {
  border-radius: 15px;
  width: 255px; height: auto;
  margin: 0 10px 0 0;
}
.detra {
  width: 80px;
  flex-shrink: 0;
  font-weight: bold;
}
.desga {
  height: 105px;
  overflow: hidden;
  font-size: 15px;
  color: #444;
  margin: 10px 0;
  text-align: justify;
}
.detce {
  text-align: left;
}
.sidemain {
  flex-shrink: 0;
  max-width: 330px;
  margin: 0 0 0 6px;
  justify-content: flex-start;
}
.hma {
  color: #fff !important;
  text-transform: uppercase;
  text-align: left;
  font-size: 26px;
  width: 100%;
}
.hmac {
  color: #fff !important;
  text-transform: uppercase;
  text-align: center;
  font-size: 32px;
  width: 100%;
}
.minu {
  margin-bottom: 0;
}
.texdiv {
  padding: 10px;
  width: 96%;
  color: var(--col4);
}
#mein {
  width: 60%;
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
  align-items: center;
}
#mein a {
  color: #fff;
  text-transform: uppercase;
  font-size: 18px;
}
#mein a:hover {
  color: var(--col3);
}

#popup {
	display: none;
	position: fixed;
	left: 0; top: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	flex-flow: row wrap;
	justify-content: center;
	align-items: center;
	z-index: 100;
}
#apprate {
	width: 310px;
	height: 246px;
	background: url('images/apprate.png?t=1')  no-repeat;
	display: flex;
	flex-flow: column nowrap;
	justify-content: space-between;
	align-items: center;
}
#apprate img {
	margin: 0 0 -5px 0;
}
#apprate2 {
	width: 310px;
	background-color: #fff;
	display: flex;
	flex-flow: column nowrap;
	justify-content: flex-start;
	align-items: center;
  border-radius: 25px;
  padding: 10px 10px 0 10px;
}
.pr {
	font-size: 24px;
	color: #111;
	line-height: 100%;
	margin: 20px 0 0 0;
}
.no {
	color: #999;
	font-size: 14px;
	margin: 0 0 15px 25px;
	width: 100%;
	text-align: left;
	position: relative;
	z-index: 9;
}
.no:hover {
	text-decoration: underline;
}
.rghost {
	display: block;
	width: 310px; height: 240px;
	position: absolute;
}
.bab {
	display: none;
	text-transform: uppercase;
	font-size: 14px;
	width: 100%;
	padding: 10px;
  color: #fff;
}
#loading {
position: fixed;
width: 100vw; height: 100vh;
top: 0; left: 0;
z-index: 999999;
font-size: 30px;
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
background: #0144b5;
color: #fff;
}
.bigban {
  width: 100%;
  margin: 10px 0;
  color: #fff;
}
.but {
  display: block;
  background: var(--col3);
  border-radius: 25px;
  height: 50px;
  padding: 0 50px;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 22px;
  text-transform: uppercase;
  font-weight: bold;
}
.butgrey {
  background: #9b9b9b !important;
}
#preplay {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  box-sizing: border-box;
  background-color: var(--col1);
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
  border-top: 5px solid var(--col3);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#preplay::-webkit-scrollbar {
background: var(--col1);
width: 5px;
}
#preplay::-webkit-scrollbar-thumb {
background: var(--col3);
}
.pphotp {
  width: 90%;
  text-align: center;
  flex: 0 0 auto;
  flex-shrink: 0;
  min-height: min-content;
}
@keyframes spin {
  100% {-webkit-transform: rotate(360deg); transform: rotate(360deg);}
}
.loader {
  width: 50px; height: 50px;
  border-radius: 30px;
  border: 7px dotted #3498db; /* заміни на var(--col1), якщо використовуєш CSS змінні */
  animation: spin 4s linear infinite;
  margin: auto;
}
.hide {
  display: none;
}
#swipe {
  display: none;
  position: absolute;
  left: 50%; top: 50%;
  z-index: 123;
  width: 200px; height: 240px;
  margin: -140px 0 0 -100px;
  background: url('images/swipe4.gif') no-repeat;
}
#more_games {
  display: none;
  position: absolute;
  left: 0; top: 0;
  width: 256px; height: 70px;
  background: url('images/more_games_big.gif') no-repeat;
  z-index: 2;
}

.gpmin {
  width: 100%;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: center;
}
.gpmin > div:nth-child(1) {
  width: 100%;
  height: 85svh;
}
.gpmin > div:nth-child(2) {
  width: 100%;
  height: 65px;
  overflow: hidden;
  position: fixed;
  bottom: 0;
}

.gpure {
  width: 100%;
  display: flex;
  flex-flow: column nowrap;
  justify-content: flex-start;
  align-items: center;
  height: 100svh;
}
.gpure > div:nth-child(1) {
  width: 100%;
  height: calc(100svh - 67px);
  background-color: #000;
}
.gpure > div:nth-child(2) {
  width: 100%;
  height: 65px;
  overflow-y: hidden;
  position: fixed;
  bottom: 0;
}
.board {
  display: none;
  position: fixed; top: 0; left: 0;
  /* Above typical ad / consent overlays (often 1e5–1e6); onboarding must receive taps */
  z-index: 2147483000;
  width: 100%;
  height: 100vh;
  text-align: center;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: flex-end;
  background-size: contain;
  background-repeat: no-repeat;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#board1 {
  display: flex;
  background-size: contain;
  background-repeat: no-repeat;
}

.boardbut {
  width: 280px;
  height: 70px;
  border-radius: 40px;
  background: linear-gradient(135deg, #3ed000, #2ba500);
  border: 4px solid #fff;
  text-transform: uppercase;
  font-size: 32px;
  color: #fff;
  display: inline-flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  margin: 0 0 130px 0;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.boardbut:hover {
  color: #fff;
}

.sortbar {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}
.sortbtn {
  background: var(--col2);
  color: #fff;
  border: none;
  padding: 14px 25px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 0.5px;
}
.sortbtn:hover {
  opacity: 0.9;
}
.sortbtn.active {
  background: var(--col3);
  color: #fff;
}
.sbp {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 -15px 0;
}












/* 🖥️ Для горизонтальної (landscape) орієнтації */
@media (orientation: landscape) {
  .gpure {
    flex-flow: row nowrap; /* панелі поруч */
    height: 100svh;
  }

  .gpure > div:nth-child(1) {
    width: calc(100svw - 67px); /* зменшення ширини під панель */
    height: 100svh;
  }

  .gpure > div:nth-child(2) {
    width: 67px;
    height: 100svh;
    overflow: hidden;
    position: fixed;
    bottom: auto;
    right: 0;
  }
}




@media (max-width:1240px) {
  .moreright {display: none;}
}
@media (max-width:1085px) {
  .moreleft {display: none;}
  .sidemain {display: none;}
}
@media (max-width:890px) {
  #mein {
    display: none;
    position: absolute;
    top: 60px; left: 0;
    line-height: 300%;
    padding: 30px 15px 15px 15px;
    border-radius: 0 0 15px 0;
    background: var(--col2);
    width: 200px;
    max-height: calc(100dvh - 58px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 100;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  #mein::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  #butmein {display: block;}
  .block2 {
    width: 100%;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
  }
  .screen {
    margin: 0 0 15px 0;
  }
}
@media (max-width:600px) {
  .ad {
    float: none;
    width: 98%;
    margin: 0 0 20px 0;
    max-height: 280px;
  }
  .block1 {
    flex-flow: column nowrap;
    justify-content: center;
  }
  .block1.kez-game-block1 {
    display: block;
  }
  .text {
    line-height: 130%;
  }
  .screen {
    width: 96%; height: auto;
  }
  /* Keep game.php intro thumb small so text still wraps; do not use full .screen banner size */
  .block1.kez-game-block1 p.text img.screen {
    width: 120px;
    max-width: 38%;
    height: auto;
    float: right;
  }

  #maince {
    display: none;
  }
  .bab {display: block;}
  .ad {float: none;}
  .ad ins {width: 100%;}
}

/* --- Header rewards (always hamburger menu, no logo) --- */
#top.top-with-rewards {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 500;
  min-height: 70px;
  height: auto;
  padding: 6px 8px;
  /* Must not clip #mein dropdown; horizontal scroll lives on .kez-treasures */
  overflow: visible;
  /* Same timing/easing as #mein slide so corner and panel move together */
  transition: border-bottom-left-radius 0.38s cubic-bezier(0.32, 1.12, 0.45, 1);
}
/* Open menu: square BL corner (animates in sync with panel) */
#top.top-with-rewards.kez-nav-menu-open {
  border-bottom-left-radius: 0;
}
#top.top-with-rewards #butmein {
  display: block !important;
  position: relative;
  z-index: 10;
}
/* Menu z-index:1 — slides under hamburger / treasures / logo (solid bar on top) */
#top.top-with-rewards > .kez {
  position: relative;
  z-index: 10;
}
#top.top-with-rewards #mein {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  line-height: 300%;
  padding: 14px 15px 16px 15px;
  border-radius: 0 0 15px 0;
  background: var(--col2);
  width: 200px;
  flex-flow: column nowrap !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start;
  align-items: flex-start;
  z-index: 1;
  box-shadow: 4px 12px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  /* Same duration on both props = close doesn’t feel faster than the corner */
  transition: opacity 0.38s cubic-bezier(0.32, 1.12, 0.45, 1),
    transform 0.38s cubic-bezier(0.32, 1.12, 0.45, 1);
  transform-origin: 50% 0;
}
#top.top-with-rewards #mein.kez-mein--panel {
  display: flex !important;
}
#top.top-with-rewards #mein.kez-mein--panel.kez-mein--open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Scroll menu only if content exceeds viewport; grow with content up to full height */
#top.top-with-rewards #mein.kez-mein--panel {
  max-height: calc(100dvh - 56px - env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#top.top-with-rewards #mein.kez-mein--panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
body.kez-nav-menu-lock {
  overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
  #top.top-with-rewards,
  #top.top-with-rewards #mein {
    transition-duration: 0.01ms;
  }
}
#top.top-with-rewards .kez-treasures {
  position: relative;
  z-index: 10;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  pointer-events: none;
}
#top.top-with-rewards .kez-treasures::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
.kez-treasures {
  -webkit-tap-highlight-color: transparent;
}
.kez-treasures-inner {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.8vw, 14px);
  max-width: none;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  pointer-events: auto;
}
.kez-treasure-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-shrink: 0;
}
.kez-treasure-ico {
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.kez-treasure-pill {
  font-family: "Starlight", Arial, Helvetica, sans-serif;
  color: #fff;
  background: var(--col4);
  border: 2px solid var(--col2);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.05;
}
@media (min-width: 640px) {
  /* Плашка заходить під іконку: лівий край плашки ≈ центр іконки; текст — з відступом від краю монети */
  .kez-treasure-item {
    --treasure-ico: clamp(44px, 6.5vw, 64px);
    flex-direction: row;
    align-items: center;
    gap: 0;
    position: relative;
  }
  .kez-treasure-ico {
    width: var(--treasure-ico);
    height: var(--treasure-ico);
    position: relative;
    z-index: 2;
  }
  .kez-treasure-pill {
    font-size: clamp(13px, 2.5vw, 22px);
    margin-left: calc(var(--treasure-ico) / -2);
    padding: 4px 12px 6px;
    padding-left: calc(var(--treasure-ico) * 0.52 + 10px);
    position: relative;
    z-index: 1;
  }
}
@media (max-width: 639px) {
  .kez-treasure-item {
    flex-direction: column;
    gap: 0;
    line-height: 0;
    align-items: center;
    position: relative;
  }
  .kez-treasure-ico {
    width: clamp(42px, 14vw, 58px);
    height: clamp(42px, 14vw, 58px);
    position: relative;
    z-index: 2;
  }
  .kez-treasure-pill {
    font-size: clamp(14px, 4.2vw, 20px);
    padding: 5px 12px 6px;
    margin-top: clamp(-12px, -2.8vw, -7px);
    line-height: 1.08;
    position: relative;
    z-index: 1;
  }
}

/* Reward balance toast — ~30% larger visuals; max 90vw; ~35% snappier motion */
#kez-reward-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2147481500;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  width: min(90vw, 546px);
  max-width: 90vw;
  padding: 0;
  box-sizing: border-box;
}
#kez-reward-toast.kez-reward-toast--visible {
  visibility: visible;
  opacity: 1;
}
#kez-reward-toast .kez-toast-inner {
  background: linear-gradient(165deg, #bfe8ff 0%, #8fd4ff 45%, #6bc4f8 100%);
  border-radius: 29px;
  padding: 21px 21px 23px;
  box-shadow:
    0 16px 52px rgba(15, 80, 140, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.55);
  position: relative;
  overflow: visible;
}
#kez-reward-toast .kez-toast-reason {
  margin: 0 0 14px;
  padding: 0 10px;
  font-family: Myriad, sans-serif;
  font-size: clamp(17px, 4.4vw, 22px);
  font-weight: 700;
  color: #0c2a4a;
  text-align: center;
  line-height: 1.3;
  min-height: 1.2em;
  opacity: 0;
  text-transform: uppercase;
}
#kez-reward-toast .kez-toast-reason--in {
  animation: kez-reason-in 0.46s ease-out forwards;
}
@keyframes kez-reason-in {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
#kez-reward-toast .kez-toast-row {
  display: flex;
  flex-flow: row nowrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(8px, 3.9vw, 23px);
  transition: opacity 0.3s ease;
}
#kez-reward-toast .kez-toast-row--conceal {
  opacity: 0;
}
#kez-reward-toast .kez-toast-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
}
#kez-reward-toast .kez-toast-ico-wrap {
  position: relative;
  display: block;
  flex-shrink: 0;
}
#kez-reward-toast .kez-toast-ico {
  display: block;
  position: relative;
  z-index: 1;
  width: 73px;
  height: 73px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 40, 90, 0.25));
  transform-origin: 50% 55%;
  flex-shrink: 0;
}
#kez-reward-toast .kez-toast-ico--reward-in {
  animation: kez-toast-ico-reward-in 0.78s cubic-bezier(0.34, 1.35, 0.64, 1) both;
}
@keyframes kez-toast-ico-reward-in {
  0% {
    transform: scale(10);
    opacity: 0;
  }
  55% {
    transform: scale(0.8);
    opacity: 1;
  }
  78% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* +N above icon — subtle overlap vs 12px (between full above and “a bit on” art) */
#kez-reward-toast .kez-toast-delta {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  z-index: 4;
  margin: 0;
  width: max-content;
  max-width: 120%;
  transform: translateX(-50%);
  font-family: "Starlight", Arial, Helvetica, sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 5.2vw, 26px);
  white-space: nowrap;
  pointer-events: none;
  line-height: 1;
}
#kez-reward-toast .kez-delta-coins {
  color: #16a34a;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.45);
}
#kez-reward-toast .kez-delta-rubies {
  color: #0284c7;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.4);
}
#kez-reward-toast .kez-delta-chests {
  color: #dc2626;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 0.85),
    0 1px 3px rgba(0, 0, 0, 0.45);
}
#kez-reward-toast .kez-toast-delta--in {
  animation: kez-delta-reward-in 0.59s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes kez-delta-reward-in {
  0% {
    transform: translate(-50%, -40px) scale(3.5);
    opacity: 0;
  }
  68% {
    transform: translate(-50%, 3px) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}
#kez-reward-toast .kez-toast-pill {
  position: relative;
  z-index: 1;
  overflow: visible;
  margin-top: 14px;
  font-family: "Starlight", Arial, Helvetica, sans-serif;
  font-size: clamp(16px, 4.2vw, 23px);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, #1a2a44 0%, #0d1528 100%);
  border-radius: 999px;
  padding: 7px 16px 9px;
  min-width: 3.2em;
  text-align: center;
  line-height: 1.1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
/* Stacked number layers: new flies above old; old removed when new’s animation ends */
#kez-reward-toast .kez-toast-pill-num-stack {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 2.5em;
  min-height: 1.15em;
  vertical-align: middle;
  overflow: visible;
}
#kez-reward-toast .kez-toast-pill-num-layer {
  position: relative;
  display: inline-block;
  z-index: 0;
}
#kez-reward-toast .kez-toast-pill-num-layer--base {
  z-index: 0;
}
/* Flying “1” bits: random path into jittered landing; end at 1% scale then removed */
#kez-reward-toast .kez-toast-pill-one-fly {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  white-space: nowrap;
  pointer-events: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  --kez-one-start-x: 0px;
  --kez-one-start-y: -90px;
  --kez-one-end-x: 0px;
  --kez-one-end-y: 0px;
  transform: translate(calc(-50% + var(--kez-one-start-x)), calc(-50% + var(--kez-one-start-y)))
    scale(4.2);
  opacity: 1;
}
#kez-reward-toast .kez-toast-pill-one-fly--in {
  animation: kez-pill-one-fly 0.44s cubic-bezier(0.33, 1.1, 0.45, 1) forwards;
}
@keyframes kez-pill-one-fly {
  0% {
    transform: translate(calc(-50% + var(--kez-one-start-x)), calc(-50% + var(--kez-one-start-y)))
      scale(4.2);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--kez-one-end-x)), calc(-50% + var(--kez-one-end-y)))
      scale(0.01);
    opacity: 0;
  }
}
#kez-reward-toast .kez-toast-sparkles {
  position: absolute;
  inset: -6px;
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}
#kez-reward-toast .kez-toast-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 1px;
  opacity: 0;
  transform: rotate(45deg) scale(0.4);
  animation: kez-spark-twinkle 1.82s ease-in-out infinite;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.85);
}
#kez-reward-toast .kez-toast-glimmer {
  position: absolute;
  width: 29px;
  height: 29px;
  left: 50%;
  top: 22px;
  margin-left: -14.5px;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  opacity: 0.55;
  animation: kez-glimmer 2.6s ease-in-out infinite;
}
#kez-reward-toast.kez-reward-toast--in {
  animation: kez-toast-pop-in 0.94s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
#kez-reward-toast.kez-reward-toast--out {
  animation: kez-toast-pop-out 0.49s ease-in forwards;
}
@keyframes kez-toast-pop-in {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  58% {
    transform: translate(-50%, -50%) scale(1.06);
    opacity: 1;
  }
  78% {
    transform: translate(-50%, -50%) scale(0.97);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}
@keyframes kez-toast-pop-out {
  to {
    transform: translate(-50%, -48%) scale(0.92);
    opacity: 0;
  }
}
@keyframes kez-spark-twinkle {
  0%,
  100% {
    opacity: 0;
    transform: rotate(45deg) scale(0.35);
  }
  35% {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
  55% {
    opacity: 0.4;
    transform: rotate(45deg) scale(0.7);
  }
}
@keyframes kez-glimmer {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.15);
  }
}
.kez-treasure-ico.kez-ico-pulse,
#kez-reward-toast .kez-toast-ico.kez-ico-pulse {
  animation: kez-ico-pulse 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes kez-ico-pulse {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.14);
  }
  100% {
    transform: scale(1);
  }
}

#kez-rewards-intro {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  background: rgba(0, 0, 0, 0.8);
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  justify-content: safe center;
  align-items: center;
  padding: max(12px, env(safe-area-inset-top, 0px)) 16px max(12px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#kez-rewards-intro .kez-intro-panel {
  background: #fff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: min(92vh, calc(100vh - 24px));
  max-height: min(92dvh, calc(100dvh - 24px));
  padding: 20px 22px 24px;
  text-align: center;
  color: var(--col4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}
#kez-rewards-intro h2 {
  color: var(--col2);
  font-size: 24px;
  margin: 0 0 12px 0;
  text-align: center;
}
#kez-rewards-intro .kez-intro-lead {
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 14px;
  text-align: center;
}
.kez-intro-bal-caption {
  margin: 0 0 10px;
  font-size: 15px;
  color: #555;
}
.kez-intro-bal-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 8px;
}
#kez-rewards-intro .kez-intro-bal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Starlight", Arial, sans-serif;
  font-size: clamp(18px, 4.5vw, 22px);
  color: var(--col4);
  margin: 0;
}
#kez-rewards-intro .kez-intro-bal img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.kez-treasures-inline-ico {
  vertical-align: middle;
  display: inline-block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}
#kez-rewards-intro ul.kez-intro-rules {
  margin: 10px auto 14px;
  padding: 0;
  padding-left: 1.2em;
  max-width: 480px;
  text-align: left;
  font-size: 15px;
  line-height: 1.55;
  list-style-position: outside;
  box-sizing: border-box;
}
#kez-rewards-intro .kez-intro-shop {
  font-size: 15px;
  line-height: 1.5;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}
#kez-rewards-intro .kez-intro-close {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: var(--col2);
  color: #fff;
  font-family: Myriad, sans-serif;
  font-size: 18px;
  cursor: pointer;
}
#kez-rewards-intro .kez-intro-close:hover {
  filter: brightness(1.08);
}

/* Onboarding: skip when already completed (localStorage), hide boards before interaction */
html.kez-onboarding-done .board {
  display: none !important;
}

/* Scroll to top */
.kez-scroll-top {
  position: fixed;
  right: 16px;
  bottom: 22px;
  z-index: 1200;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--col3);
  color: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.kez-scroll-top:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.kez-scroll-top.kez-scroll-top--visible {
  display: flex;
}
.kez-scroll-top::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 18px solid #fff;
  margin-bottom: 5px;
}

/* Game page: ad float:left + img float:right in p.text; text flows between (original layout).
   Global .screen is 350×250 and overrides .text img — force small thumb here so text can wrap. */
.block1.kez-game-block1 {
  display: block;
  text-align: left;
}
/* clear floated Read more button + contain floats from .ad / img */
.block1.kez-game-block1::after {
  content: "";
  display: table;
  clear: both;
}
.block1.kez-game-block1 p.text.kez-game-desc-p img.screen {
  width: 130px;
  height: auto;
  float: right;
  margin: 0 0 5px 10px;
  border-radius: 15px;
  display: block;
}
p.text.kez-game-desc-p {
  overflow: visible;
  display: flow-root;
}
/* Entire block (ad + paragraph) clipped; gradient + toggle below clip */
.kez-game-desc-clip {
  position: relative;
  z-index: 0;
  transition: max-height 0.35s ease;
}
.kez-game-desc-clip::after {
  content: "";
  display: table;
  clear: both;
}
.kez-game-desc-clip.is-collapsed {
  max-height: 300px;
  overflow: hidden;
}
.kez-game-desc-clip .kez-game-desc-fade {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52px;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.35) 45%,
    rgba(255, 255, 255, 0.88)
  );
}
.kez-game-desc-clip.is-collapsed .kez-game-desc-fade {
  display: block;
}
.block1.kez-game-block1 .kez-game-desc-toggle {
  float: right;
  clear: both;
  position: relative;
  z-index: 3;
  margin-top: 2px;
  margin-bottom: 10px;
  margin-left: 0;
  padding: 8px 16px;
  border: none;
  border-radius: 12px;
  background: var(--col2);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.block1.kez-game-block1 .kez-game-desc-toggle:hover {
  filter: brightness(1.06);
}

/* Gameplay: report problem */
.button.report {
  background: var(--col1) url("images/but_bug.png") 50% 50% / 30px auto no-repeat;
}
#kez-game-report-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.8);
}
#kez-game-report-overlay.kez-report--open {
  display: flex;
}
.kez-report-dialog {
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  font-family: Myriad, sans-serif;
  color: #222;
}
.kez-report-dialog h3 {
  margin: 0 0 12px;
  font-size: 20px;
  text-align: center;
}
.kez-report-dialog p.kez-report-lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  color: #444;
}
.kez-report-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.kez-report-reasons label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f6fa;
  cursor: pointer;
  font-size: 15px;
}
.kez-report-reasons input {
  flex-shrink: 0;
}
.kez-report-note {
  width: 100%;
  min-height: 72px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #ccd4e0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}
.kez-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.kez-report-actions button {
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.kez-report-cancel {
  background: #e8ecf2;
  color: #333;
}
.kez-report-submit {
  position: relative;
  min-width: 128px;
  background: var(--col2);
  color: #fff;
}
.kez-report-submit:disabled {
  cursor: wait;
  opacity: 1;
}
.kez-report-submit--loading .kez-report-submit-label {
  opacity: 0;
}
.kez-report-submit--loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: kez-report-spin 0.65s linear infinite;
}
@keyframes kez-report-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Report result toast (replaces alert) */
.kez-report-toast {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100002;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  pointer-events: none;
}
.kez-report-toast.kez-report-toast--visible {
  display: flex;
  pointer-events: auto;
}
.kez-report-toast__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  animation: kez-report-toast-fade 0.25s ease;
}
@keyframes kez-report-toast-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.kez-report-toast__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  padding: 24px 22px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  text-align: center;
  font-family: Myriad, sans-serif;
  animation: kez-report-toast-pop 0.38s cubic-bezier(0.22, 1.15, 0.36, 1);
}
@keyframes kez-report-toast-pop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.kez-report-toast--success .kez-report-toast__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #34d399, #059669);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
  position: relative;
}
.kez-report-toast--success .kez-report-toast__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 12px;
  height: 22px;
  border: solid #fff;
  border-width: 0 4px 4px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  margin-top: -2px;
}
.kez-report-toast--error .kez-report-toast__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fb7185, #e11d48);
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.3);
  position: relative;
}
.kez-report-toast--error .kez-report-toast__icon::before,
.kez-report-toast--error .kez-report-toast__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
}
.kez-report-toast--error .kez-report-toast__icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
.kez-report-toast--error .kez-report-toast__icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.kez-report-toast__msg {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.45;
  color: #333;
}
.kez-report-toast__ok {
  padding: 10px 28px;
  border: none;
  border-radius: 12px;
  background: var(--col2);
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
}
.kez-report-toast__ok:hover {
  filter: brightness(1.06);
}

/* Site-wide preloader: bar fill driven by script/kez-preloader.js */
.kez-page-loader__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.kez-page-loader__art {
  position: relative;
  /* Графіка 512×512 — не більше оригіналу; на малих екранах — вміщується у viewport */
  width: min(512px, 100vmin);
  height: min(512px, 100vmin);
  max-width: min(512px, 100vw);
  max-height: min(512px, 100vh);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  flex-shrink: 0;
  background-color: #0144b5;
  overflow: hidden;
}
.kez-page-loader__bg,
.kez-page-loader__bar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}
.kez-page-loader__bar-layer {
  position: absolute;
  inset: 0;
  /* Bar fill left→right (135px→370px on 512px): left edge fixed at 26.367%, right inset 73.633% → 27.734% — values set by kez-preloader.js */
  clip-path: inset(0 73.633% 0 26.367%);
  -webkit-clip-path: inset(0 73.633% 0 26.367%);
  will-change: clip-path;
}
@media (prefers-reduced-motion: reduce) {
  .kez-page-loader__bar-layer {
    clip-path: inset(0 27.734% 0 26.367%);
    -webkit-clip-path: inset(0 27.734% 0 26.367%);
  }
}

/* ========== Community chat (chat.php) — compact mobile-first ========== */
html.kez-chat-html {
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
body.kez-chat-body {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
body.kez-chat-body #top {
  flex-shrink: 0;
}
body.kez-chat-body .kez-chat-page {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0 8px;
}
body.kez-chat-body #bottom {
  flex-shrink: 0;
}
.kez-chat.kez-chat--fill {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  text-align: left;
}
.kez-chat {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 12px;
  padding: 0 8px;
  box-sizing: border-box;
  text-align: left;
}
.kez-chat__hero {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--col2) 0%, var(--col1) 55%, var(--col3) 160%);
  border-radius: var(--br, 10px) var(--br, 10px) 0 0;
  padding: 8px 12px 10px;
  box-shadow: 0 2px 12px rgba(0, 80, 140, 0.18);
  position: relative;
  overflow: hidden;
}
.kez-chat__hero::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.kez-chat__hero-inner {
  position: relative;
  z-index: 1;
}
.kez-chat__composer .kez-chat__settings-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  transition: background 0.15s ease;
}
.kez-chat__composer .kez-chat__settings-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}
.kez-chat__title {
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #fff;
  font-weight: normal;
  text-shadow: 0 1px 2px rgba(0, 40, 80, 0.35);
  overflow: visible;
}
.kez-chat__panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: 1px solid rgba(0, 146, 217, 0.25);
  border-top: none;
  border-radius: 0 0 var(--br, 10px) var(--br, 10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.kez-chat--fill .kez-chat__panel {
  flex: 1 1 auto;
  min-height: 0;
}
.kez-chat__log {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 6px 8px;
  background: linear-gradient(180deg, #f8fcff 0%, #eef6fb 100%);
  scrollbar-width: thin;
  scrollbar-color: var(--col1) #e8f4fc;
}
.kez-chat--fill .kez-chat__log {
  flex: 1 1 0%;
  min-height: 0;
  /* At least 300px when viewport allows; shrinks on very short screens */
  min-height: min(300px, calc(100dvh - 268px));
  max-height: none;
}
.kez-chat__log::-webkit-scrollbar {
  width: 8px;
}
.kez-chat__log::-webkit-scrollbar-thumb {
  background: var(--col1);
  border-radius: 8px;
}
.kez-chat__log::-webkit-scrollbar-track {
  background: #e8f4fc;
}
.kez-chat__log:empty::before {
  content: "No messages yet — be the first to say hello!";
  display: block;
  text-align: center;
  color: var(--col2);
  opacity: 0.65;
  font-size: 13px;
  padding: 16px 10px;
}
.kez-chat-msg {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  animation: kez-chat-in 0.28s ease-out;
}
.kez-chat-msg__row {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(94%, 520px);
}
.kez-chat-msg--mine .kez-chat-msg__row {
  margin-left: auto;
}
.kez-chat-msg:not(.kez-chat-msg--mine) .kez-chat-msg__row {
  margin-right: auto;
}
.kez-chat-msg__ava-wrap {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--col1);
  border: 1px solid rgba(0, 80, 140, 0.15);
  box-sizing: border-box;
}
.kez-chat-msg__ava-wrap--empty {
  background: linear-gradient(145deg, var(--col2) 0%, var(--col1) 100%);
  border-color: rgba(255, 255, 255, 0.35);
}
.kez-chat-msg__ava-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kez-chat-msg__ava-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
}
@keyframes kez-chat-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.kez-chat-msg__bubble {
  min-width: 0;
  flex: 1 1 auto;
  max-width: calc(100% - 36px);
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #e0e4e8;
  border-radius: 10px;
  background: #eceff1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}
.kez-chat-msg__bubble-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.kez-chat-msg__maincol {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}
.kez-chat-msg--mine .kez-chat-msg__maincol {
  align-items: flex-end;
  text-align: right;
}
.kez-chat-msg__name {
  display: block;
  font-size: 10px;
  font-weight: bold;
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0.02em;
  opacity: 0.92;
}
.kez-chat-msg__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.38;
  word-wrap: break-word;
  min-width: 0;
  width: 100%;
}
.kez-chat-msg--mine .kez-chat-msg__text {
  text-align: right;
}
.kez-chat-msg__time {
  display: block;
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
  margin: 0;
  padding: 0 0 0 2px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: rgba(100, 116, 139, 0.65);
}
.kez-chat-msg__reply-hit {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kez-chat-msg__reply-hit:focus {
  outline: 1px dotted rgba(0, 146, 217, 0.7);
  outline-offset: 2px;
}
.kez-chat__composer {
  flex-shrink: 0;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--col2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.kez-chat__composer-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.kez-chat__composer-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.kez-chat__row {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
}
.kez-chat__row--grow {
  flex: 0 0 auto;
}
.kez-chat__label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 3px 0;
}
.kez-chat__nick,
.kez-chat__input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  padding: 8px 10px;
  outline: none;
}
.kez-chat__nick::placeholder,
.kez-chat__input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}
.kez-chat__nick:focus,
.kez-chat__input:focus {
  border-color: var(--col3);
  background: rgba(255, 255, 255, 0.28);
}
.kez-chat__input {
  resize: vertical;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.35;
  font-size: 14px;
  padding: 6px 8px;
}
.kez-chat__composer-row .kez-chat__input {
  flex: 1 1 auto;
  min-width: 0;
}
.kez-chat__send {
  flex: 0 0 auto;
  align-self: center;
  min-width: 72px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--col3) 0%, #e6b400 100%);
  color: var(--col4);
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 #b8860b;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.kez-chat__send:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.kez-chat__send:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #b8860b;
}

/* Chat settings modal */
.kez-chat-settings {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.kez-chat-settings.kez-chat-settings--open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.kez-chat-settings__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 70, 0.55);
  backdrop-filter: blur(2px);
}
.kez-chat-settings__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(90vh, 560px);
  overflow: auto;
  margin: 0;
  padding: 20px 20px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f0f8fc 100%);
  border: 1px solid rgba(0, 146, 217, 0.35);
  box-shadow: 0 16px 48px rgba(0, 40, 80, 0.28);
  text-align: left;
  box-sizing: border-box;
}
.kez-chat-settings__h {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: normal;
  color: var(--col2);
}
.kez-chat-settings__lead {
  margin: 0 0 16px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--col4);
  opacity: 0.9;
}
.kez-chat-settings__label {
  display: block;
  margin: 12px 0 6px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--col2);
  font-weight: bold;
}
.kez-chat-settings__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 146, 217, 0.45);
  font-family: inherit;
  font-size: 16px;
  color: var(--col4);
  background: #fff;
}
.kez-chat-settings__input:focus {
  outline: none;
  border-color: var(--col1);
  box-shadow: 0 0 0 2px rgba(0, 146, 217, 0.2);
}
.kez-chat-settings__colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kez-chat-settings__color-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.kez-chat-settings__color-btn:hover {
  transform: scale(1.08);
}
.kez-chat-settings__color-btn--on {
  border-color: var(--col2);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--col1);
}
.kez-chat-settings__avas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
  min-height: 40px;
}
.kez-chat-settings__ava-btn {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: #e8f4fc;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.kez-chat-settings__ava-btn:hover {
  transform: scale(1.04);
}
.kez-chat-settings__ava-btn img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.kez-chat-settings__ava-btn--none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--col2);
  opacity: 0.65;
}
.kez-chat-settings__ava-btn--on {
  border-color: var(--col1);
  box-shadow: 0 0 0 2px rgba(0, 146, 217, 0.35);
}
.kez-chat-settings__ava-loading,
.kez-chat-settings__ava-hint {
  margin: 0;
  font-size: 13px;
  color: var(--col4);
  opacity: 0.85;
}
.kez-chat-settings__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 146, 217, 0.2);
}
.kez-chat-settings__cancel,
.kez-chat-settings__save {
  min-width: 100px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  border: none;
}
.kez-chat-settings__cancel {
  background: rgba(0, 0, 0, 0.06);
  color: var(--col4);
}
.kez-chat-settings__save {
  background: linear-gradient(180deg, var(--col3) 0%, #e6b400 100%);
  color: var(--col4);
  font-weight: bold;
  box-shadow: 0 3px 0 #b8860b;
}
.kez-chat-settings__save:hover {
  filter: brightness(1.05);
}

@media (max-width: 520px) {
  .kez-chat__composer-row {
    flex-direction: column;
    align-items: stretch;
  }
  .kez-chat__composer-actions {
    align-self: stretch;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }
  .kez-chat__send {
    flex: 1 1 auto;
    min-width: 0;
    align-self: center;
  }
  .kez-chat__composer .kez-chat__settings-btn {
    align-self: center;
  }
}

/* ========== Daily collectible card modal ========== */
body.kez-daily-card-lock {
  overflow: hidden;
  overscroll-behavior: none;
}
.kez-daily-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 100600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.kez-daily-card-overlay.kez-daily-card-overlay--open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}
.kez-daily-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 25, 55, 0.6);
  backdrop-filter: blur(3px);
}
.kez-daily-card-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: auto;
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: linear-gradient(165deg, #ffffff 0%, #f0f7ff 100%);
  border: 1px solid rgba(0, 146, 217, 0.35);
  box-shadow: 0 20px 50px rgba(0, 40, 90, 0.35);
  text-align: center;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1.15, 0.36, 1), opacity 0.35s ease;
}
.kez-daily-card-overlay--open .kez-daily-card-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}
/* Shine only on the card image area */
.kez-daily-card-frame .kez-daily-card-shine {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    118deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 48%,
    rgba(255, 255, 255, 0.12) 52%,
    transparent 65%
  );
  background-size: 200% 100%;
  animation: kez-card-shine-sweep 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: soft-light;
}
@keyframes kez-card-shine-sweep {
  0%,
  100% {
    background-position: 120% 0;
    opacity: 0.65;
  }
  50% {
    background-position: -20% 0;
    opacity: 0.95;
  }
}
/* Sparkles like reward toast (diamond glints) */
.kez-daily-card-frame .kez-daily-card-sparkles {
  position: absolute;
  inset: -4px;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}
.kez-daily-card-frame .kez-daily-card-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 1px;
  opacity: 0;
  transform: rotate(45deg) scale(0.4);
  animation: kez-spark-twinkle 1.82s ease-in-out infinite;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.85);
}
.kez-daily-card-frame .kez-daily-card-spark:nth-child(1) {
  left: 8%;
  top: 12%;
  animation-delay: 0s;
}
.kez-daily-card-frame .kez-daily-card-spark:nth-child(2) {
  right: 18%;
  top: 22%;
  animation-delay: 0.35s;
}
.kez-daily-card-frame .kez-daily-card-spark:nth-child(3) {
  left: 20%;
  bottom: 18%;
  animation-delay: 0.7s;
}
.kez-daily-card-frame .kez-daily-card-spark:nth-child(4) {
  right: 10%;
  bottom: 14%;
  animation-delay: 1.05s;
}
.kez-daily-card-frame .kez-daily-card-spark:nth-child(5) {
  left: 42%;
  top: 6%;
  animation-delay: 0.5s;
}
.kez-daily-card-frame .kez-daily-card-spark:nth-child(6) {
  right: 36%;
  bottom: 8%;
  animation-delay: 1.2s;
}
.kez-daily-card-gift-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.45);
  position: relative;
  z-index: 2;
}
.kez-daily-card-h {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: normal;
  color: var(--col2);
  position: relative;
  z-index: 2;
}
.kez-daily-card-lead {
  margin: 0 0 14px 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--col4);
  text-align: left;
  position: relative;
  z-index: 2;
}
.kez-daily-card-frame {
  position: relative;
  margin: 0 auto 12px;
  max-width: 220px;
  border-radius: 12px;
  border: 3px solid rgba(0, 146, 217, 0.25);
  box-shadow: 0 8px 24px rgba(0, 80, 140, 0.2);
  overflow: hidden;
  background: #fff;
  z-index: 2;
}
.kez-daily-card-frame img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: bottom;
  position: relative;
  z-index: 1;
}
.kez-daily-card-progress {
  margin: 0 0 14px 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--col2);
  position: relative;
  z-index: 2;
}
.kez-daily-card-btn {
  padding: 10px 28px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  color: var(--col4);
  background: linear-gradient(180deg, var(--col3) 0%, #e6b400 100%);
  box-shadow: 0 3px 0 #b8860b;
  position: relative;
  z-index: 2;
  white-space: normal;
  line-height: 1.25;
  max-width: 100%;
}
.kez-daily-card-btn:hover {
  filter: brightness(1.05);
}

/* ========== Collectible cards page (cards.php) ========== */
.kez-cards-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 12px 24px;
  box-sizing: border-box;
}
.kez-cards-page__h {
  margin-bottom: 12px;
}
.kez-cards-page__intro {
  text-align: center;
  max-width: 52em;
  margin: 0 auto 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--col4);
}
.kez-cards-page__progress {
  font-size: 16px;
  font-weight: bold;
  color: var(--col2);
  margin: 0 auto 16px;
  text-align: center;
}
.kez-cards-grid {
  display: grid;
  /* Картки 210×330 — колонки масштабуються, пропорції клітинки як у оригіналу */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 100px), 1fr));
  gap: 10px;
  max-width: 100%;
}
.kez-cards-cell {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 80, 140, 0.15);
  background: #f0f4f8;
  aspect-ratio: 210 / 330;
}
.kez-cards-cell img {
  display: block;
  width: 100%;
  height: 100%;
  /* Заповнення клітинки 210∶330 без «letterbox»; оригінали карток — ті самі пропорції */
  object-fit: cover;
  object-position: center center;
}
.kez-cards-cell__img--locked {
  filter: grayscale(1) brightness(0.7);
  opacity: 0.45;
}
.kez-cards-cell__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
  color: rgba(0, 40, 80, 0.35);
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}
.kez-cards-cell--owned {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}
