/* SinoClub — дизайн-система. Токены из макета design_handoff_sinoclub. */
@import url('fonts/fonts.css');

:root {
  /* цвет */
  --paper:      #F4EEE3;   /* фон страницы */
  --paper-lt:   #FFFBF4;   /* карточки */
  --canvas:     #E7DFD2;   /* фон канвы */
  --ink:        #1B1714;   /* текст, тёмные блоки */
  --ink-2:      #4A423B;   /* вторичный */
  --ink-3:      #7A6F65;   /* приглушённый */
  --accent:     #B8321F;   /* красная печать */
  --gold:       #D9AE45;   /* золото — только на тёмном/красном */
  --on-red:     #FFF8EE;   /* текст на красном */
  --line:       #1B17141A;
  --line-2:     #1B17141F;
  --line-3:     #1B171433;
  --on-dark-bg: #F4EEE30F;
  --on-dark-ln: #F4EEE31A;
  --on-dark-tx: #F4EEE3B3;

  /* шрифт */
  --head: 'Literata', Georgia, serif;
  --ui:   'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hz:   'Noto Serif SC', 'Literata', serif;

  /* форма */
  --r-pill: 999px;
  --r-card: 18px;
  --r-sm:   12px;
  --shadow: 0 30px 60px -30px #1B171440;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--head); letter-spacing: -0.022em; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1.02; font-weight: 700; }
h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; font-weight: 700; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 600; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.hz { font-family: var(--hz); }

.overline {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent);
}
.overline .cn { font-family: var(--hz); text-transform: none; letter-spacing: 0; }

/* ——— шапка ——— */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: #F4EEE3F2;
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: 1240px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.seal {
  width: 38px; height: 38px; border-radius: 6px; flex: none;
  background: var(--accent); color: var(--paper);
  font-family: var(--hz); font-weight: 900; font-size: 22px;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px var(--gold);
}
.brand b { font-family: var(--head); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; margin-left: 8px; }
.nav a.on { color: var(--accent); font-weight: 700; }
.header-sp { flex: 1; }

/* ——— кнопки ——— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ui); font-weight: 700; font-size: 15px;
  padding: 13px 24px; border-radius: var(--r-pill);
  border: 1px solid var(--line-3); background: transparent; color: var(--ink);
  cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--on-red); border-color: var(--accent); }
.btn-accent:hover { background: #A32C1B; color: var(--on-red); }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: #000; color: var(--paper); }
.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* ——— карточки ——— */
.card {
  background: var(--paper-lt);
  border: 1px solid var(--line-2);
  border-radius: var(--r-card);
  padding: 20px;
}
.card-dark { background: var(--ink); color: var(--paper); border-color: #0000; }
.card-red  { background: var(--accent); color: var(--on-red); border-color: #0000; }

/* ——— пропись 田字格 ——— */
.tian {
  position: relative; display: grid; place-items: center;
  background: var(--paper-lt);
  border: 1px solid #B8321F40; border-radius: 10px;
}
.tian::before, .tian::after {
  content: ''; position: absolute; background: #B8321F22;
}
.tian::before { left: 0; right: 0; top: 50%; height: 1px; }
.tian::after  { top: 0; bottom: 0; left: 50%; width: 1px; }
.tian > * { position: relative; font-family: var(--hz); line-height: 1; }

/* ——— поля ——— */
select, input[type="text"], input:not([type]) {
  font-family: var(--ui); font-size: 15px; color: var(--ink);
  background: var(--paper-lt);
  border: 1px solid var(--line-3); border-radius: var(--r-sm);
  padding: 10px 12px; max-width: 100%;
}
select:focus, input:focus { outline: 2px solid #B8321F40; outline-offset: 1px; }
label { font-size: 13px; color: var(--ink-3); }

/* ——— вкладки разделов ——— */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.tabs a {
  padding: 10px 18px; border-radius: var(--r-pill);
  border: 1px solid var(--line-3); font-size: 15px; font-weight: 600;
  background: var(--paper-lt);
}
.tabs a .cn { font-family: var(--hz); margin-right: 6px; }
.tabs a.act { background: var(--accent); color: var(--on-red); border-color: var(--accent); }
.tabs a.act:hover { color: var(--on-red); }

/* ——— подвал ——— */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 64px; padding: 28px 0;
  font-size: 14px; color: var(--ink-3);
}
.site-footer .bar {
  max-width: 1240px; margin: 0 auto; padding: 0 32px;
  display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
}

/* ——— рабочая панель внизу (разговор, тоны) ——— */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: #FFFBF4F2; backdrop-filter: blur(8px);
  border-top: 1px solid var(--line-2);
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
}
.dock .row { max-width: 820px; margin: 0 auto; display: flex; gap: 10px; align-items: center; justify-content: center; }
.status { text-align: center; color: var(--ink-3); font-size: 14px; min-height: 22px; padding: 4px 8px; }
.status.live { color: var(--accent); font-weight: 600; }
.wave {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; animation: pulse 1s infinite;
}
@keyframes pulse { 50% { transform: scale(1.7); opacity: .35; } }

.icon-btn {
  width: 52px; height: 52px; flex: none; border-radius: 14px;
  border: 1px solid var(--line-3); background: var(--paper-lt);
  color: var(--ink); font-size: 20px; cursor: pointer;
}
.icon-btn:disabled { opacity: .35; cursor: default; }

@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .site-header .bar { padding: 10px 16px 12px; gap: 10px; flex-wrap: wrap; }
  .nav { display: none; }
  .brand b { font-size: 19px; }
  /* вкладки — отдельным рядом во всю ширину, как таб-бар в макете */
  .tabs { width: 100%; gap: 8px; }
  .tabs a {
    flex: 1; text-align: center; padding: 8px 4px; font-size: 12px;
    font-weight: 700; line-height: 1.2; min-height: 48px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .tabs a .cn { display: block; margin: 0 0 3px; font-size: 19px; font-weight: 400; }
  .site-footer .bar { padding: 0 20px; }
  h3 { font-size: 19px; }
}
