:root {
  --canvas: #f0f4f7;
  --paper: #fff;
  --wash: #e8f0f5;
  --ink: #223748;
  --muted: #506778;
  --navy: #183c5b;
  --navy-light: #255472;
  --teal: #156970;
  --line: #d6e1e8;
  --gap: clamp(12px, 2vw, 24px);
  --sans: "Instrument Sans", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

html {
  background: var(--canvas);
}

body {
  color: var(--ink);
  background: var(--canvas);
  font: 15px/1.6 var(--sans);
}

body > .hide:has(> img[src="/Template/yixueban/images/wx.jpg"]) {
  display: none !important;
}

body > #container,
body > #container *,
body > .fixed-bottom,
body > .fixed-bottom * {
  box-sizing: border-box;
}

body > #container:has(> #banner) {
  width: min(1160px, calc(100% - 2 * var(--gap)));
  margin: var(--gap) auto 0;
}

#container a:focus-visible,
#container :is(button, input, select, textarea):focus-visible,
.fixed-bottom a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

#container > #banner {
  height: auto;
  padding-top: clamp(52px, 11.8vw, 138px);
  border-top: 3px solid var(--teal);
  background-color: var(--paper);
  background-position: top center;
  background-size: 100% auto;
}

#banner > .nav {
  position: static;
  width: 100%;
  background: var(--navy);
}

#banner > .nav ul:has(> li) {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

#banner > .nav li {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
}

#banner > .nav li a {
  display: grid;
  min-height: 50px;
  height: 100%;
  padding: 7px 4px;
  place-items: center;
  border-inline-end: 1px solid #fff2;
  color: #fff;
  font: 650 15px/1.25 var(--sans);
  text-align: center;
  overflow-wrap: anywhere;
  transition: background-color .16s ease;
}

#banner > .nav li:last-child a,
#banner > .nav li a:is(:hover, :focus-visible) {
  color: #fff;
  background: var(--navy-light);
}

#banner > .nav a:focus-visible,
.fixed-bottom a:focus-visible {
  outline-color: #fff;
  outline-offset: -3px;
}

#container > #main {
  width: 100%;
  margin-top: var(--gap);
  overflow: visible;
}

#main > #slider-mask {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1002 / 200;
  margin: 0 0 var(--gap);
  overflow: hidden;
  background: var(--wash);
}

#slider-mask #slider,
#slider-mask #slider > div,
#slider-mask #slider img {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
}

#slider-mask #slider img {
  display: block;
  object-fit: contain;
}

#slider-mask #slider:not(:has(> div[style])) > div:nth-child(n + 2) {
  display: none;
}

#slider-mask :is(#prev, #next) {
  top: 50%;
  width: clamp(29px, 4.1vw, 43px);
  height: clamp(37px, 5.3vw, 55px);
  padding: 4px;
  transform: translateY(-50%);
  object-fit: contain;
  background: #fff9;
}

#main:has(> .main_c + .main_right),
#main:has(> .content_left + .category_right) {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

#main:has(> .main_c + .main_right) {
  grid-template-columns: minmax(214px, 1fr) minmax(0, 2.5fr);
}

#main:has(> .content_left + .category_right) {
  grid-template-columns: minmax(0, 2.55fr) minmax(214px, 1fr);
}

#main:has(> :is(.main_c, .content_left) + *) > :is(#slider-mask, .yqlj) {
  grid-column: 1 / -1;
  margin: 0;
}

#main:has(> :is(.main_c, .content_left) + *) > .clear {
  display: none;
}

#main :is(.main_c, .main_left, .main_right, .main_right_bot, .content_left, .category_right) {
  float: none;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  overflow: visible;
}

#main :is(.main_left > .tuijian, .main_left > .tuijian2, .main_right_bot, .content_left,
  .category_right > .tuijian, .category_right > .contact) {
  position: relative;
  border: 0;
  border-top: 2px solid var(--teal);
  background: var(--paper);
}

#main :is(.main_left > .tuijian2, .category_right > .contact) {
  margin-top: var(--gap);
}

#main :is(.tuijian, .tuijian2, .main_right_bot, .content_left, .contact) > h3 {
  min-height: 48px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  background: var(--wash);
  font: 700 19px/1.3 var(--sans);
}

#main .more {
  top: 10px;
  right: 10px;
}

#main .more a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px;
}

#main :is(.tuijian, .tuijian2) ul {
  padding: 0 15px;
}

#main :is(.tuijian, .tuijian2) li {
  height: auto !important;
  padding: 0;
  border-bottom: 1px solid var(--line) !important;
  line-height: 1.5 !important;
}

#main :is(.tuijian, .tuijian2) li:last-child {
  border: 0 !important;
}

#main :is(.tuijian, .tuijian2) li a,
#main .main_right_bot .style1 > a {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#main :is(.tuijian, .tuijian2) li a {
  padding: 9px 0;
}

#main :is(.tuijian, .tuijian2, .main_right_bot, .content_left) a:is(:hover, :focus-visible) {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: .18em;
}

#main .search {
  margin: 0 0 var(--gap);
  padding: 11px 13px;
  border: 0;
  background: var(--wash);
}

#main .search :is(table, tbody) {
  display: block;
  width: 100%;
}

#main .search tr {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content max-content;
  align-items: center;
  gap: 7px;
}

#main .search td {
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
  color: var(--navy) !important;
}

#main .search .class_name_search {
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border-color: var(--line);
  font: inherit;
}

#main .search .class_submit {
  min-height: 40px;
  width: auto;
  padding: 0 10px;
  border: 0;
  color: #fff;
  background: var(--navy);
  font: 650 14px/1.4 var(--sans);
}

#main .main_right_bot table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

#main .main_right_bot th {
  color: var(--muted);
  font-weight: 650;
  text-align: left;
}

#main .main_right_bot :is(th, td) {
  min-width: 0;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  overflow-wrap: anywhere;
}

#main .main_right_bot :is(th, td):first-child {
  width: auto;
  padding-inline-start: 14px;
  background: none;
}

#main .main_right_bot th:nth-child(2) { width: 13%; }
#main .main_right_bot th:nth-child(3) { width: 15%; }
#main .main_right_bot th:nth-child(4) { width: 11%; }
#main .main_right_bot th:nth-child(5) { width: 11% !important; }

#main .main_right_bot td:last-child a {
  color: var(--teal);
  font-weight: 650;
}

#main .content_left {
  padding-bottom: 18px;
}

#main .content_left > .place {
  position: static;
  padding: 8px 15px;
  color: var(--muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}

#main .content_left > table {
  width: 100%;
  border-collapse: collapse;
}

#main .content_left > table td {
  width: auto;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
  background: none;
}

#main .content_left > table td > a {
  display: block;
  min-height: 44px;
  padding: 10px 0;
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

#main .content_left > :is(h1, h2) {
  margin: 0;
  padding: clamp(14px, 2.5vw, 29px);
  color: var(--ink);
  font: 720 clamp(22px, 2.7vw, 32px)/1.42 var(--sans);
  text-align: center;
  overflow-wrap: anywhere;
}

#main .content_left > :is(.content_title, .content_title_2) {
  padding: 8px 15px;
  border: 0;
  color: var(--muted);
  background: var(--wash);
  font: 14px/1.55 var(--sans);
  overflow-wrap: anywhere;
}

#main .content_left > :is(.content_title, .content_title_2):empty {
  display: none;
}

#main .content_left > :is(.content_title, .content_title_2) ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 12px;
  float: none;
  position: static;
  padding: 0;
}

#main .content_left > :is(.content_title, .content_title_2) li {
  float: none;
  position: static;
  margin: 0;
}

#main .content_left > :is(.content_title, .content_title_2) li span {
  padding: 0;
}

#main .content_left > :is(.content, .next_pre, p) {
  min-width: 0;
  padding: 0 clamp(13px, 3vw, 27px);
  overflow-wrap: anywhere;
}

#main .content_left > .content {
  max-width: 100%;
  color: var(--ink);
  font: 16px/1.78 var(--sans);
}

#main .content_left .weekly-date {
  text-align: center;
  text-indent: 0;
}

#main .content_left #MyContent :is(img, video, iframe) {
  max-width: 100% !important;
}

#main .content_left #MyContent img {
  height: auto !important;
}

#main .content_left > .xzbm:empty {
  display: none;
}

#main .content_left #site-registration,
#main .content_left .sr-grid,
#main .content_left .sr-grid > * {
  min-width: 0;
  max-width: 100%;
}

#main .contact p {
  margin: 0;
  padding: 9px 15px;
  color: var(--muted);
}

#main #fenye {
  max-width: 100%;
  padding: 4px 12px;
  color: var(--muted);
  line-height: 2.15;
  overflow-wrap: anywhere;
}

#main #fenye a {
  display: inline-block;
  min-height: 29px;
  margin: 2px;
  padding: 0 7px;
  border: 1px solid var(--line);
  color: var(--navy);
  white-space: nowrap;
}

#main #fenye select {
  max-width: 100%;
}

#main .yqlj h4 {
  padding: 8px 0;
  color: var(--muted);
  background: none;
}

#main .yqlj ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

#main .yqlj li {
  float: none;
  margin: 0;
}

#container > #footer {
  margin: var(--gap) 0 0;
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: none;
  font: 14px/1.6 var(--sans);
  overflow-wrap: anywhere;
}

#container > #footer p {
  margin: 6px 0;
}

@media (max-width: 970px) {
  #main .search tr {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
  }

  #main .search .style3 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  body:has(> .fixed-bottom) > #container {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  #banner > .nav ul:has(> li) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #banner > .nav li:nth-child(n + 5) {
    border-top: 1px solid #fff2;
  }

  #banner > .nav li:last-child {
    grid-column: span 2;
  }

  #banner > .nav li a {
    min-height: 45px;
    font-size: 14px;
  }

  #main:has(> .main_c + .main_right),
  #main:has(> .content_left + .category_right) {
    grid-template-columns: minmax(0, 1fr);
  }

  #main .content_left > .content,
  #main .content_left #MyContent table {
    overflow-x: auto;
  }

  #main .content_left #MyContent table {
    display: block;
    max-width: 100%;
  }

  #main .main_right_bot :is(table, tbody) {
    display: block;
  }

  #main .main_right_bot tr {
    display: grid;
    grid-template-columns: 1fr 1.2fr minmax(0, .8fr) auto;
    padding: 5px 11px;
    border-bottom: 1px solid var(--line);
  }

  #main .main_right_bot :is(th, td) {
    width: auto !important;
    padding: 3px;
    border: 0;
  }

  #main .main_right_bot :is(th, td):first-child {
    grid-column: 1 / -1;
    padding-inline-start: 3px;
  }

  #main .main_right_bot .style1 > a {
    min-height: 31px;
    padding-block: 4px;
    font-size: 15px;
  }

  body > .fixed-bottom {
    display: block;
    position: fixed;
    inset: auto 0 0;
    z-index: 100;
    width: auto;
    margin: 0;
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--navy);
  }

  .fixed-bottom ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .fixed-bottom ul > li {
    display: block;
    width: auto;
    border-inline-end: 1px solid #fff2;
  }

  .fixed-bottom ul > li:last-child {
    background: var(--navy-light);
  }

  .fixed-bottom ul > li > a {
    display: grid;
    min-height: 54px;
    place-content: center;
    justify-items: center;
    gap: 2px;
    color: #fff;
    font: 650 12px/1.25 var(--sans);
    text-align: center;
  }

  .fixed-bottom img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
  }
}

@media (prefers-reduced-motion: reduce) {
  #banner > .nav li a { transition: none; }
}
