/* ══════════════════════════════════════════════════════════
   HOME PAGE
   ══════════════════════════════════════════════════════════ */
.home-hero {
  padding: var(--sp-8) var(--sp-5) var(--sp-6);
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.home-hero .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  box-shadow: 0 4px 16px rgba(37,99,235,.3);
}
.home-hero .brand-mark svg { width: 28px; height: 28px; color: white; }
.home-greeting {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}
.home-subtitle {
  font-size: var(--fs-sm);
  color: var(--hint);
  line-height: var(--lh-relaxed);
}

/* Primary CTA */
.cta-chat {
  margin: 0 var(--sp-5) var(--sp-6);
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: white;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  box-shadow: 0 4px 20px rgba(37,99,235,.25);
  border: none;
  width: calc(100% - var(--sp-10));
  text-align: left;
}
.cta-chat:active { transform: scale(.97); box-shadow: 0 2px 12px rgba(37,99,235,.3); }
.cta-chat .cta-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cta-chat .cta-icon svg { width: 22px; height: 22px; }
.cta-chat .cta-text h3 { font-size: var(--fs-base); font-weight: var(--fw-semibold); margin-bottom: 2px; }
.cta-chat .cta-text p { font-size: var(--fs-xs); opacity: .8; font-weight: var(--fw-regular); }

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-6);
}
.feature-card {
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4);
  cursor: pointer;
  transition: transform .15s var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.feature-card:active { transform: scale(.96); }
.feature-card .fc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.fc-blue { background: var(--blue-soft); }
.fc-sage { background: var(--sage-soft); }
.fc-amber { background: var(--amber-soft); }
.fc-red { background: var(--red-soft); }
.feature-card .fc-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}
.feature-card .fc-desc {
  font-size: var(--fs-xs);
  color: var(--hint);
  line-height: var(--lh-normal);
  margin-top: -4px;
}

/* Bottom Links */
.home-links {
  padding: 0 var(--sp-5) var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 560px;
  margin: 0 auto;
}
.home-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--section-bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  color: var(--text);
  text-align: left;
  transition: background .15s var(--ease);
}
.home-link:active { background: var(--bg2); }
.home-link .hl-icon { font-size: 18px; width: 24px; text-align: center; }
.home-link .hl-text { flex: 1; font-size: var(--fs-sm); font-weight: var(--fw-medium); }
.home-link .hl-arrow { color: var(--hint); font-size: var(--fs-sm); }

/* Section Label */
.section-label {
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-3);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--hint);
  text-transform: uppercase;
  letter-spacing: 0;
}

/* Top conversion CTAs */
.top-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  padding: 0 var(--sp-5) var(--sp-6);
  max-width: 560px;
  margin: 0 auto;
}
.top-cta {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-radius: var(--r-lg);
  text-align: center;
  color: white;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.top-cta:active { transform: scale(.98); }
.top-cta-ai {
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  box-shadow: 0 10px 28px rgba(37,99,235,.24);
}
.top-cta-promo {
  background: linear-gradient(135deg, #059669, #0E7490);
  box-shadow: 0 10px 28px rgba(5,150,105,.2);
}
.top-cta-grid .top-cta-promo {
  min-height: 86px;
  flex-direction: row;
  justify-content: center;
  text-align: left;
}
.top-cta-grid .top-cta-promo .top-cta-copy { align-items: flex-start; width: auto; }
.top-cta-grid .top-cta-promo .top-cta-copy strong { font-size: var(--fs-md); }
.top-cta-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.18);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}
.ai-sparkle-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask: url("../ai-sparkles.svg") center / contain no-repeat;
  mask: url("../ai-sparkles.svg") center / contain no-repeat;
}
.top-cta-icon.ai-sparkle-icon {
  color: white;
  font-size: 0;
}
.top-cta-copy { display: flex; flex-direction: column; align-items: center; width: 100%; }
.top-cta-copy strong { font-size: var(--fs-base); line-height: var(--lh-tight); text-align: center; }

/* Reusable AI CTA */
.ai-chat-cta {
  width: 100%;
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: white;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  text-align: center;
  box-shadow: 0 8px 22px rgba(37,99,235,.22);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s var(--ease);
}
.ai-chat-cta:active {
  transform: scale(.98);
  filter: brightness(.95);
  box-shadow: 0 4px 14px rgba(37,99,235,.24);
}
.ai-chat-cta-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,.18);
  color: white;
}
.ai-chat-cta-icon::before {
  width: 22px;
  height: 22px;
}
.ai-cta-slot { width: 100%; }
.page-ai-cta {
  padding: 0 var(--sp-5) var(--sp-8);
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 360px) {
  .top-cta-grid { grid-template-columns: 1fr; }
}

.tab-page-pad {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--sp-6) + env(safe-area-inset-top, 0px)) var(--sp-5) calc(148px + env(safe-area-inset-bottom, 0px));
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
.meeting-calendar-widget {
  min-height: 286px;
  margin: 0 0 var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid #E5E7EB;
  border-radius: var(--r-lg);
  background: #FFFFFF;
  color: #111827;
  box-shadow: var(--shadow-sm);
}
.meeting-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.meeting-calendar-head div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meeting-calendar-head span {
  color: #DC2626;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
}
.meeting-calendar-head strong {
  font-size: var(--fs-lg);
  line-height: var(--lh-tight);
}
.meeting-calendar-head time {
  max-width: 42%;
  color: #4B5563;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  text-align: right;
  text-transform: capitalize;
}
.meeting-weekdays,
.meeting-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.meeting-weekdays {
  margin-bottom: var(--sp-2);
  color: #64748B;
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-align: center;
  text-transform: uppercase;
}
.meeting-month-grid {
  gap: 5px;
}
.meeting-day {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  color: #111827;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.meeting-day:active { transform: scale(.94); }
.meeting-day.is-empty { pointer-events: none; }
.meeting-day.is-today:not(.is-selected) {
  background: #F3F4F6;
}
.meeting-day.has-event {
  color: #DC2626;
}
.meeting-day.has-event::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: var(--r-full);
  background: #DC2626;
  transform: translateX(-50%);
}
.meeting-day.is-selected {
  background: #DC2626;
  color: #FFFFFF;
}
.meeting-day.is-selected::after {
  background: #FFFFFF;
}
.meeting-agenda {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid #E5E7EB;
}
.meeting-agenda-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}
.meeting-agenda-time {
  padding-top: 2px;
  color: #DC2626;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
}
.meeting-agenda-copy strong {
  display: block;
  font-size: var(--fs-sm);
  line-height: var(--lh-tight);
}
.meeting-agenda-copy p {
  margin-top: 3px;
  color: #64748B;
  font-size: var(--fs-xs);
  line-height: var(--lh-normal);
}
.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.meeting-telegram-btn,
.meeting-open-btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}
.meeting-telegram-btn {
  background: #E0F2FE;
  color: #0369A1;
}
.meeting-telegram-btn.is-saved {
  background: #DCFCE7;
  color: #166534;
}
.meeting-telegram-btn.is-error {
  background: #FEE2E2;
  color: #B91C1C;
}
.meeting-open-btn {
  background: #EEF2FF;
  color: #3730A3;
}
.meeting-empty {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  font-size: var(--fs-xs);
  text-align: center;
}
.tool-card {
  min-width: 0;
  aspect-ratio: 1 / .82;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--section-bg);
  color: var(--text);
  text-align: left;
  transition: transform .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.tool-card:active {
  transform: scale(.98);
  background: var(--bg2);
}
.tool-card-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
}
.tool-card:nth-child(2) .tool-card-icon { background: var(--sage-soft); color: var(--sage); }
.tool-card:nth-child(3) .tool-card-icon { background: var(--amber-soft); color: var(--amber); }
.tool-card:nth-child(4) .tool-card-icon { background: rgba(14,116,144,.12); color: #0E7490; }
.tool-card-icon svg,
.profile-action-icon svg,
.document-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-card > span:last-child {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}
@media (max-width: 340px) {
  .tool-grid { gap: var(--sp-2); }
  .tool-card { padding: var(--sp-3); }
}

