:root {
  --pku-ink: #27221f;
  --pku-muted: #655b54;
  --pku-accent: #681f30;
  --pku-rule: #e2d8cc;
  --pku-paper: #fffdf9;
  --pku-wrap: min(1200px, calc(100% - 48px));
  --pku-heading: "Noto Serif CJK SC", "Songti SC", SimSun, serif;
}

html { background: #f4f0ea; }
body {
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  background: #f4f0ea;
  color: var(--pku-ink);
  font: 15px/1.55 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #9e6248;
  outline-offset: 3px;
}

#showpic.cc:has(> img[src="https://www.chinalearning.cn/Template/2016927/images/weixin.jpg"]) { display: none !important; }
body > #container { width: var(--pku-wrap); max-width: 100%; margin-inline: auto; overflow: visible; }
body > #logo { display: none; }
body > .header-container {
  height: 180px;
  padding: 0;
  background: #fff url("images/logo.png") center bottom / min(1000px, 100%) auto no-repeat;
  border-bottom: 1px solid var(--pku-rule);
}

body > .header-container .h-s { width: var(--pku-wrap); max-width: 1000px; }
body > .header-container .header-s { height: 30px; line-height: 30px; background: var(--pku-accent); }
body > .header-container .header-info { color: #fff7f1; font-weight: 400; }
body > .header-container .header-wrap { height: 149px; overflow: visible; }
body > .header-container .search-2016 { top: 30px; width: min(40%, 350px); height: auto; }
body > .header-container .search-form { display: flex; height: auto; margin: 0; }
body > .header-container .search-form .keywrds {
  float: none;
  width: auto;
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  box-sizing: border-box;
  background: var(--pku-paper);
  border: 1px solid #c9b7ab;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  color: var(--pku-ink);
  font: inherit;
  font-size: 14px;
}
body > .header-container .search-form .search-btn {
  flex: 0 0 70px;
  height: 38px;
  padding: 0;
  border-radius: 0 4px 4px 0;
  background: var(--pku-accent);
  color: #fff;
  -webkit-text-fill-color: #fff;
  font: inherit;
  font-size: 14px;
}

body > .nav { height: auto; line-height: 1.35; background: var(--pku-accent); color: #fff; }
body > .nav .h-s { width: var(--pku-wrap); }
body > .nav .h-s > ul {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  margin: 0;
}
body > .nav .h-s > ul > li { float: none; min-width: 0; }
body > .nav .h-s > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 5px 3px;
  box-sizing: border-box;
  border: 0;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  font-size: 13px;
}
body > .nav .h-s > ul > li > a:hover,
body > .nav .h-s > ul > li > a:focus-visible { background: #833549; text-decoration: none; }
body > .nav_list { display: none; }

body > #container > .footer {
  margin: 34px 0 0;
  padding: 20px 10px 28px;
  border: 0;
  border-top: 1px solid #cbbcaf;
  color: var(--pku-muted);
  text-align: center;
  line-height: 1.65;
}
body > #container > .footer p:first-child { display: block; }
body > .fixed-bottom { display: none; }

@media (max-width: 1400px) {
  #aff-im-root .embed-icon:has(.embed-icon-default) {
    top: auto !important;
    right: 9px !important;
    bottom: 14px !important;
    width: 48px !important;
    height: 48px !important;
    overflow: hidden;
    transform: none !important;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px #27221f36;
  }
  #aff-im-root .embed-icon .embed-icon-default { width: 48px !important; height: auto !important; }
}

body:has(> .frmsubmit #frmOrder) > #logo {
  display: block;
  width: min(100%, 740px);
  margin-inline: auto;
  box-sizing: border-box;
  background: #fff;
  border-top: 3px solid var(--pku-accent);
}
body:has(> .frmsubmit #frmOrder) > #logo img { display: block; width: 100%; height: auto; }
body > .frmsubmit:has(#frmOrder) {
  width: min(620px, var(--pku-wrap));
  margin: 18px auto 0;
  padding: clamp(15px, 3vw, 29px) !important;
  box-sizing: border-box;
  border: 1px solid var(--pku-rule);
  border-top: 2px solid var(--pku-accent);
  background: var(--pku-paper) !important;
}
body > .frmsubmit:has(#frmOrder) h2 {
  background: transparent;
  color: var(--pku-accent);
  font: 700 24px/1.5 var(--pku-heading);
  text-align: left;
}
body > .frmsubmit #frmOrder > div { display: grid; gap: 5px; margin: 0 0 14px; }
body > .frmsubmit #frmOrder span { width: auto; margin: 0; text-align: left; }
body > .frmsubmit #frmOrder input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid #ad9b91;
  border-radius: 4px;
  background: #fff;
  color: var(--pku-ink);
  font: inherit;
}
body > .frmsubmit #frmOrder #btn-submit {
  min-height: 44px;
  width: min(100%, 220px);
  margin: 5px 0 0;
  border-radius: 4px;
  background: var(--pku-accent);
  color: #fff;
  font: inherit;
}
body:has(> .frmsubmit #frmOrder) > .about { margin: 16px auto 26px; text-align: center; color: var(--pku-muted); }

@media (max-width: 1040px) {
  body > .nav .h-s > ul { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  body > .header-container { height: clamp(132px, 18vw, 180px); }
  body > .header-container .header-wrap { height: auto; }
  body > .header-container .search-2016 { top: 19px; }
}

@media (max-width: 700px) {
  :root { --pku-wrap: calc(100% - 24px); }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  body > #logo {
    display: block;
    padding: 0 12px;
    background: #fff;
    border-top: 3px solid var(--pku-accent);
  }
  body > #logo img { display: block; width: 100%; height: auto; }
  body > .header-container { display: block; height: auto; background: #fff; }
  body > .header-container .header-s { display: none; }
  body > .header-container .header-wrap { display: block; height: auto; padding: 3px 0 10px; }
  body > .header-container .search-2016 { position: static; float: none; width: 100%; }
  body > .nav { display: block; }
  body:has(> .nav_list) > .nav { display: none; }
  body > .nav .h-s { width: 100%; }
  body > .nav .h-s > ul {
    grid-template: repeat(2, auto) / none;
    grid-auto-columns: minmax(72px, 24%);
    grid-auto-flow: column;
    overflow-x: auto;
    scrollbar-color: #c88b97 var(--pku-accent);
  }
  body > .nav .h-s > ul > li > a { min-height: 42px; border-bottom: 1px solid #ffffff22; }
  body > .nav_list {
    display: block;
    width: var(--pku-wrap);
    margin: 14px auto;
    padding: 10px;
    box-sizing: border-box;
    background: var(--pku-paper);
    border-top: 2px solid var(--pku-accent);
  }
  body > .nav_list h2 { margin: 0 4px 6px; color: var(--pku-accent) !important; font: 700 16px/1.45 var(--pku-heading); }
  body > .nav_list .list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
  body > .nav_list a {
    display: grid;
    place-items: center;
    min-height: 34px;
    padding: 3px 1px;
    color: var(--pku-ink);
    border-bottom: 1px solid var(--pku-rule);
    box-sizing: border-box;
    font-size: 13px;
    text-align: center;
  }
  body > #container > .footer { margin-bottom: 0; padding-bottom: 14px; }
  body > .fixed-bottom {
    display: block;
    position: fixed;
    z-index: 1000;
    inset: auto 0 0;
    width: auto;
    padding: 0 0 env(safe-area-inset-bottom, 0px);
    background: #54202c;
    border-top: 1px solid #855461;
  }
  body > .fixed-bottom ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
  body > .fixed-bottom li { width: auto; border-color: #ffffff24; }
  body > .fixed-bottom li a { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 55px; color: #fff; }
  body > .fixed-bottom li a p { font: 13px/1.25 "Microsoft YaHei", "PingFang SC", sans-serif; }
  body > .fixed-bottom li:last-child { background: #782f41; }
  body:has(> .fixed-bottom a[href*="affim.baidu.com"]) #aff-im-root .embed-icon:has(.embed-icon-default) { display: none !important; }
  body:has(> .fixed-bottom) #aff-im-root .embed-icon:has(.embed-icon-default) { bottom: calc(65px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (max-width: 360px) {
  :root { --pku-wrap: calc(100% - 18px); }
  body > .nav_list a { font-size: 12px; }
}

@media (prefers-reduced-motion: no-preference) {
  body > .nav a, body > .nav_list a, body > #container a { transition: color .16s, background-color .16s; }
}

body > .img_gallery {
  display: block;
  width: var(--pku-wrap);
  height: auto;
  aspect-ratio: 4 / 1;
  margin: 22px auto 0;
  border: 0;
  background: #27221f;
  position: relative;
  overflow: hidden;
}
body > #slideshow { display: none !important; }
body > .img_gallery .main_img { position: absolute; inset: 0; height: 100%; width: 100%; overflow: hidden; }
body > .img_gallery .main_img ul { position: absolute; height: 100% !important; }
body > .img_gallery .main_img li,
body > .img_gallery .main_img li a,
body > .img_gallery .main_img li span { height: 100% !important; }
body > .img_gallery .main_img li :is(a, span) { display: block; width: 100%; }
body > .img_gallery .main_img li span { background-position: center; background-size: cover; background-repeat: no-repeat; }
body > .img_gallery .main_img .img_1 { background-image: url("images/img1.png"); }
body > .img_gallery .main_img .img_2 { background-image: url("images/img2.png"); }
body > .img_gallery .main_img .img_3 { background-image: url("images/img3.png"); }
body > .img_gallery .main_img .img_4 { background-image: url("images/img4.png"); }
body > .img_gallery .point {
  display: flex;
  position: absolute;
  z-index: 2;
  width: auto;
  height: auto;
  margin: 0;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 6px;
  border-radius: 20px;
  background: #211818a8;
}
body > .img_gallery .point a {
  position: relative;
  display: block;
  width: 29px;
  height: 30px;
  background: none;
  text-indent: -1000px;
  visibility: visible;
  overflow: hidden;
}
body > .img_gallery .point a::after {
  content: "";
  position: absolute;
  inset: 12px auto auto 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: #ffffffa6;
}
body > .img_gallery .point a.on::after { width: 16px; background: #fff; }
body > .img_gallery :is(#btn_prev, #btn_next) {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: none;
  width: 42px !important;
  height: 42px !important;
  margin-top: -21px;
  border-radius: 50%;
  background: #23171cb0;
  color: #fff;
  text-align: center;
  font: 30px/38px sans-serif;
}
body > .img_gallery #btn_prev { left: 12px; }
body > .img_gallery #btn_next { right: 12px; }
body > .img_gallery #btn_prev::after { content: "\2039"; }
body > .img_gallery #btn_next::after { content: "\203a"; }

/* Display the real course table on small screens instead of the duplicate mobile rows. */
body > #container > .main:has(> .course_classify) {
  display: grid;
  grid-template-columns: minmax(218px, 1fr) minmax(0, 2.9fr);
  gap: 22px;
  margin-top: 22px;
  overflow: visible;
}
body > #container > .main > .hot-course {
  grid-row: 1;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-top: 2px solid var(--pku-accent);
  background: var(--pku-paper);
}
.hot-course .h-left { width: 100%; }
.hot-course .h-right { float: none; width: 100%; min-width: 0; }
.hot-course .h-right ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; width: 100%; }
.hot-course .h-right li {
  display: flex;
  align-items: center;
  gap: 8px;
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--pku-rule);
}
.hot-course .h-right li a {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hot-course .h-right li span {
  position: static;
  float: none;
  color: var(--pku-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hot-course .h-right li img { margin-right: 3px; vertical-align: middle; }

body > #container > .main > .right_part { grid-row: 2; grid-column: 1; float: none; width: auto; min-width: 0; }
body > #container > .main > .course_classify { grid-row: 2; grid-column: 2; float: none; width: auto; min-width: 0; overflow: visible; }
.right_part .item,
.course_classify .course {
  margin: 0 0 18px;
  padding-bottom: 8px;
  border: 1px solid var(--pku-rule);
  border-top: 2px solid var(--pku-accent);
  border-radius: 0;
  background: var(--pku-paper);
}
.right_part .item h4,
.course_classify .course h3 {
  height: auto;
  margin: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--pku-rule);
  background: #f6efe7;
  color: var(--pku-accent);
  font: 700 19px/1.4 var(--pku-heading);
}
.right_part .item h4 p { float: none; margin: 0; padding: 0; border: 0; }
.right_part .item > ul { width: auto; margin: 0 12px; }
.right_part .item > ul > li { height: auto; min-height: 36px; padding: 0 2px; border-bottom: 1px solid var(--pku-rule); line-height: 36px; }
.right_part .item > ul > li > a { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.right_part .item > ul > li:last-child { border-bottom: 0; }
.right_part .item.new-classify > a { width: 49%; padding: 8px 3px; box-sizing: border-box; font-size: 13px; text-align: center; }
.right_part .item .more, .course_classify .course .more { top: 13px; right: 14px; width: auto; }
.course_classify .course h3 > a, .course_classify .course .more a { width: auto; color: var(--pku-accent); }
.course_classify .course table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; }
.course_classify .course th {
  height: 35px;
  background: #fffaf3;
  border-bottom: 1px solid var(--pku-rule);
  color: var(--pku-muted);
  font-size: 12px;
  font-weight: 500;
}
.course_classify .course th:first-child { width: auto; text-align: left !important; padding-left: 15px; }
.course_classify .course :is(th, td):nth-child(2) { width: 94px; }
.course_classify .course :is(th, td):nth-child(3) { width: 63px; }
.course_classify .course :is(th, td):nth-child(4) { width: 92px; }
.course_classify .course :is(th, td):nth-child(5) { width: 83px; }
.course_classify .course td { height: 40px; padding: 0 4px; border-bottom: 1px solid var(--pku-rule); text-align: center; }
.course_classify .course td.td_style1 { width: auto; padding-left: 15px; padding-right: 7px; text-align: left; }
.course_classify .course td.td_style1 a {
  display: block;
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pku-ink);
  line-height: inherit;
}
.course_classify .course td.download { background: none; }
.course_classify .course td.download a { width: auto; color: var(--pku-accent); }
.course_classify .course td.download a[href=""] { color: var(--pku-muted); }
.course_classify .course :is(td.fee-mobile, .course-fee) { float: none; color: var(--pku-accent); font-variant-numeric: tabular-nums; }
.course_classify .course :is(p.course-mobile, .time-mobile, tr:has(> .time-mobile)) { display: none; }
.hot-course li a:hover, .course_classify .course td.td_style1 a:hover, .right_part .item a:hover { color: var(--pku-accent); text-decoration: underline; }

@media (min-width: 701px) {
  body:has(> .img_gallery) { display: flex; flex-direction: column; }
  body:has(> .img_gallery) > .nav { order: 1; }
  body:has(> .img_gallery) > .img_gallery { order: 2; }
  body:has(> .img_gallery) > #container { order: 3; }
}

@media (max-width: 1000px) {
  body > #container > .main:has(> .course_classify) { grid-template-columns: minmax(0, 1fr); }
  body > #container > .main > .course_classify { grid-column: 1; grid-row: 2; }
  body > #container > .main > .right_part { grid-column: 1; grid-row: 3; }
}

@media (max-width: 700px) {
  body:has(> .img_gallery) { display: flex; flex-direction: column; }
  body:has(> .img_gallery) > .nav_list { order: 1; }
  body:has(> .img_gallery) > #container { order: 2; }
  body > .img_gallery { aspect-ratio: 640 / 230; margin-top: 10px; }
  body > .img_gallery .main_img .img_1 { background-image: url("images/1.png"); }
  body > .img_gallery .main_img .img_2 { background-image: url("images/2.png"); }
  body > .img_gallery .main_img .img_3 { background-image: url("images/3.png"); }
  body > .img_gallery .main_img .img_4 { background-image: url("images/4.png"); }
  body > .img_gallery .point { bottom: 4px; }
  body > .img_gallery .point a { height: 25px; }
  body > .img_gallery .point a::after { top: 9px; }
  body > #container > .main:has(> .course_classify) { margin-top: 0; gap: 14px; }
  body > #container > .main > .hot-course { display: block; padding: 8px 12px; }
  .hot-course::before { color: var(--pku-accent); font: 700 17px/1.45 var(--pku-heading); }
  .hot-course .h-right ul { grid-template-columns: 1fr; }
  body > #container > .main > .right_part { display: block; }
  .course_classify .course th { padding: 6px 0; height: auto; line-height: 1.4; }
  .course_classify .course :is(th, td):nth-child(n) { width: auto; }
  .course_classify .course thead, .course_classify .course tbody { display: block; }
  .course_classify .course tr {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .82fr) minmax(0, .92fr) minmax(0, .86fr);
  }
  .course_classify .course tr > :first-child { grid-column: 1 / -1; padding-left: 11px; }
  .course_classify .course td { min-width: 0; height: auto; line-height: 1.35; padding: 6px 2px 9px; font-size: 12px; }
  .course_classify .course td.td_style1 { padding: 9px 11px 3px; border-bottom: 0; font-size: 14px; font-weight: 600; }
  .course_classify .course td.download a { overflow: visible; white-space: nowrap; }
  .course_classify .course span.course-fee { float: none; font-size: inherit; }
}

/* Course, news, faculty and article pages */
#container:has(> .main-col) > .position {
  display: block;
  margin: 0;
  padding: 13px 0;
  color: var(--pku-muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#container > .position p { margin: 0; }
#container > .position a { color: var(--pku-accent); }
#container > .position .cut { margin: 0 .5em; }

#container > .main-col {
  display: grid;
  grid-template-columns: minmax(195px, 23%) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 36px);
  align-items: start;
  width: 100%;
  margin: 0 0 26px;
  overflow: visible;
}

#container > .main-col > :is(.main_left, .main_right) {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}

#container .main-col .main_left .cols {
  padding: 0;
  margin: 0 0 22px;
  border: 0;
  border-top: 2px solid var(--pku-accent);
  background: var(--pku-paper);
}

#container .main-col .main_left h4 {
  margin: 0;
  padding: 12px 15px;
  border-bottom: 1px solid var(--pku-rule);
  background: transparent;
  color: var(--pku-accent);
  font-size: 16px;
  line-height: 1.4;
}

#container .main-col .main_left h4 p {
  float: none;
  margin: 0;
  padding: 0;
  border: 0;
}

#container .main-col .main_left .cols ul {
  width: auto;
  margin: 0;
  padding: 2px 15px 7px;
}

#container .main-col .main_left .cols li {
  height: auto;
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--pku-rule);
  background: none;
  line-height: 1.5;
}

#container .main-col .main_left .cols li:last-child { border-bottom: 0; }

#container .main-col .main_left .cols li a {
  display: block;
  min-width: 0;
  padding: 9px 0;
  overflow: hidden;
  color: var(--pku-ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#container > .main-col > .main_right {
  border: 0;
  border-top: 2px solid var(--pku-accent);
  background: var(--pku-paper);
}

#container .main-col .main_right > h3 {
  margin: 0;
  padding: clamp(13px, 2vw, 24px) clamp(13px, 3vw, 32px);
  border-bottom: 1px solid var(--pku-rule);
  background: transparent;
  color: var(--pku-accent);
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.45;
}

#container .main_right > .class_cate {
  box-sizing: border-box;
  width: auto;
  margin: 0 clamp(13px, 3vw, 32px);
  padding: 16px 0;
  border-bottom: 1px solid var(--pku-rule);
  background: transparent;
}

#container .class_cate table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

#container .main_right .class_cate td {
  padding: 0;
  border: 0;
  color: var(--pku-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#container .class_cate .course-tit a {
  display: block;
  padding: 2px 0 4px;
  color: var(--pku-ink);
  font-size: clamp(16px, 1.65vw, 19px);
  font-weight: 650;
  line-height: 1.5;
}

#container .main_right .class_cate .course-brief { padding: 3px 0; }
#container .main_right .class_cate :is(.course-info, .course-xz) { padding-top: 3px; font-size: 13px; }
#container .main_right .class_cate .course-info span { color: inherit; font-size: inherit; }
#container .class_cate :is(.c-place, .c-time) { margin-left: .7em; }
#container .class_cate .course-info i { display: inline; font-style: normal; }
#container .class_cate .course-info .c-place { display: inline; }
#container .main-col :is(.main_left .cols a, .course-tit a, .position a):hover { color: var(--pku-accent); }

#container .main_right :is(#fenye, .fenye, .kspage) {
  box-sizing: border-box;
  float: none;
  max-width: 100%;
  margin: 0 !important;
  padding: 16px clamp(13px, 3vw, 32px);
  color: var(--pku-muted);
  font-size: 13px;
  line-height: 2;
  text-align: left !important;
  overflow-wrap: anywhere;
}

#container .main_right :is(#fenye, .fenye, .kspage):empty { display: none; }

#container .main_right :is(#fenye, .fenye, .kspage) a,
#container .main_right #turnpage {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  min-height: 36px;
  margin: 2px 1px;
  padding: 3px 8px;
  border: 1px solid var(--pku-rule);
  background: var(--pku-paper);
  color: var(--pku-accent);
  font: inherit;
  line-height: 28px;
  vertical-align: middle;
}

#container .main_right :is(#fenye, .fenye, .kspage) a:hover {
  border-color: var(--pku-accent);
  background: var(--pku-accent);
  color: #fff;
}

#container > .main-col .main_right > .title {
  padding: clamp(18px, 4vw, 40px) clamp(13px, 3vw, 32px) 0;
}

#container .main_right > .title h1 {
  max-width: 34em;
  margin: 0 auto;
  padding: 0 0 clamp(13px, 2vw, 22px);
  color: var(--pku-accent);
  font-size: clamp(23px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

#container .main_right > .title .blockquote {
  margin: 0;
  padding: 12px 0;
  border-block: 1px solid var(--pku-rule);
  background: transparent;
  color: var(--pku-muted);
  font-size: 14px;
  line-height: 1.65;
}

#container .main_right > .title .blockquote p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 0;
  padding: 0;
  border: 0;
}

#container .main_right > .title .blockquote i {
  display: inline;
  min-width: 0;
  font-style: normal;
  overflow-wrap: anywhere;
}

#container .main_right > .title .blockquote span { margin: 0; color: var(--pku-ink); }

#container .main_right > .content {
  padding: clamp(15px, 3vw, 32px);
  overflow-wrap: anywhere;
}

#container .main_right #MyContent {
  max-width: 100%;
  color: var(--pku-ink);
  font-size: 16px;
  line-height: 1.8;
}

#container .main_right #MyContent :is(img, video) {
  box-sizing: border-box;
  max-width: 100% !important;
  height: auto !important;
}

#container .main_right #MyContent img { width: auto; }
#container .main_right #MyContent :is(p, div):has(img):not(:has(> p, > div, > table, > ul, > ol)) {
  text-indent: 0 !important;
}

#container .main_right #MyContent :is(iframe, embed, object) { max-width: 100% !important; }
#container .main_right #MyContent pre { max-width: 100%; overflow: auto; }
#container .main_right #MyContent table {
  display: block;
  width: max-content !important;
  max-width: 100% !important;
  margin-inline: auto;
  overflow-x: auto;
}

#container .main_right #site-registration {
  box-sizing: border-box;
  width: auto;
  max-width: none;
  margin: 0 clamp(13px, 3vw, 32px) clamp(18px, 4vw, 32px);
  border-color: var(--pku-rule);
  background: var(--pku-paper);
  scroll-margin-top: 12px;
}

#container .main_right #site-registration .sr-heading,
#container .main_right #site-registration button { background: var(--pku-accent); }
#container .main_right #site-registration .sr-heading { font-size: clamp(19px, 2vw, 23px); }

#container .main_right #site-registration :is(input:not([type=hidden]), textarea) {
  border-color: #ad9b91;
  border-radius: 4px;
}

#container .main_right #site-registration :is(input, textarea, button):focus-visible {
  outline: 2px solid var(--pku-accent);
  outline-offset: 2px;
}

#container > .rightbody:has(#form-bmb) {
  width: min(100%, 780px);
  margin: 0 auto 28px;
}

#container .rightbody .sign-up {
  box-sizing: border-box;
  width: auto;
  padding: clamp(14px, 3vw, 28px);
  border: 1px solid var(--pku-rule);
  border-top: 2px solid var(--pku-accent);
  background: var(--pku-paper);
}

#container .sign-up p { padding-left: 0; color: var(--pku-ink); }
#container .sign-up > p > span:empty { display: none; }
#container #form-bmb { color: var(--pku-ink); }

#container #form-bmb h3 {
  padding: 12px 0;
  border-bottom: 1px solid var(--pku-rule);
  background: transparent;
  color: var(--pku-accent);
  font-size: 17px;
}

#container #form-bmb :is(.item, .item-other) { padding: 8px 0 16px; }
#container #form-bmb :is(.item, .item-other) div { padding: 7px 0; }

#container #form-bmb label {
  display: block;
  width: auto;
  padding: 0 0 5px;
  text-align: left;
}

#container #form-bmb :is(input[type=text], textarea) {
  box-sizing: border-box;
  width: min(calc(100% - 24px), 420px);
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #ad9b91;
  border-radius: 4px;
  font: inherit;
}

#container #form-bmb textarea { width: min(100%, 420px); resize: vertical; }
#container #form-bmb .item span { top: 0; padding-left: 5px; vertical-align: middle; }

#container #form-bmb #tijiao {
  width: min(100%, 180px);
  min-height: 44px;
  border-radius: 4px;
  background: var(--pku-accent);
}

@media (max-width: 820px) {
  #container > .main-col { grid-template-columns: minmax(0, 1fr); }
  #container > .main-col > .main_left { order: 2; }
}

@media (max-width: 640px) {
  #container > .main-col > .main_left { display: none; }
  #container > .position:has(a:nth-of-type(2)) ~ #content-mobile { display: none; }
  #container > #content-mobile { margin: 0 0 8px; padding: 4px 0; color: var(--pku-accent); }
  #container .main_right .class_cate .course-brief { display: table-cell; }
  #container .main_right > .title .blockquote p { justify-content: flex-start; }
  #container .main_right :is(#fenye, .fenye, .kspage) a,
  #container .main_right #turnpage { min-height: 40px; }
}

/* Older About directory and the original student-gallery template. */
:is(body:has(> .buju > .content_mode), body:has(> table[width="960"] + #showpic)) {
  --legacy-ink: #302820;
  --legacy-accent: #702b33;
  --legacy-rule: #ded4c9;
  --legacy-paper: #fffcf7;
  margin: 0;
  background: #f3eee7;
  color: var(--legacy-ink);
  font: 15px/1.55 system-ui, "Microsoft YaHei", sans-serif;
}

.buju > #showpic,
body > table[width="960"] + #showpic { display: none !important; }

body > .buju:has(> .content_mode) {
  box-sizing: border-box;
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto 30px;
  overflow: visible;
}

.buju > .front {
  height: auto;
  padding: 0 12px;
  background: #3a2225;
  color: #eadbd2;
}

.buju > .front > ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  margin: 0;
  padding: 0;
}

.buju > .front li { float: none; margin: 0; }
.buju > .front a {
  display: inline-block;
  padding: 9px 0;
  color: #fff7ee;
}

.buju > .top, .buju > .top > .sf, .buju > .top > .menu, .buju > .top > .search {
  box-sizing: border-box;
  float: none;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.buju > .top > .sf > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.buju > .top > .menu {
  padding: 8px 14px 12px;
  background: var(--legacy-paper);
  border-bottom: 1px solid var(--legacy-rule);
}

.buju .menu .m_tttt {
  float: none;
  width: auto;
  height: auto;
  margin: 0;
  padding: 2px 0 8px;
  background: none;
  color: var(--legacy-accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}

.buju .menu > ul { width: auto; height: auto; margin: 0; padding: 0; }
.buju .menu :is(div.daohang, ul:not(:has(> div.daohang))) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 2px 8px;
}

.buju .menu li { float: none; width: auto; margin: 0; padding: 0; }
.buju .menu li a {
  display: block;
  padding: 7px 0;
  color: var(--legacy-ink);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.buju > .top > .search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 11px 12px;
  background: var(--legacy-paper);
}

.buju .search :is(.search_box, .weizhi) {
  float: none;
  width: auto;
  height: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: var(--legacy-ink);
  line-height: 1.6;
}

.buju .search :is(form, fieldset) { max-width: 100%; }
.buju .search .search_box table { width: auto; max-width: 100%; }
.buju .search .search_box td { white-space: normal; }
.buju .search :is(input, select) {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 34px;
  margin: 2px 0;
}

.buju .search .textbox { width: min(260px, 100%); }
.buju .search .inputButton {
  padding: 0 11px;
  border: 0;
  background: var(--legacy-accent);
  color: white;
  cursor: pointer;
}
.buju .search .weizhi a { color: var(--legacy-accent); }
.buju .search a img { display: block; max-width: 100%; height: auto; }
.buju .search > a[title]:has(img[src$="/baom.jpg" i]) {
  display: inline-block;
  padding: 7px 12px;
  background: var(--legacy-accent);
  color: white;
}
.buju .search > a[title] > img[src$="/baom.jpg" i] { display: none; }
.buju .search > a[title]:has(img[src$="/baom.jpg" i])::before { content: attr(title); }

.buju > .content_mode {
  display: grid;
  grid-template-columns: minmax(170px, 24%) minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
  background: none;
  overflow: visible;
}

.buju > .content_mode:not(:has(> .content_left a[href])) {
  grid-template-columns: minmax(0, 1fr);
}

.buju .content_mode > .content_left:not(:has(a[href])),
.buju .content_mode > .clearfix { display: none; }

.buju .content_mode > :is(.content_left, .content_right) {
  float: none;
  width: auto;
  min-width: 0;
  border: 0;
  border-top: 2px solid var(--legacy-accent);
  background: var(--legacy-paper);
}

.buju .lanmu_ganyan_list { height: auto; width: auto; margin: 0; overflow: visible; }
.buju .lamu_right_mode_header {
  box-sizing: border-box;
  width: auto;
  height: auto;
  padding: 13px 16px;
  border-bottom: 1px solid var(--legacy-rule);
  background: none;
  color: var(--legacy-accent);
}

.buju .lamu_right_mode_header h3 {
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 18px;
  line-height: 1.4;
}
.buju .lanmu_ganyan_list table { width: 100%; table-layout: fixed; }
.buju .lanmu_ganyan_list table :is(th, td):last-child:empty { display: none; }
.buju .lanmu_ganyan_list table td {
  height: auto;
  padding: 0 16px;
  border-bottom: 1px solid var(--legacy-rule);
  background: none;
  line-height: 1.5;
}

.buju .lanmu_ganyan_list td a {
  display: block;
  padding: 11px 0;
  overflow: hidden;
  color: var(--legacy-ink);
  font: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buju #fenye { padding: 10px 16px; text-align: left !important; overflow-wrap: anywhere; }
.buju #fenye a { display: inline-block; padding: 5px 6px; }
.buju .content_right > div:has(> .lamu_bottome_box) {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  float: none !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 9px 16px;
}

.buju .lamu_bottome_box { float: none; width: auto; height: auto; background: none; }
.buju .lamu_bottome_box a { display: block; padding: 3px 0; color: var(--legacy-accent); }
.buju .content_mode > .foot {
  box-sizing: border-box;
  grid-column: 1 / -1;
  width: auto;
  min-width: 0;
  height: auto;
  padding: 8px 12px;
  text-align: center;
  overflow-wrap: anywhere;
}

.buju .foot > table { width: 100%; table-layout: fixed; }
.buju .foot img { max-width: 100%; height: auto; }

/* Some old About footers embed a second course directory with fixed floats. */
.buju .foot .buju,
.buju .foot :is(.mode_1, .top_mode, .left_mode, .left_xiao_mode, .left-top, .space, #mrq, #Marquee_x) {
  float: none;
  width: auto;
  max-width: 100%;
  margin-inline: 0;
}

.buju .foot .left_xiao_mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.buju .foot .left_xiao_mode > :is(.left_mode_content, .right_mode_content) {
  float: none;
  width: auto;
  height: auto;
  min-width: 0;
}

.buju .foot .left-top > :is(.menu_left, .new_mode) { float: none; width: auto; max-width: 100%; }
.buju .foot .left-top .menu_left :is(ul, .menu_left_box) { max-width: 100%; }
.buju .foot :is(table, .img_mode, .menu_left_img) { max-width: 100%; }
.buju .foot .left_xiao_mode table { width: 100%; table-layout: fixed; }
.buju .foot .left_xiao_mode :is(th, td) { width: auto !important; white-space: normal; }
.buju .foot .left_xiao_mode :is(th, td) a { overflow-wrap: anywhere; }

/* The gallery page has an outer table and two columns of nested tables. */
body > table[width="960"]:has(+ #showpic) {
  width: min(1200px, calc(100% - 32px));
  margin: 16px auto 30px;
  table-layout: fixed;
  background: var(--legacy-paper);
  border-top: 2px solid var(--legacy-accent);
}

body > table[width="960"]:has(+ #showpic) > tbody > tr > td {
  height: auto;
  min-width: 0;
  background: var(--legacy-paper);
  overflow-wrap: anywhere;
}

body > table[width="960"]:has(+ #showpic) table { max-width: 100%; }
body > table[width="960"]:has(+ #showpic) table[width="680"] {
  float: none;
  width: 100%;
}

body > table[width="960"]:has(+ #showpic) :is(td.left, td.t003399, td.pd) {
  box-sizing: border-box;
  padding: 8px;
  background-image: none;
  color: var(--legacy-ink);
  line-height: 1.5;
}

body > table[width="960"]:has(+ #showpic) td.pd[height="660"]:empty { height: 0; padding: 0; }
body > table[width="960"]:has(+ #showpic) img { max-width: 100%; height: auto; }

body > table[width="960"]:has(+ #showpic) table:has(> tbody > tr > td.pd > span[id^="ks"]:empty):not(:has(> tbody > tr > td.pd > span[id^="ks"]:not(:empty))) { display: none; }
body > table[width="960"]:has(+ #showpic) > tbody > tr > td > table:nth-child(2) td { height: auto; }

@media (max-width: 780px) {
  .buju > .content_mode { grid-template-columns: minmax(0, 1fr); }
  .buju .content_mode > .content_right { grid-row: 1; }
  .buju .foot .left_xiao_mode { grid-template-columns: minmax(0, 1fr); }
  body > table[width="960"]:has(+ #showpic) > tbody > tr > td > table:first-child > tbody > tr > td {
    display: block;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body > .buju:has(> .content_mode),
  body > table[width="960"]:has(+ #showpic) { width: calc(100% - 18px); margin-top: 9px; }
  .buju > .front > ul { column-gap: 7px; }
  .buju > .front a { padding: 10px 0; }
  .buju .menu :is(div.daohang, ul:not(:has(> div.daohang))) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
