/* projectrose.eu: a 2000s Ragnarok fansite, built from the RO~sē logo sticker.
   Ink outlines and hard shadows like the sticker, holo-foil title bars like its edge, rosé paper, wine buttons,
   bottle-green headings. Pixelify Sans for titles, tabs and numbers; Verdana for reading, as fansites had it. */
@font-face { font-family: "Pixelify"; src: url(fonts/pixelify-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-007D, U+007F-00FF, U+2000-206F; }
@font-face { font-family: "Pixelify"; src: url(fonts/pixelify-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-007D, U+007F-00FF, U+2000-206F; }
@font-face { font-family: "Pixelify"; src: url(fonts/pixelify-sans-latin-ext-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F; }
@font-face { font-family: "Pixelify"; src: url(fonts/pixelify-sans-latin-ext-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0100-024F; }

:root {
  --paper: #f6e6f3;       /* the logo's pink */
  --paper-2: #fbf2f8;
  --card: #fffafd;
  --ink: #2a1520;         /* the logo's outline */
  --muted: #6e5262;
  --wine: #b3143a;
  --wine-dk: #7d0d29;
  --bottle: #1f6b3a;
  --gold: #b88a12;
  --holo: linear-gradient(90deg, #f7f0a8 0%, #f3d6e9 34%, #d9d2f4 62%, #cdeedd 100%);
  --ok: #1f8a4c;
  --bad: #c4183c;
  --pixel: "Pixelify", "Trebuchet MS", sans-serif;
  --read: Verdana, "DejaVu Sans", Geneva, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  font: 13px/1.6 var(--read);
  color: var(--ink);
  /* a faint diamond lattice, like old fansite wallpapers */
  background:
    linear-gradient(45deg, rgba(179, 20, 58, .045) 25%, transparent 25% 75%, rgba(179, 20, 58, .045) 75%) 0 0 / 22px 22px,
    linear-gradient(45deg, rgba(179, 20, 58, .045) 25%, transparent 25% 75%, rgba(179, 20, 58, .045) 75%) 11px 11px / 22px 22px,
    var(--paper);
}
a { color: var(--wine-dk); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--wine); }
:focus-visible { outline: 2px dashed var(--wine); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--pixel); font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
.small { font-size: 12px; color: var(--muted); }
#guest, #member { display: grid; gap: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.page { width: min(1000px, 100% - 24px); margin: 18px auto 28px; }

/* ---------- masthead ---------- */
.mast {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 14px 18px; background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
}
.mast-logo img { display: block; width: 172px; image-rendering: pixelated; }
.mast-words .motto { font: 700 26px/1.1 var(--pixel); color: var(--wine-dk); margin: 0 0 4px; }
.mast-words .sub { margin: 0; color: var(--muted); }
.mast-status { text-align: right; font-family: var(--pixel); }
.lamp { display: inline-block; width: 11px; height: 11px; border: 2px solid var(--ink); border-radius: 50%; background: #bbb; vertical-align: -1px; margin-right: 6px; }
.lamp.on { background: #39c46b; }
.lamp.off { background: var(--bad); }
.lamp.soon { background: #f2c94c; }
.mast-status .state { font-size: 17px; }
.mast-status .count { font-size: 13px; color: var(--muted); }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0 10px; padding: 0; list-style: none; }
.tabs a {
  display: block; padding: 7px 14px 6px; font: 400 16px/1 var(--pixel); color: var(--ink); text-decoration: none;
  background: var(--paper-2); border: 2px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0;
}
.tabs a:hover { background: #fff; }
.tabs a[aria-current="page"] { background: var(--wine); color: #fff; padding-top: 10px; margin-top: -3px; }

/* ---------- body columns ---------- */
.cols {
  display: grid; grid-template-columns: 236px 1fr; gap: 18px; align-items: start;
  padding: 18px; background: var(--paper-2); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
}
.side, .main { display: grid; gap: 18px; min-width: 0; }

/* ---------- windows: the RO client's, in sticker form ---------- */
.win { background: var(--card); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); min-width: 0; }
.win-title {
  display: flex; align-items: center; gap: 8px; padding: 5px 9px 4px;
  background: var(--holo); border-bottom: 2px solid var(--ink); font: 700 15px/1.2 var(--pixel);
}
.win-title::before {
  content: ""; flex: none; width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: #fff;
}
.win-title .aside { margin-left: auto; font-weight: 400; font-size: 13px; color: var(--muted); }
.win-body { padding: 12px 14px; }
.win-body > :last-child { margin-bottom: 0; }
.win.wine .win-title { background: var(--wine); color: #fff; }
.win.wine .win-title::before { background: var(--wine-dk); border-color: #fff; }

.main h1 { font-size: 30px; color: var(--wine-dk); margin: 2px 0 2px; }
.main .lede { font-size: 14px; color: var(--muted); margin: 0; }
.win-body h3 { font-size: 18px; color: var(--bottle); margin: 1.1em 0 .4em; }
.win-body h3:first-child { margin-top: 0; }
.win-body ul { margin: 0 0 .8em; padding-left: 1.2em; }
.win-body li { margin: .2em 0; }
.prose { max-width: 68ch; }

/* ---------- buttons and forms ---------- */
.btn {
  display: inline-block; padding: 8px 16px 7px; font: 700 15px/1 var(--pixel); color: #fff; text-decoration: none; cursor: pointer;
  background: var(--wine); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.btn:hover { background: #c81d46; color: #fff; }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.btn.plain { background: #fff; color: var(--ink); }
.btn.plain:hover { background: var(--paper-2); color: var(--ink); }
.btn:disabled { background: #d9c3cf; cursor: not-allowed; transform: none; box-shadow: 3px 3px 0 var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.form { display: grid; gap: 9px; }
.form label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.form input, .form select {
  font: 13px var(--read); color: var(--ink); padding: 6px 8px; background: #fff; border: 2px solid var(--ink); border-radius: 0; width: 100%;
}
.form input:focus { outline: 2px dashed var(--wine); outline-offset: 1px; }
.form .row { display: flex; gap: 14px; align-items: center; font-size: 12px; }
.form .row label { display: flex; gap: 5px; align-items: center; color: var(--ink); font-size: 13px; }
.form .row input { width: auto; }
.msg { min-height: 1.2em; margin: 0; font-size: 12px; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--ok); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { font: 700 13px var(--pixel); text-align: left; padding: 5px 7px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.tbl td { padding: 4px 7px; border-bottom: 1px dotted #d6b9ca; vertical-align: top; }
.tbl tr:nth-child(even) td { background: #fdf5fa; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .rank { width: 2.2em; font-family: var(--pixel); color: var(--muted); }
.tbl tr.first .rank { color: var(--gold); }
.tbl .empty { color: var(--muted); font-style: italic; text-align: center; padding: 14px; }
.scroll-x { overflow-x: auto; }

/* ---------- the sidebar's hit counter: digits in tiles, like a 2003 counter ---------- */
.counter { display: flex; gap: 3px; margin: 2px 0 6px; }
.counter span {
  display: grid; place-items: center; width: 26px; height: 34px; font: 700 24px/1 var(--pixel); color: #ffe8f2;
  background: linear-gradient(#3a1d2c 50%, #2a1520 50%); border: 2px solid var(--ink);
}
.side .small { font-size: 12px; color: var(--muted); margin: 0; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; }
.side dt { font-weight: 700; }
.side dd { margin: 0; text-align: right; }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: 1fr 210px; gap: 18px; align-items: center; }
.hero h1 { font-size: 34px; }
.glass { display: grid; gap: 8px; justify-items: center; text-align: center; }
.glass .big { font: 700 54px/1 var(--pixel); color: var(--wine); }
.glass .label { font-size: 12px; color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); }
.facts div { padding: 10px 12px; border-right: 2px solid var(--ink); background: #fff; }
.facts div:last-child { border-right: 0; }
.facts b { display: block; font: 700 24px/1.1 var(--pixel); color: var(--wine-dk); }
.facts span { font-size: 12px; color: var(--muted); }

.news { list-style: none; margin: 0; padding: 0; }
.news li { padding: 9px 0; border-bottom: 1px dotted #d6b9ca; }
.news li:first-child { padding-top: 0; }
.news li:last-child { border-bottom: 0; padding-bottom: 0; }
.news .title { font: 700 16px var(--pixel); }
.news .date { color: var(--muted); font-size: 12px; margin-left: 8px; }
.news .tag { display: inline-block; font: 400 12px/1 var(--pixel); padding: 3px 6px 2px; margin-right: 6px; border: 2px solid var(--ink); background: #f7f0a8; }
.news .tag.event { background: #cdeedd; }
.news .tag.maintenance { background: #d9d2f4; }
.news p { margin: 4px 0 0; }

.woe { width: 100%; border-collapse: collapse; font-size: 12px; }
.woe td { padding: 4px 0; border-bottom: 1px dotted #d6b9ca; }
.woe tr:last-child td { border-bottom: 0; }
.woe td:last-child { text-align: right; font-family: var(--pixel); font-size: 13px; }

/* ---------- wiki ---------- */
.wiki { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: start; }
.toc { position: sticky; top: 12px; }
.toc ol { margin: 0; padding-left: 1.4em; font-size: 12.5px; }
.toc li { margin: .25em 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.wiki .win { scroll-margin-top: 12px; }
.shot {
  display: grid; place-items: center; min-height: 150px; margin: 10px 0; padding: 12px; text-align: center;
  border: 2px dashed #c9a5b8; background: repeating-linear-gradient(-45deg, #fff, #fff 8px, #fbf2f8 8px, #fbf2f8 16px);
  color: var(--muted); font-size: 12px;
}
.shot b { display: block; font: 700 14px var(--pixel); color: var(--ink); margin-bottom: 2px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 3px 16px; margin: 0 0 .8em; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; }
.was { color: var(--muted); text-decoration: line-through; }
.note { padding: 8px 10px; margin: 10px 0; background: #f7f0a8; border: 2px solid var(--ink); font-size: 12.5px; }

/* ---------- statistics ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.tile { padding: 10px 12px; background: #fff; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.tile b { display: block; font: 700 26px/1.1 var(--pixel); color: var(--wine-dk); font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); }
.chart { width: 100%; height: 180px; display: block; }
.chart .grid { stroke: #ecd3e1; stroke-width: 1; }
.chart .line { fill: none; stroke: var(--wine); stroke-width: 2; }
.chart .area { fill: rgba(179, 20, 58, .12); }
.chart text { font: 11px var(--read); fill: var(--muted); }
.bars { display: grid; gap: 5px; }
.bar { display: grid; grid-template-columns: 130px 1fr 40px; gap: 8px; align-items: center; font-size: 12px; }
.bar .track { height: 14px; background: #fff; border: 2px solid var(--ink); }
.bar .fill { height: 100%; background: var(--bottle); }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; }
.switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.switch button {
  font: 400 14px/1 var(--pixel); padding: 6px 10px 5px; cursor: pointer; color: var(--ink);
  background: #fff; border: 2px solid var(--ink);
}
.switch button[aria-pressed="true"] { background: var(--bottle); color: #fff; }
.castles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.castle { padding: 10px; background: #fff; border: 2px solid var(--ink); }
.castle h4 { font-size: 15px; color: var(--bottle); }
.castle .owner { font: 700 16px var(--pixel); margin: 6px 0 2px; }
.castle .when { font-size: 12px; color: var(--muted); }

/* ---------- download ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.steps > li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px;
  font: 700 22px/1 var(--pixel); background: var(--wine); color: #fff; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
.steps h3 { margin: 6px 0 4px !important; }
.dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
.dl .card { padding: 10px 12px; background: #fff; border: 2px solid var(--ink); }
.dl .card b { font: 700 16px var(--pixel); }

/* ---------- account ---------- */
.acct { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.game-acc { border: 2px solid var(--ink); background: #fff; margin-bottom: 12px; }
.game-acc header { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.game-acc header b { font: 700 16px var(--pixel); }
.game-acc header .meta { color: var(--muted); font-size: 12px; }
.game-acc header .btn { margin-left: auto; padding: 5px 10px 4px; font-size: 13px; }
.game-acc .chars { padding: 6px 10px 8px; }
.pill { display: inline-block; padding: 1px 6px; font-size: 11px; border: 1px solid var(--ink); background: #cdeedd; }
.pill.off { background: #eee; }
.pill.bad { background: #f7c6d2; }

/* ---------- footer ---------- */
.foot { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.foot a { color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .mast { grid-template-columns: 1fr; text-align: left; }
  .mast-status { text-align: left; }
  .cols { grid-template-columns: 1fr; padding: 12px; }
  .side { order: 2; }
  .hero, .wiki, .acct, .castles, .dl { grid-template-columns: 1fr; }
  .toc { position: static; }
  .facts { grid-template-columns: 1fr; }
  .facts div { border-right: 0; border-bottom: 2px solid var(--ink); }
  .facts div:last-child { border-bottom: 0; }
  .bar { grid-template-columns: 100px 1fr 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
