.lg-root { max-width: 760px; margin: 0 auto; }
.lg-wrap {
	--lg-bg: #fff8ec; --lg-ink: #2b2140; --lg-soft: #7a6f8f; --lg-card: #ffffff; --lg-line: #f0e2c8;
	--lg-cherry: #d7263d; --lg-sun: #ffc93c; --lg-mint: #3ec7a8; --lg-sky: #4f8cff; --lg-plum: #a463e8;
	position: relative; overflow: hidden;
	font-family: "LG Andika", "Andika", "Noto Sans Georgian", "BPG Arial", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	background: var(--lg-bg); color: var(--lg-ink); border-radius: 22px; padding: 16px;
	min-height: 520px; display: flex; flex-direction: column; align-items: center; gap: 16px;
	user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
	box-sizing: border-box; line-height: 1.2; touch-action: manipulation;
}
.lg-wrap * { box-sizing: border-box; }
.lg-wrap :where(button) {
	font: inherit; color: inherit; border: 0; margin: 0; cursor: pointer; line-height: 1.1;
	text-transform: none; letter-spacing: normal; box-shadow: none; text-shadow: none;
	min-height: 0; min-width: 0; width: auto; background: none; padding: 0; touch-action: manipulation;
}
.lg-wrap :where(button):disabled { cursor: default; }
.lg-wrap button:focus-visible { outline: 3px solid var(--lg-sky); outline-offset: 3px; }

/* language */
.lg-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lg-lang { background: var(--lg-card) !important; border: 2px solid var(--lg-line) !important; border-radius: 999px; padding: 10px 18px !important; font-weight: 700; font-size: 18px; }
.lg-lang.on { background: var(--lg-ink) !important; color: #fff !important; border-color: var(--lg-ink) !important; }
.lg-pickhint { font-size: 56px; margin-top: 40px; animation: lg-bob 1.4s ease-in-out infinite; }

/* home */
.lg-games { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; }
.lg-game { border-radius: 22px; padding: 18px 10px 14px !important; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff !important; box-shadow: 0 6px 0 rgba(0,0,0,.18) !important; transition: transform .1s; }
.lg-game:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.18) !important; }
.lg-g0 { background: var(--lg-cherry) !important; }
.lg-g1 { background: var(--lg-sky) !important; }
.lg-g2 { background: var(--lg-plum) !important; }
.lg-gicons { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.95); color: var(--lg-ink); border-radius: 16px; padding: 10px 14px; min-height: 84px; }
.lg-ic { font-size: 44px; line-height: 1; }
.lg-icl { font-weight: 700; font-size: 52px; }
.lg-arrow { font-size: 26px; color: var(--lg-soft); }
.lg-gname { font-weight: 700; font-size: 17px; text-align: center; }
.lg-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: auto; }
.lg-small { background: var(--lg-card) !important; border: 2px solid var(--lg-line) !important; border-radius: 999px; padding: 10px 16px !important; font-weight: 700; font-size: 16px; }
.lg-small b { color: var(--lg-cherry); }
.lg-go { background: var(--lg-mint) !important; border-color: var(--lg-mint) !important; color: #fff !important; font-size: 22px; padding: 14px 26px !important; }
.lg-hold { color: var(--lg-soft) !important; font-size: 13px; position: relative; overflow: hidden; }
.lg-hold::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--lg-cherry); }
.lg-hold.holding::after { width: 100%; transition: width 2s linear; }

/* round */
.lg-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.lg-round { width: 54px; height: 54px; border-radius: 50% !important; background: var(--lg-card) !important; border: 2px solid var(--lg-line) !important; font-size: 26px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.lg-ghost { visibility: hidden; }
.lg-title { font-weight: 700; font-size: 20px; }
.lg-stars { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: 24px; color: #e6dccb; min-width: 0; }
.lg-stars .on { color: var(--lg-sun); }
.lg-stars .pop { animation: lg-pop .5s; display: inline-block; }
.lg-stars.big { font-size: 40px; color: var(--lg-sun); }
.lg-stage { display: flex; justify-content: center; }
.lg-big { width: 170px; height: 170px; border-radius: 32px !important; background: var(--lg-card) !important; border: 3px solid var(--lg-line) !important; display: flex; align-items: center; justify-content: center; }
.lg-emoji { font-size: 104px; line-height: 1; }
.lg-letter { font-size: 120px; font-weight: 700; color: var(--lg-cherry) !important; }
.lg-ear { font-size: 90px; animation: lg-bob 1.6s ease-in-out infinite; }
.lg-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; max-width: 560px; }
.lg-tiles.n4 { grid-template-columns: repeat(4, 1fr); }
.lg-tile { aspect-ratio: 1 / 1; max-width: 100%; border-radius: 24px !important; background: var(--lg-card) !important; border: 3px solid var(--lg-line) !important; box-shadow: 0 6px 0 var(--lg-line) !important; display: flex; align-items: center; justify-content: center; transition: transform .1s, opacity .3s; }
.lg-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--lg-line) !important; }
.lg-tl { font-size: clamp(56px, 14vw, 96px); font-weight: 700; }
.lg-ka .lg-tl { font-size: clamp(66px, 17vw, 112px); font-weight: 600; }
.lg-ka .lg-letter, .lg-ka .lg-icl { font-weight: 600; }
.lg-tpic { font-size: clamp(48px, 12vw, 80px); }
.lg-tl.c0 { color: var(--lg-cherry) !important; } .lg-tl.c1 { color: var(--lg-sky) !important; }
.lg-tl.c2 { color: var(--lg-plum) !important; } .lg-tl.c3 { color: #e0832a !important; }
.lg-tile.ok { background: #e3f8ef !important; border-color: var(--lg-mint) !important; box-shadow: 0 6px 0 var(--lg-mint) !important; animation: lg-pop .5s; }
.lg-tile.no { animation: lg-wiggle .45s; }
.lg-tile:disabled:not(.ok) { opacity: .3; }
.lg-tiles.wait .lg-tile:not(.ok) { opacity: .55; }
.lg-tile.hint { animation: lg-pulse 1s ease-in-out infinite; border-color: var(--lg-sun) !important; }
@keyframes lg-pulse { 50% { transform: scale(1.07); } }
.lg-conf { position: absolute; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; animation: lg-conf .9s ease-out forwards; }

/* sticker */
.lg-won { font-size: 150px; margin-top: 30px; animation: lg-spin 1s ease-out; }
.lg-book { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: 46px; }
.lg-book span { transform: rotate(var(--r)); }
.lg-note { color: var(--lg-soft); font-size: 14px; text-align: center; max-width: 60ch; margin: 4px auto; }

/* parents */
.lg-parent { width: 100%; background: var(--lg-card); border-radius: 18px; padding: 14px; }
.lg-parent h4 { margin: 0 0 10px; font-size: 16px; }
.lg-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.lg-pl { border: 2px solid var(--lg-line); border-radius: 12px; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lg-pl b { font-size: 24px; }
.lg-pl.off { opacity: .35; }
.lg-dots { display: flex; gap: 2px; }
.lg-dots i { width: 7px; height: 7px; border-radius: 50%; background: #e6dccb; }
.lg-dots i.f { background: var(--lg-mint); }
.lg-prow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.lg-chip { border: 2px solid var(--lg-line) !important; border-radius: 999px; padding: 7px 14px !important; font-weight: 700; font-size: 14px; background: var(--lg-bg) !important; }
.lg-chip.on { background: var(--lg-ink) !important; color: #fff !important; border-color: var(--lg-ink) !important; }
.lg-chip:disabled { opacity: .4; }
.lg-warn { color: var(--lg-cherry) !important; }
.lg-credit { font-size: 12px; margin-top: 14px; }

@keyframes lg-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes lg-wiggle { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes lg-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes lg-spin { 0% { transform: scale(0) rotate(-180deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes lg-conf { to { transform: translate(var(--dx), var(--dy)) rotate(260deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .lg-wrap * { animation: none !important; transition: none !important; } }

@media (max-width: 560px) {
	.lg-wrap { padding: 12px; gap: 12px; border-radius: 16px; }
	.lg-games { grid-template-columns: 1fr; }
	.lg-lang { font-size: 15px; padding: 8px 12px !important; }
	.lg-game { flex-direction: row; justify-content: flex-start; padding: 12px !important; gap: 14px; }
	.lg-gicons { min-height: 70px; padding: 6px 12px; }
	.lg-gname { font-size: 19px; text-align: left; }
	.lg-big { width: 130px; height: 130px; }
	.lg-emoji { font-size: 80px; } .lg-letter { font-size: 90px; } .lg-ear { font-size: 70px; }
	.lg-tiles, .lg-tiles.n4 { gap: 10px; }
	.lg-tiles.n4 { grid-template-columns: repeat(2, 1fr); max-width: 330px; }
	.lg-stars { font-size: 19px; }
	.lg-round { width: 46px; height: 46px; font-size: 22px; }
}
