/*
 * Website look, rebuilt from the 2014 panfu.com stylesheet (cdn.young-internet.com/.../panfu/website/css/style.css,
 * Wayback Machine). Images in /web/img are the original sprites, plus the home.swf intro art
 * (forest, sign, pandas, purple button) exported with FFDec. Same ids/classes as the original
 * where possible; below 990px the fixed 960px layout stacks for phones.
 */
@font-face { font-family: "Eyeful"; src: url("fonts/Eyeful.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Hiruko"; src: url("fonts/hirukoregular-webfont.woff") format("woff"); font-display: swap; }

:root { color-scheme: light; }
* { box-sizing: border-box; }
html, body, div, ul, ol, li, form, fieldset, input, h1, h2, h3, p { margin: 0; padding: 0; }
ul { list-style: none; }
img { border: 0; }
body { background: #845616; font: 13px/1.45 Arial, Helvetica, sans-serif; color: #000; min-width: 320px; }
a, a:visited { color: #339900; }
.wrap { width: 960px; margin: 0 auto; position: relative; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header: logo, claim, buttons, menu ---------- */
#header-box { position: relative; height: 86px; z-index: 20; background: #9fd35a url("img/backgrounds.png") 0 -176px repeat-x; }
#header-box::before { content: ""; position: absolute; left: 0; top: 0; width: 50%; height: 86px; background: #5cb800 url("img/backgrounds.png") 0 0 repeat-x; }
#header { position: relative; width: 960px; height: 86px; margin: 0 auto; background: url("img/backgrounds.png") 0 -176px repeat-x; }
#header-left { float: left; width: 327px; height: 86px; background: url("img/backgrounds.png") 0 0 repeat-x; }
#header-logo { float: left; position: relative; width: 250px; height: 80px; background: url("img/logos_claims.png") 0 -2px no-repeat; }
#header-logo a { display: block; width: 250px; height: 80px; }
#header-logo .text { position: absolute; right: 0; bottom: 0; width: 170px; height: 28px; background: url("img/logos_claims.png") -78px -309px no-repeat; pointer-events: none; }
#header-transition { float: left; width: 77px; height: 86px; background: url("img/backgrounds.png") 0 -88px no-repeat; }
#header-bar { float: right; height: 54px; padding-top: 12px; display: flex; gap: 10px; align-items: flex-start; }
#header-bar .hint { color: #fff; font-size: 11px; line-height: 15px; text-align: right; padding-top: 1px; text-shadow: 0 1px 1px rgba(0,0,0,.25); }
#header-bar .hint a { color: #fff; }
.btn-small { display: inline-block; width: 118px; height: 30px; line-height: 30px; text-align: center; background: url("img/graphics_home.png") 0 -242px no-repeat;
             color: #6a4932 !important; font-weight: bold; font-size: 14px; text-decoration: none; white-space: nowrap; }
.btn-small:hover { background-position: -174px -242px; }
#header-menu { position: absolute; right: 0; bottom: 4px; height: 28px; }
#header-menu li { float: left; border-left: 1px dotted #5a8f1d; }
#header-menu li:last-child { border-right: 1px dotted #5a8f1d; }
#header-menu a { display: block; height: 28px; padding: 7px 16px 0; color: #000; text-decoration: none; }
#header-menu li:hover { background: #5a8f1d; border-left-color: #8cb341; }
#header-menu li:hover a { color: #fff; }
#header-menu li.currentPage a { border-bottom: 2px solid #f3c342; }

/* ---------- Main box: the home intro, or the forest band above subpages ---------- */
#main-box { position: relative; z-index: 10; height: 198px; background: #a9d21d url("img/header_sections.png") 50% 0 repeat-x; }
#main-box .wrap { height: 100%; }
#main-box.main { height: 382px; background-image: url("img/home_strip.png"); }
#main-box.main .wrap { width: 980px; background: url("img/home_forest.jpg") 0 0 no-repeat; }

#intro-pandas { position: absolute; left: 40px; bottom: 14px; width: 404px; height: 236px; }
#intro-pandas img { position: absolute; left: 0; bottom: 0; width: 404px; height: auto; opacity: 0; transition: opacity .8s; }
#intro-pandas img.on { opacity: 1; }
#intro-sign { position: absolute; right: 26px; top: 40px; width: 405px; height: 330px; background: url("img/home_sign.png") no-repeat;
              font-family: "Eyeful", Arial, sans-serif; color: #fff; text-shadow: 0 1px 2px rgba(60,25,0,.55); }
#intro-sign h1 { position: absolute; left: 26px; right: 26px; top: 38px; font-size: 17px; font-weight: bold; text-align: center; color: #fff; }
#intro-sign ul { position: absolute; left: 30px; right: 26px; top: 88px; }
#intro-sign li { display: flex; align-items: center; gap: 10px; height: 41px; font-size: 15px; font-weight: bold; }
#intro-sign li img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.btn-play { position: absolute; display: block; width: 260px; height: 77px; padding-top: 15px; text-align: center; text-decoration: none;
            background: url("img/home_button.png") 0 0 / 260px 77px no-repeat; color: #fff !important;
            font: bold 26px/1.2 "Eyeful", Arial, sans-serif; text-shadow: 0 2px 2px rgba(90,0,90,.5); }
.btn-play:hover { background-image: url("img/home_button_hover.png"); }
#intro-sign .btn-play { left: 52px; top: 262px; }

/* ---------- Teaser boxes on the home page ---------- */
#boxes-box { background: #a9d21d; }
#boxes-box .boxes { width: 935px; margin: 0 auto; padding: 0 0 48px; display: flex; gap: 28px; }
.teaser { position: relative; width: 293px; flex: none; }
.teaser .teaser-header { height: 83px; padding: 20px 18px 0; background: url("img/graphics_home.png") 0 -351px no-repeat;
                         color: #fff; font-size: 24px; font-weight: bold; }
.teaser.header-yellow .teaser-header { background-position: 0 -450px; color: #845616; }
.teaser.header-blue .teaser-header { background-position: 0 -535px; }
.teaser .teaser-content { min-height: 221px; padding: 0 18px 60px; background: url("img/box_middle.png") 0 0 repeat-y; }
.teaser .teaser-content h2 { font-size: 14px; font-weight: bold; color: #390; margin-bottom: 12px; }
.teaser .teaser-content p { margin-bottom: 10px; }
.teaser .teaser-footer { height: 16px; background: url("img/graphics_home.png") 0 -435px no-repeat; }
.teaser .button { position: absolute; right: 16px; bottom: 26px; width: 128px; height: 48px; background: url("img/graphics_home.png") 0 0 no-repeat; }
.teaser .button:hover { background-position: -128px 0; }
.teaser .button.yellow { background-position: 0 -48px; }
.teaser .button.yellow:hover { background-position: -128px -48px; }
.teaser .button a { display: block; height: 48px; padding-top: 15px; text-align: center; color: #fff; font-size: 14px; font-weight: bold; text-decoration: none; }
.teaser .button.yellow a { color: #845616; }
.teaser.parents { height: 325px; background: url("img/parents_teaser.png") no-repeat; }
.teaser.parents .title { height: 68px; line-height: 64px; text-align: center; color: #fff; font-size: 24px; font-weight: bold; }
.teaser.parents ul { padding: 4px 14px 0 63px; }
.teaser.parents .button { bottom: 12px; }
.teaser.parents li { min-height: 44px; margin-bottom: 4px; color: #666; font-size: 13px; font-weight: bold; line-height: 16px; display: flex; align-items: center; }

/* ---------- Subpages: plank title, container, side menu ---------- */
#pages { background: #49981d url("img/background_stripe.png") 0 0 repeat-x; padding-bottom: 70px; }
#pages .pages { width: 959px; margin: -100px auto 0; position: relative; z-index: 11; }
#pages .pages-header { position: relative; height: 26px; }
#pages .pages-header .border { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: url("img/container_borders.png") 0 0 no-repeat; }
#pages .pages-header .title { position: absolute; left: 0; bottom: 0; width: 249px; height: 48px; background: url("img/graphics.png") 0 -635px no-repeat;
                              text-align: center; line-height: 42px; text-transform: uppercase; color: #fff; font-size: 20px; font-weight: bold; }
#pages .pages-header .background { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; }
#pages.flat .pages { margin-top: 0; padding-top: 30px; }
#pages .pages-content { display: flex; flex-direction: row-reverse; justify-content: space-between; background: url("img/container_middle.png") 0 0 repeat-y; min-height: 480px; }
#pages .pages-footer { height: 12px; background: url("img/container_borders.png") 0 -12px no-repeat; }
#pages.one-col .pages-header .border { background-position: 0 -23px; }
#pages.one-col .pages-content { min-height: 0; background: #fff; box-shadow: inset 4px 0 0 -3px rgba(0,0,0,.25), inset -4px 0 0 -3px rgba(0,0,0,.25); }
#pages.one-col .pages-footer { background-position: 0 -34px; }
.pagesContent { width: 684px; margin: 16px 16px 16px 0; }
#pages.one-col .pagesContent { flex: 1; width: auto; margin: 16px 30px; }
.pagesContent h1 { font-size: 24px; font-weight: bold; color: #390; line-height: 28px; padding-bottom: 20px; }
.pagesContent h2 { font-size: 18px; font-weight: bold; color: #390; padding: 10px 0 10px; }
.pagesContent p { padding-bottom: 10px; line-height: 18px; }
.pagesContent ul.checkMark { margin-bottom: 10px; }
.pagesContent ul.checkMark > li { position: relative; padding: 0 0 8px 26px; line-height: 18px; }
.pagesContent ul.checkMark > li::before { content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 18px; background: url("img/graphics_home.png") -270px -95px no-repeat; }
.pagesContent ol { margin: 0 0 10px 22px; list-style: decimal; }
.pagesContent ol li { padding: 2px 0; line-height: 18px; }
.pagesContent code { background: #f1f7e6; border: 1px solid #d6e6bd; padding: 0 4px; font-size: 12px; word-break: break-all; }
.pagesContent details { border-top: 1px dashed #b6d08a; padding: 8px 0; }
.pagesContent summary { cursor: pointer; font-weight: bold; color: #390; font-size: 14px; }
.pagesContent .small { font-size: 11px; color: #666; }
.pagesContent .contact { font-weight: bold; font-size: 16px; }
.pagesMenu { width: 244px; margin: 12px 0 16px 4px; flex: none; }
.pagesMenu li { width: 227px; height: 44px; margin-left: 5px; background: url("img/graphics.png") -251px -713px no-repeat; }
.pagesMenu li:first-child { height: 60px; background-position: -251px -634px; }
.pagesMenu li:first-child a { line-height: 76px; }
.pagesMenu li a { display: block; height: 100%; line-height: 44px; text-align: center; color: #fff; font-size: 14px; font-weight: bold; text-decoration: none; }
.pagesMenu li a:hover, .pagesMenu li.active a { text-decoration: underline; }
.pagesMenu .side-panda { display: block; margin: 20px auto 0; width: 150px; }

/* Original look-alike download buttons */
.downloads { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0 18px; }
.dl { position: relative; flex: 1 1 200px; padding: 12px 14px 14px; border: 2px solid #d6e6bd; border-radius: 10px; background: #f6faee; color: #000 !important; text-decoration: none; }
.dl strong { display: block; font-size: 18px; color: #390; }
.dl span { font-size: 12px; color: #555; }
.dl .btn-small { display: block; margin-top: 10px; }
.dl.mine { border-color: #f39a13; background: #fff8e6; }
.dl .mine-note { position: absolute; right: 10px; top: 10px; font-size: 11px; font-weight: bold; color: #e07b00; visibility: hidden; }
.dl.mine .mine-note { visibility: visible; }

/* ---------- Registration: Max with the key and the wooden sign ---------- */
#main-box.registration { height: 411px; background: #a9d21d url("img/home_strip.png") 0 -1px repeat-x; }
#main-box.registration .wrap { width: 979px; background: url("img/login_landingpage_bg.png") 0 0 no-repeat; }
#register-sign { position: absolute; left: 318px; top: 60px; width: 386px; height: 330px; color: #fff; font-size: 12px; }
#register-sign h1 { font: bold 22px/1.2 "Eyeful", Arial, sans-serif; color: #fff; text-align: center; margin: 2px 0 8px; text-shadow: 0 2px 2px rgba(0,0,0,.45); }
.field { display: flex; align-items: center; margin-bottom: 5px; }
.field > label, .field > .label { width: 128px; flex: none; font-weight: bold; text-shadow: 0 1px 1px rgba(0,0,0,.5); }
.field input[type=text], .field input[type=password], .field input[type=email], .field input[type=date] {
  width: 220px; height: 26px; padding: 0 8px; border: 2px solid #5a3108; border-radius: 6px; background: #fffbea; font: 13px Arial, sans-serif; color: #000; }
.field input:focus { outline: 2px solid #f3c342; outline-offset: 0; }
.field .choices { display: flex; gap: 14px; }
.field .choices label { display: flex; align-items: center; gap: 4px; font-weight: bold; cursor: pointer; }
.field .choices input { accent-color: #f39a13; width: 16px; height: 16px; }
.field.agree { font-size: 11px; line-height: 14px; margin: 6px 0 0 0; align-items: flex-start; gap: 6px; }
.field.agree > label { width: auto; flex: 1; }
.field.agree a { color: #ffd23f; }
.field.agree input { margin-top: 1px; accent-color: #f39a13; }
.hp { position: absolute; left: -9999px; }
#name-state { display: block; font-size: 11px; line-height: 13px; height: 13px; margin: -4px 0 1px 128px; color: #ffe27a; }
#name-state.good { color: #c6ff7a; }
#register-form .btn-play { position: relative; margin: 2px auto 0; width: 210px; height: 62px; padding-top: 11px; background-size: 210px 62px; font-size: 21px; border: 0; cursor: pointer; }
#register-error { display: none; position: absolute; left: 0; right: 0; top: 100%; margin-top: 8px; padding: 8px 12px; background: #fff3d6; border: 2px solid #e07b00; border-radius: 8px; color: #7a3a00; font-weight: bold; text-align: center; }
#register-error.show { display: block; }
#register-done { display: none; text-align: center; padding-top: 6px; }
#register-done p { font-size: 15px; line-height: 21px; margin-bottom: 14px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
#register-done .btn-play { position: relative; margin: 0 auto; }
#register-closed { display: none; text-align: center; font-size: 15px; line-height: 21px; padding-top: 50px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* ---------- Green navigation with the pandas, brown footer ---------- */
#navigation-box { clear: both; }
#navigation-box .bar { height: 20px; background: #a9d21d url("img/backgrounds.png") 0 -281px repeat-x; }
#pages + #navigation-box .bar { background-color: #49981d; }
#navigation { background: #17a000 url("img/backgrounds.png") 0 -300px repeat-x; padding: 24px 0; min-height: 150px; }
#navigation .wrap { min-height: 110px; }
#navigation .column { display: inline-block; vertical-align: top; width: 180px; margin: 0 10px 0 16px; }
#navigation .column li { border-bottom: 1px dashed #fff; }
#navigation .column a { display: block; padding: 8px 0; color: #fff; text-decoration: none; font-size: 12px; }
#navigation .column a:hover { color: #333; }
#navigation .pandas { position: absolute; right: 0; top: -90px; width: 204px; height: 220px; background: url("img/panda.png") -196px 0 no-repeat; }
#footer-box .bar { height: 19px; background: #845616 url("img/backgrounds.png") 0 -262px repeat-x; }
#footer { width: 960px; margin: 0 auto; padding: 14px 16px 30px; color: #fff; font-size: 12px; }
#footer a { color: #fff; }

/* ---------- Phones and small windows ---------- */
@media (max-width: 989px) {
  .wrap, #header, #footer, #pages .pages { width: auto; }
  #header-box { height: auto; background: #5cb800 url("img/backgrounds.png") 0 0 repeat-x; }
  #header-box::before { display: none; }
  #header { height: auto; background: none; display: flex; flex-wrap: wrap; align-items: center; padding: 0 16px; }
  #header-left { width: auto; background: none; }
  #header-logo { width: 220px; height: 70px; background-size: 220px auto; }
  #header-logo a { width: 220px; height: 70px; }
  #header-logo .text { display: none; }
  #header-transition { display: none; }
  #header-bar { margin-left: auto; padding: 0; height: auto; }
  #header-bar .hint { display: none; }
  #header-menu { position: static; width: calc(100% + 32px); margin: 0 -16px; height: auto; background: #9fd35a; overflow-x: auto; white-space: nowrap; }
  #header-menu ul { display: flex; }
  #header-menu li { float: none; }
  #header-menu a { padding: 7px 12px 0; }

  #main-box.main { height: auto; background: #a9d21d url("img/home_strip.png") 0 0 repeat-x; }
  #main-box.main .wrap { width: auto; background-position: 30% 0; padding: 170px 16px 16px; }
  #intro-pandas { left: 50%; margin-left: -150px; top: 4px; bottom: auto; width: 300px; height: 176px; }
  #intro-pandas img { width: 300px; }
  #intro-sign { position: relative; right: auto; top: auto; margin: 0 auto; width: 100%; max-width: 405px; height: auto; padding: 32px 22px 22px;
                background: #8a4f12; border: 4px solid #6e3a08; border-radius: 16px; box-shadow: inset 0 0 0 6px #9b5c1b; }
  #intro-sign h1, #intro-sign ul { position: static; }
  #intro-sign h1 { margin: -14px 0 10px; }
  #intro-sign li { height: auto; padding: 4px 0; }
  #intro-sign .btn-play { position: relative; left: auto; top: auto; margin: 12px auto 0; }

  #boxes-box .boxes { width: auto; padding: 24px 16px 40px; flex-wrap: wrap; justify-content: center; gap: 20px; }

  #main-box { height: 120px; }
  #pages .pages { margin: -50px 16px 0; }
  #pages .pages-header .border, #pages .pages-footer { background: #fff; border-radius: 6px 6px 0 0; }
  #pages .pages-footer { border-radius: 0 0 6px 6px; }
  #pages .pages-content { flex-direction: column; background: #fff; }
  #pages .pages-header .title { left: 50%; margin-left: -124px; }
  .pagesContent, #pages.one-col .pagesContent { width: auto; margin: 16px; }
  .pagesMenu { width: auto; margin: 0 0 16px; display: flex; flex-direction: column; align-items: center; }
  .pagesMenu .side-panda { display: none; }

  #main-box.registration { height: auto; background: #a9d21d; }
  #main-box.registration .wrap { width: auto; background: url("img/home_forest.jpg") 30% 0 no-repeat; padding: 30px 16px; }
  #register-sign { position: relative; left: auto; top: auto; margin: 0 auto; width: 100%; max-width: 420px; height: auto; padding: 18px;
                   background: #8a4f12; border: 4px solid #6e3a08; border-radius: 16px; box-shadow: inset 0 0 0 6px #9b5c1b; }
  .field { flex-wrap: wrap; }
  .field > label, .field > .label { width: 100%; margin-bottom: 2px; }
  .field input[type=text], .field input[type=password], .field input[type=email], .field input[type=date] { width: 100%; }
  #name-state { margin-left: 0; }
  #register-error { position: static; margin-top: 10px; }

  #navigation .wrap { padding: 0 16px; }
  #navigation .column { width: auto; min-width: 140px; margin: 0 16px 12px 0; }
  #navigation .pandas { display: none; }
  #footer { padding: 14px 16px 30px; }
}

/* Game page (play.html): the 2014 www.panfu.com/play.html, the game in a white box with the menu,
   then the grass and the chat rules. The client's stage is 772x480, the size of #game-embed. */
.page_game #game-box { padding-top: 20px; background: #339900; }
.page_game #game-box .container { width: 785px; margin: 0 auto; padding-bottom: 8px; }
.page_game #game-window { background: url("img/bg_game.gif") 0 0 no-repeat; width: 785px; height: 540px; }
.page_game #game-window .menu { height: 40px; margin-right: 10px; }
.page_game #game-window .menu ul { float: right; }
.page_game #game-window .menu li { float: left; margin-top: 4px; height: 36px; border-right: 1px dotted #666; }
.page_game #game-window .menu li:last-child { border-right: none; }
.page_game #game-window .menu li:hover { background-color: #8cb342; }
.page_game #game-window .menu a { display: block; padding: 0 20px; line-height: 36px; color: #000; text-decoration: none; font-size: 12px; }
.page_game #game-window .logo { padding: 5px 0 0 12px; }
.page_game #game-window .logo a { display: block; width: 110px; height: 34px; background: url("img/graphics.png") -360px -595px no-repeat; }
.page_game #game-embed { background: url("img/game_preloader_bg.png"); margin: 3px 0 0 6px; width: 772px; height: 480px; }
.page_game #game-embed > :not(noscript) { display: block; width: 100%; height: 100%; }
.page_game #navigation-box .bar { background-color: #339900; }
.page_game #navigation { min-height: 100px; }
.rules-game { width: 967px; margin: 0 auto; }
.rules-game.header { background: url("img/box_rules_top-bottom.png") 0 0 no-repeat; height: 15px; }
.rules-game.content { background: url("img/box_rules_middle.png") 0 0 repeat-y; padding: 0 5px; overflow: hidden; font-size: 12px; line-height: normal; }
.rules-game.footer { background: url("img/box_rules_top-bottom.png") 0 -17px no-repeat; height: 15px; }
.rules-game .intro { padding: 0 15px; font-weight: bold; margin-bottom: 20px; }
.rules-game .outro { font-weight: bold; text-align: center; margin-bottom: 10px; }
.rules-game .columns { text-align: center; }
.rules-game .columns > li { display: inline-block; vertical-align: top; text-align: left; }
.rules-column { width: 297px; margin: 0 8px; }
.rules-column li { padding-bottom: 16px; }
.rules-column .icon { float: left; background-image: url("img/graphics.png"); }
.rules-column .icon.chat { background-position: -388px -535px; width: 57px; height: 34px; }
.rules-column .icon.mute { background-position: -369px -373px; width: 49px; height: 36px; }
.rules-column .icon.star { background-position: -226px -64px; width: 37px; height: 37px; }
.rules-column .icon.whistle { background-position: -418px -373px; width: 48px; height: 36px; }
.rules-item { padding-left: 60px; font-size: 11px; line-height: 1.2; }
.rules-item h2 { font-size: 11px; font-weight: bold; }

@media (max-width: 990px) {
  .page_game #game-box { padding: 10px 8px 0; }
  .page_game #game-box .container { width: auto; max-width: 785px; }
  .page_game #game-window { width: auto; height: auto; background: #fff; border-radius: 10px; padding-bottom: 8px; }
  .page_game #game-window .menu { height: auto; margin: 0; display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; }
  .page_game #game-window .menu ul { float: none; display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .page_game #game-window .logo { padding: 2px 0 0 8px; flex: none; }
  .page_game #game-window .menu a { padding: 0 10px; }
  .page_game #game-embed { width: auto; height: auto; aspect-ratio: 772 / 480; margin: 3px 6px 0; background-size: cover; }
  .rules-game { width: auto; margin: 0 8px; }
  .rules-game.header, .rules-game.footer { display: none; }
  .rules-game.content { background: #fff; border-radius: 10px; padding: 14px 6px; }
  .rules-column { width: auto; max-width: 297px; }
}
