.howto-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1rem 1rem 3.5rem;
}

.howto-hero {
  margin-top: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 24px;
  background: linear-gradient(130deg, rgba(99, 102, 241, 0.18), rgba(236, 72, 153, 0.12));
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.2), transparent 30%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.hero-label {
  width: fit-content;
  margin: 0;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4338ca;
  background: rgba(255, 255, 255, 0.6);
}

.howto-hero h1 {
  margin: 0.8rem 0 0.6rem;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.2;
}

.hero-subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--color-text);
  line-height: 1.8;
  font-size: 1rem;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.howto-search {
  margin-top: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.howto-search-copy h2 {
  margin: 0;
  font-size: 1.12rem;
}

.howto-search-copy p {
  margin: 0.35rem 0 0;
  color: var(--color-text-secondary);
}

.howto-search-form {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
}

.howto-search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--color-text);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.howto-search-form input[type="search"]:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.55);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.howto-search-status {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.howto-empty {
  margin-top: 1rem;
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem;
}

.howto-empty h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.howto-empty p {
  margin: 0;
  color: var(--color-text-secondary);
}

.guides-section {
  margin-top: 1.25rem;
}

.guides-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.guides-head p {
  margin: 0.45rem 0 0;
}

.howto-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.howto-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  transition: all var(--transition-base);
}

.howto-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-xl);
}

.howto-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.howto-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.13);
  color: #4338ca;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.howto-dept {
  color: var(--color-text-tertiary);
  font-size: 0.72rem;
  text-align: right;
}

.howto-card h2 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.35;
}

.howto-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.howto-meta span {
  color: var(--color-text-tertiary);
  font-size: 0.78rem;
}

.howto-read {
  color: #4f46e5;
  font-weight: 600;
  margin-top: auto;
}

.howto-note {
  margin-top: 1.2rem;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 14px;
  padding: 1rem;
}

.howto-note h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.howto-note p {
  margin: 0;
  font-size: 0.92rem;
}

.guide-hero {
  margin-top: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(16, 185, 129, 0.12));
  box-shadow: var(--shadow-lg);
  padding: clamp(1rem, 2.7vw, 1.8rem);
}

.guide-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.guide-time {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.guide-hero h1 {
  margin: 0.75rem 0 0.45rem;
  font-size: clamp(1.55rem, 3.5vw, 2.3rem);
  line-height: 1.25;
}

.guide-hero p {
  margin: 0;
  color: var(--color-text);
  line-height: 1.8;
}

.guide-highlights {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.guide-highlights span {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.8rem;
}

.guide-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.guide-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 0.95rem 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.5);
}

.guide-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
}

.guide-card ul,
.guide-card ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.guide-card li {
  margin-bottom: 0.3rem;
}

.guide-card a {
  color: #4f46e5;
  font-weight: 600;
}

.faq-section {
  margin-top: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
}

.faq-section h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 0.75rem;
  background: var(--color-bg-secondary);
}

.faq-item h4 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
}

.faq-item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
}

.guide-bottom-nav {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.reveal-card {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 0.55s ease forwards;
}

.howto-grid .reveal-card:nth-child(2) { animation-delay: 0.05s; }
.howto-grid .reveal-card:nth-child(3) { animation-delay: 0.1s; }
.howto-grid .reveal-card:nth-child(4) { animation-delay: 0.15s; }
.howto-grid .reveal-card:nth-child(5) { animation-delay: 0.2s; }
.howto-grid .reveal-card:nth-child(6) { animation-delay: 0.25s; }
.howto-grid .reveal-card:nth-child(7) { animation-delay: 0.3s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .guide-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .howto-container {
    padding: 0.8rem 0.85rem 2.5rem;
  }

  .howto-search-form {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .guide-bottom-nav {
    flex-direction: column;
  }

  .hero-actions a,
  .howto-search-form .btn-primary,
  .howto-search-form .btn-outline,
  .guide-bottom-nav a {
    width: 100%;
    text-align: center;
  }

  .howto-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}
