/* 教学栏目（/class/）独立样式：结构参考根目录 教学排版.html */
:root{
  --teach-deep:#2A4858;
  --teach-gold:#C49A2D;
  --teach-bg:#F0EEE8;
  --teach-card:#FAFAF7;
  --teach-text:#2A4858;
  --teach-sub:#6B7E88;
  --teach-line:#E4E0D8;
}

body.teach-body{
  background: var(--teach-bg);
}

.teach-page{
  width: min(900px, 82vw);
  margin: 0 auto;
  padding: 24px 0 52px;
  font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color: var(--teach-text);
}

.teach-title{
  text-align: center;
  margin: 18px 0 20px;
  font-size: 26px;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--teach-deep);
}

.teach-basic{
  width: 100%;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: minmax(260px, 34%) minmax(0, 1fr);
  gap: 24px;
  background: var(--teach-card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  align-items: start;
}
.teach-basic__cover img{
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.teach-basic__cover a{
  display:block;
}
.teach-basic__cover a:hover img{
  opacity:.92;
}
.teach-basic__types{
  margin: 2px 0 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.teach-basic__types a,
.teach-basic__types span{
  display:inline-block;
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.2;
  border:1px solid #d8dee3;
  color: var(--teach-deep);
  background:#fff;
  text-decoration:none;
}
.teach-basic__types a:hover{
  border-color: var(--teach-deep);
}
.teach-basic__info p{
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--teach-text);
}
.teach-basic__ad{
  margin: 12px 0 14px;
  padding: 10px 12px;
  border-left: 3px solid var(--teach-gold);
  background: #f5f2e8;
  border-radius: 0 8px 8px 0;
  color: #546a75;
  font-size: 13px;
  line-height: 1.85;
}
.teach-basic__links{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.teach-basic__links a{
  display: inline-block;
  background: var(--teach-deep);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  line-height: 1.3;
}
.teach-basic__links a:hover{
  background: #1f3a46;
}

.teach-section{
  background: var(--teach-card);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 34px;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
}

.teach-section__head{
  background: var(--teach-deep);
  padding: 18px 22px;
}
.teach-section__en{
  font-size: 11px;
  color: var(--teach-gold);
  letter-spacing: 5px;
  margin-bottom: 5px;
}
.teach-section__h2{
  font-size: 22px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0;
}

.teach-section__body{
  padding: 22px 24px 26px;
}

.teach-content{
  font-size: 15px;
  line-height: 2.05;
  color: var(--teach-text);
}
.teach-content p{
  margin: 0 0 14px;
}
.teach-content p:last-child{ margin-bottom: 0; }
.teach-content small{ color: var(--teach-sub); }
.teach-content strong{ color: var(--teach-deep); }
.teach-content a{ color: var(--teach-deep); text-decoration: underline; }

/* 表格：后台录入 <table> 自动套用 */
.teach-content table{
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  background: #fff;
  border: 1px solid var(--teach-line);
  border-radius: 8px;
  overflow: hidden;
}
.teach-content th,
.teach-content td{
  border: 1px solid var(--teach-line);
  padding: 10px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.8;
  color: var(--teach-text);
}
.teach-content th{
  background: #F0EEE8;
  font-weight: 800;
}

.teach-content ul,
.teach-content ol{
  margin: 10px 0 14px 20px;
  padding: 0;
  color: var(--teach-text);
}
.teach-content li{
  margin: 6px 0;
  line-height: 1.9;
  color: var(--teach-text);
}

.teach-figure{
  display: flex;
  justify-content: center;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--teach-line);
}
.teach-figure img{
  max-width: min(100%, 780px);
  height: auto;
  border-radius: 10px;
  display: block;
}

.teach-trick-gate{
  margin-top: 4px;
}
.teach-trick-content{
  /* 默认折叠：不依赖 inline style，避免被内容覆盖 */
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .25s ease, opacity .2s ease;
}
.teach-trick-gate.is-open .teach-trick-content{
  max-height: 9999px;
  opacity: 1;
  margin-top: 14px;
}

/* 技巧攻略图片区也默认隐藏，展开后显示 */
.teach-trick-figure{ display: none; }
.teach-trick-gate.is-open + .teach-trick-figure{ display: flex; }
.teach-trick-btn{
  background: var(--teach-deep);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}
.teach-trick-btn:hover{
  background: #1f3a46;
}

/* 列表页 */
.teach-list{
  width: min(900px, 82vw);
  margin: 0 auto;
  padding: 24px 0 52px;
  font-family: "PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
.teach-list h1{
  text-align: center;
  font-size: 26px;
  letter-spacing: 1px;
  font-weight: 800;
  color: var(--teach-deep);
  margin: 18px 0 18px;
}
.teach-list dl{
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--teach-line);
}
.teach-list a{
  text-decoration: none;
  color: inherit;
  display: block;
}
.teach-list p{
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: var(--teach-text);
}
.teach-list a:hover p{
  color: var(--teach-deep);
  text-decoration: underline;
}

/* 教学列表：搜索结果风格卡片 */
.teach-list-item{
  display: grid;
  grid-template-columns: 180px minmax(0,1fr);
  gap: 14px;
  background: #fff;
  border: 1px solid #eceff3;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 14px;
}
.teach-list-cover{
  display: block;
}
.teach-list-cover img{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.teach-list-main{min-width:0;}
.teach-list-title{
  display:block;
  font-size:18px;
  font-weight:700;
  color: var(--teach-deep);
  text-decoration:none;
  margin-bottom:8px;
}
.teach-list-title:hover{text-decoration:underline;}
.teach-list-desc{
  font-size:14px;
  line-height:1.8;
  color:#5a6b75;
  margin-bottom:10px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:3.6em;
}
.teach-list-stars{
  font-size:14px;
  color:#4b5563;
  margin-bottom:10px;
}
.teach-list-stars span{
  color:#f39c12;
  letter-spacing:1px;
}
.teach-list-btns{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}
.teach-list-btns a{
  display:inline-block;
  padding:6px 11px;
  border-radius:6px;
  background:var(--teach-deep);
  color:#fff;
  text-decoration:none;
  font-size:12px;
}
.teach-list-btns a:hover{background:#1f3a46;}

.teach-pagebar{
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--teach-sub);
}
.teach-pagebar a{
  color: var(--teach-deep);
  text-decoration: none;
  margin: 0 6px;
}
.teach-pagebar a:hover{ text-decoration: underline; }
.teach-pagebar b{ color: var(--teach-gold); margin: 0 6px; }

@media (max-width: 480px){
  .teach-page,
  .teach-list{
    width: 92vw;
    padding: 18px 0 36px;
  }
  .teach-basic{
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }
  .teach-basic__cover{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #e7e2d6;
  }
  .teach-basic__cover img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
  }
  .teach-basic__info p{
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 8px;
  }
  .teach-basic__types{
    gap: 6px;
    margin-bottom: 8px;
  }
  .teach-basic__types a,
  .teach-basic__types span{
    font-size: 11px;
    padding: 4px 8px;
  }
  .teach-basic__links{
    gap: 8px;
  }
  .teach-basic__links a{
    font-size: 12px;
    padding: 6px 10px;
    background: #2A4858 !important;
    color: #ffffff !important;
    border: 1px solid #2A4858 !important;
    text-decoration: none !important;
  }
  .teach-basic__links a:visited{
    color: #ffffff !important;
  }
  .teach-basic__links a:hover,
  .teach-basic__links a:active,
  .teach-basic__links a:focus{
    background: #1f3a46 !important;
    color: #ffffff !important;
  }
  .teach-basic__ad{
    font-size: 12px;
    line-height: 1.75;
  }
  .teach-title, .teach-list h1{ font-size: 22px; }
  .teach-section__h2{
    font-size: 19px;
    color: #fff !important;
  }
  .teach-section__en{
    color: var(--teach-gold) !important;
  }
  .teach-section__head a,
  .teach-section__head span,
  .teach-section__head p,
  .teach-section__head h1,
  .teach-section__head h2,
  .teach-section__head h3{
    color: #fff !important;
  }
  .teach-content{ font-size: 14px; line-height: 2; }
  .teach-section{ margin-bottom: 24px; }
  .teach-list-item{
    grid-template-columns: 110px minmax(0,1fr);
    gap:10px;
    padding:8px;
  }
  .teach-list-title{font-size:15px;margin-bottom:6px;}
  .teach-list-desc{font-size:12px;line-height:1.7;margin-bottom:8px;}
  .teach-list-stars{font-size:12px;margin-bottom:8px;}
  .teach-list-btns a{font-size:11px;padding:5px 9px;}
  .teach-list-btns a,
  .teach-list-btns a:visited{
    background:#2A4858 !important;
    color:#ffffff !important;
    border:1px solid #2A4858 !important;
    text-decoration:none !important;
  }
  .teach-list-btns a:hover,
  .teach-list-btns a:active,
  .teach-list-btns a:focus{
    background:#1f3a46 !important;
    color:#ffffff !important;
  }
}

