/* Лингора redesign 2026-10-08: simple home (Лори + one main action), «Учить» tiles, «Игры» tab, profile tiles,
   «Лори хвалит» pill. Loaded after all other styles. Variables come from app.css / ui2.css (dark + light). */

/* ---------- 4-tab bottom bar ---------- */
.tabbar.tabbar4 .tab-btn span { font-size: 12px; }
.tabbar.tabbar4 .tab-btn.active .ic { width: 52px; padding: 1px 15px; }
.tab-btn .ic { transition: transform .25s var(--spring, ease); }
.tab-btn:active .ic { transform: scale(.88); }

/* ---------- home ---------- */
/* Incident notice on the home screen (2026-11-20) */
.hm-notice {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 12px 16px 16px;
  border-radius: var(--r-md, 18px);
  background: var(--saffron-soft);
  border: 1px solid var(--line-2);
  min-width: 0;
}
.hm-notice-top { display: flex; align-items: flex-start; gap: 8px; }
.hm-notice-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  padding-top: 6px;
}
.hm-notice-x {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  margin: -4px -8px 0 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hm-notice-x:active { background: var(--surface-3); }
.hm-notice-body {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
.hm-notice-btn { min-height: 44px; font-size: 16px; font-weight: 800; margin: 0; }
html.hm-c5 .hm-notice { padding: 12px; }

.hm-hello { display: flex; align-items: flex-end; gap: 10px; padding: 2px 2px 0; min-width: 0; }
.hm-lori.mascot { width: 76px; height: 76px; flex: 0 0 76px; }
.hm-lori.mascot svg { animation: hmHop 3.4s var(--ease-out, ease) infinite; transform-origin: 50% 95%; }
.hm-bubble { position: relative; flex: 1 1 auto; min-width: 0; margin-bottom: 14px; padding: 10px 14px; border-radius: 18px 18px 18px 6px;
  background: var(--surface-2); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px;
  animation: hmBubble .5s var(--spring, ease) .1s both; }
.hm-bubble b { font-size: 17px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.hm-bubble span { font-size: 14px; color: var(--ink-2); line-height: 1.35; overflow-wrap: anywhere; }
.hm-bubble::before { content: ""; position: absolute; left: -7px; bottom: 8px; width: 14px; height: 14px; background: var(--surface-2);
  border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); transform: rotate(45deg) skew(8deg, 8deg); border-radius: 0 0 0 4px; }

.hm-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: linear-gradient(150deg, rgba(139, 47, 217, .55), rgba(194, 38, 142, .38) 70%), var(--surface); border-color: rgba(255, 255, 255, .14); }
html[data-theme="light"] .hm-hero { background: linear-gradient(150deg, rgba(139, 47, 217, .16), rgba(194, 38, 142, .10) 70%), var(--surface); border-color: var(--line-2); }
.hm-hero::after { content: ""; position: absolute; right: -40px; top: -50px; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); pointer-events: none; }
.hm-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; position: relative; z-index: 1; }
.hm-course { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; max-width: 100%; padding: 4px 8px 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); color: inherit; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
html[data-theme="light"] .hm-course { background: var(--surface-2); border-color: var(--line-2); }
.hm-course > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; line-height: 1.15; }
.hm-course .ic { width: 16px; height: 16px; opacity: .7; }
.hm-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 4px 10px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 800;
  background: rgba(255, 255, 255, .14); color: inherit; border: 0; max-width: 100%; }
.hm-pill > span { overflow-wrap: anywhere; }
.hm-pill .ic { width: 14px; height: 14px; flex: 0 0 14px; }
.hm-pill.trial { background: rgba(62, 219, 176, .2); color: #8FF5D6; }
.hm-pill.warn { background: rgba(255, 196, 92, .22); color: #FFD68A; min-height: 36px; cursor: pointer; }
.hm-pill.lock { background: rgba(255, 255, 255, .12); }
html[data-theme="light"] .hm-pill.trial { color: #0F7F6A; }
html[data-theme="light"] .hm-pill.warn { color: #8A5200; }
.hm-title { position: relative; z-index: 1; font-size: clamp(21px, 6.2vw, 26px); font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; margin-top: 4px; }
.hm-title.skel { color: transparent; width: 70%; border-radius: 10px; }
.hm-sub { position: relative; z-index: 1; font-size: 13.5px; font-weight: 700; color: var(--ink-2); overflow-wrap: anywhere; min-height: 18px; }
.hm-meter { position: relative; z-index: 1; height: 10px; }
.hm-go { position: relative; z-index: 1; min-height: 58px; font-size: 18px; font-weight: 900; margin-top: 4px; border-radius: 18px;
  box-shadow: 0 10px 26px rgba(194, 38, 142, .38); animation: hmGo 2.6s ease-in-out 1.2s infinite; }
.hm-go .ic { width: 22px; height: 22px; }
.hm-go:disabled { animation: none; }

.hm-day { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.hm-ring.ring { width: 58px; height: 58px; flex: 0 0 58px; }
.hm-ring.ring b { font-size: 14px; }
.hm-day-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hm-day-t b { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.hm-day-t span { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.hm-stat { display: flex; flex-direction: column; align-items: center; gap: 0; min-width: 40px; }
.hm-stat b { font-size: 16px; font-weight: 900; }
.hm-stat .ic { width: 24px; height: 24px; }
.hm-flame { color: var(--muted); opacity: .6; }
.hm-flame.on { color: #FF8A3D; opacity: 1; animation: hmFlame 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.hm-xp { color: var(--saffron); }

.hm-word { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; padding: 12px 12px 12px 14px; }
.hm-word-ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 14px; display: grid; place-items: center; background: var(--lagoon-soft); color: var(--lagoon); }
.hm-word-ic .ic { width: 22px; height: 22px; }
.hm-word .grow { min-width: 0; display: flex; flex-direction: column; }
.hm-word-k { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hm-word-w { font-size: 19px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.hm-word-w.skel { color: transparent; width: 60%; border-radius: 8px; }
.hm-word-r { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.hm-word-say { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 16px; display: grid; place-items: center; }

@keyframes hmHop { 0%, 72%, 100% { transform: translateY(0) scale(1); } 80% { transform: translateY(-7px) scale(1.03, .97); } 88% { transform: translateY(0) scale(1.04, .95); } 94% { transform: translateY(-2px); } }
@keyframes hmBubble { from { opacity: 0; transform: translateY(8px) scale(.94); transform-origin: 0 100%; } to { opacity: 1; transform: none; } }
@keyframes hmGo { 0%, 86%, 100% { transform: scale(1); } 92% { transform: scale(1.025); } }
@keyframes hmFlame { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.12) rotate(-4deg); } }

/* ---------- «Учить» ---------- */
.screen-head .lang-pick { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px 6px 12px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.lang-pick .ic { width: 16px; height: 16px; opacity: .7; }
.lt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lt-grid .mode { min-height: 96px; padding: 12px 8px; align-items: center; justify-content: center; text-align: center; gap: 8px; position: relative; }
.lt-grid .mode .mi { width: 46px; height: 46px; border-radius: 15px; }
.lt-grid .mode .mi .ic { width: 24px; height: 24px; }
.lt-grid .mode b { font-size: 13.5px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; }
.lt-grid .mode .pill { position: absolute; top: 6px; right: 6px; margin: 0; min-height: 0; padding: 3px 5px; }
.lt-grid .mode .pill .ic { width: 12px; height: 12px; }
.lt-grid .mode:active { transform: scale(.96); }
.lt-eb { margin: 6px 2px -4px; }

/* ---------- «Игры» ---------- */
.gt-eb { margin: 6px 2px -4px; }
.gt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gt-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 132px; padding: 14px;
  text-align: left; color: #fff; font: inherit; cursor: pointer; border: 0; transition: transform .18s var(--spring, ease); }
.gt-tile:active { transform: scale(.96); }
.gt-tile b { font-size: 17px; font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; position: relative; z-index: 1; margin-top: auto; }
.gt-sub { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; opacity: .9; position: relative; z-index: 1; overflow-wrap: anywhere; }
.gt-sub .ic { width: 14px; height: 14px; }
.gt-ico { width: 64px; height: 64px; display: block; position: relative; z-index: 1; }
.gt-ico svg { width: 100%; height: 100%; overflow: visible; }
.gt-tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 88px; gap: 12px; }
.gt-tile.wide b { margin-top: 0; }
.gt-tile.wide .gt-ico { width: 56px; height: 56px; flex: 0 0 56px; }
.gt-tile.wide > b, .gt-tile.wide > .gt-sub { display: block; }
.gt-tile.wide { display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; }
.gt-tile.wide .gt-ico { grid-row: 1 / 3; align-self: center; }
.gt-tile.wide b { align-self: end; }
.gt-lang { background: linear-gradient(140deg, #7C3AED, #B02BB8); }
.gt-ask { background: linear-gradient(140deg, #FF7A59, #FF4F9A); }
.gt-ask .gt-ico { animation: hmHop 3s var(--ease-out, ease) infinite; }
.gt-uno { background: linear-gradient(140deg, #F23A4B, #FF8A3D); }
.gt-pool { background: linear-gradient(140deg, #0E8F6A, #1E6FD9); }
.gt-ck { background: linear-gradient(140deg, #3B2A7A, #6A3FB8); }
.gt-tile.is-locked .gt-ico { filter: grayscale(.4); opacity: .85; }
.gt-tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); pointer-events: none; }

/* ---------- profile: hero + quick tiles in one card ---------- */
.pf-top { display: flex; flex-direction: column; gap: 12px; }
.pf-top .profile-hero { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pf-top .profile-hero > .grow { min-width: 0; }
.pf-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pf-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 76px; padding: 8px 4px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line); color: inherit; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; text-align: center; }
.pf-tile > span:last-child { overflow-wrap: anywhere; line-height: 1.15; max-width: 100%; }
.pf-tile .mi { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.pf-tile .mi .ic { width: 21px; height: 21px; }
.pf-tile:active { transform: scale(.95); }
.pf-tiles:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- «Лори хвалит» ---------- */
.lp { position: fixed; left: 50%; top: calc(max(env(safe-area-inset-top, 0px), var(--safe-t, 0px)) + 62px); z-index: 85; pointer-events: none;
  display: flex; align-items: center; gap: 8px; max-width: min(92vw, 420px); padding: 7px 16px 7px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #8B2FD9, #C2268E); color: #fff; font-weight: 900; font-size: 16px; line-height: 1.2;
  box-shadow: 0 12px 30px rgba(20, 2, 40, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
  opacity: 0; transform: translate(-50%, -16px) scale(.85); visibility: hidden; }
.lp .lp-t { overflow-wrap: anywhere; min-width: 0; }
.lp .lp-lori.mascot { width: 40px; height: 40px; flex: 0 0 40px; margin: -10px 0 -6px; }
.lp.in { visibility: visible; animation: lpIn .45s var(--spring, cubic-bezier(.34, 1.56, .64, 1)) both; }
.lp.in .lp-lori svg { animation: lpJump .7s var(--ease-out, ease) .1s both; }
.lp.out { visibility: visible; animation: lpOut .3s ease both; }
.lp-bad { background: linear-gradient(135deg, #3A2560, #5B3B8F); font-size: 15px; }
.lp-fire { background: linear-gradient(135deg, #FF7A1A, #FF3D7F); font-size: 17px; }
.lp-big { background: linear-gradient(135deg, #12B886, #7C3AED); font-size: 17px; padding: 9px 18px 9px 10px; }
.lp-big .lp-lori.mascot, .lp-fire .lp-lori.mascot { width: 48px; height: 48px; flex-basis: 48px; }
@keyframes lpIn { from { opacity: 0; transform: translate(-50%, -18px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes lpOut { from { opacity: 1; transform: translate(-50%, 0) scale(1); } to { opacity: 0; transform: translate(-50%, -12px) scale(.94); visibility: hidden; } }
@keyframes lpJump { 0% { transform: translateY(0) rotate(0); } 35% { transform: translateY(-9px) rotate(-8deg); } 70% { transform: translateY(0) rotate(4deg); } 100% { transform: none; } }

@media (max-width: 359px) {
  .lt-grid .mode b { font-size: 12.5px; }
  .gt-tile { min-height: 120px; padding: 12px; }
  .gt-ico { width: 54px; height: 54px; }
  .hm-lori.mascot { width: 64px; height: 64px; flex-basis: 64px; }
  .pf-tile { font-size: 11.5px; }
}
@media (max-height: 680px) {
  .hm-lori.mascot { width: 60px; height: 60px; flex-basis: 60px; }
  .hm-bubble { margin-bottom: 8px; padding: 8px 12px; }
  .hm-go { min-height: 52px; }
  .hm-hero { padding: 14px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-lori.mascot svg, .hm-go, .hm-flame.on, .gt-ask .gt-ico, .hm-bubble { animation: none !important; }
  .lp.in { animation: none; opacity: 1; transform: translate(-50%, 0); }
  .lp.in .lp-lori svg { animation: none; }
  .lp.out { animation: none; opacity: 0; visibility: hidden; }
}
html.lite .hm-go { animation: none; }

/* ---------- profile: achievements shelf collapsed to one row ---------- */
.gx-shelf:not(.open) .gx-ach:nth-child(n+5) { display: none; }
.gx-more-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.gx-more-row .gx-count { margin: 0; text-align: left; }
.gx-more { min-height: 40px; }

/* ---- home: course meter start state + quick tiles that fill the free space (2026-10-08 rd2) ---- */
.hm-meter { background: rgba(255, 255, 255, .16); }
html[data-theme="light"] .hm-meter { background: var(--surface-3); }
.hm-meter > i { background: linear-gradient(90deg, #3EDBB0, #FFC45C); min-width: 10px; }
.hm-meter.zero > i { position: relative; overflow: hidden; }
.hm-meter.zero > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: hmShine 2.2s ease-in-out infinite; }
@keyframes hmShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.view:has(> .hm-quick) { min-height: calc(100vh - 62px - var(--safe-t, 0px)); min-height: calc(100dvh - 62px - var(--safe-t, 0px)); }
.hm-quick { flex: 1 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(96px, 1fr); gap: 10px; min-height: 96px; }
.hq { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 4px;
  border: 0; border-radius: 22px; color: #fff; font: inherit; cursor: pointer; max-height: 190px;
  box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .25); transition: transform .15s var(--ease-out, ease); }
.hq:active { transform: scale(.94); }
.hq::after { content: ""; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 65%); pointer-events: none; }
.hq b { font-size: min(13px, 3.25vw); font-weight: 900; line-height: 1.15; text-align: center; white-space: nowrap; letter-spacing: -.01em; position: relative; z-index: 1; max-width: 100%; }
.hq-art { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); position: relative; z-index: 1; }
.hq-art .ic { width: 26px; height: 26px; }
.hq-art .hq-lori { width: 46px; height: 46px; }
.hq-art .hq-lori svg { width: 100%; height: 100%; }
.hq-a { background: linear-gradient(150deg, #8B2FD9, #C2268E); }
.hq-b { background: linear-gradient(150deg, #13A889, #2A7FD6); }
.hq-c { background: linear-gradient(150deg, #F2994A, #E0457B); }
.hq-d { background: linear-gradient(150deg, #4F5BD5, #8B2FD9); }
.hq.is-locked .hq-art { opacity: .8; }
.hq-lock { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .3); z-index: 1; }
.hq-lock .ic { width: 13px; height: 13px; }
.hq-a .hq-art { animation: hqBob 3.2s ease-in-out infinite; }
@keyframes hqBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (min-height: 900px) { .hq-art { width: 58px; height: 58px; } }
@media (max-width: 359px) { .hm-quick { gap: 8px; } .hq-art { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .hm-meter.zero > i::after, .hq-a .hq-art { animation: none; } }
html.lite .hm-meter.zero > i::after, html.lite .hq-a .hq-art { animation: none; }
.gt-dress { background: linear-gradient(140deg, #F2994A, #E0457B); }
.gt-rank { background: linear-gradient(140deg, #B8860B, #E5A93C); }
.gt-ic { display: grid; place-items: center; border-radius: 18px; background: rgba(255, 255, 255, .2); }
.gt-ic .ic { width: 30px; height: 30px; }
.gt-ico.mascot svg { width: 100%; height: 100%; }

/* rd3: tab bar sits at the very bottom — labels may use the upper part of the home-indicator area (like native tab bars), no dead band */
.tabbar.tabbar4 { padding-bottom: max(4px, calc(var(--safe-b) - 20px)); }
.tabbar.tabbar4 .tab-btn { min-height: 48px; }
.tabbar.tabbar4 .tab-btn span { white-space: nowrap; }

/* ===== rd9 (iPhone review): bottom bar rebuilt — 4 equal columns, one fixed row, the bar's own background under the home indicator ===== */
:root { --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-sb, 0px), calc(var(--tg-safe-area-inset-bottom, 0px) + var(--tg-content-safe-area-inset-bottom, 0px))); --tab-h: 64px; }
.tabbar.tabbar4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; box-sizing: border-box;
  left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 560px;
  padding: 3px max(6px, env(safe-area-inset-right, 0px)) max(4px, var(--safe-b)) max(6px, env(safe-area-inset-left, 0px));
}
.tabbar.tabbar4 .tab-btn { height: 56px; min-height: 56px; padding: 0 2px; margin: 0; gap: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; }
.tabbar.tabbar4 .tab-btn .ic { box-sizing: border-box; width: 52px; height: 30px; flex: 0 0 30px; padding: 4px 15px; border-radius: 15px; background: transparent; box-shadow: none; }
.tabbar.tabbar4 .tab-btn.active .ic { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(194, 38, 142, .35); }
.tabbar.tabbar4 .tab-btn span { display: block; height: 16px; font-size: 12px; line-height: 16px; white-space: nowrap; overflow: visible; }
@media (max-width: 340px) { .tabbar.tabbar4 .tab-btn span { font-size: 11px; } .tabbar.tabbar4 .tab-btn .ic { width: 46px; padding: 4px 12px; } }

/* ===== rd9: home fits the screen above the bar — homefit.js adds .hm-c1 / .hm-c2 only when the tiles would end behind the bar ===== */
html.hm-c1 .view:has(> .hm-quick) { gap: 10px; }
html.hm-c1 .hm-lori.mascot { width: 60px; height: 60px; flex-basis: 60px; }
html.hm-c1 .hm-bubble { margin-bottom: 6px; padding: 8px 12px; }
html.hm-c1 .hm-bubble b { font-size: 16px; }
html.hm-c1 .hm-bubble span { font-size: 13px; }
html.hm-c1 .hm-hero { padding: 14px; gap: 6px; }
html.hm-c1 .hm-title { margin-top: 2px; font-size: clamp(20px, 5.8vw, 24px); }
html.hm-c1 .hm-go { min-height: 52px; margin-top: 2px; }
html.hm-c1 .hm-course { min-height: 32px; }
html.hm-c1 .hm-pill { min-height: 26px; padding: 3px 10px; }
html.hm-c1 .hm-day { padding: 9px 12px; }
html.hm-c1 .hm-ring.ring { width: 50px; height: 50px; flex-basis: 50px; }
html.hm-c1 .hm-word { padding: 9px 12px; }
html.hm-c1 .hm-word-say { width: 44px; height: 44px; flex-basis: 44px; }
html.hm-c1 .hm-word-ic { width: 38px; height: 38px; flex-basis: 38px; }
html.hm-c1 .hm-quick { grid-auto-rows: minmax(84px, 1fr); min-height: 84px; gap: 8px; }
html.hm-c1 .hq { gap: 6px; padding: 8px 4px; }
html.hm-c1 .hq-art { width: 42px; height: 42px; border-radius: 14px; }
html.hm-c3 .hm-hello { display: none; }
html.hm-c2 .view:has(> .hm-quick) { gap: 8px; }
html.hm-c2 .hm-hero { padding: 12px 14px; gap: 5px; }
html.hm-c2 .hm-go { min-height: 48px; font-size: 17px; }
html.hm-c2 .hm-day { padding: 6px 12px; }
html.hm-c2 .hm-ring.ring { width: 44px; height: 44px; flex-basis: 44px; }
html.hm-c2 .hm-word { padding: 6px 12px; }
html.hm-c2 .hm-word-ic { width: 34px; height: 34px; flex-basis: 34px; }
html.hm-c2 .hm-word-say { width: 42px; height: 42px; flex-basis: 42px; }
html.hm-c2 .hm-word-w { font-size: 17px; }
html.hm-c2 .hm-quick { grid-auto-rows: minmax(72px, 1fr); min-height: 72px; }
html.hm-c2 .hq { gap: 4px; padding: 6px 4px; }
html.hm-c2 .hq-art { width: 36px; height: 36px; border-radius: 12px; }
html.hm-c2 .hq-art .ic { width: 22px; height: 22px; }
html.hm-c2 .hq-art .hq-lori { width: 38px; height: 38px; }
/* rd10: very short in-app viewports (Telegram / MAX with their header, down to ~560 px) */
html.hm-c4 .hm-sub { display: none; }
html.hm-c4 .hm-go { min-height: 46px; }
html.hm-c4 .hm-day, html.hm-c4 .hm-word { padding: 4px 12px; }
html.hm-c4 .hm-ring.ring { width: 40px; height: 40px; flex-basis: 40px; }
html.hm-c4 .hm-word-say { width: 40px; height: 40px; flex-basis: 40px; }
html.hm-c4 .hm-word-k { font-size: 10.5px; }
html.hm-c4 .hm-quick { grid-auto-rows: minmax(64px, 1fr); min-height: 64px; }
html.hm-c4 .hq-art { width: 32px; height: 32px; border-radius: 11px; }
html.hm-c4 .hq-art .ic { width: 20px; height: 20px; }
html.hm-c4 .hq-art .hq-lori { width: 32px; height: 32px; }
html.hm-c5 .hm-top .hm-pill { display: none; }
html.hm-c5 .hm-hero { padding: 10px 12px; gap: 4px; }
html.hm-c5 .hm-title { font-size: 19px; }
html.hm-c5 .hm-day-t span { display: none; }
html.hm-c5 .hm-word-r { font-size: 12px; }

/* rd10: page titles — Лори's hat / crown above the small title mascot is never cut by the sticky top bar */
.view > .screen-head:first-child { padding-top: 18px; }
/* rd10: «Игры» / «Слова дня» fill the screen on tall phones — the fun tiles grow instead of leaving a band above the bar */
.view:has(> .gt-grid:last-child) { min-height: calc(100vh - 62px - var(--safe-t, 0px)); min-height: calc(var(--tg-vh, 100dvh) - 62px - var(--safe-t, 0px)); }
.view > .gt-grid:last-child { flex: 1 0 auto; grid-auto-rows: minmax(132px, 1fr); }
.view > .gt-grid:last-child .gt-tile { max-height: 260px; }

/* navpin 2026-10-12: iOS rubber-band/overscroll must not drag the fixed bottom nav */
html, body { overscroll-behavior-y: none; }
html { height: 100%; background: var(--bg); }
.tabbar.tabbar4 { transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); will-change: transform; }

/* Compact muted footer for legal links, receipts, and seller requisites at the very bottom */
.pf-legal-foot {
  margin-top: 14px; padding: 10px 6px 4px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--muted); font-size: 11.5px; line-height: 1.4; opacity: .78;
}
.pf-legal-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px;
}
.pf-legal-a {
  background: none; border: 0; padding: 2px 3px; margin: 0; font: inherit;
  font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, .22);
}
html[data-theme="light"] .pf-legal-a { text-decoration-color: rgba(0, 0, 0, .22); }
.pf-legal-a:hover, .pf-legal-a:active { color: var(--ink); opacity: 1; }
.pf-legal-owner {
  font-size: 10.5px; color: var(--muted); opacity: .72; margin-top: 2px;
}
