/* ═══════════════════════════════════════════════════════════════════════
   Web Tools Suite — Home Page & Tools Catalog Styles
   ═══════════════════════════════════════════════════════════════════════ */

#home-view {
  overflow-y: auto;
}
.home-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 42px 24px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text);
}
.hero-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.6;
  margin-bottom: 28px;
}
.hero-controls {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}
.search-box {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}
.search-box svg {
  position: absolute;
  left: 14px;
  width: 15px !important;
  height: 15px !important;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  background: var(--btn-bg);
  border: 0 !important;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: box-shadow .15s ease, background .15s ease;
}
.search-box input:focus {
  background: var(--btn-bg);
  box-shadow: 0 0 0 2px var(--tg-url);
}
.search-kbd {
  position: absolute;
  right: 14px;
  font-size: 11px;
  color: var(--muted);
  background: var(--btn-bg-hover);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  pointer-events: none;
}
.hero-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-sm);
  border: 0;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s ease;
  user-select: none;
}
.hero-chip:hover {
  background: var(--chip-bg-hover);
  color: var(--text);
}
.hero-chip:active {
  transform: scale(.98);
}
.hero-chip.on {
  background: var(--tg-url);
  color: #fff !important;
  border: 0;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}
.hero-chip.on:hover {
  background: var(--accent-dark);
}
.hero-chip .hn {
  background: var(--chip-badge-bg);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.hero-chip.on .hn {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}
.hn {
  margin-left: 4px;
  opacity: .85;
  font-size: 11px;
}
.tools-grid-section {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 24px 60px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 22px;
}
.tool-card {
  background: var(--panel);
  border: 0 !important;
  border-radius: 18px;
  display: flex;
  flex-direction: row;
  min-height: 185px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .22s ease;
  position: relative;
  overflow: hidden;
  user-select: none;
}
.tool-card.active-tool {
  cursor: pointer;
}
.tool-card.active-tool:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 14px 28px -10px rgba(0, 0, 0, 0.22);
}
.tool-card.planned-tool {
  opacity: .75;
}

/* Landscape poster visual block */
.tc-poster {
  width: 175px;
  min-width: 175px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.tc-poster-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.28) 0%, transparent 72%);
  pointer-events: none;
}
.tc-poster-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transition: transform .28s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 1;
}
.tool-card:hover .tc-poster-icon {
  transform: scale(1.1);
}
.tc-poster-icon svg {
  width: 30px !important;
  height: 30px !important;
  stroke-width: 2.2;
}

/* Poster theme gradients */
.tc-poster.tc-icon-tg {
  background: linear-gradient(135deg, #1d90d9 0%, #229ed9 45%, #2aabee 100%);
}
.tc-poster.tc-icon-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 45%, #06b6d4 100%);
}
.tc-poster.tc-icon-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
}
.tc-poster.tc-icon-purple {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
}
.tc-poster.tc-icon-blue {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
}
.tc-poster.tc-icon-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
}

/* Landscape poster content info */
.tc-info {
  flex: 1;
  min-width: 0;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.tc-info-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tc-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -.01em;
}
.tc-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tc-info-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.tc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.tc-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  background: var(--btn-bg);
  border: 0 !important;
  border-radius: 6px;
  color: var(--muted);
}
.tc-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--tg-url);
  color: #fff;
  border: 0 !important;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  transition: all .16s ease;
  white-space: nowrap;
  margin-left: auto;
}
.tool-card:hover .tc-open-btn {
  background: var(--accent-dark);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  transform: translateX(2px);
}
.tc-open-btn svg {
  width: 14px !important;
  height: 14px !important;
  transition: transform .16s ease;
}
.tool-card:hover .tc-open-btn svg {
  transform: translateX(2px);
}
.tc-planned-lbl {
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  margin-left: auto;
}

/* ── Home Responsive Rules ─────────────────────────────────────── */
@media (max-width: 850px) {
  .home-hero {
    padding: 24px 14px 16px;
  }
  .hero-title {
    font-size: 26px;
    line-height: 1.25;
  }
  .hero-desc {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .search-box input {
    font-size: 13px;
    padding: 10px 14px 10px 36px;
  }
  .search-box svg { left: 10px; }
  .search-kbd { display: none; }
  .hero-chips {
    justify-content: flex-start;
    overflow-x: auto;
    width: 100%;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .hero-chip {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11px;
    padding: 5px 11px;
  }
  .tools-grid-section {
    padding: 12px 14px 36px;
  }
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .tool-card {
    border-radius: 16px;
  }
}

@media (max-width: 640px) {
  .tool-card {
    flex-direction: column;
    min-height: auto;
  }
  .tc-poster {
    width: 100%;
    min-width: 100%;
    height: 125px;
  }
  .tc-info {
    padding: 16px;
  }
}
