/*
 * Toolly Web Game UI
 * WordPress-safe namespace: tly-
 * Version: 1.0.0
 */

:root {
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f4f6fb;
  color: #1d2540;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Roboto, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.tly-menu-open {
  overflow: hidden;
}

.tly-app {
  --tly-bg: #f4f6fb;
  --tly-surface: #ffffff;
  --tly-surface-soft: #f8f9fd;
  --tly-text: #1d2540;
  --tly-heading: #12182c;
  --tly-muted: #727b94;
  --tly-border: #e5e8f1;
  --tly-primary: #6d3df5;
  --tly-primary-dark: #5424d8;
  --tly-primary-soft: #eee8ff;
  --tly-blue: #3478f6;
  --tly-green: #20a65a;
  --tly-orange: #ff8a24;
  --tly-yellow: #ffdf3f;
  --tly-pink: #ed3f8f;
  --tly-red: #ef435d;
  --tly-shadow-sm: 0 6px 18px rgba(37, 45, 81, 0.07);
  --tly-shadow-md: 0 14px 36px rgba(37, 45, 81, 0.1);
  --tly-radius-sm: 10px;
  --tly-radius: 16px;
  --tly-radius-lg: 22px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 2% 9%, rgba(109, 61, 245, 0.055), transparent 18rem),
    radial-gradient(circle at 94% 24%, rgba(52, 120, 246, 0.05), transparent 22rem),
    var(--tly-bg);
  color: var(--tly-text);
}

.tly-app *,
.tly-app *::before,
.tly-app *::after {
  box-sizing: border-box;
}

.tly-app img,
.tly-app svg {
  display: block;
  max-width: 100%;
}

.tly-app a {
  color: inherit;
  text-decoration: none;
}

.tly-app button,
.tly-app input {
  font: inherit;
}

.tly-app button {
  color: inherit;
}

.tly-app [hidden] {
  display: none !important;
}

.tly-container {
  width: min(1440px, calc(100% - 40px));
  margin-inline: auto;
}

.tly-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.tly-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 10px;
  background: #11182d;
  color: #fff !important;
  box-shadow: var(--tly-shadow-md);
}

.tly-skip-link:focus {
  transform: translateY(0);
}

.tly-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tly-btn:hover {
  transform: translateY(-2px);
}

.tly-btn:focus-visible,
.tly-category:focus-visible,
.tly-favorite:focus-visible,
.tly-hero__arrow:focus-visible,
.tly-hero__dots button:focus-visible,
.tly-nav-toggle:focus-visible,
.tly-back-to-top:focus-visible {
  outline: 3px solid rgba(52, 120, 246, 0.35);
  outline-offset: 3px;
}

.tly-btn--sm {
  min-height: 36px;
  padding-inline: 14px;
  border-radius: 9px;
  font-size: 13px;
}

.tly-btn--large {
  min-height: 50px;
  padding-inline: 24px;
  border-radius: 13px;
}

.tly-btn--block {
  width: 100%;
}

.tly-btn--primary {
  background: linear-gradient(135deg, #7646ff, #632ce8);
  color: #fff !important;
  box-shadow: 0 9px 20px rgba(109, 61, 245, 0.28);
}

.tly-btn--primary:hover {
  box-shadow: 0 13px 26px rgba(109, 61, 245, 0.34);
}

.tly-btn--ghost {
  border-color: var(--tly-border);
  background: #fff;
  color: var(--tly-text) !important;
}

.tly-btn--ghost:hover {
  border-color: #cdd2df;
  box-shadow: var(--tly-shadow-sm);
}

.tly-btn--orange {
  background: linear-gradient(135deg, #ff9f35, #ff7b17);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(255, 138, 36, 0.26);
}

.tly-btn--yellow {
  background: #ffdf3f;
  color: #382900 !important;
  box-shadow: 0 10px 20px rgba(255, 223, 63, 0.22);
}

.tly-btn--green {
  background: linear-gradient(135deg, #33b665, #139148);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(32, 166, 90, 0.22);
}

.tly-btn--blue {
  background: linear-gradient(135deg, #3d90ff, #2468db);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(52, 120, 246, 0.24);
}

.tly-btn--pink {
  background: linear-gradient(135deg, #f257a0, #d92b80);
  color: #fff !important;
  box-shadow: 0 10px 20px rgba(237, 63, 143, 0.23);
}

.tly-btn--soft {
  min-width: 170px;
  background: #f1edff;
  border-color: #ddd3ff;
  color: var(--tly-primary-dark) !important;
}

/* Header */
.tly-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 68px;
  border-bottom: 1px solid rgba(222, 226, 237, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(150%) blur(14px);
  transition: box-shadow 0.2s ease, height 0.2s ease;
}

.tly-header.is-scrolled {
  box-shadow: 0 8px 26px rgba(30, 38, 65, 0.08);
}

.tly-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.tly-brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tly-primary) !important;
  white-space: nowrap;
}

.tly-brand__mark {
  width: 31px;
  color: var(--tly-primary);
}

.tly-brand__mark svg {
  width: 100%;
}

.tly-brand__text {
  color: #282f46;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.tly-brand__sub {
  margin-left: -2px;
  color: var(--tly-primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.tly-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 3px;
}

.tly-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #2b3145;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.tly-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--tly-primary);
  transition: left 0.18s ease, right 0.18s ease;
}

.tly-nav a:hover,
.tly-nav a.is-active {
  color: var(--tly-primary);
}

.tly-nav a:hover::after,
.tly-nav a.is-active::after {
  left: 12px;
  right: 12px;
}

.tly-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tly-search {
  position: relative;
  width: 190px;
}

.tly-search input {
  width: 100%;
  height: 38px;
  padding: 0 40px 0 15px;
  border: 1px solid #e1e5ee;
  border-radius: 11px;
  background: #f7f8fc;
  color: var(--tly-text);
  outline: none;
  transition: width 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tly-search input::placeholder {
  color: #9aa1b3;
}

.tly-search input:focus {
  border-color: rgba(109, 61, 245, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(109, 61, 245, 0.1);
}

.tly-search button {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #606a82;
  cursor: pointer;
}

.tly-search button svg {
  width: 18px;
  margin: auto;
}

.tly-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 10px;
  border: 1px solid var(--tly-border);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.tly-nav-toggle span:not(.tly-sr-only) {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 3px;
  background: #252c42;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tly-nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(6px) rotate(45deg);
}

.tly-nav-toggle[aria-expanded="true"] span:nth-child(3) {
  opacity: 0;
}

.tly-nav-toggle[aria-expanded="true"] span:nth-child(4) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Ad system */
.tly-ad {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(218, 222, 235, 0.95);
  border-radius: var(--tly-radius);
  isolation: isolate;
}

.tly-ad__label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 19px;
  padding: 0 6px;
  border-radius: 5px;
  background: rgba(78, 85, 111, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  backdrop-filter: blur(6px);
}

.tly-top-ad-wrap {
  padding-top: 18px;
}

.tly-ad--top {
  min-height: 124px;
  padding: 20px 330px 20px 180px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-color: #d9e1fb;
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.9), transparent 14rem),
    linear-gradient(100deg, #f8f6ff 0%, #edf5ff 56%, #cce8ff 100%);
  box-shadow: var(--tly-shadow-sm);
}

.tly-top-ad__icon {
  position: absolute;
  left: 65px;
  bottom: 22px;
  z-index: 2;
  font-size: 68px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 14px 20px rgba(58, 37, 143, 0.18));
}

.tly-top-ad__copy {
  position: relative;
  z-index: 3;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tly-top-ad__copy > span {
  color: #333a50;
  font-size: 14px;
  font-weight: 800;
}

.tly-top-ad__copy strong {
  color: #11172a;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.tly-top-ad__copy small {
  margin-top: 5px;
  color: #66708a;
  font-size: 12px;
}

.tly-pill {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.tly-pill--purple {
  background: #6d3df5;
  color: #fff;
  box-shadow: 0 8px 20px rgba(109, 61, 245, 0.22);
}

.tly-top-ad__scene {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 325px;
  height: 100%;
  z-index: 1;
}

.tly-scene__cloud {
  position: absolute;
  width: 50px;
  height: 18px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
}

.tly-scene__cloud::before,
.tly-scene__cloud::after {
  content: "";
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: inherit;
}

.tly-scene__cloud::before {
  left: 8px;
  width: 20px;
  height: 24px;
}

.tly-scene__cloud::after {
  right: 8px;
  width: 25px;
  height: 30px;
}

.tly-scene__cloud--1 {
  top: 28px;
  left: 35px;
  transform: scale(0.8);
}

.tly-scene__cloud--2 {
  top: 40px;
  right: 20px;
  transform: scale(0.58);
}

.tly-scene__coin {
  position: absolute;
  z-index: 3;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffbf22;
  color: #fff5aa;
  font-size: 13px;
  box-shadow: 0 7px 14px rgba(203, 122, 0, 0.25), inset 0 0 0 4px #ffd95b;
}

.tly-scene__coin--1 {
  top: 25px;
  left: 132px;
}

.tly-scene__coin--2 {
  top: 55px;
  right: 58px;
}

.tly-scene__player {
  position: absolute;
  right: 154px;
  bottom: 34px;
  z-index: 4;
  font-size: 39px;
  transform: rotate(-5deg);
}

.tly-scene__block {
  position: absolute;
  bottom: 0;
  width: 76px;
  height: 55px;
  background: linear-gradient(135deg, #6dc85e, #2c8f42);
  border-top: 10px solid #8bd874;
  box-shadow: inset -8px -8px 0 rgba(23, 78, 42, 0.22);
}

.tly-scene__block::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(45, 58, 31, 0.18) 49% 51%, transparent 52%),
    linear-gradient(#a66535 0 46%, #75431f 47% 100%);
  background-size: 30px 17px;
}

.tly-scene__block--1 { left: 20px; height: 47px; }
.tly-scene__block--2 { left: 92px; width: 96px; height: 72px; }
.tly-scene__block--3 { right: 0; width: 136px; height: 58px; }

/* Main layout */
.tly-main {
  padding-top: 18px;
  padding-bottom: 38px;
}

.tly-layout {
  display: grid;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr) minmax(240px, 270px);
  gap: 18px;
  align-items: start;
}

.tly-sidebar,
.tly-content {
  min-width: 0;
}

.tly-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tly-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tly-panel,
.tly-section {
  border: 1px solid var(--tly-border);
  border-radius: var(--tly-radius);
  background: var(--tly-surface);
  box-shadow: var(--tly-shadow-sm);
}

.tly-panel {
  padding: 16px;
}

.tly-panel__head,
.tly-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tly-panel__head {
  margin-bottom: 12px;
}

.tly-panel__head h2,
.tly-section__head h2 {
  margin: 0;
  color: var(--tly-heading);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.04em;
}

.tly-panel__head a,
.tly-section__head > a,
.tly-section__tools a {
  color: #6f7890;
  font-size: 12px;
  font-weight: 750;
}

.tly-panel__head a:hover,
.tly-section__head > a:hover,
.tly-section__tools a:hover {
  color: var(--tly-primary);
}

.tly-panel-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #e1e5ee;
  color: #8a92a6;
  font-size: 10px;
  line-height: 1.5;
}

.tly-demo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff2d9;
  color: #9e6214;
  font-size: 9px;
  font-weight: 900;
}

/* Category */
.tly-category-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tly-category {
  width: 100%;
  min-height: 39px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 25px 1fr auto;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #495167;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.tly-category:hover {
  transform: translateX(2px);
  background: #f7f5ff;
  color: var(--tly-primary-dark);
}

.tly-category.is-active {
  border-color: #e0d8ff;
  background: #f1edff;
  color: var(--tly-primary-dark);
  font-weight: 850;
}

.tly-category__icon {
  font-size: 16px;
  filter: saturate(1.08);
}

.tly-category span:nth-child(2) {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tly-category b {
  color: #98a0b2;
  font-size: 10px;
}

/* Side ads */
.tly-ad--vertical {
  min-height: 340px;
  padding: 45px 17px 25px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  color: #fff;
  box-shadow: var(--tly-shadow-sm);
}

.tly-ad--purple {
  background:
    radial-gradient(circle at 84% 20%, rgba(255,255,255,.25), transparent 7rem),
    linear-gradient(160deg, #c03ef0 0%, #8a34ef 40%, #5541e9 100%);
}

.tly-ad--vertical::before,
.tly-ad--vertical::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}

.tly-ad--vertical::before {
  width: 170px;
  height: 170px;
  right: -70px;
  bottom: -50px;
}

.tly-ad--vertical::after {
  width: 80px;
  height: 80px;
  left: -35px;
  top: 120px;
}

.tly-ad--vertical p {
  position: relative;
  z-index: 2;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}

.tly-ad--vertical strong {
  position: relative;
  z-index: 2;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: -0.055em;
}

.tly-ad--vertical > span:not(.tly-ad__label) {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  color: rgba(255,255,255,.82);
  font-size: 11px;
}

.tly-ad--vertical .tly-btn {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  min-height: 37px;
  padding-inline: 13px;
  font-size: 11px;
}

.tly-ad__space-icon {
  position: absolute;
  right: 17px;
  bottom: 65px;
  z-index: 3;
  font-size: 62px;
  transform: rotate(12deg);
  filter: drop-shadow(0 14px 15px rgba(26, 16, 91, .25));
}

.tly-ad__pixels i {
  position: absolute;
  z-index: 1;
  display: block;
  width: 22px;
  height: 22px;
  background: #51d98d;
  box-shadow: inset -5px -5px 0 rgba(20,83,51,.18);
}

.tly-ad__pixels i:nth-child(1) { left: 14px; bottom: 18px; }
.tly-ad__pixels i:nth-child(2) { left: 39px; bottom: 18px; background: #ffc93f; }
.tly-ad__pixels i:nth-child(3) { left: 26px; bottom: 43px; background: #56a6ff; }
.tly-ad__pixels i:nth-child(4) { right: 32px; bottom: 20px; background: #65dc74; }

.tly-ad--mini {
  min-height: 150px;
  padding: 36px 16px 18px;
  color: #174a80;
  background: linear-gradient(145deg, #dff4ff, #eef7ff 55%, #cbeaff);
  box-shadow: var(--tly-shadow-sm);
}

.tly-ad--mini strong {
  display: block;
  margin-bottom: 10px;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.tly-ad--mini a {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 10px;
  border-radius: 8px;
  background: #3478f6;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.tly-ad__mini-icon {
  position: absolute;
  right: 18px;
  bottom: 18px;
  font-size: 55px;
}

/* Stats */
.tly-stats {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tly-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  border-bottom: 1px dashed #e9ebf1;
}

.tly-stats > div:last-child {
  border-bottom: 0;
}

.tly-stats dt {
  color: #6f7890;
  font-size: 11px;
}

.tly-stats dd {
  margin: 0;
  color: #30394f;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Hero */
.tly-hero {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid #dfe2ec;
  border-radius: var(--tly-radius-lg);
  background: #10162a;
  box-shadow: var(--tly-shadow-md);
}

.tly-hero__slides,
.tly-slide {
  position: absolute;
  inset: 0;
}

.tly-slide {
  display: flex;
  align-items: center;
  padding: 50px 42px;
  background-color: #0b132a;
  background-image: var(--slide-image);
  background-position: center;
  background-size: cover;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.015);
  transition: opacity 0.55s ease, visibility 0.55s ease, transform 0.8s ease;
}

.tly-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.tly-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 8, 21, .86) 0%, rgba(4, 8, 21, .61) 38%, rgba(4, 8, 21, .08) 70%),
    linear-gradient(0deg, rgba(3, 5, 14, .28), transparent 45%);
}

.tly-slide__content {
  position: relative;
  z-index: 2;
  width: min(430px, 65%);
  color: #fff;
}

.tly-slide__content h1,
.tly-slide__content h2 {
  margin: 15px 0 8px;
  color: #fff;
  font-size: clamp(30px, 3.1vw, 48px);
  line-height: 1.07;
  letter-spacing: -0.06em;
  text-shadow: 0 5px 18px rgba(0,0,0,.28);
}

.tly-slide__content p {
  margin: 0 0 14px;
  color: rgba(255,255,255,.85);
  font-size: 15px;
  line-height: 1.65;
  word-break: keep-all;
}

.tly-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.tly-badge--purple { background: #7040ed; }
.tly-badge--blue { background: #3478f6; }
.tly-badge--green { background: #23a85c; }
.tly-badge--new { background: linear-gradient(135deg, #7f4cff, #5e26e9); box-shadow: 0 5px 12px rgba(80,39,190,.28); }

.tly-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 21px;
}

.tly-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px;
  background: rgba(10, 17, 36, .45);
  color: rgba(255,255,255,.92);
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.tly-hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 38px;
  height: 54px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  background: rgba(6, 10, 22, .38);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background .18s ease, transform .18s ease;
}

.tly-hero__arrow:hover {
  background: rgba(6, 10, 22, .68);
  transform: translateY(-50%) scale(1.04);
}

.tly-hero__arrow--prev { left: 14px; }
.tly-hero__arrow--next { right: 14px; }

.tly-hero__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.tly-hero__dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.48);
  cursor: pointer;
  transition: width .18s ease, background .18s ease;
}

.tly-hero__dots button.is-active {
  width: 24px;
  background: #fff;
}

/* Horizontal ad */
.tly-ad--horizontal {
  min-height: 126px;
  padding: 25px 190px 25px 92px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--tly-shadow-sm);
}

.tly-ad--soft {
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, .9), transparent 12rem),
    linear-gradient(105deg, #fff0f4, #fff5e8 48%, #e8f8f1);
}

.tly-ad--horizontal > div:not(.tly-ad__horizontal-characters) {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.tly-ad--horizontal > div > span {
  color: #4c5265;
  font-size: 12px;
  font-weight: 800;
}

.tly-ad--horizontal > div > strong {
  color: #2e2f52;
  font-size: 22px;
  letter-spacing: -0.045em;
}

.tly-ad__horizontal-icon {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 2;
  font-size: 55px;
}

.tly-ad__horizontal-characters {
  position: absolute;
  right: 24px;
  bottom: 15px;
  z-index: 1;
  font-size: 38px;
  letter-spacing: 2px;
  filter: drop-shadow(0 8px 10px rgba(47, 54, 76, .12));
}

.tly-ad--horizontal .tly-btn {
  position: relative;
  z-index: 3;
  min-height: 38px;
  padding-inline: 13px;
  font-size: 11px;
  white-space: nowrap;
}

/* Content sections */
.tly-section {
  padding: 18px;
}

.tly-section__head {
  margin-bottom: 14px;
}

.tly-section__head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tly-section__eyebrow {
  color: var(--tly-primary);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.tly-section__tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tly-filter-status {
  max-width: 180px;
  overflow: hidden;
  color: #9097aa;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tly-game-grid {
  display: grid;
  gap: 12px;
}

.tly-game-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tly-game-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4e7ef;
  border-radius: 12px;
  background: #fff;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.tly-game-card:hover {
  transform: translateY(-4px);
  border-color: #d7d1f4;
  box-shadow: 0 13px 24px rgba(46, 51, 81, .12);
}

.tly-game-card__link {
  display: block;
}

.tly-game-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #17213b;
}

.tly-game-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .38s ease, filter .25s ease;
}

.tly-game-card:hover .tly-game-card__thumb img {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.03);
}

.tly-game-card__thumb .tly-badge {
  position: absolute;
  top: 8px;
  left: 8px;
}

.tly-game-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -45%) scale(.86);
  border: 1px solid rgba(255,255,255,.48);
  border-radius: 50%;
  background: rgba(8, 12, 28, .55);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  backdrop-filter: blur(7px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.tly-game-card:hover .tly-game-card__play {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.tly-game-card__body {
  padding: 10px 11px 11px;
}

.tly-game-card__body h3 {
  margin: 0 27px 7px 0;
  overflow: hidden;
  color: #22293d;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tly-game-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #848c9f;
  font-size: 9px;
}

.tly-rating {
  color: #e49a13;
  font-weight: 800;
  white-space: nowrap;
}

.tly-favorite {
  position: absolute;
  right: 8px;
  bottom: 34px;
  z-index: 5;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: #828aa0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(39,47,75,.12);
  transition: color .18s ease, transform .18s ease, background .18s ease;
}

.tly-favorite:hover {
  transform: scale(1.08);
  color: var(--tly-pink);
}

.tly-favorite.is-active {
  background: #fff0f7;
  color: var(--tly-pink);
}

.tly-empty-state {
  min-height: 180px;
  padding: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed #dce0eb;
  border-radius: 12px;
  background: #fafbfe;
  color: #818a9f;
  text-align: center;
}

.tly-empty-state::before {
  content: "🔍";
  font-size: 35px;
}

.tly-empty-state strong {
  color: #40485f;
}

.tly-empty-state span {
  font-size: 12px;
}

.tly-section__footer {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

/* Genre cards */
.tly-genre-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tly-genre-card {
  position: relative;
  min-height: 82px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 11px;
  color: #fff !important;
  isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease;
}

.tly-genre-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(32, 39, 65, .16);
}

.tly-genre-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transition: transform .35s ease;
}

.tly-genre-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(9, 13, 28, .78), rgba(9, 13, 28, .12));
}

.tly-genre-card:hover::before {
  transform: scale(1.06);
}

.tly-genre-card strong {
  font-size: 13px;
  letter-spacing: -0.04em;
}

.tly-genre-card span {
  margin-top: 2px;
  color: rgba(255,255,255,.76);
  font-size: 9px;
}

.tly-genre-card--action::before { background-image: url('../images/game-pirate-duel.svg'); }
.tly-genre-card--puzzle::before { background-image: url('../images/game-marble-labyrinth.svg'); }
.tly-genre-card--racing::before { background-image: url('../images/game-neon-drift.svg'); }
.tly-genre-card--sports::before { background-image: url('../images/game-mini-golf.svg'); }
.tly-genre-card--strategy::before { background-image: url('../images/game-cyber-grid.svg'); }
.tly-genre-card--simulation::before { background-image: url('../images/game-island-builder.svg'); }
.tly-genre-card--rhythm::before { background-image: url('../images/game-rhythm-reactor.svg'); }
.tly-genre-card--mystery::before { background-image: url('../images/game-mirror-mansion.svg'); }

/* Right sidebar */
.tly-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--tly-red);
  font-size: 9px;
  font-weight: 900;
}

.tly-live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tly-red);
  box-shadow: 0 0 0 4px rgba(239, 67, 93, .12);
}

.tly-ranking-list {
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
}

.tly-ranking-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px 42px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
}

.tly-ranking-list li > b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f1edff;
  color: var(--tly-primary);
  font-size: 10px;
}

.tly-ranking-list li:nth-child(2) > b { background: #fff3df; color: #d77b11; }
.tly-ranking-list li:nth-child(3) > b { background: #eef7ef; color: #319252; }
.tly-ranking-list li:nth-child(n+4) > b { background: #f0f2f6; color: #70798f; }

.tly-ranking-list img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.tly-ranking-list li > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.tly-ranking-list a {
  overflow: hidden;
  color: #242b40;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tly-ranking-list a:hover {
  color: var(--tly-primary);
}

.tly-ranking-list li > div span {
  color: #9aa1b2;
  font-size: 8px;
  text-transform: uppercase;
}

.tly-ranking-list small {
  color: #747c90;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.tly-ranking-panel .tly-btn {
  min-height: 35px;
  font-size: 10px;
}

.tly-ad--square {
  min-height: 244px;
  padding: 38px 16px 18px;
  box-shadow: var(--tly-shadow-sm);
}

.tly-ad--square p {
  position: relative;
  z-index: 3;
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 800;
}

.tly-ad--square strong {
  position: relative;
  z-index: 3;
  display: block;
  font-size: 23px;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.tly-ad--square > span:not(.tly-ad__label):not(.tly-ad__robot):not(.tly-ad__kid):not(.tly-ad__gift) {
  position: relative;
  z-index: 3;
  display: block;
  margin-top: 8px;
  font-size: 10px;
}

.tly-ad--square .tly-btn {
  position: relative;
  z-index: 3;
  margin-top: 14px;
  min-height: 34px;
  padding-inline: 11px;
  font-size: 9px;
}

.tly-ad--sky {
  color: #16477f;
  background:
    radial-gradient(circle at 82% 14%, rgba(255,255,255,.88), transparent 7rem),
    linear-gradient(150deg, #e7f7ff 0%, #ccecff 48%, #afd9ff 100%);
}

.tly-ad--sky::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.42);
}

.tly-ad__robot {
  position: absolute;
  top: 35px;
  right: 20px;
  z-index: 2;
  font-size: 45px;
  transform: rotate(8deg);
}

.tly-ad__kid {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  font-size: 61px;
}

.tly-ad--gift {
  color: #205d34;
  background:
    radial-gradient(circle at 83% 13%, rgba(255,255,255,.85), transparent 8rem),
    linear-gradient(140deg, #ebfff3 0%, #dff6e8 55%, #caedda 100%);
}

.tly-ad__gift {
  position: absolute;
  right: 15px;
  bottom: 16px;
  z-index: 2;
  font-size: 73px;
  transform: rotate(6deg);
  filter: drop-shadow(0 12px 14px rgba(41,103,63,.15));
}

/* Community */
.tly-post-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
}

.tly-post-list li {
  min-width: 0;
  min-height: 34px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #eef0f5;
}

.tly-post-list li:last-child {
  border-bottom: 0;
}

.tly-post-list a {
  overflow: hidden;
  color: #3e465b;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tly-post-list a:hover {
  color: var(--tly-primary);
}

.tly-post-list time {
  color: #a1a7b6;
  font-size: 8px;
  white-space: nowrap;
}

.tly-post-tag {
  min-width: 29px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
}

.tly-post-tag--notice { background: #ef435d; }
.tly-post-tag--tip { background: #e6a021; }
.tly-post-tag--guide { background: #7d49eb; }
.tly-post-tag--free { background: #3478f6; }
.tly-post-tag--question { background: #2ea767; }

/* Online */
.tly-online-total {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f7f8fc;
  color: #8b93a7;
  font-size: 9px;
}

.tly-online-total strong {
  color: #2d354a;
  font-size: 12px;
}

.tly-online-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20a65a;
  box-shadow: 0 0 0 4px rgba(32,166,90,.12);
}

.tly-online-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  list-style: none;
}

.tly-online-list li {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  align-items: center;
  gap: 7px;
}

.tly-online-list img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
}

.tly-online-list span {
  overflow: hidden;
  color: #41495d;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tly-online-list b {
  color: #5e687e;
  font-size: 9px;
  font-weight: 800;
}

/* Bottom ad */
.tly-ad--bottom {
  min-height: 100px;
  margin-top: 18px;
  padding: 22px 245px 22px 115px;
  display: flex;
  align-items: center;
  gap: 28px;
  background:
    radial-gradient(circle at 76% 35%, rgba(255,255,255,.92), transparent 13rem),
    linear-gradient(100deg, #fff0f1, #fff2df 46%, #f5e9ff 100%);
  box-shadow: var(--tly-shadow-sm);
}

.tly-ad__bottom-icon {
  position: absolute;
  left: 38px;
  bottom: 16px;
  font-size: 54px;
  transform: rotate(-8deg);
}

.tly-ad--bottom > div {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

.tly-ad--bottom strong {
  color: #30223d;
  font-size: 19px;
  letter-spacing: -0.04em;
}

.tly-ad--bottom > div span {
  color: #e33479;
  font-size: 13px;
  font-weight: 800;
}

.tly-ad--bottom .tly-btn {
  position: relative;
  z-index: 2;
  margin-left: auto;
  min-height: 42px;
  white-space: nowrap;
}

.tly-ad__bottom-confetti {
  position: absolute;
  right: 25px;
  top: 16px;
  z-index: 1;
  color: #844bf2;
  font-size: 23px;
  word-spacing: 14px;
  opacity: .76;
}

/* Newsletter */
.tly-newsletter {
  position: relative;
  min-height: 96px;
  margin-top: 16px;
  padding: 18px 18px 18px 76px;
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(350px, 1.2fr);
  align-items: center;
  gap: 22px;
  border: 1px solid var(--tly-border);
  border-radius: var(--tly-radius);
  background: #fff;
  box-shadow: var(--tly-shadow-sm);
}

.tly-newsletter__icon {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 12px;
  background: linear-gradient(135deg, #e6dcff, #c6b5ff);
  font-size: 22px;
}

.tly-newsletter__copy h2 {
  margin: 0;
  color: #282e43;
  font-size: 15px;
  letter-spacing: -0.04em;
}

.tly-newsletter__copy p {
  margin: 3px 0 0;
  color: #858da0;
  font-size: 10px;
}

.tly-newsletter__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.tly-newsletter__form input {
  min-width: 0;
  height: 43px;
  padding: 0 14px;
  border: 1px solid #dfe3ec;
  border-radius: 10px;
  background: #fafbfe;
  color: var(--tly-text);
  outline: none;
}

.tly-newsletter__form input:focus {
  border-color: rgba(109,61,245,.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(109,61,245,.1);
}

.tly-newsletter__form .tly-btn {
  min-height: 43px;
}

.tly-form-message {
  position: absolute;
  right: 18px;
  bottom: 2px;
  margin: 0;
  color: #29935a;
  font-size: 9px;
  font-weight: 700;
}

/* Footer */
.tly-footer {
  border-top: 1px solid #e1e5ed;
  background: #fff;
}

.tly-footer__grid {
  padding-top: 34px;
  padding-bottom: 28px;
  display: grid;
  grid-template-columns: 1.45fr repeat(4, 1fr);
  gap: 40px;
}

.tly-brand--footer .tly-brand__text {
  font-size: 19px;
}

.tly-footer__brand > p {
  margin: 13px 0 17px;
  color: #7a8398;
  font-size: 11px;
  line-height: 1.65;
}

.tly-socials {
  display: flex;
  gap: 7px;
}

.tly-socials a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef0f5;
  color: #626b7f;
  font-size: 11px;
  font-weight: 800;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.tly-socials a:hover {
  transform: translateY(-2px);
  background: var(--tly-primary);
  color: #fff;
}

.tly-footer nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tly-footer nav h2 {
  margin: 0 0 5px;
  color: #30374d;
  font-size: 12px;
}

.tly-footer nav a {
  color: #7b8498;
  font-size: 10px;
}

.tly-footer nav a:hover {
  color: var(--tly-primary);
}

.tly-footer__bottom {
  padding-top: 15px;
  padding-bottom: 18px;
  border-top: 1px solid #eceef3;
  color: #969daf;
  font-size: 9px;
  text-align: center;
}

/* Mobile ad and back to top */
.tly-mobile-ad {
  display: none;
}

.tly-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  transform: translateY(80px);
  border: 0;
  border-radius: 50%;
  background: #252d43;
  color: #fff;
  font-size: 19px;
  opacity: 0;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(20, 27, 47, .25);
  transition: transform .2s ease, opacity .2s ease, background .18s ease;
}

.tly-back-to-top.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.tly-back-to-top:hover {
  background: var(--tly-primary);
}

/* Intermediate desktop */
@media (max-width: 1320px) {
  .tly-header__inner { gap: 17px; }
  .tly-nav a { padding-inline: 8px; font-size: 13px; }
  .tly-search { width: 160px; }
  .tly-layout { grid-template-columns: 205px minmax(0, 1fr) 250px; gap: 14px; }
  .tly-hero { min-height: 380px; }
  .tly-slide { padding-inline: 36px; }
  .tly-top-ad__copy { min-width: 290px; }
  .tly-ad--top { padding-right: 300px; padding-left: 165px; gap: 14px; }
  .tly-top-ad__scene { width: 295px; }
}

@media (max-width: 1160px) {
  .tly-header { height: 64px; }
  .tly-nav a:nth-child(7),
  .tly-nav a:nth-child(8) { display: none; }
  .tly-header__actions .tly-btn--ghost { display: none; }
  .tly-layout {
    grid-template-columns: 205px minmax(0, 1fr);
    grid-template-areas:
      "left main"
      "right right";
  }
  .tly-sidebar--left { grid-area: left; }
  .tly-content { grid-area: main; }
  .tly-sidebar--right {
    grid-area: right;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    align-items: stretch;
  }
  .tly-sidebar--right > * { min-height: 100%; }
  .tly-online-panel { grid-column: span 2; }
  .tly-ad--gift { min-height: 220px; }
  .tly-ad--top { padding-right: 250px; padding-left: 135px; }
  .tly-top-ad__icon { left: 42px; font-size: 58px; }
  .tly-top-ad__scene { width: 245px; }
  .tly-top-ad__copy strong { font-size: 26px; }
  .tly-top-ad__copy small { display: none; }
  .tly-ad--bottom { padding-right: 190px; }
}

@media (max-width: 980px) {
  .tly-container { width: min(100% - 28px, 930px); }
  .tly-brand__sub { display: none; }
  .tly-nav { display: none; }
  .tly-nav-toggle { display: block; }
  .tly-nav.is-open {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 1001;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    align-content: start;
    gap: 0;
    max-height: calc(100vh - 64px);
    padding: 16px;
    overflow: auto;
    background: #fff;
    box-shadow: 0 20px 30px rgba(29,37,64,.16);
  }
  .tly-nav.is-open a,
  .tly-nav.is-open a:nth-child(7),
  .tly-nav.is-open a:nth-child(8) {
    display: flex;
    min-height: 47px;
    padding: 0 16px;
    border-bottom: 1px solid #eef0f5;
  }
  .tly-nav.is-open a::after { display: none; }
  .tly-header__actions { margin-left: 0; }
  .tly-search { width: 210px; }
  .tly-ad--top {
    padding-left: 115px;
    padding-right: 25px;
  }
  .tly-top-ad__scene { display: none; }
  .tly-top-ad__icon { left: 28px; }
  .tly-top-ad__copy { min-width: 0; flex: 1; }
  .tly-layout {
    grid-template-columns: 190px minmax(0,1fr);
  }
  .tly-game-grid--four { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tly-genre-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tly-ad--horizontal { padding-right: 105px; }
  .tly-ad__horizontal-characters { right: 12px; font-size: 30px; }
  .tly-ad--horizontal > div > strong { font-size: 18px; }
  .tly-ad--bottom { padding-right: 25px; }
  .tly-ad__bottom-confetti { display: none; }
  .tly-newsletter { grid-template-columns: 1fr; gap: 12px; }
  .tly-newsletter__form { grid-column: 1; }
  .tly-footer__grid { grid-template-columns: 1.4fr repeat(2,1fr); gap: 28px; }
}

@media (max-width: 760px) {
  .tly-app { padding-bottom: 64px; }
  .tly-app.is-mobile-ad-closed { padding-bottom: 0; }
  .tly-container { width: min(100% - 22px, 680px); }
  .tly-header__inner { gap: 10px; }
  .tly-header__actions .tly-btn { display: none; }
  .tly-search { width: min(43vw, 210px); }
  .tly-search input { height: 37px; }
  .tly-top-ad-wrap { padding-top: 11px; }
  .tly-ad--top {
    min-height: 150px;
    padding: 30px 18px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }
  .tly-top-ad__icon { display: none; }
  .tly-top-ad__copy { grid-column: 1 / -1; }
  .tly-top-ad__copy strong { font-size: 25px; }
  .tly-top-ad__copy > span { font-size: 12px; }
  .tly-top-ad__copy small { display: block; }
  .tly-pill { min-height: 34px; padding-inline: 12px; font-size: 11px; }
  .tly-ad--top .tly-btn { min-height: 36px; padding-inline: 13px; font-size: 11px; }
  .tly-main { padding-top: 12px; }
  .tly-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .tly-content { order: 1; width: 100%; gap: 12px; }
  .tly-sidebar--left { order: 2; width: 100%; }
  .tly-sidebar--right { order: 3; width: 100%; display: flex; }
  .tly-category-panel { order: 1; }
  .tly-category-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 5px;
  }
  .tly-category { min-height: 42px; }
  .tly-ad--vertical { min-height: 235px; }
  .tly-ad__space-icon { font-size: 52px; }
  .tly-stats-panel { order: 3; }
  .tly-ad--mini { order: 4; }
  .tly-hero { min-height: 365px; border-radius: 16px; }
  .tly-slide { padding: 42px 27px; background-position: 62% center; }
  .tly-slide__shade { background: linear-gradient(90deg, rgba(4,8,21,.9), rgba(4,8,21,.52) 72%, rgba(4,8,21,.18)); }
  .tly-slide__content { width: 82%; }
  .tly-slide__content h1,
  .tly-slide__content h2 { font-size: 32px; }
  .tly-slide__content p { font-size: 13px; }
  .tly-hero__arrow { width: 34px; height: 46px; }
  .tly-hero__arrow--prev { left: 8px; }
  .tly-hero__arrow--next { right: 8px; }
  .tly-ad--horizontal {
    min-height: 150px;
    padding: 28px 18px 18px 75px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .tly-ad__horizontal-icon { left: 17px; font-size: 45px; }
  .tly-ad__horizontal-characters { right: 10px; bottom: 12px; opacity: .75; }
  .tly-section { padding: 14px; }
  .tly-section__tools { flex-direction: column; align-items: flex-end; gap: 2px; }
  .tly-game-grid--four { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .tly-game-card__body { padding: 9px; }
  .tly-game-card__body h3 { font-size: 11px; }
  .tly-game-card__meta { font-size: 8px; }
  .tly-favorite { right: 6px; bottom: 31px; }
  .tly-ad--bottom {
    min-height: 150px;
    padding: 42px 18px 18px;
    display: block;
  }
  .tly-ad__bottom-icon { display: none; }
  .tly-ad--bottom > div span { margin: 4px 0 13px; }
  .tly-ad--bottom .tly-btn { margin: 0; }
  .tly-newsletter { padding: 22px 14px 18px; }
  .tly-newsletter__icon { position: static; transform: none; }
  .tly-newsletter__form { grid-template-columns: 1fr; }
  .tly-form-message { position: static; grid-column: 1; }
  .tly-footer__grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px 20px; }
  .tly-footer__brand { grid-column: 1 / -1; }
  .tly-mobile-ad {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 1500;
    min-height: 54px;
    padding: 8px 72px 8px 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ded8f5;
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 12px 28px rgba(31,38,66,.2);
    backdrop-filter: blur(12px);
  }
  .tly-mobile-ad .tly-ad__label { top: 50%; left: 8px; transform: translateY(-50%); }
  .tly-mobile-ad > div { min-width: 0; display: flex; flex-direction: column; }
  .tly-mobile-ad strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
  .tly-mobile-ad span:not(.tly-ad__label) { color: #8a92a4; font-size: 8px; }
  .tly-mobile-ad > a { margin-left: auto; min-width: 68px; min-height: 32px; display: grid; place-items: center; border-radius: 8px; background: var(--tly-primary); color: #fff; font-size: 9px; font-weight: 850; }
  .tly-mobile-ad > button { position: absolute; top: 50%; right: 8px; width: 27px; height: 27px; transform: translateY(-50%); border: 0; border-radius: 7px; background: #f0f1f5; color: #697186; cursor: pointer; }
  .tly-back-to-top { right: 16px; bottom: 80px; }
}

@media (max-width: 480px) {
  .tly-brand__text { font-size: 18px; }
  .tly-brand__mark { width: 28px; }
  .tly-search { width: 41vw; }
  .tly-search input { padding-left: 11px; font-size: 12px; }
  .tly-nav.is-open { grid-template-columns: 1fr; }
  .tly-ad--top { min-height: 172px; }
  .tly-top-ad__copy strong { font-size: 23px; }
  .tly-top-ad__copy small { font-size: 10px; }
  .tly-hero { min-height: 330px; }
  .tly-slide { padding: 38px 24px; }
  .tly-slide__content { width: 90%; }
  .tly-slide__content h1,
  .tly-slide__content h2 { font-size: 27px; }
  .tly-slide__content p { font-size: 12px; line-height: 1.55; }
  .tly-chip-row { margin-bottom: 15px; }
  .tly-btn--large { min-height: 43px; padding-inline: 17px; font-size: 12px; }
  .tly-game-grid--four { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
  .tly-game-card__body h3 { font-size: 10px; }
  .tly-game-card__meta span:first-child { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tly-genre-grid { grid-template-columns: 1fr; }
  .tly-footer__grid { grid-template-columns: 1fr 1fr; }
  .tly-footer nav h2 { font-size: 11px; }
  .tly-footer nav a { font-size: 9px; }
  .tly-mobile-ad { padding-left: 46px; padding-right: 70px; }
  .tly-mobile-ad span:not(.tly-ad__label) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tly-app *,
  .tly-app *::before,
  .tly-app *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
