/* What the old site's style sheets need to draw the same page today, and its captions in Vietnamese.
   The old sheets come from the capture and are not edited (website/build.py); this sheet is loaded after them. */

@font-face { font-family: "Be Vietnam Pro"; src: url(fonts/BeVietnamPro-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(fonts/BeVietnamPro-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

/* Beyond the page's own width the window keeps the colour of its ground: the home page's navy, which both of its
   paintings end in, and the inner pages' dark tile. */
html { background: #101b28; }
html:has(body.site-home), body.site-home { background: #002945; }
/* The window always has its upright scroll bar: the page is enlarged to the width beside it (site.js), and a bar
   that came only with the enlarged page would take a strip of that width. */
html { overflow-y: scroll; }

/* The centre column's boxes hold floats and margins the way the browsers of 2013 did. */
.col3_m, .col3_m .margin { display: flow-root; }
/* A float-clearing dot has no height but had a line of its own, which today's browsers count as 18 px of page
   below the last painting. */
.clearfix::after { font-size: 0; line-height: 0; }

/* One face for the whole site; the old sheets name Chinese faces in a few places. */
body, input, button, .title, .title_art, .quickJump label { font-family: "Be Vietnam Pro", arial, sans-serif; }

/* ---- the pages' paintings: backgrounds that hold more pixels than the old ones, and over them the figures and
   ornaments, each a layer of its own (website/build.py writes their places). The layers lie under the page's own
   parts; those of the header are cut at its lower edge, where the old picture ended; the lady is whole and is not
   cut. The home page's two backgrounds run on beyond the old ones' edges (the upper one downward, the lower one
   upward, each ending in the page's navy). ---- */
.bg01 { overflow-x: clip; }
body.site-home .bg01 { background-image: url(art/scene.jpg); background-size: 1420px 1380px; }
body.site-home .bg02 { background-image: url(art/low.webp); background-size: 1420px 780px; }
body.site-inner .bg01 { background-image: url(art/scene-inner.jpg); background-size: 1420px 1209px; }
.wrap { background: none; isolation: isolate; }
.scene { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; }
.scene img { position: absolute; max-width: none; }
.scene .head { position: absolute; left: -209px; top: 0; width: 1420px; height: 513px; overflow: hidden; }
body.site-inner .scene .head { height: 381px; }
.scene .flip { transform: scaleX(-1); }

/* ---- the frames: the old site's own files and places, each with three pixels to the page's one and with the parts
   made again laid in (website/build.py, `PAINTINGS`). A rule here names the new file and the old file's size. ---- */
body.site-home .col3_t { background-image: url(art/ct3.webp); background-size: 751px 24px; }
body.site-home .col3_m, body.site-home .col3_b { background-image: url(art/col3.webp); background-size: 2253px 43px; }
body.site-home .row1 { background-image: url(art/row1.jpg); background-size: 751px 230px; }
body.site-home .module h3, body.site-home .module .c, body.site-home .xxzl, body.site-home .module1,
body.site-home .module1 h3 { background-image: url(art/box2.webp); background-size: 1810px 317px; }
body.site-home .xxzl h3, body.site-home .xxzl .c { background-image: none; }
body.site-home .xxzl dt { background-image: url(art/dt.jpg); background-size: 77px 26px; }
/* The inner pages' centre column: the same frame, with the home page's caps; it is as long as its article. */
body.site-inner .col3_t, body.site-inner .col3_m, body.site-inner .col3_b {
  background-image: url(art/col3-inner.webp); background-size: 2253px 150px;
}
body.site-inner .col3_m, body.site-inner .col3_m .margin { min-height: 0; }
body.site-inner .col3_m .margin { padding-bottom: 20px; }
/* The side column is one frame from top to foot: its top (the plate under the two buttons and the field of rings
   under it) is one picture, of which the field at the column's end shows more; the foot is put together from the
   same field and its own frame (website/build.py, `FOOT_FIELD`); the plain parts between take their borders from
   the same picture (the old site's middle tile stood one pixel to the right of the rest). */
.qNav { background: url(art/rail-top.jpg) no-repeat 0 0 / 236px 227px !important; }
#uc { height: 132px; background: url(art/rail-top.jpg) no-repeat 0 -51px / 236px 227px; }
.cs .margin { background: url(art/rail-top.jpg) no-repeat 0 -53px / 236px 227px; }
.box1_b { background: url(art/rail-foot.webp) no-repeat 0 0 / 236px 60px; }
.box1_m { background-image: url(art/box1.webp); background-size: 708px 816px; background-position: -237px 0; }
.intro .margin, .zxkf .margin { background: url(art/intro.jpg) no-repeat 0 0 / 236px 100%; }
/* A title bar is see-through above its upper line (7 px) and below its lower one (3 px), where the old picture
   held a strip of the block above and of its own block. So the block above runs on under the bar's top and the
   block's own field under its foot, and the bar sits on both without a gap. */
.box2 { position: relative; margin-top: -7px; }
.box2 h3 { position: relative; z-index: 1; }
.box2 .margin { margin-top: -3px; padding-top: 3px; padding-bottom: 7px; }
.cs .margin { padding-bottom: 0; }
.intro p { padding-bottom: 8px; }

/* ---- the bar's captions are text ---- */

#nav a { text-indent: 0; text-align: center; text-decoration: none; font: 700 14px/27px "Be Vietnam Pro", arial, sans-serif; }
#nav a b {
  background: linear-gradient(#ffe992 20%, #f3a61f 80%); -webkit-background-clip: text; background-clip: text;
  color: transparent; filter: drop-shadow(0 1px 0 #2f0900) drop-shadow(0 0 1px #2f0900);
}
#nav a:hover, #nav a.current { background: url(art/nav-on.webp) no-repeat 0 0 / 100% 100% !important; }
#nav a:hover b, #nav a.current b { background: none; color: #7a1a0b; filter: none; text-shadow: 0 1px 0 rgba(255, 236, 170, .5); }

/* ---- captions the old site kept inside pictures are text, and what lay under them is a part that stands free: a
   picture with a see-through ground, stretched to its element, over whatever the page has there. A tab at rest is
   its caption on the bar, as the old site had it. ---- */
.box2 h3 {
  background: url(art/title.webp) no-repeat 0 0 / 100% 100% !important; text-indent: 0; text-align: center;
  font: 700 16px/49px "Be Vietnam Pro", arial, sans-serif;
}
.box2 h3 strong {
  background: linear-gradient(#fbf4cf 30%, #d3b968 82%); -webkit-background-clip: text; background-clip: text;
  color: transparent; filter: drop-shadow(0 1px 0 #241800) drop-shadow(0 0 1px #241800);
}
.news h3 a, .module1 h3 strong a, .module h3 strong a {
  background: none !important; text-indent: 0; text-align: center; text-decoration: none; color: #f1eea6;
  text-shadow: 0 1px 1px #06302f, 0 0 2px #06302f, 0 0 1px #06302f;
}
.news h3 a { font: 700 13px/31px "Be Vietnam Pro", arial, sans-serif; letter-spacing: -.2px; }
.news h3 a:hover, .news h3 a.current { background: url(art/tab-on.webp) no-repeat 0 0 / 100% 100% !important; }
.module1 h3 strong a, .module h3 strong a { font: 700 12px/25px "Be Vietnam Pro", arial, sans-serif; letter-spacing: -.2px; }
.module1 h3 strong a:hover, .module h3 strong a:hover, .module1 h3 strong a.current, .module h3 strong a.current {
  background: url(art/sec-on.webp) no-repeat 0 0 / 100% 100% !important;
}

/* The side column's two buttons: one button for both, its sign a part of its own, the caption text. */
.qNav a {
  position: relative; box-sizing: border-box; padding-left: 35px; background: url(art/btn.webp) no-repeat 0 0 / 100% 100%;
  text-indent: 0; text-decoration: none; white-space: nowrap; font: 700 12px/37px "Be Vietnam Pro", arial, sans-serif;
  letter-spacing: -.2px;
}
.qNav a::before {
  content: ""; position: absolute; left: 8px; top: 4px; width: 22px; height: 28px;
  background: url(art/icon-seal.webp) no-repeat center / contain;
}
.qNav a + a { padding-left: 31px; }
.qNav a + a::before { left: 9px; top: 10px; width: 17px; height: 17px; background-image: url(art/icon-coin.webp); }
.qNav a b {
  position: relative; background: linear-gradient(#fff36a 25%, #ff9a1a 80%); -webkit-background-clip: text; background-clip: text;
  color: transparent; filter: drop-shadow(0 1px 0 #4a1c00) drop-shadow(0 0 1px #4a1c00) drop-shadow(0 0 1px #4a1c00);
}

.zxkf .more { background-image: url(art/mbtn.jpg); background-size: 93px 19px; text-indent: 0; text-decoration: none; font: 700 11px/19px "Be Vietnam Pro", arial, sans-serif; color: #3a2f0a; }
#gotogame { background-image: url(art/qin.jpg); background-size: 31px 15px; text-indent: 0; padding: 0; width: 31px; height: 15px; border: 0; font: 700 10px/15px "Be Vietnam Pro", arial, sans-serif; color: #3d3a0c; cursor: pointer; }
#player { background-image: url(art/video.jpg); background-size: 191px 138px; text-decoration: none; }
#player .player_pic { padding-top: 110px; text-align: center; color: #fff; text-decoration: underline; }

/* The four schools: each button is put together from the same plate and ornaments, its figure and its name
   (website/build.py, `SECTS`); under the pointer its blue turns to jade. */
.feature2 li a.la1, .feature2 li a.la1:hover { background: url(art/s1.jpg) no-repeat 0 0 / 255px auto; }
.feature2 li a.la2, .feature2 li a.la2:hover { background: url(art/s2.jpg) no-repeat 0 0 / 255px auto; }
.feature2 li a.la3, .feature2 li a.la3:hover { background: url(art/s3.jpg) no-repeat 0 0 / 255px auto; }
.feature2 li a.la4, .feature2 li a.la4:hover { background: url(art/s4.jpg) no-repeat 0 0 / 255px auto; }
.feature2 li a.la1.on, .feature2 li a.la1:hover { background-image: url(art/s1-on.jpg); }
.feature2 li a.la2.on, .feature2 li a.la2:hover { background-image: url(art/s2-on.jpg); }
.feature2 li a.la3.on, .feature2 li a.la3:hover { background-image: url(art/s3-on.jpg); }
.feature2 li a.la4.on, .feature2 li a.la4:hover { background-image: url(art/s4-on.jpg); }

/* ---- Vietnamese runs longer than Chinese: the same boxes hold it with closer lines, and a list's line that does
   not fit ends in an ellipsis ---- */
.news li a, .module1 li a { white-space: nowrap; text-overflow: ellipsis; }
.title { font-size: 21px; }
.intro p { line-height: 19px; }
.xxzl dt { clear: left; }
.xxzl dd { line-height: 20px; padding-top: 3px; }
.quickJump input { margin-left: 2px; }

/* ---- a narrow screen (a phone): one column, 375 px wide, put together from the same parts; the script enlarges
   it to the screen's width. Order: the bar, the header's painting, the two buttons, the centre column, the side
   column, the foot. A block that fits the width keeps its size or is enlarged whole; a block that does not is as
   wide as the screen and as high as what it holds, in a frame whose corners keep their size (website/build.py,
   `CUTS`). ---- */
@media (max-width: 760px) {
  .wrap { width: 375px; display: flex; flex-direction: column; }
  .wrap::after { display: none; }
  .col1 { display: contents; }
  #nav { order: 0; } .banner { order: 1; } .qNav { order: 2; } .col3 { order: 3; } .box1 { order: 4; } #footer { order: 5; }
  body.site-home .bg01 { background-size: 947px 920px; }
  body.site-home .bg02 { background-size: 947px 520px; }
  body.site-inner .bg01 { background-size: 947px 806px; }

  /* The bar: two rows of four links on the bar's own plank. */
  #nav {
    height: 64px;
    background: url(art/bar.webp) no-repeat -150px -3px / 640px 38px, url(art/bar.webp) no-repeat -150px 29px / 640px 38px;
  }
  #nav li { display: grid; grid-template-columns: repeat(4, 1fr); }
  #nav li a { float: none; width: auto; height: 26px; margin: 3px 4px !important; line-height: 26px; }

  /* The header's painting: the same layers at places of their own, the logo between the two heads as on the wide
     page (its three parts 0.86 times as large). The monk's plate ends where the old header ended; here that edge
     melts away behind the orb. */
  .banner, body.site-home .banner, body.site-inner .banner { height: 387px; }
  .scene .head, body.site-inner .scene .head { left: 0; width: 375px; height: 451px; }
  .scene img { height: auto !important; }
  .scene .bar, .scene .crest-l, .scene .crest-r, .scene .in-vow { display: none; }
  .scene .logo { left: 157px !important; top: 64px !important; width: 61px !important; }
  .scene .phoenix { left: 126px !important; top: 83px !important; width: 140px !important; }
  .scene .slogan { left: 112px !important; top: 141px !important; width: 150px !important; }
  .scene .monk {
    left: -52px !important; top: 107px !important; width: 221px !important;
    -webkit-mask-image: linear-gradient(#000 82%, transparent 98%); mask-image: linear-gradient(#000 82%, transparent 98%);
  }
  .scene .dragon { left: 87px !important; top: 224px !important; width: 228px !important; }
  .scene .lady { left: 165px !important; top: 118px !important; width: 296px !important; }
  .scene .orb { left: 35px !important; top: 290px !important; width: 305px !important; }
  .scene .in-orb { left: 87px !important; top: 292px !important; width: 200px !important; }
  /* The smaller spirit dragon stays where the painting behind it has it (the painting's 385, 235, two thirds). */
  .scene .in-ghost { left: -29px !important; top: 157px !important; width: 97px !important; }
  #startgame { left: 112px; bottom: 0; width: 150px; height: 130px; }

  /* The two buttons: the side column's head plate closed by the column's foot, a box of its own. */
  .qNav { position: relative; zoom: 1.2; margin: 0 auto 60px; width: 188px; }
  .qNav::after {
    content: ""; position: absolute; left: 0; top: 51px; width: 236px; height: 60px;
    background: url(art/rail-foot.webp) no-repeat 0 0 / 236px 60px;
  }

  /* The centre column: its frame at half size, its blocks one under the other. */
  .col3 { float: none; width: 375px; margin-top: 10px; }
  body.site-home .col3_t, body.site-inner .col3_t { height: 12px; background: url(art/ct3.webp) no-repeat 0 0 / 375px 12px; }
  body.site-home .col3_m, body.site-inner .col3_m { background: url(art/col3.webp) repeat-y -375px 0 / 1125px 21.5px; padding-bottom: 3px; }
  body.site-home .col3_b, body.site-inner .col3_b { height: 11px; background: url(art/col3.webp) no-repeat -750px 0 / 1125px 21.5px; }
  body.site-home .row1 { display: flex; flex-direction: column; width: auto; height: auto; padding-top: 6px; background: none; }
  .news { order: 1; position: relative; isolation: isolate; float: none; width: auto; margin: 0 9px; padding: 0; }
  /* A frame's corners keep their size and its sides stretch. Between two such pieces a screen that enlarges the
     page by a part of a pixel leaves a hairline; under the title bar it would show light, so the bar's own colours,
     row by row, lie behind it. */
  .news::before, .module::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border: solid transparent;
    border-width: 40px 75px 14px 14px; border-image: url(art/news.jpg) 120 225 42 42 fill;
    background: linear-gradient(#2acbc6 0 1px, #118883 1px 2px, #155f5f 2px, #0c3c3b 28px, #083e37 28px 29px,
      #24797c 29px 30px, #002823 30px 31px, #092220 31px 32px, #b5c5ab 32px 39px, #32432c 39px 40px)
      border-box no-repeat 4px 0 / calc(100% - 8px) 40px;
  }
  .news h3 { padding-left: 8px; }
  .news h3 a { width: 72px; margin-right: 3px; }
  .tab_div { padding: 12px 16px 12px 16px; }
  .tab_div li a, .tab_div li a strong { width: 262px; }
  .tab_div .more { position: static; display: block; text-align: right; color: #0a6d7f; }
  .feature2 { order: 2; float: none; zoom: 1.36; height: auto; margin: 6px auto 0; }
  .feature2 ul { height: auto; }
  .feature { width: auto; height: auto; margin: 6px auto 2px; }
  .feature img { margin: 3px 2px; }
  .row { width: auto; }
  .module1 { float: none; margin: 6px auto; }
  .module { position: relative; isolation: isolate; width: 359px; margin: 6px auto; overflow: visible; }
  .module::before {
    border-width: 38px 110px 10px 70px; border-image: url(art/panel.webp) 114 330 30 210 fill;
    background: linear-gradient(#0b4256 0 1px, #51b3bc 1px 2px, #25747e 2px 3px, #2c6c74 3px, #2f6870 5px,
      #2d656a 7px, #306366 10px, #326262 15px, #1d494a 15px, #214647 19px, #214546 23px, #244849 28px,
      #214c4c 28px 29px, #64adaa 29px 30px, #225758 30px 31px, #1f4346 31px 32px)
      border-box no-repeat 4px 0 / calc(100% - 8px) 32px;
  }
  body.site-home .module h3, body.site-home .module .c, body.site-home .xxzl { background-image: none; }
  .xxzl { height: auto; }
  .xxzl dl { margin: 12px 10px 6px; }
  .xxzl dd { float: none; width: auto; margin-left: 85px; }
  .yxzt li { margin: 3px 12px; }

  /* The side column, enlarged whole; its empty field is left out. */
  .box1 { zoom: 1.5; margin: 12px auto 0; }
  .box1_m { min-height: 0; }
  #uc { display: none; }
  #footer { width: auto; padding: 14px 14px 20px; font-size: 10px; line-height: 15px; }

  /* An inner page: the same frame; the way to the page is a bar of its own and the article is as wide as the
     screen. */
  body.site-inner .col3_t {
    height: auto; padding-top: 12px;
    background: url(art/ct3.webp) no-repeat 0 0 / 375px 12px, url(art/col3.webp) repeat-y -375px 0 / 1125px 21.5px;
  }
  .breadcrumb {
    box-sizing: border-box; width: 359px; height: 38px; margin: 6px auto 0; padding: 0 0 0 45px; overflow: hidden;
    background: url(art/panel.webp) no-repeat 0 0 / 359px 316px; line-height: 38px; white-space: nowrap;
  }
  .title { padding: 10px 0 2px; text-align: center; }
  body.site-inner .col3_m .margin { width: auto; padding: 0 14px 16px; font-size: 14px; line-height: 23px; }
  .title_art { font-size: 15px; line-height: 22px; padding: 12px 0; margin-bottom: .6em; }
}
