/* ---------- базовый reset и типографика ---------- */
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Arial,Helvetica,sans-serif;
  color:#111827;background:#f6f7fb;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
a{color:#111827;text-decoration:none}
a:hover{text-decoration:underline}

/* контейнер и карточки */
.container{max-width:1100px;margin:0 auto;padding:0 18px}
.bg-white{background:#fff}
.rounded-xl{border-radius:16px}
.shadow{box-shadow:0 8px 22px rgba(17,24,39,.08)}
.p-6{padding:24px}
.p-4{padding:16px}
.mt-2{margin-top:8px}.mt-3{margin-top:12px}.mt-4{margin-top:16px}.mt-5{margin-top:20px}.mt-6{margin-top:24px}
.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}.mb-5{margin-bottom:20px}.mb-6{margin-bottom:24px}
.divide-y>*+*{border-top:1px solid #eceff3}

/* заголовки */
h1,h2,h3{margin:0 0 10px 0;color:#0f172a}
h1{font-size:28px;font-weight:800}
h2{font-size:20px;font-weight:700}
h3{font-size:17px;font-weight:700}

.text-sm{font-size:14px}
.muted{color:#6b7280}

/* кнопки */
.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:12px;border:0;cursor:pointer}
.btn-primary{background:#111827;color:#fff}
.btn-light{background:#f3f4f6;color:#111827}

/* формы */
input,select,textarea{font-size:16px}
input[type="text"],input[type="date"],select,textarea{
  width:100%;padding:10px 12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff
}
label{font-size:14px;color:#374151;display:block;margin-bottom:6px}

/* чекбокс крупный и по линии с текстом */
input[type="checkbox"]{width:20px;height:20px;vertical-align:middle;accent-color:#111827}

/* навигация */
/* навигация */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid #eceff3;
}

.header-inner {
  display: flex;
  align-items: center;   /* выравнивание по центру по вертикали */
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
}

.brand {
  font-weight: 900;
  font-size: 22px;
  margin: 0;
  line-height: 1.2;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  padding: 6px 0;
  border-radius: 8px;
  font-size: 15px;
  color: #111827;
}

.nav a:hover {
  background: #f3f4f6;
}
.site-main{padding:18px 0 90px}

/* нижняя моб. панель */
.mobile-tabbar{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #eceff3;
  display:flex;justify-content:space-around;gap:8px;padding:10px 12px;z-index:35}
.mobile-tabbar a{flex:1;text-align:center;padding:10px;border-radius:12px}
.mobile-tabbar a:active{background:#f3f4f6}

/* ---------- дерево целей ---------- */
.goal-card{padding:18px 0}

/* строки внутри карточки */
.row{display:flex;align-items:flex-start;gap:10px}
.row-right{margin-left:auto}

/* заголовки и мета */
.title-lg{font-size:18px;font-weight:700;line-height:1.4}
.title-md{font-size:16px;font-weight:600;line-height:1.4}
.meta{font-size:14px;color:#6b7280;margin-top:4px}

/* визуальные уровни */
.level{position:relative;margin-top:10px}
.level-inner{padding-left:18px;border-left:2px dashed #e5e7eb}
.level .level{margin-top:8px}
.level .level-inner{padding-left:18px}

/* элементы списка недельных целей */
.week-item{display:flex;align-items:flex-start;gap:10px;margin-top:8px}
.week-item .check{margin-top:2px}

/* разрыв между блоками целей */
.block-space{margin-top:12px}

/* на маленьких экранах немного сжимаем */
@media (max-width:920px){
  .nav{display:none}
  .site-main{padding-bottom:100px}
}
/* выполненные пункты в отчёте недели */
.done { text-decoration: line-through; color:#6b7280; }

/* ====== My Month page layout helpers ====== */
.page-header{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.grid-two{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:18px;
}

/* Мобильный вид */
@media (max-width: 640px){
  h1{font-size:28px;line-height:1.2;margin:0}
  .page-header{flex-direction:column;align-items:flex-start;gap:12px}
  .page-header .btn{width:100%;text-align:center;padding:12px 14px}
  .grid-two{display:block}
  .grid-two > section{margin-bottom:14px}
  .soft-card{padding:12px;border-radius:12px}
}

/* универсальные адаптивные утилиты, полезны и дальше */
@media (max-width:640px){
  .w-full-sm{width:100%}
  .stack-sm{display:flex;flex-direction:column;gap:10px}
}

/* По умолчанию скрываем */
.mobile-tabbar {
  display: none;
}

/* На мобильных устройствах показываем */
@media (max-width: 768px) {
  .mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 1000;
  }

  .mobile-tabbar a {
    text-decoration: none;
    color: #111;
    font-size: 0.9rem;
  }
}

/* ==== iOS Safari: убираем раздутые стрелки у select ==== */

/* по умолчанию: любой наш кастомный фон-стрелку прячем */
select {
  background-image: none !important;
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px auto;
  padding-right: 14px; /* чтобы текст не упирался в правый край */
}

/* если есть обёртки с псевдо-стрелкой (часто .select-wrap::after, .form-select::after) — скрываем */
.select-wrap::after,
.form-select::after,
.field-select::after {
  display: none !important;
  content: none !important;
}

/* на iOS используем полностью нативный вид для select */
@supports (-webkit-touch-callout: none) {
  select {
    -webkit-appearance: menulist !important;
            appearance: menulist !important;
    background: none !important;
  }
}

/* на маленьких экранах точно выключаем любые «кастомные стрелки» */
@media (max-width: 768px) {
  select {
    background: none !important;
  }
  .select-wrap::after,
  .form-select::after,
  .field-select::after {
    display: none !important;
  }
}

@media (max-width: 640px) {
  input[type="text"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px;       /* без масштабирования ввода в iOS */
    line-height: 1.3;
  }
}

}

/* ==== УБИРАЕМ ЛЮБЫЕ ЧЕВРОНЫ / СТРЕЛКИ ВНУТРИ ФОРМ ==== */
/* Работает и на десктопе, и на мобильных. */

.site-main form select {
  -webkit-appearance: menulist !important;
          appearance: menulist !important;
  background: none !important;
  background-image: none !important;
  padding-right: 12px;
}

/* Псевдоэлементы любых контейнеров внутри формы */
.site-main form *::before,
.site-main form *::after {
  content: none !important;
  background: none !important;
}

/* Любые элементы, похожие на стрелки/чевроны */
.site-main form [class*="chevron"],
.site-main form [class*="arrow"],
.site-main form .chevron,
.site-main form .chevron-down,
.site-main form .select-arrow {
  display: none !important;
}

/* SVG/картинки-стрелки внутри формы */
.site-main form img[src*="chevron"],
.site-main form img[src*="arrow"],
.site-main form svg[class*="chevron"],
.site-main form svg[class*="arrow"] {
  display: none !important;
}

/* На случай фоновой стрелки на любом потомке формы */
.site-main form * {
  background-image: none !important;
}

/* iOS – строго нативный вид селектов */
@supports (-webkit-touch-callout: none) {
  .site-main form select {
    -webkit-appearance: menulist !important;
            appearance: menulist !important;
    background: none !important;
  }
}

/* на iOS/Safari дополнительно – полностью нативный вид */
@supports (-webkit-touch-callout: none) {
  select {
    -webkit-appearance: menulist !important;
            appearance: menulist !important;
    background: none !important;
  }
}

/* чтобы точно не всплывали кастомные стрелки на узких экранах */
@media (max-width: 1024px) {
  select { background: none !important; }
  .select-wrap::after, .form-select::after, .field-select::after, .form-row::after { display: none !important; }
}

/* резервно отключаем любые стрелки внутри форм в главной области */
.site-main form .pointer-events-none.absolute.inset-y-0.right-0.flex.items-center.px-2.text-gray-700 {
  display: none !important;
}
.site-main form select {
  -webkit-appearance: menulist !important;
          appearance: menulist !important;
  background: none !important;
  background-image: none !important;
  padding-right: 12px;
}
