/* LULO Activity — оболочка и общие элементы. Стили вкладок лежат в блоках (activityWeb/style.css). */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #130e1d;
  --surface: #1b1430;
  --raise: #261c3f;
  --line: #3a2d59;
  --text: #f4eeff;
  --mute: #a99bc8;
  --pink: #ff4fa3;
  --pink-soft: #ff8cc6;
  --lilac: #a98bff;
  --win: #7ee8b4;
  --loss: #ff8a9b;

  --display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(12px, 3.2vw, 36px);
  --fs: clamp(14px, 0.55vw + 11.4px, 19px); /* базовый размер текста растёт вместе с окном */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(255, 79, 163, 0.16), transparent 60%),
    radial-gradient(700px 380px at -10% 0%, rgba(169, 139, 255, 0.14), transparent 55%),
    var(--ink);
  background-attachment: fixed;
  color: var(--text);
  font: 500 var(--fs)/1.5 var(--body);
  padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); padding-bottom: env(safe-area-inset-bottom);
  overflow-x: hidden; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: var(--pink-soft); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 6px; }

.shell { width: 100%; max-width: clamp(320px, 94vw, 1240px); margin: 0 auto; padding: 14px var(--gutter) 40px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-avatar { width: clamp(32px, 3vw, 44px); height: clamp(32px, 3vw, 44px); border-radius: 50%; background: var(--raise); object-fit: cover; }
.who-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark {
  font: 800 clamp(15px, 1.4vw, 22px)/1 var(--display);
  letter-spacing: 0.08em;
  color: var(--pink);
  margin-left: auto;
}

/* Заставка */
.splash { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter); text-align: center; }
.splash[hidden] { display: none; }
.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 100%; }
.splash-logo {
  margin: 0; white-space: nowrap; font: 900 clamp(36px, min(22vw, 26vh), 240px)/1 var(--display); letter-spacing: 0.04em;
  background: linear-gradient(180deg, var(--pink-soft), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px rgba(255, 79, 163, 0.35));
}
.splash-sub { margin: 0 0 18px; white-space: nowrap; color: var(--mute); letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; font-weight: 700; }
.splash-btn { white-space: nowrap; min-width: 220px; justify-content: center; text-align: center; padding: 15px 28px; font-size: 16px; }
.splash-btn:disabled { opacity: 0.6; cursor: default; }
.splash-msg { margin: 6px 0 0; color: var(--mute); }

/* Навигация внутри раздела */
.crumb { display: flex; align-items: center; gap: 14px; margin: 14px 0 18px; }
.crumb[hidden] { display: none; }
.crumb-back { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-weight: 700; cursor: pointer; }
.crumb-back:hover { border-color: var(--pink); }
.crumb-title { font: 800 clamp(18px, 1.8vw, 26px)/1.2 var(--display); }

/* Главный экран */
.home { padding-top: 8px; }
.home-hi { margin: 8px 0 4px; font: 800 clamp(22px, 6vw, 30px)/1.2 var(--display); overflow-wrap: anywhere; }
.home-sub { margin: 0 0 22px; color: var(--mute); }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 18px); }
.tile {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; cursor: pointer;
  padding: 14px 12px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.tile:hover { border-color: var(--pink); background: var(--raise); transform: translateY(-2px); }
.tile-ico { font-size: clamp(28px, 3.2vw, 44px); line-height: 1; margin-bottom: 4px; }
.tile-title { font: 800 clamp(10.5px, 2.9vw, 20px)/1.25 var(--display); overflow-wrap: break-word; hyphens: manual; }
.tile-desc { display: none; color: var(--mute); font-size: 0.87em; line-height: 1.35; }
@media (min-width: 600px) { .tile { padding: 18px; } .tile-desc { display: block; } }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

.state { color: var(--mute); text-align: center; padding: 48px 8px; margin: 0; }
.state strong { display: block; color: var(--text); font: 700 17px/1.3 var(--display); margin-bottom: 8px; }
.state .btn { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raise);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.btn:hover { border-color: var(--pink); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: #2a0618; }
.btn.primary:hover { background: var(--pink-soft); border-color: var(--pink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* Адаптивность: очень узкие окна и очень широкие */
@media (max-width: 340px) { .tile { padding: 10px 8px; } .tile-ico { font-size: 24px; } .btn { padding: 8px 12px; } }
@media (min-width: 1000px) { .tile { padding: 22px; } }
@media (max-height: 520px) { .splash { padding-top: 12px; padding-bottom: 12px; } .home-sub { margin-bottom: 12px; } }
img, canvas, svg, video { max-width: 100%; }
table { max-width: 100%; }
