/* Wonderland Online Reborn - site styles
   Colours are taken from the Reborn logo and key art. Edit them here. */
:root {
  --ink: #070d24;          /* page background */
  --ink-2: #0c1636;        /* raised background */
  --panel: #111d44;        /* panels */
  --line: #24346a;         /* borders */
  --line-soft: #1b2a58;
  --text: #e9edf7;
  --muted: #9ca8c8;
  --blue: #2f6fe0;         /* logo blue */
  --sky: #5cc0ff;          /* logo glow */
  --gold: #f2c45a;         /* "Reborn" gold */
  --gold-2: #d99a2b;
  --max: 1160px;
  --head: "Cinzel", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-underline-offset: 3px; }
a:hover { color: #9ad8ff; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { font-family: Consolas, "Courier New", monospace; font-size: .82em; word-break: break-all; color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: #fff; color: #000; padding: 8px 12px; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Section heading with a thin rule */
.section-title { display: flex; align-items: baseline; gap: 16px; margin-bottom: 22px; }
.section-title h2 { margin: 0; white-space: nowrap; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(-6px); }
.section-title a { order: 3; font-size: .9rem; white-space: nowrap; }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: #060b1fee; border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: block; margin-right: auto; position: relative; align-self: flex-start; height: 68px; }
/* The logo hangs below the bar, like most game sites. */
.logo img { height: 96px; width: auto; margin-top: 4px; filter: drop-shadow(0 4px 10px #000a); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { color: var(--muted); text-decoration: none; font: 600 .8rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 10px 12px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.nav a.btn { margin-left: 10px; color: #1b1203; border-bottom: 1px solid #b47f1f; padding: 12px 18px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); padding: 8px 12px; font: 600 .8rem var(--body); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border-radius: 3px; }

@media (max-width: 860px) {
  .topbar .wrap { gap: 12px; }
  .logo img { height: 60px; margin-top: 4px; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; background: #060b1f; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav-open .nav { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-soft); }
  .nav a[aria-current="page"] { border-bottom-color: var(--line-soft); color: var(--gold); }
  .nav a.btn { margin: 12px 0 0; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; cursor: pointer;
  font: 700 .85rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase;
  padding: 13px 22px; border-radius: 3px; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold { color: #1b1203; background: linear-gradient(#f7d77f, var(--gold) 48%, var(--gold-2)); border-color: #b47f1f; box-shadow: inset 0 1px 0 #fff3c4, 0 2px 0 #00000055; }
.btn-gold:hover { color: #1b1203; background: linear-gradient(#fbe3a0, #f6cf6e 48%, #e4a63a); }
.btn-line { color: var(--text); border-color: #3a4c86; background: #ffffff08; }
.btn-line:hover { color: var(--text); border-color: var(--sky); }
.btn-discord { color: #fff; background: #5865f2; border-color: #4752c4; }
.btn-discord:hover { color: #fff; background: #4f5ce0; }
.btn-lg { font-size: .95rem; padding: 17px 30px; }
.btn-block { display: flex; width: 100%; }
.is-disabled { opacity: .55; pointer-events: none; cursor: default; }

/* ---------- Home hero ---------- */
.hero { position: relative; background: #0a1640; border-bottom: 1px solid var(--line); }
.hero picture img { width: 100%; height: auto; max-height: 640px; object-fit: cover; object-position: center 35%; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: linear-gradient(transparent, #070d24cc); pointer-events: none; }
.hero-cta { position: absolute; z-index: 1; right: max(16px, calc((100% - var(--max)) / 2 + 16px)); bottom: 24px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; max-width: 520px; justify-content: flex-end; }
.hero-cta .meta { flex-basis: 100%; text-align: right; color: #d5dcf0; font-size: .85rem; text-shadow: 0 1px 4px #000; }
@media (max-width: 760px) {
  .hero::after { display: none; }
  .hero-cta { position: static; max-width: none; justify-content: stretch; background: var(--ink-2); padding: 16px; border-top: 1px solid var(--line); }
  .hero-cta .btn { flex: 1 1 200px; }
  .hero-cta .meta { text-align: center; text-shadow: none; color: var(--muted); }
}

/* ---------- Status strip ---------- */
.status { background: var(--ink-2); border-bottom: 1px solid var(--line); }
.status ul { list-style: none; margin: 0 auto; padding: 0 16px; max-width: var(--max); display: grid; grid-template-columns: repeat(6, 1fr); }
.status li { padding: 16px 14px; border-left: 1px solid var(--line-soft); }
.status li:last-child { border-right: 1px solid var(--line-soft); }
.status .k { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.status .v { display: block; font: 700 1.15rem/1.3 var(--head); color: var(--text); }
@media (max-width: 900px) { .status ul { grid-template-columns: repeat(3, 1fr); } .status li { border-bottom: 1px solid var(--line-soft); } .status li:last-child { border-right: 0; } }
@media (max-width: 480px) { .status ul { grid-template-columns: repeat(2, 1fr); } .status li { padding: 12px 10px; } }

/* ---------- Page layout ---------- */
.block { padding: 56px 0; }
.block + .block { padding-top: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.box { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 22px; }
.box + .box { margin-top: 18px; }
.box h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8em; }
.box p { color: var(--muted); font-size: .96rem; }
.box ol { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .96rem; }
.box ol li + li { margin-top: 6px; }

/* ---------- News ---------- */
.news { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news li { display: grid; grid-template-columns: 110px 1fr; gap: 4px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.news time { color: var(--muted); font-size: .88rem; padding-top: 3px; }
.news .type { display: inline-block; font: 700 .66rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px; border: 1px solid; border-radius: 2px; margin-right: 10px; vertical-align: 3px; }
.type-news { color: var(--sky); } .type-patch { color: var(--gold); } .type-event { color: #f08ad0; }
.news h3 { display: inline; font-size: 1.08rem; }
.news p { grid-column: 2; margin: 6px 0 0; color: var(--muted); font-size: .97rem; }
@media (max-width: 560px) { .news li { grid-template-columns: 1fr; } .news p { grid-column: 1; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about figure { margin: 0; border: 1px solid var(--line); padding: 6px; background: var(--panel); }
.about p { color: #c9d1e6; }
.facts { margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.facts div { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.facts dt { font-weight: 700; }
.facts dd { margin: 2px 0 0; color: var(--muted); font-size: .94rem; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Character strip on Home ---------- */
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.strip a { display: block; text-decoration: none; color: var(--muted); font-size: .85rem; text-align: center; }
.strip .frame { height: 150px; display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  background: linear-gradient(#18295e, #0d1738); border: 1px solid var(--line); border-radius: 3px; margin-bottom: 6px; transition: border-color .15s; }
.strip img { height: 140px; width: auto; max-width: none; }
.strip a:hover .frame { border-color: var(--gold); }
.strip a:hover { color: var(--text); }
@media (max-width: 860px) { .strip { grid-template-columns: repeat(4, 1fr); } .strip a:nth-child(n+9) { display: none; } }

/* ---------- Inner page header ---------- */
.page-head { position: relative; border-bottom: 1px solid var(--line); background-color: #0a1640; background-repeat: no-repeat; background-position: 0 0, right 40%; background-size: 100% 100%, min(58%, 760px) auto;
  background-image: linear-gradient(90deg, #070d24 0%, #070d24 47%, #070d24b3 66%, #070d2433 100%), url("../img/castle.jpg");
  background-image: linear-gradient(90deg, #070d24 0%, #070d24 47%, #070d24b3 66%, #070d2433 100%), image-set(url("../img/castle.webp") type("image/webp"), url("../img/castle.jpg") type("image/jpeg")); }
@media (max-width: 700px) { .page-head { background-size: 100% 100%, cover; background-position: 0 0, center; } }
.page-head .wrap { padding-top: 56px; padding-bottom: 40px; }
.page-head h1 { margin-bottom: .3em; }
.page-head p { color: #c3cce4; max-width: 560px; margin: 0; }

/* ---------- Characters roster ---------- */
.roster { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 28px; align-items: start; }
.roster-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.roster-list button { display: block; width: 100%; padding: 0; cursor: pointer; background: linear-gradient(#18295e, #0d1738); border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font: 600 .78rem/1 var(--body); overflow: hidden; }
.roster-list .thumb { display: block; height: 92px; overflow: hidden; }
.roster-list .thumb img { width: 100%; height: 150px; object-fit: cover; object-position: 50% 0; }
.roster-list .nm { display: block; padding: 7px 2px; border-top: 1px solid var(--line-soft); background: #0a1330; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-list button:hover { border-color: #4a62a8; color: var(--text); }
.roster-list button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }

.detail { display: grid; grid-template-columns: 260px minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; min-height: 440px; }
.detail .art { display: flex; align-items: flex-end; justify-content: center; padding: 20px 10px 0;
  background: radial-gradient(ellipse at 50% 85%, #2f6fe055, transparent 65%), linear-gradient(#1a2c66, #0c1638); border-right: 1px solid var(--line); }
.detail .art img { max-height: 400px; width: auto; }
.detail .info { padding: 26px 28px; }
.detail h2 { font-size: 2rem; margin-bottom: .15em; }
.detail .build { color: var(--gold); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1em; }
.detail .blurb { color: #c9d1e6; font-size: 1.04rem; }
.detail dl { margin: 22px 0 0; border-top: 1px solid var(--line); }
.detail dl div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.detail dt { color: var(--muted); font-size: .9rem; }
.detail dd { margin: 0; font-weight: 600; }
.el { display: inline-block; font: 700 .68rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border-radius: 2px; margin-left: 8px; vertical-align: 2px; color: #fff; }
.el-earth { background: #8b6a2c; } .el-water { background: #2763c4; } .el-fire { background: #c2412b; } .el-wind { background: #2b8a58; } .el-heal { background: #a8487f; }
.el-row { margin-top: 10px; }
.el-row .el { margin: 0 6px 6px 0; font-size: .74rem; padding: 6px 10px; }

@media (max-width: 1000px) { .roster { grid-template-columns: 1fr; } .roster-list { grid-template-columns: repeat(7, 1fr); } }
@media (max-width: 640px) {
  .roster-list { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .roster-list li { flex: 0 0 82px; scroll-snap-align: start; }
  .detail { grid-template-columns: 1fr; min-height: 0; }
  .detail .art { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail .art img { max-height: 300px; }
  .detail .info { padding: 20px 18px; }
  .detail dl div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Rates ---------- */
.big-rates { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 4px; background: var(--panel); margin-bottom: 40px; }
.big-rates > div { padding: 26px 24px; border-left: 1px solid var(--line); }
.big-rates > div:first-child { border-left: 0; }
.big-rates .v { font: 700 clamp(2.2rem, 6vw, 3.2rem)/1 var(--head); color: var(--gold); }
.big-rates .l { margin-top: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; }
.big-rates .n { color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .big-rates > div { padding: 18px 12px; } .big-rates .n { display: none; } }

table.settings { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
table.settings th, table.settings td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.settings th { width: 36%; font-weight: 600; color: var(--muted); }
table.settings tr:last-child > * { border-bottom: 0; }
@media (max-width: 560px) { table.settings th, table.settings td { display: block; width: auto; padding: 0 14px; border: 0; } table.settings th { padding-top: 12px; font-size: .88rem; } table.settings td { padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); } }

.notice { border-left: 3px solid var(--gold); background: #f2c45a14; padding: 12px 16px; margin-bottom: 24px; font-weight: 600; }
.small { color: var(--muted); font-size: .9rem; }

/* ---------- Rules ---------- */
.rules { list-style: none; counter-reset: r; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 820px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 56px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); }
.rules li::before { content: counter(r, decimal-leading-zero); font: 700 1.4rem/1.2 var(--head); color: var(--gold); }
.rules h3 { margin: 0 0 4px; font-family: var(--body); font-size: 1.08rem; font-weight: 700; }
.rules p { margin: 0; color: var(--muted); }

/* ---------- Download ---------- */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start; }
.dl-card { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 4px; padding: 28px; }
.dl-card h2 { margin-bottom: .3em; }
.dl-card .meta { color: var(--muted); margin-bottom: 20px; }
.dl-card .sub { margin: 16px 0 0; color: var(--muted); font-size: .95rem; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 18px 46px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; display: grid; place-items: center; font: 700 .95rem var(--head); color: var(--gold); border: 1px solid var(--gold-2); border-radius: 50%; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; width: 1px; background: var(--line); }
details.adv { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
details.adv summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.adv p { margin-top: 10px; color: var(--muted); font-size: .94rem; }
@media (max-width: 900px) { .dl { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #050a1c; margin-top: 24px; }
.footer > .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-top: 40px; padding-bottom: 28px; }
.footer-logo { height: 120px; width: auto; margin: -8px 0 8px -6px; }
.footer h4 { margin: 4px 0 12px; font: 700 .74rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text); text-decoration: none; font-size: .95rem; }
.footer a:hover { color: var(--gold); }
.footer p { color: var(--muted); font-size: .92rem; max-width: 340px; }
.legal { border-top: 1px solid var(--line-soft); background: #050a1c; }
.legal .wrap { display: flex; align-items: center; gap: 16px; padding-top: 16px; padding-bottom: 24px; color: #7581a3; font-size: .82rem; }
.legal img { height: 44px; width: auto; flex: none; opacity: .9; }
.legal p { margin: 0; }
@media (max-width: 700px) { .footer > .wrap { grid-template-columns: 1fr 1fr; } .footer > .wrap > div:first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
