/* 7Я — Семейный планировщик. Палитра Концепта 2 v2 (тёплая). */
:root {
  --bg:        #FBF6EE;  /* cream фон */
  --surface:  #FFFFFF;
  --soft:     #F7F1E6;
  --stone:    #EBE3D7;
  --stone-d:  #D2C6B4;
  --ink:      #3D352E;   /* warm charcoal */
  --slate:    #8A7969;   /* warm taupe */
  --accent:   #ED7A5C;   /* persiko-terracotta */
  --accent-d: #D85F40;
  --ok:       #2D8C5A;

  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; min-height: 100vh; overscroll-behavior: none; }
body { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }

#app { max-width: 480px; margin: 0 auto; padding: 24px 20px 32px; }

/* === HOME === */
.hero { margin: 8px 0 24px; }
.brand { font-family: 'Inter', sans-serif; font-weight: 900; font-size: 42px; letter-spacing: -0.03em; line-height: 1; margin: 0; }
.brand .accent { color: var(--accent); }
.greeting { color: var(--slate); font-size: 15px; font-weight: 500; margin: 8px 0 0; }

.card-next {
  background: var(--ink); color: #FBF6EE;
  padding: 24px;
  border-radius: var(--r-l);
  margin: 24px 0 18px;
  position: relative;
}
.card-next .eyebrow { display: block; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.card-next .next-time { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.card-next .next-title { font-size: 20px; font-weight: 700; margin-top: 6px; }
.card-next .next-sub { color: rgba(251,246,238,.6); font-size: 13px; margin-top: 4px; }

.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.mod {
  background: var(--soft);
  border: 1px solid var(--stone);
  border-radius: var(--r-m);
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 4px;
  text-decoration: none; color: var(--ink);
  position: relative;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.mod:active { transform: scale(.98); }
.mod .mod-title { font-weight: 700; font-size: 15px; }
.mod .mod-count { color: var(--slate); font-size: 13px; }
.mod .mod-dot { position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0.55; }
.mod .mod-dot.accent { background: var(--accent); opacity: 1; }

/* === FAB голосового помощника === */
.voice-fab {
  position: fixed; right: 20px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ink); color: var(--accent);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(61,53,46,.25);
  z-index: 50;
}
.voice-fab:active { transform: scale(.95); }

/* === TABBAR === */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(251,246,238,.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--stone);
  display: flex; justify-content: space-around; align-items: center;
  height: var(--tabbar-h);
  padding-bottom: var(--safe-bottom);
  z-index: 40;
}
.tab { color: var(--slate); font-size: 13px; font-weight: 600; text-decoration: none; padding: 8px 6px; cursor: pointer; }
.tab.active { color: var(--accent); }

/* === Подэкраны (заглушки) === */
.screen-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.screen-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.back { background: var(--soft); border: 1px solid var(--stone); width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.placeholder { color: var(--slate); font-size: 15px; line-height: 1.5; padding: 24px; background: var(--soft); border-radius: var(--r-m); border: 1px dashed var(--stone-d); }

/* === AUTH === */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { text-align: center; padding: 56px 0 24px; }
.auth-brand { font-size: 56px; }
.auth-tagline { color: var(--slate); font-size: 14px; margin-top: 4px; }
.auth-card { background: var(--surface); border: 1px solid var(--stone); border-radius: var(--r-l); padding: 28px 24px; margin-top: 16px; box-shadow: 0 8px 24px rgba(61,53,46,.04); }
.auth-card h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }
.auth-hint { color: var(--slate); font-size: 13px; margin: 0 0 18px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.inp { width: 100%; box-sizing: border-box; padding: 14px 16px; background: var(--soft); border: 1px solid var(--stone); border-radius: var(--r-m); font-size: 16px; color: var(--ink); font-family: inherit; outline: none; transition: border-color .15s; }
.inp:focus { border-color: var(--accent); }
.code-inp { letter-spacing: 0.6em; text-align: center; font-weight: 700; font-size: 22px; }
.btn-primary { width: 100%; margin-top: 16px; padding: 14px; background: var(--ink); color: var(--bg); border: none; border-radius: var(--r-m); font-size: 16px; font-weight: 700; cursor: pointer; transition: transform .15s; }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { width: 100%; margin-top: 10px; padding: 12px; background: transparent; color: var(--slate); border: none; font-size: 14px; cursor: pointer; }
.auth-foot { color: var(--slate); font-size: 12px; margin-top: 18px; text-align: center; }
.ob-sep { display: flex; align-items: center; gap: 10px; color: var(--slate); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin: 22px 0 12px; }
.ob-sep::before, .ob-sep::after { content: ""; flex: 1; height: 1px; background: var(--stone); }
.ob-sep span { white-space: nowrap; }

/* === CALENDAR === */
.cal-nav { margin-left: auto; display: flex; gap: 6px; }
.cal-arrow { width: 32px; height: 32px; border-radius: 8px; background: var(--soft); border: 1px solid var(--stone); font-size: 18px; color: var(--ink); cursor: pointer; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; color: var(--slate); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.cal-weekdays span { text-align: center; padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 18px; }
.cal-cell { aspect-ratio: 1/1; background: var(--soft); border: 1px solid transparent; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--ink); position: relative; font-family: inherit; }
.cal-cell .cd { font-size: 13px; font-weight: 600; }
.cal-cell .cdot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal-cell.mute { color: var(--stone-d); background: transparent; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.today .cd { color: var(--accent); font-weight: 800; }
.cal-cell.sel { background: var(--ink); color: var(--bg); }
.cal-cell.sel .cd { color: var(--bg); }
.cal-cell.sel .cdot { background: var(--bg); }
.cal-day-events { background: var(--surface); border: 1px solid var(--stone); border-radius: var(--r-m); padding: 18px; }
.cal-day-events h3 { font-size: 15px; font-weight: 700; margin: 0 0 12px; }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-day-head h3 { margin: 0; }
.btn-add { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-add:active { background: var(--accent-d); }
.ev-sub { color: var(--slate); font-size: 12px; margin-top: 2px; }
.cal-day-events .empty { color: var(--slate); font-size: 13px; margin: 0; }
.ev { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--soft); }
.ev:first-of-type { border-top: none; padding-top: 0; }
.ev-time { font-weight: 700; color: var(--accent); font-size: 14px; min-width: 50px; }
.ev-title { font-size: 14px; font-weight: 600; }
.ev-sub { font-size: 12px; color: var(--slate); margin-top: 2px; }
