/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/fonts/bricolage-grotesque-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-italic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin */
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/inter-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/inter-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/inter-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/inter-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/inter-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/inter-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/inter-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/source-serif-4-italic-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/source-serif-4-italic-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/source-serif-4-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/source-serif-4-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/source-serif-4-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/source-serif-4-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/source-serif-4-normal-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/fonts/source-serif-4-normal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* PACHKA — client mini-app design tokens */

:root {
  /* Palette — kraft cream base */
  --cream: #F4F0E8;
  --cream-2: #FFFFFF;
  --ink: #14140F;
  --mute: #7A7366;
  --line: #E1DAC8;
  --dash: #BDB4A0;

  /* Brand */
  --violet: #C9A0A8;             /* dusty tulle rose */
  --violet-soft: #E8D0D4;
  --violet-ink: #5A3E45;
  --lime: #DCFA3C;
  --lime-ink: #1E2A00;
  --lime-soft: #EEFFA8;
  --lime-deep: #B8E600;
  --leaf: #4A5D3E;

  /* Lime для текста на инвертированном фоне (chip-bg = var(--fg)).
     В light теме фон такого чипа тёмный — оставляем яркий лайм.
     В dark теме фон чипа = кремовый, яркий лайм на нём сливается,
     поэтому переключаем на тёмно-зелёный leaf. */
  --lime-on-fg: var(--lime);

  /* Roles — remap for theme */
  --bg: var(--cream);
  --bg-2: var(--cream-2);
  --bg-elev-1: #FFFFFF;
  --bg-elev-2: #ECE6D8;
  --fg: var(--ink);
  --fg-2: #2E2E24;
  --fg-mute: var(--mute);
  --fg-dim: #B8B0A0;
  --border: var(--line);
  --border-strong: #BDB4A0;
  --border-dash: var(--dash);
  --card: #FFFFFF;
  --pill: rgba(20,20,15,0.06);
  --pill-border: rgba(20,20,15,0.12);

  --c-alert: #9F3C1D;

  /* Panels that must stay dark in BOTH themes (for lime/violet accent contrast) */
  --panel-bg: #14140F;
  --panel-fg: #F4F0E8;
  --panel-fg-mute: rgba(244,240,232,0.55);
  --panel-border: rgba(244,240,232,0.18);
  --panel-rim: transparent;

  /* Fonts */
  --f-display:  'Bricolage Grotesque', Inter, system-ui, sans-serif;
  --f-serif:    'Instrument Serif', Georgia, serif;
  --f-serif-ed: 'Source Serif 4', Georgia, serif;
  --f-mono:     'JetBrains Mono', ui-monospace, monospace;
  --f-ui:       'Inter', system-ui, sans-serif;

  /* Geometry */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  --eyebrow: 0.22em;
}

[data-theme="dark"] {
  --bg: #14140F;
  --bg-2: #1C1C16;
  --bg-elev-1: #1C1C16;
  --bg-elev-2: #26261E;
  --fg: #F4F0E8;
  --fg-2: #D4CCB6;
  --fg-mute: #9A9080;      /* lifted from #7A7366 for dark-bg readability */
  --fg-dim:  #6A6458;      /* lifted from #4A4840 */
  --border:  #38382E;      /* lifted from #2E2E24 */
  --border-strong: #55554A;
  --border-dash: #44443A;
  --card: #1C1C16;
  --pill: rgba(244,240,232,0.08);
  --pill-border: rgba(244,240,232,0.14);
  --violet-soft: #5A3E45;
  /* В dark-теме fg = кремовый, лайм на нём сливается → leaf. */
  --lime-on-fg: var(--leaf);

  --panel-bg: #1C1C16;
  --panel-fg: #F4F0E8;
  --panel-fg-mute: rgba(244,240,232,0.55);
  --panel-border: rgba(244,240,232,0.12);
  --panel-rim: rgba(244,240,232,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: #14140F;
  font-family: var(--f-ui);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Utility: eyebrow */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: var(--eyebrow);
  text-transform: uppercase;
  color: var(--fg-mute);
}

.eyebrow-ink {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: var(--eyebrow);
  text-transform: uppercase;
  color: var(--fg);
}

.mono { font-family: var(--f-mono); }
.display { font-family: var(--f-display); letter-spacing: -0.02em; }
.serif-it { font-family: var(--f-serif); font-style: italic; letter-spacing: 0; }

/* Ruble sign helper — italic serif glyph overhangs its advance width; add
   right-padding so the tail isn't clipped inside parents with tight
   letter-spacing or overflow:hidden. */
.rub {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  padding-right: 0.12em;
  display: inline-block;
}
.serif-ed { font-family: var(--f-serif-ed); }

/* Dashed divider */
.dashed {
  border: 0;
  border-top: 1px dashed var(--border-dash);
  height: 0;
  margin: 0;
}

/* Corner registration marks */
.reg-mark {
  position: absolute;
  width: 10px; height: 10px;
  color: var(--fg-mute);
}

/* Neon dot */
.brand-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(220,250,60,0.2);
}

.brand-dot.violet {
  background: var(--violet);
  box-shadow: 0 0 0 3px rgba(201,160,168,0.3);
}

/* Hide scrollbars in horizontal scrollers */
.no-scroll::-webkit-scrollbar { display: none; }
.no-scroll { scrollbar-width: none; }

/* Pulse */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}
.pulse { animation: pulse-dot 1.6s ease-in-out infinite; }

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Stage (viewport for mini app) */
.stage {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(201,160,168,0.10), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(220,250,60,0.10), transparent 40%),
    #0A0A08;
}

.device {
  width: 420px;
  max-width: 100%;
  min-height: 900px;
  background: var(--bg);
  color: var(--fg);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 40px 80px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255,255,255,0.06);
}

/* App surface */
.app { position: relative; min-height: 900px; padding-bottom: 96px; }
