/* ============================================================
   工具站内容页皮肤
   教程和联系方式复用主站内容，但视觉回到工具站原有的
   暖白纸底、墨色文字和米色卡片体系。
   ============================================================ */

:root {
  color-scheme: light;
  --bg-primary: #f3eee3;
  --bg-secondary: #fcfaf8;
  --bg-card: #ffffff;
  --bg-glass: rgba(252, 250, 248, 0.86);
  --bg-tertiary: #f3f0ef;
  --border-subtle: rgba(38, 37, 30, 0.1);
  --border-hover: rgba(38, 37, 30, 0.24);
  --accent-primary: #d97e1f;
  --accent-secondary: #b3620f;
  --accent-glow: rgba(217, 126, 31, 0.24);
  --accent-glow-strong: rgba(217, 126, 31, 0.38);
  --accent-subtle: rgba(217, 126, 31, 0.09);
  --color-danger: #c0392b;
  --text-primary: #26251e;
  --text-secondary: #504f49;
  --text-tertiary: #8f8b81;
  --font-body: MiSans, "PingFang SC", -apple-system, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(38, 37, 30, 0.08);
  --shadow-md: 0 12px 32px rgba(38, 37, 30, 0.1);
  --shadow-lg: 0 18px 42px rgba(38, 37, 30, 0.12);
}

html {
  background: #f3eee3;
}

body[data-page="tutorial"],
body[data-page="tutorial-detail"],
body[data-page="contact"] {
  background:
    radial-gradient(ellipse 62% 52% at 32% 10%, rgba(217, 126, 31, 0.16) 0%, transparent 62%),
    radial-gradient(ellipse 48% 42% at 72% 88%, rgba(38, 37, 30, 0.08) 0%, transparent 62%),
    radial-gradient(rgba(38, 37, 30, 0.16) 1.5px, transparent 2.5px),
    #f3eee3;
  background-size: auto, auto, 20px 20px, auto;
  background-attachment: fixed;
  color: var(--text-primary);
}

body[data-page="tutorial"]::before,
body[data-page="tutorial-detail"]::before,
body[data-page="contact"]::before {
  background: transparent;
}

body[data-page="tutorial"] #fx-mask,
body[data-page="tutorial-detail"] #fx-mask,
body[data-page="contact"] #fx-mask {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

body[data-page="tutorial"] main,
body[data-page="tutorial-detail"] main,
body[data-page="contact"] main {
  position: relative;
  z-index: 2;
  flex: 1;
}

body[data-page="tutorial"] .container,
body[data-page="tutorial-detail"] .container,
body[data-page="contact"] .container {
  max-width: 1080px;
  padding-inline: 24px;
}

body[data-page="tutorial"] .nav,
body[data-page="tutorial-detail"] .nav,
body[data-page="contact"] .nav {
  padding: 0;
  background: rgba(252, 250, 248, 0.86);
  border-bottom: 1px solid rgba(38, 37, 30, 0.1);
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body[data-page="tutorial"] .nav-inner,
body[data-page="tutorial-detail"] .nav-inner,
body[data-page="contact"] .nav-inner {
  max-width: 1080px;
  height: 60px;
  padding-inline: 24px;
}

body[data-page="tutorial"] .nav-logo,
body[data-page="tutorial-detail"] .nav-logo,
body[data-page="contact"] .nav-logo {
  gap: 8px;
  color: var(--text-primary);
  line-height: 1;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

body[data-page="tutorial"] .nav-logo .logo-mark,
body[data-page="tutorial-detail"] .nav-logo .logo-mark,
body[data-page="contact"] .nav-logo .logo-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--text-primary);
  color: #fafafa;
  font-size: 14px;
}

body[data-page="tutorial"] .nav-logo-mark,
body[data-page="tutorial-detail"] .nav-logo-mark,
body[data-page="contact"] .nav-logo-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--text-primary);
  color: #fafafa;
  font-size: 14px;
}

body[data-page="tutorial"] .nav-logo-copy,
body[data-page="tutorial-detail"] .nav-logo-copy,
body[data-page="contact"] .nav-logo-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

body[data-page="tutorial"] .nav-logo-copy strong,
body[data-page="tutorial-detail"] .nav-logo-copy strong,
body[data-page="contact"] .nav-logo-copy strong {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

body[data-page="tutorial"] .nav-logo-copy small,
body[data-page="tutorial-detail"] .nav-logo-copy small,
body[data-page="contact"] .nav-logo-copy small {
  color: var(--text-tertiary);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

body[data-page="tutorial"] .nav-links,
body[data-page="tutorial-detail"] .nav-links,
body[data-page="contact"] .nav-links {
  gap: 2px;
}

body[data-page="tutorial"] .nav-link,
body[data-page="tutorial-detail"] .nav-link,
body[data-page="contact"] .nav-link {
  padding: 8px 14px;
  color: #504f49;
  font-size: 15px;
  font-weight: 500;
}

body[data-page="tutorial"] .nav-link::after,
body[data-page="tutorial-detail"] .nav-link::after,
body[data-page="contact"] .nav-link::after {
  left: 4px;
  right: 4px;
  bottom: 2px;
  width: auto;
  height: 2px;
  background: var(--text-primary);
  transform: scaleX(0);
  transform-origin: left;
}

body[data-page="tutorial"] .nav-link:hover,
body[data-page="tutorial"] .nav-link.active,
body[data-page="tutorial-detail"] .nav-link:hover,
body[data-page="tutorial-detail"] .nav-link.active,
body[data-page="contact"] .nav-link:hover,
body[data-page="contact"] .nav-link.active {
  color: var(--text-primary);
  background: transparent;
}

body[data-page="tutorial"] .nav-link:hover::after,
body[data-page="tutorial"] .nav-link.active::after,
body[data-page="tutorial-detail"] .nav-link:hover::after,
body[data-page="tutorial-detail"] .nav-link.active::after,
body[data-page="contact"] .nav-link:hover::after,
body[data-page="contact"] .nav-link.active::after {
  width: auto;
  transform: scaleX(1);
}

body[data-page="tutorial"] .nav-toggle,
body[data-page="tutorial-detail"] .nav-toggle,
body[data-page="contact"] .nav-toggle {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid rgba(38, 37, 30, 0.24);
  border-radius: 8px;
  background: transparent;
}

body[data-page="tutorial"] .nav-toggle span,
body[data-page="tutorial-detail"] .nav-toggle span,
body[data-page="contact"] .nav-toggle span {
  background: var(--text-primary);
}

/* 教程索引 */
.tutorial-index-hero,
.tutorial-detail-hero {
  border-bottom-color: rgba(38, 37, 30, 0.1);
  background:
    radial-gradient(circle at 86% 18%, rgba(217, 126, 31, 0.12), transparent 26rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 62%);
}

.tutorial-index-hero::after,
.tutorial-detail-hero::after {
  border-color: rgba(217, 126, 31, 0.14);
}

.tutorial-index-hero .container,
.tutorial-detail-hero .container {
  padding-top: 24px;
  padding-bottom: 0;
}

.tutorial-breadcrumb,
.page-breadcrumb {
  color: var(--text-tertiary);
}

.tutorial-breadcrumb a,
.page-breadcrumb a {
  color: var(--text-secondary);
}

.tutorial-breadcrumb a:hover,
.page-breadcrumb a:hover {
  color: var(--accent-secondary);
}

.tutorial-overline,
.tutorial-side-kicker,
.tutorial-panel-label,
.contact-kicker {
  color: var(--accent-deep, #b3620f);
}

.tutorial-index-heading {
  gap: 36px;
  padding: 32px 0 40px;
}

.tutorial-index-title,
.tutorial-detail-title {
  color: var(--text-primary);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
}

.tutorial-index-lede {
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 1.6vw, 1.08rem);
  line-height: 1.8;
}

.tutorial-index-stats {
  border-left-color: rgba(38, 37, 30, 0.24);
  color: var(--text-tertiary);
}

.tutorial-index-stats strong {
  color: var(--accent-deep, #b3620f);
  font-size: 2.8rem;
}

.tutorial-index-stats > span,
.tutorial-index-latest,
.tutorial-index-latest time {
  color: var(--text-tertiary);
}

.tutorial-index-latest {
  border-top-color: rgba(38, 37, 30, 0.1);
}

.tutorial-library {
  grid-template-columns: minmax(0, 1fr) 250px;
  max-width: 1080px;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 64px;
}

.tutorial-control-bar {
  padding-bottom: 16px;
}

.tutorial-search-shell {
  max-width: 640px;
  padding: 11px 16px;
  background: #fff;
  border-color: rgba(38, 37, 30, 0.1);
  color: var(--text-tertiary);
  box-shadow: var(--shadow-sm);
}

.tutorial-search-shell:focus-within {
  background: #fff;
  border-color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(38, 37, 30, 0.06);
}

.tutorial-search-shell input {
  color: var(--text-primary);
}

.tutorial-search-shell input::placeholder,
.tutorial-result-summary,
.tutorial-filter-label {
  color: var(--text-tertiary);
}

.tutorial-category-strip {
  border-top-color: rgba(38, 37, 30, 0.1);
  border-bottom-color: rgba(38, 37, 30, 0.1);
}

.tutorial-category-list .filter-btn {
  color: var(--text-secondary);
}

.tutorial-category-list .filter-btn:hover,
.tutorial-category-list .filter-btn.active {
  border-color: rgba(217, 126, 31, 0.3);
  background: rgba(217, 126, 31, 0.09);
  color: var(--accent-deep, #b3620f);
}

.tutorial-results {
  gap: 16px;
  padding-top: 20px;
}

.tutorial-card,
.tutorial-side-card,
.tutorial-related-card,
.tutorial-toc-panel,
.tutorial-block,
.tutorial-article-nav-item {
  background: #fff;
  border-color: rgba(38, 37, 30, 0.1);
  box-shadow: var(--shadow-sm);
}

.tutorial-card {
  min-height: 250px;
  border-radius: 10px;
}

.tutorial-card:hover {
  background: #fff;
  border-color: rgba(38, 37, 30, 0.24);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tutorial-card-number,
.tutorial-side-mark,
.tutorial-empty-mark,
.tutorial-card-arrow,
.tutorial-article-nav-item > span:last-child {
  color: var(--accent-deep, #b3620f);
}

.tutorial-card-category,
.tutorial-card-tags .tag,
.tutorial-detail-tags .tag {
  border-color: rgba(38, 37, 30, 0.1);
  background: #f3f0ef;
  color: var(--text-secondary);
}

.tutorial-card-body h2,
.tutorial-side-card h2,
.tutorial-related-card h2,
.tutorial-empty h2,
.tutorial-article-nav-item,
.tutorial-article-nav-item strong,
.tutorial-block h2,
.tutorial-block-content h3,
.tutorial-faq summary {
  color: var(--text-primary);
}

.tutorial-card-body h2 {
  font-size: clamp(1.1rem, 1.8vw, 1.32rem);
}

.tutorial-card:hover .tutorial-card-body h2,
.tutorial-card:hover .tutorial-card-arrow {
  color: var(--accent-deep, #b3620f);
}

.tutorial-card-desc,
.tutorial-card-meta,
.tutorial-side-card > p:not(.tutorial-side-kicker),
.tutorial-random-list .tutorial-link,
.tutorial-random-index,
.tutorial-random-arrow,
.tutorial-random-empty,
.tutorial-empty,
.tutorial-placeholder,
.tutorial-toc-link,
.tutorial-toc-sublink,
.tutorial-toc-empty,
.tutorial-article-nav-label,
.tutorial-return-link {
  color: var(--text-secondary);
}

.tutorial-card-meta time,
.tutorial-card-meta span + span::before,
.tutorial-card-meta time::before {
  color: var(--text-tertiary);
}

.tutorial-random-pick-card {
  background: #f5ead6;
}

.tutorial-random-card {
  background: #e8ede3;
}

.tutorial-random-button {
  border-color: rgba(179, 98, 15, 0.3);
  background: rgba(217, 126, 31, 0.1);
  color: var(--accent-deep, #b3620f);
}

.tutorial-random-button:hover,
.tutorial-random-button:focus-visible {
  border-color: var(--accent);
  background: rgba(217, 126, 31, 0.16);
}

/* 教程详情 */
.tutorial-detail-topline {
  padding-top: 16px;
}

.tutorial-detail-back {
  border-color: rgba(38, 37, 30, 0.18);
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-secondary);
}

.tutorial-detail-back > span:first-child,
.tutorial-detail-back:hover,
.tutorial-detail-back:focus-visible {
  color: var(--accent-deep, #b3620f);
}

.tutorial-detail-back:hover,
.tutorial-detail-back:focus-visible {
  border-color: rgba(217, 126, 31, 0.4);
  background: rgba(217, 126, 31, 0.09);
}

.tutorial-detail-heading {
  gap: 32px;
  padding: 28px 0 40px;
}

.tutorial-detail-title {
  max-width: 780px;
  font-size: clamp(2rem, 4.8vw, 4rem);
}

.tutorial-detail-description,
.tutorial-meta-item,
.tutorial-meta-item strong,
.tutorial-meta-item time {
  color: var(--text-secondary);
}

.tutorial-detail-stamp {
  border-color: rgba(217, 126, 31, 0.38);
  background: rgba(217, 126, 31, 0.08);
  color: var(--accent-deep, #b3620f);
}

.tutorial-detail-stamp strong {
  color: var(--accent-deep, #b3620f);
}

.tutorial-reading-progress {
  top: 60px;
  height: 2px;
  background: rgba(38, 37, 30, 0.08);
}

.tutorial-reading-progress span {
  background: linear-gradient(90deg, #d97e1f, #b3620f);
  box-shadow: none;
}

.tutorial-reader-layout {
  grid-template-columns: 170px minmax(0, 760px) 210px;
  max-width: 1200px;
  gap: 24px;
  padding-top: 32px;
  padding-bottom: 64px;
}

.tutorial-reader-toc,
.tutorial-reader-related {
  top: 76px;
}

.tutorial-toc-panel,
.tutorial-related-card {
  padding: 16px;
}

.tutorial-toc-link:hover,
.tutorial-toc-sublink:hover,
.tutorial-toc-link.is-active,
.tutorial-toc-sublink.is-active {
  border-left-color: var(--accent);
  background: rgba(217, 126, 31, 0.09);
  color: var(--accent-deep, #b3620f);
}

.tutorial-block {
  margin-bottom: 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.tutorial-block--warning {
  background: #fff3ef;
  border-color: rgba(192, 57, 43, 0.28);
}

.tutorial-block-heading,
.tutorial-faq,
.tutorial-faq:first-child,
.tutorial-article-nav-item {
  border-color: rgba(38, 37, 30, 0.1);
}

.tutorial-block-index,
.tutorial-checkmark,
.tutorial-step-number,
.tutorial-article-nav-item > span:last-child {
  color: var(--accent-deep, #b3620f);
}

.tutorial-block-content,
.tutorial-block-content h4,
.tutorial-block-content .tutorial-quote,
.tutorial-faq > div {
  color: var(--text-secondary);
}

.tutorial-block-content a {
  color: var(--accent-deep, #b3620f);
  text-decoration-color: rgba(179, 98, 15, 0.42);
}

.tutorial-block-content a:hover,
.tutorial-return-link:hover {
  color: var(--text-primary);
}

.tutorial-block-content code {
  border-color: rgba(38, 37, 30, 0.1);
  background: #f3f0ef;
  color: var(--accent-deep, #b3620f);
}

.tutorial-block-content pre {
  border-color: rgba(38, 37, 30, 0.1);
  background: #f5f4ef;
}

.tutorial-block-content .warning-highlight {
  background: #fce8e2;
  color: #8e2d23;
}

.tutorial-quote {
  background: rgba(217, 126, 31, 0.09);
  color: var(--text-secondary);
}

.tutorial-quote cite,
.tutorial-figure figcaption {
  color: var(--text-tertiary);
}

.tutorial-checkmark,
.tutorial-step-number {
  border-color: rgba(217, 126, 31, 0.38);
}

.tutorial-article-nav-item:hover {
  background: rgba(217, 126, 31, 0.09);
  border-color: rgba(217, 126, 31, 0.4);
}

/* 联系方式 */
.contact-hero {
  padding: 48px 0 40px;
  border-bottom-color: rgba(38, 37, 30, 0.1);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 70%);
}

.contact-hero .container {
  padding-top: 0;
  padding-bottom: 0;
}

.page-breadcrumb {
  margin-bottom: 32px;
}

.contact-heading-grid {
  grid-template-columns: minmax(0, 1fr) 180px;
  max-width: 1080px;
  gap: 32px;
}

.contact-heading-grid h1 {
  margin: 10px 0 16px;
  color: var(--text-primary);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  letter-spacing: -0.045em;
}

.contact-lede {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.contact-heading-note {
  min-height: 132px;
  padding: 14px;
  color: var(--text-tertiary);
  border-left-color: var(--accent);
  background: linear-gradient(145deg, rgba(217, 126, 31, 0.1), rgba(255, 255, 255, 0.48));
}

.contact-heading-note strong {
  color: var(--accent-deep, #b3620f);
}

.contact-content {
  padding: 40px 0 64px;
}

.contact-layout {
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  max-width: 1080px;
  gap: 16px;
}

.contact-profile-panel,
.contact-channel-panel {
  background: #fff;
  border-color: rgba(38, 37, 30, 0.1);
  box-shadow: var(--shadow-sm);
}

.contact-profile-panel {
  top: 76px;
  padding: 20px;
}

.contact-panel-topline,
.contact-panel-heading,
.contact-panel-topline span:last-child,
.contact-heading-count,
.contact-channel-icon,
.contact-channel-action span:last-child,
.contact-note-mark {
  color: var(--accent-deep, #b3620f);
}

.contact-panel-topline,
.contact-channel-label,
.contact-profile-name-en,
.contact-profile-meta,
.contact-channel-desc,
.contact-note {
  color: var(--text-tertiary);
}

.contact-profile-avatar-wrap {
  margin: 36px auto 20px;
}

.contact-profile-glow {
  background: radial-gradient(circle, rgba(217, 126, 31, 0.24), transparent 68%);
}

.contact-profile-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(217, 126, 31, 0.2);
}

.contact-profile-panel h2,
.contact-panel-heading h2,
.contact-channel-value {
  color: var(--text-primary);
}

.contact-profile-quote {
  color: var(--text-secondary);
  background: rgba(217, 126, 31, 0.08);
  border-left-color: var(--accent);
}

.contact-profile-meta,
.contact-panel-heading,
.contact-channel-card {
  border-color: rgba(38, 37, 30, 0.1);
}

.contact-channel-icon {
  background: rgba(217, 126, 31, 0.09);
  border-color: rgba(217, 126, 31, 0.2);
}

.contact-channel-value:hover {
  color: var(--accent-deep, #b3620f);
}

.contact-channel-action {
  color: var(--text-secondary);
  border-color: rgba(38, 37, 30, 0.16);
  background: transparent;
}

.contact-channel-action:hover {
  color: var(--accent-deep, #b3620f);
  border-color: rgba(217, 126, 31, 0.4);
  background: rgba(217, 126, 31, 0.08);
}

.contact-note-mark {
  border-color: rgba(217, 126, 31, 0.45);
}

/* 内容页页脚保持工具站原有的简洁居中形式 */
body[data-page="tutorial"] .footer,
body[data-page="tutorial-detail"] .footer,
body[data-page="contact"] .footer {
  margin-top: 0;
  padding: 0;
  background: transparent;
  text-align: center;
}

body[data-page="tutorial"] .footer-inner,
body[data-page="tutorial-detail"] .footer-inner,
body[data-page="contact"] .footer-inner {
  max-width: none;
  padding: 28px 24px;
  text-align: center;
  border-top-color: rgba(38, 37, 30, 0.1);
  color: rgba(38, 37, 30, 0.5);
}

body[data-page="tutorial"] .footer-brand,
body[data-page="tutorial-detail"] .footer-brand,
body[data-page="contact"] .footer-brand {
  margin-bottom: 4px;
  color: rgba(38, 37, 30, 0.5);
}

body[data-page="tutorial"] .footer-nav,
body[data-page="tutorial-detail"] .footer-nav,
body[data-page="contact"] .footer-nav {
  display: block;
  margin: 0 0 0.5rem;
  padding: 0;
  color: rgba(38, 37, 30, 0.5);
  font-size: 12px;
}

body[data-page="tutorial"] .footer-nav a,
body[data-page="tutorial-detail"] .footer-nav a,
body[data-page="contact"] .footer-nav a,
body[data-page="tutorial"] .footer-inner a,
body[data-page="tutorial-detail"] .footer-inner a,
body[data-page="contact"] .footer-inner a {
  color: rgba(38, 37, 30, 0.6);
}

body[data-page="tutorial"] .footer .icp,
body[data-page="tutorial-detail"] .footer .icp,
body[data-page="contact"] .footer .icp {
  text-align: center;
}

body[data-page="tutorial"] .footer .disclaimer,
body[data-page="tutorial-detail"] .footer .disclaimer,
body[data-page="contact"] .footer .disclaimer {
  color: rgba(38, 37, 30, 0.45);
}

@media (max-width: 1120px) {
  .tutorial-reader-layout {
    grid-template-columns: 165px minmax(0, 1fr);
    max-width: 1080px;
  }

  .tutorial-reader-related {
    display: none;
  }
}

@media (max-width: 820px) {
  body[data-page="tutorial"] .nav-links,
  body[data-page="tutorial-detail"] .nav-links,
  body[data-page="contact"] .nav-links {
    top: 60px;
    padding: 0;
    background: rgba(252, 250, 248, 0.98);
    border-bottom-color: rgba(38, 37, 30, 0.1);
  }

  body[data-page="tutorial"] .nav-links.open,
  body[data-page="tutorial-detail"] .nav-links.open,
  body[data-page="contact"] .nav-links.open {
    max-height: 400px;
    gap: 2px;
    padding: 10px 16px 16px;
  }

  body[data-page="tutorial"] .nav-links li,
  body[data-page="tutorial-detail"] .nav-links li,
  body[data-page="contact"] .nav-links li {
    padding-left: 0;
  }

  .tutorial-library,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .tutorial-discovery {
    position: static;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .tutorial-reader-layout {
    grid-template-columns: 1fr;
    padding-top: 20px;
  }

  .tutorial-reader-toc,
  .tutorial-reader-related,
  .contact-profile-panel {
    position: static;
  }

  .contact-profile-panel {
    max-width: none;
  }

  .tutorial-toc-toggle {
    background: #fff;
    border-color: rgba(38, 37, 30, 0.1);
    color: var(--text-secondary);
  }
}

@media (max-width: 600px) {
  /* 窄屏下控制栏改为纵向布局时，搜索框不能继续保留 420px 的 flex 基准高度。 */
  .tutorial-search-shell {
    width: 100%;
    max-width: none;
    min-height: 44px;
    height: auto;
    flex: 0 0 auto;
    align-self: stretch;
  }
}

@media (max-width: 600px) {
  body[data-page="tutorial"] .container,
  body[data-page="tutorial-detail"] .container,
  body[data-page="contact"] .container {
    padding-inline: 18px;
  }

  .tutorial-index-heading,
  .tutorial-detail-heading,
  .contact-heading-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-index-heading,
  .tutorial-detail-heading {
    gap: 24px;
  }

  .tutorial-index-stats {
    border-top-color: rgba(38, 37, 30, 0.18);
  }

  .tutorial-control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .tutorial-results {
    grid-template-columns: 1fr;
  }

  .tutorial-discovery {
    grid-template-columns: 1fr;
  }

  .contact-heading-note {
    min-height: 104px;
  }

  .contact-content {
    padding-top: 28px;
  }

  .contact-channel-card {
    grid-template-columns: 2.7rem minmax(0, 1fr);
  }

  .contact-channel-icon {
    width: 2.7rem;
    height: 2.7rem;
  }

  .contact-channel-action {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.25rem;
  }
}
