/* Luckydeck — เว็บเกมออนไลน์สไตล์ปี 2004-2006 (หน้ากว้างตายตัว 1000px) */
* { box-sizing: border-box; }
html { background: #cfe2f6; }
body {
  margin: 0;
  font: 12px/1.5 Tahoma, "Leelawadee UI", "Thonburi", sans-serif;
  color: #26335c;
  background:
    linear-gradient(to bottom, rgba(207,226,246,0) 420px, #cfe2f6 820px),
    url(img/shots/bg-park.webp) center top / max(100%, 1400px) auto no-repeat,
    #cfe2f6;
  min-height: 100vh;
}
a { color: #1f4fae; text-decoration: none; }
a:hover { color: #e8590c; text-decoration: underline; }
ul, ol { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
img { image-rendering: auto; }
.wrap { width: 1000px; margin: 0 auto; }

/* ---------- top utility bar ---------- */
#topbar { background: #1b2a66; border-bottom: 2px solid #0d1740; color: #cfe0ff; font-size: 11px; height: 24px; line-height: 22px; }
#topbar .wrap { display: flex; justify-content: space-between; }
#topbar a { color: #fff; padding: 0 2px; }
#topbar a:hover { color: #ffe36b; }
#topbar i { color: #6f82c2; font-style: normal; margin: 0 7px; }
#topbar .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #55e02a; border: 1px solid #0c3d02; box-shadow: inset 2px 2px 0 #c9ff9a; vertical-align: -1px; }

/* ---------- header ---------- */
#header { height: 158px; position: relative; }
#logo { position: absolute; left: 150px; top: 8px; display: block; }
#logo img { display: block; }
#slogan { position: absolute; right: 16px; top: 44px; text-align: center; width: 300px; }
#slogan span { display: block; font-weight: bold; }
#slogan .s1 { font-size: 22px; line-height: 28px; color: #1b2a66; text-shadow: -2px 0 #fff, 2px 0 #fff, 0 -2px #fff, 0 2px #fff, -2px -2px #fff, 2px 2px #fff, 2px -2px #fff, -2px 2px #fff; transform: rotate(-3deg); border-bottom: 3px solid #ff5fa8; padding-bottom: 4px; }
#slogan .s2 { margin-top: 12px; font-size: 11px; color: #1b2a66; text-shadow: -1px 0 #fff, 1px 0 #fff, 0 -1px #fff, 0 1px #fff; }

/* ---------- navigation tabs ---------- */
#nav { display: flex; gap: 4px; height: 48px; }
#nav li { flex: 1; }
#nav a {
  display: block; height: 100%; text-align: center; padding-top: 6px; font-weight: bold; font-size: 14px; line-height: 18px; color: #1b2a66;
  background: linear-gradient(#f4f8ff 0, #dbe6f7 50%, #bccbe6 51%, #aebfde 100%);
  border: 2px solid #4a5f96; border-radius: 6px; box-shadow: inset 0 0 0 1px #fff, 2px 2px 0 rgba(27,42,102,.35);
}
#nav small { display: block; font: bold 9px/12px Verdana, Tahoma, sans-serif; letter-spacing: 1px; color: #5a6ea3; }
#nav a:hover, #nav li.on a {
  text-decoration: none; color: #5a2400;
  background: linear-gradient(#fff6b0 0, #ffd84a 50%, #ffb81f 51%, #ff9a1a 100%); border-color: #7a3d00;
}
#nav a:hover small, #nav li.on small { color: #8a4300; }

/* ---------- layout ---------- */
#main { display: flex; gap: 10px; margin-top: 12px; align-items: flex-start; }
#left { width: 232px; flex: none; }
#center { width: 506px; flex: none; }
#right { width: 242px; flex: none; }
#left > *, #center > *, #right > *, #content.sub > *, .auth-slot > * { margin-bottom: 10px; }
#content { flex: 1; min-width: 0; }
#content.home { display: flex; gap: 10px; align-items: flex-start; }
.auth-slot { min-height: 150px; }

/* ---------- window panel ---------- */
.win { position: relative; background: #f6faff; border: 2px solid #1b2a66; border-radius: 3px; box-shadow: 2px 2px 0 rgba(27,42,102,.30); }
.win-title {
  height: 22px; line-height: 20px; padding: 0 6px;
  background: linear-gradient(#3f63c4 0, #2a48a6 50%, #1f3a8f 51%, #1b2f7a 100%);
  border-bottom: 2px solid #1b2a66; color: #fff; display: flex; justify-content: space-between; align-items: center;
}
.win-title span { font: bold 11px/20px Verdana, Tahoma, sans-serif; letter-spacing: 1px; text-shadow: 1px 1px 0 #0d1740; }
.win-title em { display: flex; }
.win-title em b { width: 12px; height: 12px; border: 1px solid #0d1740; background: #e9f0ff; position: relative; }
.win-title em b::after { content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 2px; background: #1b2a66; }
.win-body { padding: 9px; }

/* ---------- tab row under a window title ---------- */
.tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid #1b2a66; background: #e6eefb; }
.tabs a { height: 21px; line-height: 19px; padding: 0 14px; font-weight: bold; font-size: 12px; color: #1b2a66; border: 1px solid #1b2a66; border-bottom: 0; border-radius: 3px 3px 0 0; background: linear-gradient(#f4f8ff, #c9d6ee); }
.tabs a:hover { text-decoration: none; background: #fff3b8; }
.tabs a.on { background: #f6faff; height: 22px; margin-bottom: -1px; border-top: 2px solid #ff9a1a; }
.tabs a.more { margin-left: auto; border: 0; background: none; font: bold 9px/21px Verdana, sans-serif; color: #1f4fae; padding: 0 2px; letter-spacing: 1px; }

/* ---------- login ---------- */
.chk { display: inline-flex; align-items: center; gap: 3px; margin: 7px 8px 0 0; font-size: 11px; color: #4b5d82; cursor: pointer; }
.chk input { margin: 0; width: 12px; height: 12px; }
.login-msg { margin-top: 6px; padding: 3px 6px; font-size: 11px; color: #a11a1a; background: #fff0f0; border: 1px dotted #d46a6a; }
.login-links { display: flex; gap: 5px; margin-top: 9px; padding-top: 9px; border-top: 1px dotted #8fa3d0; }
.btn-mini {
  flex: 1; text-align: center; height: 22px; line-height: 19px; font-size: 11px; font-weight: bold; color: #1b2a66; white-space: nowrap;
  background: linear-gradient(#fbfdff 0, #e3ebf8 50%, #c9d6ee 51%, #bccbe6 100%); border: 1px solid #4a5f96; border-radius: 3px; box-shadow: inset 0 0 0 1px #fff;
}
.btn-mini.pink { color: #fff; text-shadow: 1px 1px 0 #8a2a00; background: linear-gradient(#ffc76b 0, #ff9a2e 50%, #f47a12 51%, #e06408 100%); border-color: #7a2600; box-shadow: inset 0 0 0 1px #ffe2a8; }
.btn-mini:hover { text-decoration: none; filter: brightness(1.07); color: #1b2a66; }
.btn-mini.pink:hover { color: #fff; }
.login-fields { display: grid; grid-template-columns: 56px 1fr; gap: 6px; align-items: center; }
.login-fields label, .form-row > label { font-weight: bold; font-size: 12px; color: #1b2a66; white-space: nowrap; }
.login-fields input, .form input[type=text], .form input[type=email], .form input[type=password], .form select, .form textarea {
  width: 100%; height: 22px; padding: 0 4px; font: 12px Tahoma, "Leelawadee UI", sans-serif; color: #1c2c4c; background: #fff;
  border: 1px solid #8fa3d0; border-top: 2px solid #1b2a66; border-left: 2px solid #1b2a66; border-radius: 0; outline: none;
}
.form textarea { height: auto; padding: 4px; resize: vertical; }
.login-fields input:focus, .form input:focus, .form select:focus, .form textarea:focus { background: #fffbd6; }
.btn-img { display: block; width: 100%; padding: 0; border: 0; background: center / contain no-repeat; cursor: pointer; }
.btn-img:hover { filter: brightness(1.1); }
.btn-img:active { transform: translateY(2px); filter: brightness(.94); }
.btn-img:disabled { filter: grayscale(.7); cursor: wait; }
.btn-img:focus-visible, .btn-main:focus-visible { outline: 2px solid #e8590c; outline-offset: 2px; }
.btn-img-start { aspect-ratio: 440 / 87; margin: 10px auto 2px; background-image: url(img/btn-start.webp); }
.btn-img-logout { aspect-ratio: 240 / 67; width: 120px; margin: 9px auto 0; background-image: url(img/btn-logout.webp); }
.member-win .btn-img-start { margin: 0 auto 9px; }

/* ---------- member panel ---------- */
.member-head { display: flex; gap: 8px; align-items: center; }
.member-head img { flex: none; }
.member-head div { min-width: 0; display: flex; flex-direction: column; font-size: 11px; color: #4b5d82; }
.member-head div > * { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.member-id { font-size: 13px; color: #e8590c; }
.member-job { color: #7a2ab0; font-weight: bold; }
.member-info { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; margin: 9px 0 0; padding: 7px 8px; font-size: 11px; background: #fff; border: 1px solid #8fa3d0; }
.member-info dt { color: #5b6b8c; }
.member-info dd { margin: 0; text-align: right; font-weight: bold; color: #1b2a66; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- servers ---------- */
.servers { padding: 6px; }
.servers div { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px; font-size: 13px; background: #fff; border: 1px dotted #8fa3d0; border-bottom: 0; }
.servers div:last-child { border-bottom: 1px dotted #8fa3d0; }
.servers span { flex: 1; font-weight: bold; color: #1b2a66; }
.servers em { font-style: normal; font-weight: bold; color: #1f9a12; }
.servers em.hot { color: #d6360c; }
.servers em.off { color: #8a94ad; font-weight: normal; }
.servers .soon span { color: #6b7896; }
.sv { flex: none; width: 34px; height: 34px; background: center / contain no-repeat; }
.sv-park { background-image: url(img/sv-park.webp); }
.sv-hell { background-image: url(img/sv-hell.webp); }
.sv-ice { background-image: url(img/sv-ice.webp); }
.vip-banner { display: block; position: relative; border: 2px solid #1b2a66; box-shadow: 2px 2px 0 rgba(27,42,102,.30); line-height: 0; overflow: hidden; }
.vip-banner img { width: 100%; height: auto; }
.vip-banner:hover { filter: brightness(1.08); text-decoration: none; }
/* the words of the VIP banner sit on the in-game picture as text, not baked into it */
.vip-banner .vip-head { position: absolute; left: 0; right: 0; top: 0; padding: 8px 8px 22px; line-height: 1.2; text-align: center; background: linear-gradient(rgba(13,23,64,.78), rgba(13,23,64,0)); }
.vip-banner .vip-head b { display: block; font: bold 30px/34px Verdana, sans-serif; letter-spacing: 1px; color: #ffe95e; text-shadow: -2px 0 #3a1a00, 2px 0 #3a1a00, 0 -2px #3a1a00, 0 2px #3a1a00, -2px -2px #3a1a00, 2px 2px #3a1a00, 2px -2px #3a1a00, -2px 2px #3a1a00; }
.vip-banner .vip-head span { display: block; margin-top: 2px; font-size: 11px; font-weight: bold; color: #fff; text-shadow: 1px 1px 0 #0d1740; }
.vip-banner .vip-perks { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px 8px; line-height: 1.45; font-size: 11px; color: #fff; background: rgba(13,23,64,.76); }
.vip-banner .vip-perks li { padding-left: 12px; position: relative; }
.vip-banner .vip-perks li::before { content: ''; position: absolute; left: 0; top: 5px; width: 6px; height: 6px; background: #ffc61a; border: 1px solid #5a2400; }
.vip-banner .vip-perks em { font-style: normal; font-weight: bold; color: #ffe95e; }

/* ---------- hero ---------- */
.frame { border: 2px solid #1b2a66; box-shadow: 2px 2px 0 rgba(27,42,102,.30); background-color: #9bd3f7; }
#hero { height: 316px; position: relative; overflow: hidden; }
#hero .slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .4s; }
#hero .slide.on { opacity: 1; }
#hero .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 86px 9px 12px; background: rgba(13,23,64,.72); color: #fff; }
#hero .cap b { display: block; font-size: 22px; line-height: 28px; color: #ffe95e; text-shadow: -2px 0 #3a1a00, 2px 0 #3a1a00, 0 -2px #3a1a00, 0 2px #3a1a00, -2px -2px #3a1a00, 2px 2px #3a1a00, 2px -2px #3a1a00, -2px 2px #3a1a00; }
#hero .cap span { font-size: 12px; }
#hero .pager { position: absolute; right: 8px; bottom: 9px; display: flex; gap: 3px; }
#hero .pager li { width: 20px; height: 20px; text-align: center; font: bold 11px/18px Verdana, sans-serif; color: #1b2a66; cursor: pointer; background: #e9f0ff; border: 1px solid #0d1740; }
#hero .pager li.on { color: #5a2400; background: #ffc61a; }

/* ---------- board ---------- */
.list { padding: 5px 9px 6px; min-height: 172px; }
.list li { display: flex; align-items: center; gap: 7px; height: 26px; border-bottom: 1px solid #c3d0e8; }
.list li::before { content: ""; flex: none; width: 5px; height: 5px; border: 1px solid #1b2a66; }
.list li.muted::before { display: none; }
.list li:last-child { border-bottom: 0; }
.list li[hidden] { display: none; }
.list a { flex: 0 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #26335c; }
.list a:hover { color: #e8590c; }
.list time { margin-left: auto; font: 10px Verdana, sans-serif; color: #5b6b8c; }
.tag { flex: none; display: inline-block; white-space: nowrap; width: 50px; height: 16px; line-height: 14px; text-align: center; font-size: 10px; font-weight: bold; color: #fff; border: 1px solid; }
.t-notice { background: #e2341a; border-color: #7a1002; }
.t-update { background: #2f9a1c; border-color: #0c4d02; }
.t-event  { background: #8a3fd0; border-color: #45127a; }
b.new { flex: none; width: 13px; height: 13px; font: bold 9px/12px Verdana, sans-serif; text-align: center; color: #fff; background: #ff3d2e; border: 1px solid #8a0c02; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* ---------- lucky now / ranking / card of the week ---------- */
.lucky li { height: 24px; line-height: 23px; padding-left: 20px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px dotted #8fa3d0; background: url(img/ic-coin.webp) 0 50% / 15px 15px no-repeat; }
.lucky li:last-child { border-bottom: 0; }
.lucky b { color: #1b2a66; }
.lucky em { font-style: normal; font-weight: bold; color: #7a2ab0; }
.sample { margin-top: 5px; font-size: 10px; text-align: right; color: #8a94ad; }
.rank li { display: flex; align-items: center; gap: 6px; height: 24px; border-bottom: 1px dotted #8fa3d0; font-size: 11px; }
.rank li:last-child { border-bottom: 0; }
.rank i { flex: none; width: 16px; height: 16px; text-align: center; font: bold 10px/14px Verdana, sans-serif; color: #5b6b8c; background: #e3ecf8; border: 1px solid #8fa3d0; }
.rank i.m1 { color: #5a2400; background: #ffc61a; border-color: #8a5a00; }
.rank i.m2 { color: #39424f; background: #cfd6e0; border-color: #5c6675; }
.rank i.m3 { color: #4f2408; background: #e89a55; border-color: #7a3a10; }
.rank span { flex: 1; font-weight: bold; color: #1b2a66; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.rank em { font-style: normal; font-size: 10px; color: #7a2ab0; font-weight: bold; white-space: nowrap; }
.card-week { text-align: center; background: #fff; }
.card-week img { display: block; margin: 0 auto 6px; height: auto; }
.card-week b { display: block; color: #1b2a66; }
.card-week em { display: inline-block; margin-top: 4px; padding: 1px 12px; font-style: normal; font-weight: bold; font-size: 13px; color: #ffe95e; background: #8a1c2e; border: 1px solid #45060f; }
.odds { color: #7a2ab0 !important; }

/* ---------- footer ---------- */
#footer { margin: 8px 0 24px; padding: 0 12px; height: 30px; line-height: 28px; display: flex; justify-content: space-between; font-size: 11px; color: #cfe0ff; background: #1b2a66; border: 1px solid #0d1740; }
#footer a { color: #fff; }
#footer i { font-style: normal; color: #6f82c2; margin: 0 8px; }

/* ---------- sub pages ---------- */
.page-title { position: relative; height: 44px; padding: 5px 14px; display: flex; align-items: baseline; gap: 10px; background: linear-gradient(#fff6b0 0, #ffd84a 50%, #ffb81f 51%, #ff9a1a 100%); border: 2px solid #7a3d00; border-radius: 3px; box-shadow: 2px 2px 0 rgba(27,42,102,.30); }
.page-title h1 { margin: 0; font-size: 20px; line-height: 30px; color: #5a2400; text-shadow: 1px 1px 0 #fff6b0; }
.page-title > span { font: bold 10px Verdana, sans-serif; letter-spacing: 2px; color: #8a4300; }
.crumb { margin-left: auto; font-size: 11px; color: #5a2400; }
.crumb a { color: #5a2400; text-decoration: underline; }
.muted { color: #8a94ad; }
.list li.muted { justify-content: center; border: 0; height: 60px; }
.list.tall { min-height: 150px; }
.more-link { display: block; margin-top: 7px; }
.notice-box { margin: 10px 0 0; padding: 6px 10px; font-size: 11px; color: #6b3a05; background: #fff8d6; border: 1px dotted #c98a00; }
.section-title { margin: 12px 0 6px; padding-left: 8px; font-size: 13px; color: #1b2a66; border-left: 4px solid #ff9a1a; }
.section-title:first-child { margin-top: 0; }
.prose p { margin: 6px 0; }
.steps { list-style: decimal; padding-left: 22px; margin: 6px 0; }
.steps li { padding: 3px 0; }
.wide-art { display: block; width: 100%; height: 230px; object-fit: cover; object-position: center 40%; border: 2px solid #1b2a66; margin-bottom: 8px; }
.systems { display: grid; grid-template-columns: 120px 1fr; margin: 0; border-top: 1px solid #8fa3d0; }
.systems dt, .systems dd { margin: 0; padding: 6px 8px; border-bottom: 1px dotted #8fa3d0; }
.systems dt { font-weight: bold; color: #1b2a66; background: #e3ebf8; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; border: 1px solid #1b2a66; }
.tbl th, .tbl td { padding: 5px 8px; text-align: center; border-bottom: 1px dotted #8fa3d0; }
.tbl thead th { color: #1b2a66; font-size: 11px; background: #c9d6ee; border-bottom: 1px solid #1b2a66; }
.tbl tbody th { width: 130px; text-align: left; color: #1b2a66; background: #e3ebf8; }
.tbl tbody tr:nth-child(even) td { background: #f3f7fd; }
.tbl tbody tr:hover td { background: #fff8d6; }
.tbl .left { text-align: left; }
.tbl .strong { font-weight: bold; color: #1b2a66; }
.tbl a { color: #26335c; }
.medal { display: inline-block; width: 20px; height: 20px; font: bold 11px/18px Verdana, sans-serif; font-style: normal; color: #5b6b8c; background: #e3ecf8; border: 1px solid #8fa3d0; }
.medal.m1 { color: #5a2400; background: #ffc61a; border-color: #8a5a00; }
.medal.m2 { color: #39424f; background: #cfd6e0; border-color: #5c6675; }
.medal.m3 { color: #4f2408; background: #e89a55; border-color: #7a3a10; }

.pager-bar { display: flex; justify-content: center; gap: 3px; padding: 0 0 9px; }
.pager-bar a { min-width: 20px; height: 20px; padding: 0 5px; text-align: center; font: bold 10px/18px Verdana, sans-serif; color: #1b2a66; background: #e9f0ff; border: 1px solid #1b2a66; }
.pager-bar a.on { color: #5a2400; background: #ffc61a; }
.pager-bar a:hover { text-decoration: none; }

.article h2 { margin: 0; font-size: 16px; color: #1b2a66; display: flex; align-items: center; gap: 8px; }
.article-meta { padding: 5px 0 8px; font-size: 11px; color: #8a94ad; border-bottom: 1px dotted #8fa3d0; }
.article-body { padding: 12px 2px; min-height: 160px; white-space: pre-line; line-height: 1.8; }

.form { max-width: 560px; margin: 4px auto; }
.form-row { display: grid; grid-template-columns: 120px 1fr; gap: 2px 10px; align-items: center; padding: 6px 0; border-bottom: 1px dotted #8fa3d0; }
.form-row small { grid-column: 2; font-size: 11px; color: #8a94ad; }
.form-row .chk { margin: 0; }
.form-msg { margin: 8px 0 0; padding: 5px 9px; font-size: 12px; border: 1px dotted; }
.form-msg.error { color: #a11a1a; background: #fff0f0; border-color: #d46a6a; }
.form-msg.info { color: #1c4f8a; background: #eaf4ff; border-color: #5f97dc; }
.form-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.btn-mini.wide { flex: none; padding: 0 14px; }
.btn-main {
  min-width: 170px; height: 36px; padding: 0 22px; cursor: pointer; font: bold 15px Tahoma, "Leelawadee UI", sans-serif; color: #fff;
  text-shadow: 1px 1px 0 #7a2600, -1px -1px 0 #7a2600, 1px -1px 0 #7a2600, -1px 1px 0 #7a2600;
  background: linear-gradient(#ffc76b 0, #ff9a2e 50%, #f47a12 51%, #e06408 100%); border: 2px solid #7a2600; border-radius: 4px;
  box-shadow: inset 0 0 0 1px #ffe2a8, 2px 2px 0 rgba(27,42,102,.35);
}
.btn-main:hover { filter: brightness(1.1); }
.btn-main:active { transform: translate(2px, 2px); box-shadow: inset 0 0 0 1px #ffe2a8; }
.btn-main:disabled { filter: grayscale(.7); cursor: wait; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.shot-card { display: block; font-size: 11px; color: #5b6b8c; }
.shot-card .frame { display: block; height: 130px; background-size: 180%; margin-bottom: 4px; }
.shot-card b { display: block; color: #1b2a66; }
.shot-card small i { font-style: normal; }
.shot-card:hover { text-decoration: none; filter: brightness(1.06); }
.heart { color: #e23683; font-weight: bold; }

.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.item { position: relative; padding: 10px 8px 8px; text-align: center; background: #fff; border: 1px solid #1b2a66; box-shadow: 2px 2px 0 rgba(27,42,102,.25); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.item[hidden] { display: none; }
.item b { color: #1b2a66; }
.item small { color: #8a94ad; font-size: 11px; }
.price { font-weight: bold; color: #e8590c; margin: 3px 0 5px; }
.item .btn-mini { flex: none; width: 100%; cursor: pointer; font-family: inherit; }
.badge { position: absolute; left: -4px; top: 6px; padding: 0 6px; font: bold 10px/15px Verdana, sans-serif; color: #fff; border: 1px solid; }
.badge.new { background: #e2341a; border-color: #7a1002; }
.badge.hot { background: #8a3fd0; border-color: #45127a; }
/* a good on sale (set in the admin tools): the old price struck through, the new one in red, a "-25%" burst and the time left */
.item.on-sale { border-color: #d0200f; }
.sale-badge { position: absolute; right: -4px; top: 5px; padding: 1px 6px; font: bold 11px/15px Verdana, sans-serif; font-style: normal; color: #fff; background: linear-gradient(180deg, #ff6a4a, #d0200f); border: 1px solid #6a1408; border-radius: 3px; transform: rotate(6deg); text-shadow: 0 1px 0 #6a1408; }
.price .sale-was { font-weight: normal; font-size: .85em; color: #8a94ad; text-decoration: line-through; text-decoration-color: #d0200f; }
.price .sale-now { color: #e2261a; }
.sale-ends { font-size: 11px; font-weight: bold; color: #d0200f; margin: -3px 0 4px; }

.faq details { border-bottom: 1px dotted #8fa3d0; }
.faq summary { padding: 7px 4px; font-weight: bold; color: #1b2a66; cursor: pointer; }
.faq summary:hover { color: #e8590c; }
.faq details p { margin: 0; padding: 2px 20px 9px; }

.char-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.char-slot { padding: 12px 8px; text-align: center; background: #fff; border: 1px solid #1b2a66; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #7a2ab0; font-weight: bold; }
.char-slot b { font-size: 13px; color: #1b2a66; }
.char-slot small { color: #b9770a; font-weight: bold; }
.char-slot.empty { justify-content: center; min-height: 126px; color: #8a94ad; background: #eef3fb; border-style: dashed; font-weight: normal; }
.char-slot.empty b { font-size: 26px; color: #a9b7d6; }
.tbl.info { margin-bottom: 4px; }
.play-box { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.play-box img { flex: none; height: auto; }

/* ---------- narrow window / tablet (680-1019px): sidebar stays, content becomes fluid ---------- */
@media (max-width: 1019px) {
  .wrap { width: auto; max-width: 1000px; padding: 0 12px; }
  #header { height: auto; padding: 10px 0 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 8px 12px; }
  #logo, #slogan { position: static; }
  #logo img { width: min(100%, 360px); height: auto; }
  #slogan .s1 { font-size: 19px; }
  #nav a { font-size: 12px; white-space: nowrap; }
  #content.home { flex-direction: column; }
  #center, #right { width: 100%; }
  #right { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; align-items: start; margin-bottom: 10px; }
  #right > * { margin-bottom: 0; }
  #hero { height: auto; aspect-ratio: 506 / 316; }
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .char-slots { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .page-title { height: auto; flex-wrap: wrap; }
  .tabs { flex-wrap: wrap; }
  .win-body { overflow-x: auto; }
}
@media (max-width: 859px) {
  #nav { flex-wrap: wrap; height: auto; }
  #nav li { flex: 1 0 23%; height: 44px; }
}

/* ---------- phone (<680px): one column, login first, then the page, then the side panels ---------- */
@media (max-width: 679px) {
  .wrap { max-width: 520px; }
  #topbar { height: auto; line-height: 20px; padding: 3px 0; }
  #topbar .wrap { flex-direction: column; align-items: center; }
  #header { flex-direction: column; justify-content: center; text-align: center; }
  #slogan { width: auto; }
  #main { flex-direction: column; align-items: stretch; gap: 0; }
  #left { display: contents; }
  .auth-slot { order: 1; min-height: 0; }
  #content { order: 2; width: 100%; flex: none; }
  #left > .win, #left > .vip-banner { order: 3; }
  .vip-banner { max-width: 232px; margin: 0 auto 10px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row small { grid-column: 1; }
  .crumb { display: none; }
  .tbl { font-size: 11px; }
  .tbl th, .tbl td { padding: 5px 4px; }
  .tbl tbody th { width: auto; }
  .play-box { flex-direction: column; text-align: center; }
  .systems { grid-template-columns: 90px 1fr; }
  #footer { height: auto; flex-direction: column; align-items: center; line-height: 20px; padding: 6px; }
  /* finger-sized controls; 16px inputs stop mobile browsers zooming in on focus */
  .login-fields input, .form input[type=text], .form input[type=email], .form input[type=password], .form select { height: 34px; font-size: 16px; }
  .form textarea { font-size: 16px; }
  .btn-mini { height: 32px; line-height: 29px; font-size: 12px; }
  .tabs a { height: 28px; line-height: 26px; }
  .tabs a.on { height: 29px; }
  .pager-bar a { min-width: 30px; height: 30px; line-height: 28px; font-size: 12px; }
  #hero .pager li { width: 26px; height: 26px; line-height: 24px; font-size: 12px; }
  .chk { font-size: 13px; } .chk input { width: 16px; height: 16px; }
  .list li { height: auto; min-height: 30px; padding: 3px 0; }
  .list a { white-space: normal; }
  .faq summary { padding: 11px 4px; }
}
@media (prefers-reduced-motion: reduce) { b.new { animation: none; } #hero .slide { transition: none; } }

/* shop balance, card book grid, profile forms */
.shop-coins { margin: 0 0 8px; font-weight: bold; color: #c96a00; }
.item .btn-mini:disabled { filter: grayscale(.8); cursor: default; }
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 10px 0; }
.book-card { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 3px; text-align: center; background: #fff; border: 2px solid #8a94ad; box-shadow: 2px 2px 0 rgba(27,42,102,.2); }
.book-card img { width: 75px; height: 100px; object-fit: contain; }
.book-card b { width: 100%; font-size: 11px; color: #1b2a66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-card span { font-size: 10px; font-weight: bold; color: #7a2ab0; }
.book-card i { font-style: normal; font-size: 9px; color: #c96a00; }
.book-card.r1 { border-color: #3f9a34; } .book-card.r2 { border-color: #2f6fd6; } .book-card.r3 { border-color: #8a3fd6; }
.book-card.r4 { border-color: #e0a400; } .book-card.r5 { border-color: #ff6a1a; } .book-card.r6 { border-color: #d0204a; } .book-card.r7 { border-color: #18b8c8; }
.book-card.missing { background: #dde3ee; }
.book-card.missing img { filter: grayscale(1) opacity(.45); }
.tabbed .tabs { flex-wrap: wrap; }
.profile-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; padding: 8px; background: #f2f5fb; border: 1px solid #b9c5e0; }
.profile-form b { width: 130px; color: #1b2a66; }
.profile-form input { flex: 1; min-width: 150px; padding: 4px 6px; border: 1px solid #8fa3d0; font: inherit; }
.profile-form .btn-mini { flex: none; cursor: pointer; font-family: inherit; }
.profile-form .form-msg { width: 100%; margin: 0; }
.form-msg.success { color: #1f6a2c; background: #edfbe9; border-color: #6cc06a; }

/* card book: the picked card's details, and cards as buttons */
.card-detail { align-items: flex-start; }
.card-detail > div { flex: 1; }
.card-big { width: 150px; height: 200px; object-fit: contain; flex: none; filter: drop-shadow(3px 4px 0 rgba(27,42,102,.3)); }
.card-big.missing { filter: grayscale(1) opacity(.5); }
.card-detail > .cfx { margin: 8px 6px; }      /* room for the card effect's border and aura (img/card-fx.css) */
button.book-card { font: inherit; cursor: pointer; transition: transform .1s; }
button.book-card:hover { transform: translateY(-2px); }
.book-card.picked { outline: 3px solid #ff9a1a; outline-offset: 1px; }
.captcha-box:empty { display: none; }
.captcha-box { margin: 6px 0; }

/* language flags (js/translator.js) */
.language-switch { display: inline-flex; gap: 4px; margin-left: 10px; vertical-align: middle; }
.language-switch button { padding: 0; width: 24px; height: 16px; border: 1px solid rgba(0,0,0,.45); border-radius: 2px; background: none; cursor: pointer; opacity: .55; overflow: hidden; }
.language-switch button.on { opacity: 1; box-shadow: 0 0 0 2px #ffb81f; }
.language-switch img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* shop cards: every card is as tall as its row, and the price and button sit on one line across the row */
.shop-grid .item { display: flex; flex-direction: column; height: 100%; }
.shop-grid .item small { flex: 1; }
.shop-grid .item .price { margin-top: auto; }

/* community: forms, a post opened to read, comments */
.community-actions { margin: 10px 0 0; text-align: right; }
.community-form { margin-top: 10px; padding: 10px; background: #f3f7fd; border: 1px solid #8fa3d0; display: grid; gap: 8px; }
.community-form label { display: grid; gap: 3px; font-weight: bold; font-size: 12px; color: #1b2a66; }
.community-form input[type=text], .community-form textarea, .community-form select { font: inherit; font-weight: normal; padding: 4px 6px; border: 1px solid #8fa3d0; width: 100%; box-sizing: border-box; }
.community-form textarea { resize: vertical; }
.community-back { margin: 0 0 8px; font-size: 12px; }
.post-title { margin: 0; font-size: 18px; color: #1b2a66; overflow-wrap: anywhere; }
.post-meta { margin: 4px 0 10px; font-size: 11px; color: #56618a; }
.post-body { padding: 10px; background: #fff; border: 1px solid #8fa3d0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.6; }
.post-picture { display: block; max-width: 100%; margin: 0 auto 10px; border: 1px solid #1b2a66; }
.post-comments-title { margin: 14px 0 6px; font-size: 13px; color: #1b2a66; }
.post-comment { padding: 6px 8px; border-bottom: 1px dotted #8fa3d0; font-size: 12px; }
.post-comment p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* community: the "post" button on the list page, and the page for writing a post */
a.btn-mini { display: inline-block; text-decoration: none; }
.community-post-button { min-width: 96px; text-align: center; font-size: 13px; }
.post-login { margin: 8px 10px 0; }
#postWriter .community-form { margin-top: 0; }
.post-sent { text-align: center; padding: 22px 16px; }
.post-sent h2 { margin: 0 0 10px; font-size: 16px; color: #1b2a66; }
.post-sent .form-msg { display: inline-block; margin: 0 0 14px; }

/* top-up page: packages, payment method, the account to pay into, the slip upload and its result */
.topup-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.topup-pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 8px; font: inherit; text-align: center; cursor: pointer; background: #fff; border: 1px solid #1b2a66; box-shadow: 2px 2px 0 rgba(27,42,102,.25); }
.topup-pack:hover { background: #fffbe6; }
.topup-pack.on { background: #fff3b8; border: 2px solid #e8590c; padding: 9px 5px 7px; box-shadow: 2px 2px 0 rgba(232,89,12,.35); }
.topup-pack b { color: #1b2a66; font-size: 13px; }
.topup-pack small { font-size: 10px; color: #8a94ad; }
.topup-pack small.bonus { color: #1f9a12; font-weight: bold; }
.topup-pack .price { margin: 2px 0 0; font-size: 14px; }
.topup-pack.custom { cursor: default; justify-content: center; }
.topup-pack.custom input { width: 90%; height: 26px; margin: 4px 0 2px; text-align: center; font: bold 14px Tahoma, sans-serif; border: 1px solid #8fa3d0; }
.section-title small { font-size: 11px; font-weight: normal; color: #5b6b8c; }
.topup-pay { display: flex; gap: 12px; align-items: stretch; padding: 10px; background: #fff; border: 1px solid #1b2a66; }
.topup-qr { flex: none; width: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 4px; background: #f3f7fd; border: 1px dotted #8fa3d0; }
.topup-qr img { width: 220px; height: 220px; object-fit: contain; background: #fff; }
.topup-qr small { font-size: 10px; color: #8a4300; }
.topup-qr a { font-size: 11px; }
.topup-qr .btn-mini { cursor: pointer; font-family: inherit; }
.topup-transfer { align-items: stretch; justify-content: flex-start; text-align: left; padding: 10px 12px; }
.topup-transfer b { font-size: 13px; color: #1b2a66; }
.topup-transfer ol { margin: 6px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.7; list-style: decimal; }
.pp-card { width: 216px; margin: 0; overflow: hidden; text-align: center; background: #fff; border: 1px solid #1b3f7a; border-radius: 6px; box-shadow: 0 1px 3px rgba(27, 42, 102, .25); }
.pp-head { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 6px 4px; color: #fff; background: linear-gradient(#2a5aa6, #1b3f7a); }
.pp-head b { font: bold 15px Tahoma, sans-serif; letter-spacing: .3px; }
.pp-head span { font-size: 12px; }
.topup-qr .pp-qr { display: block; width: 200px; height: 200px; margin: 6px auto 0; image-rendering: pixelated; }
.pp-amount { color: #c0392b; font-size: 13px; font-weight: bold; }
.pp-amount strong { font-size: 22px; letter-spacing: .3px; }
.pp-name { padding: 0 6px; color: #1b2a66; font-size: 13px; font-weight: bold; overflow-wrap: anywhere; }
.pp-id { padding: 0 6px 6px; color: #5a6a8a; font-size: 11px; }
.topup-qr small.pp-note { color: #1f6a2c; }
.topup-account { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.topup-amount { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; background: #fff8d6; border: 2px solid #c98a00; }
.topup-amount span { width: 100%; font-size: 11px; color: #8a4300; font-weight: bold; }
.topup-amount strong { font-size: 26px; line-height: 30px; color: #d6360c; letter-spacing: .5px; }
.topup-amount em { width: 100%; font-style: normal; font-size: 12px; color: #7a2ab0; font-weight: bold; }
.topup-row { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 6px; min-height: 30px; padding: 2px 4px; border-bottom: 1px dotted #8fa3d0; }
.topup-row span { font-size: 11px; color: #5b6b8c; }
.topup-row b { color: #1b2a66; font-size: 14px; overflow-wrap: anywhere; }
.topup-row .btn-mini { cursor: pointer; font-family: inherit; }
.topup-warn { margin: 8px 0 0; padding: 7px 10px; font-size: 12px; color: #a11a1a; background: #fff0f0; border: 2px dashed #d46a6a; }
.topup-warn b { font-size: 13px; }
.topup-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 130px; padding: 14px; text-align: center; cursor: pointer; background: #f3f7fd; border: 2px dashed #5f7ab8; border-radius: 4px; }
.topup-drop:hover, .topup-drop.over { background: #fffbe6; border-color: #e8590c; }
.topup-drop.has-file { border-style: solid; background: #fff; }
.topup-drop .topup-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.topup-drop:focus-within { outline: 2px solid #e8590c; outline-offset: 2px; }
.topup-drop img { max-width: 220px; max-height: 280px; object-fit: contain; border: 1px solid #8fa3d0; }
.topup-drop-icon { font-size: 34px; line-height: 40px; }
.topup-drop b { color: #1b2a66; overflow-wrap: anywhere; }
.topup-drop small { font-size: 11px; color: #8a94ad; }
.topup-result { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 12px; text-align: center; border: 2px solid; border-radius: 4px; }
.topup-result.ok { background: #edfbe9; border-color: #3f9a34; color: #1f6a2c; }
.topup-result.bad { background: #fff0f0; border-color: #d46a6a; color: #a11a1a; }
.topup-result.wait { background: #eaf4ff; border-color: #5f97dc; color: #1c4f8a; }
.topup-result-icon { font-size: 30px; line-height: 34px; }
.topup-result b { font-size: 17px; }
.topup-result strong { font-size: 24px; color: #e8590c; }
.topup-result p { margin: 2px 0; max-width: 520px; }
.topup-result small { color: #5b6b8c; }
.topup-steps { margin-top: 12px; font-size: 12px; color: #26335c; }
.topup-chip { display: inline-block; padding: 0 7px; font-size: 11px; font-weight: bold; line-height: 18px; border: 1px solid; border-radius: 2px; }
.topup-chip.ok { color: #1f6a2c; background: #edfbe9; border-color: #6cc06a; }
.topup-chip.bad { color: #a11a1a; background: #fff0f0; border-color: #d46a6a; }
.topup-chip.wait { color: #1c4f8a; background: #eaf4ff; border-color: #5f97dc; }
.topup-chip.off { color: #5b6b8c; background: #eef1f6; border-color: #a9b3c7; }
.topup-reason { display: block; margin-top: 2px; font-size: 10px; color: #5b6b8c; }
@media (max-width: 679px) {
  .topup-packs { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .topup-pack { padding: 6px 4px; gap: 0; }
  .topup-pack.on { padding: 5px 3px; }
  .topup-pack img { width: 28px; height: 28px; }
  .topup-pay { flex-direction: column-reverse; }      /* on a phone the account and the amount come first: a QR on the same screen cannot be scanned */
  .topup-qr { width: auto; }
  .topup-amount strong { font-size: 24px; }
  .topup-row { grid-template-columns: 64px 1fr auto; }
  .topup-pack.custom input { font-size: 16px; height: 32px; }
}
.topup-history td:nth-child(-n+3) { white-space: nowrap; }

/* the card book: a card's aura and magic circle on a character (js/avatar-studio.js, the game's own drawing) */
.card-fx { flex: none; width: 220px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.card-fx-canvas { width: 220px; height: 270px; border: 2px solid #1b2a66; border-radius: 4px; background: #0d1740; touch-action: none; }
.card-fx-empty { width: 220px; height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: #ffe36b; font-weight: bold; background: radial-gradient(circle at 50% 70%, #33479f, #0d1740 70%); border: 2px solid #1b2a66; border-radius: 4px; }
@media (max-width: 700px) { .card-detail { flex-wrap: wrap; } .card-fx, .card-fx-empty, .card-fx-canvas { width: 100%; } }

/* Terms & policy page */
.policy h4 { margin: 12px 0 4px; font-size: 13px; color: #1b2a66; }
.policy .steps li { line-height: 1.6; }
.policy-table { margin: 6px 0 10px; }
.policy-table td { text-align: left; vertical-align: top; line-height: 1.5; }
.policy-table td:first-child { width: 170px; font-weight: bold; color: #1b2a66; }
.fill-in { padding: 0 3px; color: #a01010; background: #ffecec; border: 1px dashed #d07070; }
.chk a { margin: 0 2px; }
.form-row .chk.terms { display: flex; align-items: flex-start; gap: 6px; min-width: 0; line-height: 1.6; color: #2d3a66; }
.form-row .chk.terms input { flex: none; margin-top: 3px; }
.form-row .chk.terms span { min-width: 0; white-space: normal; }
