html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {background:none repeat scroll 0 0 transparent;border:0 none;font-size:100%;margin:0;outline:0 none;padding:0;/*vertical-align:baseline;*/}
body {color:#000;font-family:verdana,helvetica,sans-serif;/*'MS UI Gothic',sans-serif;*/line-height:1.4;}
html > body {font-size:14px;}
h1, h2, h3 {color:#53524b;font-family:Arial,sans-serif;}
h1 {font-size:18px;margin-bottom:10px;}
a {color:#11c;text-decoration:none;}
a:visited {color:#11c;}
a:hover {text-decoration:underline;}
hr {border: none 0;border-top: 1px solid #ccc;height:1px;margin:10px 0 10px 0;}
select {font-size:14px;}

input[type='submit'], input[type='button'], button
{
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;
}

#page {width:730px;margin:0 auto;padding-bottom:20px;}
#header {height:55px;}
#header .links {margin:10px;position:absolute;text-align:right;}
#logo {position:absolute;margin:5px 0 0 0;width:220px;height:50px;}
#login_form {font-size:14px;margin: 10px;position:absolute;}
#email, #password {width:200px;height:20px;font-size:16px;margin:5px;}
#welcome {width: 100%;}
#welcome p {margin: 10px 0;}

.question-source-notice {
  box-sizing: border-box;
  width: 100%;
  margin: 14px 0 18px;
  padding: 11px 14px;
  border: 1px solid #a9cba9;
  border-radius: 7px;
  background: #f3faf1;
  color: #3f563d;
  line-height: 1.7;
}
.question-source-notice strong {
  margin-right: 8px;
  color: #2f6f35;
}

.system-update-notice {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #d69e2e;
  border-radius: 6px;
  background: #fffaf0;
  color: #5f4608;
  line-height: 1.7;
}
.system-update-notice__title {
  margin-bottom: 4px;
  font-weight: bold;
  font-size: 16px;
}
.system-update-notice p {
  margin: 3px 0;
}
.system-update-notice__period {
  font-weight: bold;
}

.banner {
    width: 100%;
}

#nav {margin:0 0 10px 0;}

#container {border:1px solid #ccc;min-height:300px;padding:15px;}
.full_pane {width:700px}

#subjects {border-collapse:collapse;margin:20px auto 20px;width:90%;}
#subjects td {border-collapse:collapse;border:1px solid #99CC99;padding:5px;text-align:center;}
#subjects .col1 {width:120px;vertical-align:middle;background-color:#efe;text-align:center;line-height:30px;}
#subjects .col5 {width:160px;text-align:center;}
#subjects a {display:block;width:144px;height:34px;margin-left:80px;color:#000;text-decoration:none;background-image: url(/static/button.png);background-position:0 0;background-repeat:no-repeat;text-align:center;line-height:34px;}
#subjects .heading {background-color:#c0ecc0;}
#subjects .heading_col {width:100px;background-color:#c0ecc0;}

.box {
  display: block;
  margin: 2px;
  padding: 5px;
  border: 1px solid #ccc;
  width: 330px;
  float: left;
}
.box form {
  text-align: center;
}
.box .tenki {
  height: 24px;
  float: right;
}

.home-stats-loading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 2px;
  color: #555;
  font-size: 13px;
}
.home-stats-loading--complete {
  visibility: hidden;
  min-height: 20px;
}
.home-stats-loading--complete .loading-ring {animation:none;}
.home-stats-loading--error {color:#8a3b12;}
.home-stat-placeholder {color:#999;}
.home-weather-loading {visibility:hidden;}
.home-stats-retry {margin-left:8px;padding:3px 8px;}
.loading-ring {
  box-sizing: border-box;
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 3px solid #d9e7da;
  border-top-color: #4caf50;
  border-radius: 50%;
  animation: loading-ring-spin .8s linear infinite;
}
.page-navigation-loading {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.82);
}
.page-navigation-loading__content {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #fff;
  color: #444;
}
@keyframes loading-ring-spin {to {transform:rotate(360deg);}}
@media (prefers-reduced-motion: reduce) {
  .loading-ring {animation-duration:1.8s;}
}


.news {border-collapse:collapse;margin:10px auto 10px;width:700px;}
.news td {border-collapse:collapse;border:1px solid #99CC99;padding:5px;vertical-align:top;}
.news .col1 {}
.news .col2 {width:200px;text-align:center;background-color:#efe;}
.news .heading {background-color:#c0ecc0;}

#footer {padding:18px 8px;text-align:center;color:#666;font-size:12px;}
.footer-links {display:flex;justify-content:center;flex-wrap:wrap;gap:8px 18px;margin-bottom:8px;}
.footer-copyright {margin:0;}

.support-intro {max-width:620px;margin:0 auto 18px;line-height:1.8;color:#444;}
.support-intro p {margin:5px 0;}
.support-form {box-sizing:border-box;max-width:620px;margin:0 auto;padding:20px;border:1px solid #d7dee3;border-radius:8px;background:#fafcfd;}
.support-field {margin-bottom:17px;}
.support-field label {display:block;margin-bottom:6px;font-weight:bold;color:#444;}
.support-field input,.support-field select,.support-field textarea {box-sizing:border-box;width:100%;padding:9px;border:1px solid #aeb9c1;border-radius:4px;background:#fff;font:inherit;line-height:1.5;}
.support-field textarea {resize:vertical;min-height:150px;}
.support-field input:focus,.support-field select:focus,.support-field textarea:focus {border-color:#2a8c30;outline:2px solid rgba(42,140,48,.18);}
.required,.optional {margin-left:5px;font-size:11px;font-weight:normal;}
.required {color:#a12424;}
.optional {color:#777;}
.support-privacy-note {margin:4px 0 15px;color:#666;font-size:12px;line-height:1.7;}
.support-submit {width:auto;min-width:180px;height:auto;cursor:pointer;}
.support-honeypot {position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important;}
.support-thanks {max-width:620px;margin:0 auto;padding:22px;border:1px solid #99cc99;border-radius:8px;background:#f1fbf1;line-height:1.8;text-align:center;}
.support-thanks p {margin:8px 0;}
.support-thanks-note {color:#555;font-size:12px;}
.privacy-policy {max-width:650px;margin:0 auto;color:#333;line-height:1.9;}
.privacy-policy h2 {margin:24px 0 7px;font-size:16px;}
.privacy-policy p {margin:6px 0;}
.privacy-policy-date {margin-top:28px!important;text-align:right;color:#666;font-size:12px;}

#messages {width:600px;margin:20px auto;}
#messages p {display:block;width:600px;margin:10px auto;color:#191;font-weight:bold;background-color:#cfc;padding:6px;border:1px solid #191;}
#errors {width:600px;margin:20px auto;}
#errors p {display:block;width:600px;margin:10px auto;color:#c11;font-weight:bold;background-color:#fcc;padding:6px;border:1px solid #c11;}

.button_submit {width:80px;height:20px;font-size:11px;line-height:11px;border:1px solid #333;}
/*
.button_big {width:160px;height:40px;line-height:40px;font-size:14px;border:0;background-color:#fff;background-image:url(/static/button.png);}
.button_big:hover {background-image:url(/static/button_hover.png);cursor:pointer;cursor:hand;}
*/
.button_big {
  width:160px;
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  border-radius: 8px;
}
.button_big:hover {
  background-color: #2A8C30;
}
.button_big:active {
  background-color: #6FCF72;
}

.button_mid {
  width:130px;
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 7px 14px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 13px;
  margin: 4px 2px;
  border-radius: 6px;
}
.button_mid:hover {
  background-color: #2A8C30;
}
.button_mid:active {
  background-color: #6FCF72;
}
a.button_big,
a.button_big:link,
a.button_big:visited,
a.button_big:hover,
a.button_mid,
a.button_mid:link,
a.button_mid:visited,
a.button_mid:hover {
  color: #fff;
  text-decoration: none;
}


.button_quiz {
  width: 160px;
}

/*
.button_small {width:90px;height:30px;line-height:30px;font-size:12px;border:0;background-color:#fff;background-image:url(/static/button_small.png);}
.button_small:hover {background-image:url(/static/button_small_hover.png);cursor:pointer;cursor:hand;}
*/
.button_small {width:90px;height:22px;line-height:22px;font-size:12px;border:1px solid #666;;background-color:#eee;}
.button_small:hover {cursor:pointer;cursor:hand;}

#button_thumb_up {width:45px;height:40px;line-height:40px;font-size:14px;border:0;background-color:#fff;background-image:url(/static/thumb_up.png);}
#button_thumb_up:hover {background-image:url(/static/thumb_up_hover.png);cursor:pointer;cursor:hand;}
#button_thumb_down {width:45px;height:40px;line-height:40px;font-size:14px;border:0;background-color:#fff;background-image:url(/static/thumb_down.png);}
#button_thumb_down:hover {background-image:url(/static/thumb_down_hover.png);cursor:pointer;cursor:hand;}

.full_pane .messages {width:600px;margin:20px auto;}
.full_pane .messages p {display:block;width:600px;margin:10px auto;color:#191;font-weight:bold;background-color:#cfc;padding:6px;border:1px solid #191;}
.full_pane .errors {width:600px;margin:20px auto;}
.full_pane .errors p {display:block;width:600px;margin:10px auto;color:#c11;font-weight:bold;background-color:#fcc;padding:6px;border:1px solid #c11;}
/*

.right_pane .errors {width:500px;}
.right_pane .errors p {display:block;width:500px;margin:0 0 10px 180px;color:#c11;font-weight:bold;background-color:#fcc;padding:6px;border:1px solid #c11;}

.right_pane .messages, {width:500px;margin:20px auto;}
.right_pane .messages p {display:block;width:500px;margin:0 0 10px 180px;color:#191;font-weight:bold;background-color:#cfc;padding:6px;border:1px solid #191;}
*/

.question_text {margin:10px 0 10px 0;}

.your_answer {}
.your_answer b {}
.result {}
/*
.correct {width:100px;height:30px;line-height:30px;text-align:center;color:#191;background-color:#cfc;border:1px solid #191;}
.incorrect {width:100px;height:30px;line-height:30px;text-align:center;color:#c11;background-color:#fcc;border:1px solid #c11;}
*/
.question_comment {margin:5px 0 10px 0;}
.question_id {margin:0 0 10px 0;}

/*=======*/
#question_area {font-size:15px;line-height:26px;}
.correct {width:200px;text-align:center;font-weight:bold;color:#090;font-size:16px;background-color:#dfd;margin-top:10px;padding:5px;}
.incorrect {width:200px;text-align:center;font-weight:bold;color:#900;font-size:16px;background-color:#fdd;margin-top:10px;padding:5px;}

.level {margin:10px 0 0 0;font-size:13px;line-height:16px;}
.creator {margin:5px 0 0 0;font-size:13px;line-height:16px;}
#rating {margin:0 0 5px 0;font-size:13px;line-height:22px;}
#your_rating {margin:0 0 5px 40px;font-size:13px;line-height:22px;}
#comments_info {text-align:left;margin:0 0 15px 0;font-size:13px;line-height:16px;}
.q_comment {margin-top:10px;}
.q_article {margin:8px 0 4px;color:#444;}
.score {margin:15px 0 0px 0;}
.q_body {margin:10px 0 10px 0;}
.q_info {font-size:14px;line-height:22px;margin-top:15px;}
.question_report {font-size:12px;line-height:20px;margin-top:8px;color:#666;}
.question_report a {color:#777;}
.question_report_form {max-width:520px;margin-top:8px;padding:10px;background:#f7f7f7;border:1px solid #ddd;}
.question_report_form label {display:block;margin-bottom:4px;}
.question_report_form textarea {box-sizing:border-box;width:100%;height:72px;margin-bottom:6px;font-size:14px;}
.question_report_form .button_small {width:auto;padding:0 12px;background-image:none;}
#question_report_message {margin-top:6px;color:#276b36;}
#user_comments {margin-top:10px;}
.q_comment i {color:#ccc;}
/*=======*/



.question_list a {display:block;padding:4px;}
.question_list a:hover {background-color:#ffc;}
.notes {font-size:11px;color:#666;}

.question_add td {vertical-align:top;padding:5px;}
textarea#question, textarea#comment {font-size:14px;width:500px;height:120px;}
textarea#revision_comment {font-size:14px;width:500px;height:60px;}
.question_browse {border-collapse:collapse;width:580px;margin:0 auto;}
.question_browse td {border-collapse:collapse;border:1px solid #ccc;padding:5px;}
.question_browse td.c1 {background-color:#efe;}
.question_browse i {color:#9c9;}

.revision {border-collapse:collapse;margin:10px auto 10px;width:580px;}
.revision td {border-collapse:collapse;border:1px solid #ccc;padding:5px;}
.revision td.c1 {width:80px;background-color:#efe;}
.revision td.c2, .revision td.c3 {background-color:#eee;}

#comment_body {width:400px;height:26px;}
.question_comment {margin:0 auto;}
#comments {width:660px;margin:10px auto;}
#comments i {color:#ccc;font-size:12px;margin:0 4px 0 4px;}
.input_default {font-size:14px;width:500px;height:  20px;}
.textarea_default {font-size:14px;width:500px;height:120px;}

.forum_browse {border-collapse:collapse;width:700px;margin:0 auto;margin-bottom:10px;}
.forum_browse td.title {background-color:#c0ecc0;}
.forum_browse td {border-collapse:collapse;border:1px solid #9c9;padding:5px;}
.forum_browse td.c1 {width:140px;background-color:#efe;text-align:center;vertical-align:top;line-height:30px;}
.forum_browse i {color:#9c9;}

.forums_topic_title {width:500px;float:left;}
.forums_topic_posted_on {width:180px;float:left;text-align:right;}

.forum_comment {border-collapse:collapse;width:700px;margin:0 auto;}
.forum_comment td.title {background-color:#ada;font-size:13px;padding:2px;}
.forum_comment td {border-collapse:collapse;border:1px solid #9c9;padding:5px;}
.forum_comment td.c1 {width:140px;background-color:#efe;text-align:center;vertical-align:top;line-height:30px;}
.forum_comment i {color:#9c9;}
.forums_comment_title {width:500px;float:left;font-weight:bold;color:#060;}
.forums_comment_posted_on {width:180px;float:left;text-align:right;}
.forum_comment td.divider {height:3px;line-height:0;padding:0;}

.forum_comments {display:block;width:700px;border:1px solid #999;margin-bottom:10px;}
.forum_comments b {display:block;width:700px;background-color:#ccc;height:20px;line-height:20px;font-size:14px;font-weight:normal;}
.forum_comments i {display:block;width:700px;height:40px;line-height:40px;font-size:14px;background-color:#eee;text-align:center;}

.item_selected {font-weight:bold;text-decoration:underline;color:#090;}
.item_selected:visited {color:#090;}

.minimail_submenu a {display:block;margin: 0 0 5px 0;}
.minimails {border-collapse:collapse;margin:10px auto 10px;width:700px;font-size:12px;}
.minimails td {border-collapse:collapse;padding:5px;}
.minimails tr {vertical-align:top;border:1px solid #ccc;}
.minimails a {display:block;}
.minimails thead {background-color:#efe;}
.minimails .read {background-color:#f3f3f3;font-weight:normal;}
.minimails .unread {background-color:#fff;font-weight:bold;}
.minimail_title {width:570px;font-size:18px;font-weight:bold;margin:0 auto 5px auto;}
.minimail_header1 {width:340px;float:left;}
.minimail_header2 {width:200px;text-align:right;float:left;}
.pagination {text-align:center;}
.pagination a, .pagination b {text-align:center;}

.settings_avatar {
  width: 70px;
  height: 70px;
  border: 1px solid #ccc;
}
.settings_nickname {

}

.avatar_wrapper {
  width: 260px;
  height: 82px;
}

.avatar {
  width: 80px;
  height: 80px;
  border: 1px solid #ccc;
  float: left;
  margin-right: 4px;
}

.leaderboard .avatar {
  width: 24px;
  height: 24px;
  border: 1px solid #eee;
  margin-right: 4px;
}

.avatar_nickname {
  display: inline-block;
  width: 170px;
  height: 28px;
  float: left;
  line-height: 28px;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.avatar_level {
  display: inline-block;
  width: 170px;
  height: 14px;
  line-height: 14px;
  font-size: 14px;
}

.avatar_level img {
  height: 14px;
}

.change_avatar {
  width: 70px;
  height: 70px;
  border: 1px solid #ccc;
}

.change_avatar_select {
  width: 100px;
  height: 100px;
  border: 1px solid #ccc;
}

.hidden {
  display: none;
}

.prefs {
  display: block;
  width: 100%;
  text-align: center;
}

#mg_stage {
  position: relative;
  display: block;
  margin: auto;
  width: 315px;
  height: 445px;
  border: 1px solid #ccc;
  background-image: url(bg1.png);
}

/*
#mg_top_ui_wrapper,
#mg_map_ui_wrapper,
#mg_bottom_ui_wrapper,
#mg_cards_ui_wrapper {
  position: absolute;
  width: 315px;
  height: 445px;
}
*/

#mg_top_ui {
  position: absolute;
  width: 315px;
  height: 55px;
  background-color: #999;
  font-size: 12px;
}

#mg_bottom_ui {
  position: absolute;
  bottom: 0;
  width: 315px;
  height: 75px;
  background-color: #666;
}

.button_nav {
  background-color: #4caf50;
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}

#mg_cards_ui {
  position: absolute;
  top: 55px;
  width: 315px;
  height: 315px;
  overflow: scroll;
  background-color: white;
}

.mg_list_card {
  width: 72px;
  height: 84px;
  border: 1px solid #ccc;
  float: left;
  margin: 2px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
}

#mg_card_popup_ui {
  position: absolute;
  top: 0px;
  width: 315px;
  height: 385px;
}
#mg_card_popup_backdrop {
  position: absolute;
  width: 315px;
  height: 445px;
  background-color: black;
  opacity: 0.6;
}
#mg_card_popup_frame {
  position: absolute;
  width: 245px;
  height: 320px;
  top: 25px;
  left: 35px;
  background-color: white;
}
#mg_card_popup_bg {
  position: absolute;
  width: 221px;
  height: 221px;
  top: 12px;
  left: 12px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
  border: 1px solid #ccc;
}
#mg_card_popup {
  position: absolute;
  width: 221px;
  height: 221px;
  top: 12px;
  left: 12px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid #ccc;
}
#mg_card_popup_ui button {
  position: absolute;
  width: 115px;
  bottom: -55px;
  left: 100px;
}
#mg_card_popup_name {
  position: absolute;
  bottom: 42px;
  left: 5px;
  width: 235px;
  height: 40px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}
#mg_card_popup_desc {
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 225px;
  height: 60px;
  font-size: 13px;
}
#mg_card_popup_msg {
  position: absolute;
  bottom: 5px;
  width: 315px;
  height: 30px;
  font-size: 18px;
  line-height: 30px;
  text-align: center;
  color: white;
}
#mg_map_ui {
  position: absolute;
  top: 55px;
  width: 315px;
  height: 315px;
}

#mg_bg_wrapper {
  position: absolute;
  width: 315px;
  height: 315px;
}
.mg_bgcell {
  position: absolute;
  width: 65px;
  height: 65px;
}
.bx0, .bx6 {width: 40px;}
.by0, .by6 {height: 40px;}
.bx1, .bx3, .bx5 {width: 35px;}
.by1, .by3, .by5 {height: 35px;}
.bx1 {left: 40px;}
.bx2 {left: 75px;}
.bx3 {left: 140px;}
.bx4 {left: 175px;}
.bx5 {left: 240px;}
.bx6 {left: 275px;}
.by1 {top: 40px;}
.by2 {top: 75px;}
.by3 {top: 140px;}
.by4 {top: 175px;}
.by5 {top: 240px;}
.by6 {top: 275px;}

#mg_cell_wrapper {
  position: absolute;
  width: 315px;
  height: 315px;
  overflow: hidden;
}
.mg_cell {
  position: absolute;
  width: 85px;
  height: 85px;
}
.x0, .x6 {width: 50px;}
.y0, .y6 {height: 50px;}
.x1, .x3, .x5 {width: 15px;}
.y1, .y3, .y5 {height: 15px;}
.x1 {left: 50px;}
.x2 {left: 65px;}
.x3 {left: 150px;}
.x4 {left: 165px;}
.x5 {left: 250px;}
.x6 {left: 265px;}
.y1 {top: 50px;}
.y2 {top: 65px;}
.y3 {top: 150px;}
.y4 {top: 165px;}
.y5 {top: 250px;}
.y6 {top: 265px;}

#mg_car_wrapper {
  position: absolute;
  z-index: 10;
  top: 130px;
  left: 130px;
  width: 52px;
  height: 52px;
  pointer-events: none;
}

#mg_car_bg {
  position: absolute;
  width: 52px;
  height: 52px;
}

#mg_car {
  position: absolute;
  width: 40px;
  height: 40px;
  top: -12px;
  left: 5px;
}

#mg_car_fg {
  position: absolute;
  width: 52px;
  height: 52px;
}

#mg_labels_wrapper {
  position: absolute;
  z-index: 9;
  pointer-events: none;
}
#mg_labels_wrapper div {
  position: absolute;
  width: 50px;
  height: 15px;
  font-size: 10px;
  font-weight: bold;
}
.lx1 {left: 60px;}
.lx3 {left: 160px;}
.lx5 {left: 260px;}
.ly1 {top: 40px;}
.ly3 {top: 140px;}
.ly5 {top: 240px;}
#l3_3 {top: 126px; left: 172px;}

#mg_hud {
  position: absolute;
}
#mg_hud .mg-direction-button {
  box-sizing: border-box;
  display: none;
  position: absolute;
  z-index: 8;
  width: 30px;
  height: 30px;
  padding: 2px;
  border: 2px solid #74552f;
  border-radius: 11px 9px 12px 10px;
  background: linear-gradient(145deg, #fff5b8 0%, #f0be55 76%, #dc9637 100%);
  box-shadow: 0 2px 0 #9b632b, 0 4px 5px rgba(61,45,25,.28), inset 0 1px 0 rgba(255,255,255,.7);
  color: #5d9b42;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.mg-direction-button__icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: currentColor;
  stroke: #426d35;
  stroke-width: 2.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.55));
}
.mg-direction-button--down .mg-direction-button__icon {transform:rotate(180deg);}
.mg-direction-button--left .mg-direction-button__icon {transform:rotate(-90deg);}
.mg-direction-button--right .mg-direction-button__icon {transform:rotate(90deg);}
@media (hover:hover) and (pointer:fine) {
  #mg_hud .mg-direction-button:hover {
    filter: brightness(1.06) saturate(1.08);
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 3px 0 #9b632b, 0 6px 7px rgba(61,45,25,.3), inset 0 1px 0 rgba(255,255,255,.8);
  }
}
#mg_hud .mg-direction-button:active {
  transform: translateY(2px) scale(.98);
  box-shadow: 0 1px 0 #9b632b, 0 2px 3px rgba(61,45,25,.3), inset 0 2px 4px rgba(118,75,29,.18);
}
#mg_hud .mg-direction-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#button_up {
  top: 93px;
  left: 141px;
}
#button_down {
  top: 193px;
  left: 141px;
}
#button_left {
  top: 143px;
  left: 91px;
}
#button_right {
  top: 143px;
  left: 193px;
}

#mg_system_msg {
  display: block;
  width: 100%;
  padding: 5px;
  color: #fff;
}

.cards_pref {
  display: block;
  width: 60px;
  height: 180px;
  float: left;
}

.cards_block {
}

.card_frame {
  position: relative;
  display: block;
  width: 120px;
  height: 140px;
  padding: 0;
  background-color: white;
  float: left;
  margin: 2px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  background-image: url(/static/mg/bg/polaroid_frame1.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(54, 70, 47, .08);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, filter .16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card_frame:hover {
    z-index: 2;
    transform: translateY(-3px) scale(1.04);
    border-color: rgba(118, 164, 104, .45);
    box-shadow: 0 8px 17px rgba(54, 70, 47, .22), 0 0 0 2px rgba(150, 194, 135, .12);
    filter: saturate(1.04);
  }
}

.card_frame:active {
  transform: translateY(-1px) scale(1.015);
  box-shadow: 0 3px 8px rgba(54, 70, 47, .18);
}

.card_frame:focus-visible {
  z-index: 2;
  outline: 3px solid rgba(83, 151, 69, .55);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .card_frame {
    transition: none;
  }
}

.card_bg {
  position: absolute;
  dislay: block;
  width: 102px;
  height: 89px;
  top: 19px;
  left: 8px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid #ccc;
}

.card_content {
  position: absolute;
  dislay: block;
  width: 102px;
  height: 89px;
  top: 19px;
  left: 8px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid #ccc;
}

.card_name {
  position: absolute;
  bottom: 0;
  left: 5px;
  width: 110px;
  height: 24px;
  font-size: 11px;
  text-align: center;
}

.leaderboard td {
  padding: 5px;
}
.leaderboard .rank {
  width: 60px;
  text-align: right;
}
.leaderboard .avatar_td {
  padding-right: 0;
}
.leaderboard .username {
  width: 150px;
  padding-left: 2px;
}
.leaderboard .num_cards {
  width: 60px;
}
.leaderboard .last_played {
  width: 100px;
}

#backgroup {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  opacity: 0.8;
  display: none;
}

#list_card_popup_frame_bg {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  cursor: pointer;
}

#list_card_popup_frame {
  position: relative;
  display: none;
  width: 300px;
  height: 362px;
  background-color: #fff;
  margin: 100px auto;
}

#card_popup_image_bg {
  position: absolute;
  display: block;
  width: 280px;
  height: 242px;
  top: 10px;
  left: 10px;
  border: 1px solid #ccc;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#card_popup_image {
  position: absolute;
  display: block;
  width: 280px;
  height: 242px;
  top: 10px;
  left: 10px;
  border: 1px solid #ccc;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#card_popup_name {
  position: absolute;
  display: block;
  width: 280px;
  height: 30px;
  bottom: 75px;
  left: 10px;
  text-align: center;
  font-weight: bold;
}

#card_popup_info {
  position: absolute;
  display: block;
  width: 280px;
  height: 70px;
  bottom: 0;
  left: 10px;
}
/*
#mg_card_popup {
  position: absolute;
  width: 201px;
  height: 201px;
  top: 7px;
  left: 7px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: white;
  border: 1px solid #ccc;
}
*/

.credit-card {
  height: 40px;
  margin: 5px;
}
.stripe-logo {
  width: 100px;
}

@media only screen
  and (max-width : 736px) {
    #page {
      width: 100%;
    }
    #header {
      width: 96%;
    }
    .full_pane {
      width: 96%;
    }
    #login_form {
      width: 96%;
    }
    #container {
      border: none;
      width: 96%;
    }
    .box {
      width: 80%;
      margin-left: 10%;
    }
    .cards_pref {
      width:100%;
      height:40px;
      margin-top:20px;
    }
}
