/* The website wears Obsidiana, the same identity as the game (owner 10/11: "no deberian ser 2 differentes"), laid out as the mock-up
   he approved (workshop kit assets/ui/entrega-web: header with the world map, menu on the left, framed boxes). The frames, buttons and
   fonts are the kit's own files (css/zillaz-web-kit.css, img/, fonts/); this sheet places them and styles what the pages hold. */

:root {
  --bg-0: #0A0812;
  --bg-1: #110C22;
  --panel: #17102E;
  --surface: #231848;
  --surface-hi: #352568;
  --border: #4C3A8E;
  --border-hi: #6E5ABA;
  --text: #F6F3FF;
  --dim: #A79CCB;
  --soft: #DAD3F0;
  --accent: #9B6BFF;
  --accent-2: #D9C8FF;
  --accent-deep: #5A3BC4;
  --line: rgba(255, 255, 255, 0.08);
  --go: #14F195;
  --bad: #FF77B4;
  --bad-deep: #9F265A;
  --navy: #1C1926;
  --display: "Chakra Petch", "Futura", "Avenir Next Condensed", "Trebuchet MS", system-ui, sans-serif;
  --body: "Inter", "Avenir Next", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --sh-panel: 0 0 0 1px var(--bg-0), 0 4px 0 1px rgba(0, 0, 0, 0.55);
  --sh-bevel: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 var(--bg-0);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
}

body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
body.zw-page { background-color: var(--bg-0); }

a { color: var(--accent-2); text-decoration-color: rgba(217, 200, 255, 0.4); text-underline-offset: 3px; }
a:hover { color: #fff; }

h1, h2, .zw-menu, .play, .pill, button, .steps, .head-play { font-family: var(--display); }
h1 { font-size: 24px; margin: 4px 0 14px; color: var(--text); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
h2 { font-size: 17px; margin: 22px 0 10px; color: var(--text); letter-spacing: 0.04em; font-weight: 700; }

/* Header: the world map of the kit, the logo and the cyan Play now */
.zw-header { height: 250px; border-bottom: 3px solid var(--navy); position: relative; flex: none; }
.topbar { position: absolute; top: 0; left: 0; right: 0; height: 28px; display: flex; justify-content: flex-end; gap: 16px; padding: 4px 16px; background: rgba(14, 14, 16, 0.72); font-size: 12px; color: var(--dim); }
.head-in { max-width: 1160px; margin: 0 auto; height: 100%; padding: 36px 12px 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand { display: block; min-width: 0; }
.logo { display: block; height: 186px; width: auto; max-width: 100%; }
.head-play { margin-top: 56px; width: 210px; flex: none; font-weight: 700; font-size: 22px; line-height: 1; letter-spacing: 1px; color: var(--bg-0); text-align: center; text-decoration: none; text-transform: uppercase; }
.head-play:hover { color: var(--bg-0); }
.head-play span { display: block; padding: 14px 0 12px; white-space: nowrap; }

.status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--bad); outline: 1px solid var(--navy); }
.dot.up { background: var(--go); }

/* Buttons: the kit's grey button; the big Play of the Play tab is the kit's cyan one */
.pill, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 8px solid transparent;
  border-image: url(img/btn/btn-normal.png) 8 fill / 8px / 0 stretch;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
}

.pill:hover, button:hover { border-image-source: url(img/btn/btn-hover.png); color: #fff; }
.pill:active, button:active { border-image-source: url(img/btn/btn-pressed.png); }
button:disabled { border-image-source: url(img/btn/btn-disabled.png); color: var(--dim); cursor: wait; }
button.ghost { color: var(--soft); }
.play { display: inline-flex; align-items: center; justify-content: center; gap: 0.35em; padding: 0 18px; color: var(--bg-0); font-size: 18px; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; background: transparent; }
.play:hover { color: var(--bg-0); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
  .pill, button { border-image-source: url(img/btn/btn-normal@2x.png); border-image-slice: 16 fill; }
  .pill:hover, button:hover { border-image-source: url(img/btn/btn-hover@2x.png); }
  .pill:active, button:active { border-image-source: url(img/btn/btn-pressed@2x.png); }
  button:disabled { border-image-source: url(img/btn/btn-disabled@2x.png); }
}

/* The page: menu on the left, the open section, the side column */
.wrap { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 14px 12px 28px; display: grid; grid-template-columns: 210px minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
main { min-width: 0; }
body > main { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; padding: 14px 12px 28px; }

.side .zw-menu { display: flex; align-items: center; gap: 10px; height: 40px; width: 100%; margin: 0 0 3px; padding: 0 6px 0 0; color: var(--soft); font-weight: 600; font-size: 14px; letter-spacing: 0.3px; text-decoration: none; white-space: nowrap; }
.side .zw-menu img { width: 32px; height: 32px; margin-left: -4px; flex: none; }
.side .zw-menu.is-active { color: var(--accent-2); }
.side h3 { margin: 12px 0 5px; padding: 0 2px 3px; border-bottom: 1px solid var(--surface-hi); color: var(--dim); font: 700 12px var(--display); letter-spacing: 1.5px; text-transform: uppercase; }
.side h3:first-child { margin-top: 0; }

/* Title bars: the kit's bar, sitting on the box that follows */
.tab > h1, #news-list > h1, .aside h2.bar {
  position: relative;
  z-index: 1;
  height: 30px;
  margin: 0 0 10px;
  padding: 11px 0 0;
  border-style: solid;
  border-width: 0 12px;
  border-image: url(img/frame/box-title.png) 0 12 fill / 0 12px / 0 round;
  font-size: 14px;
  line-height: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab > h1 + .box, #news-list > h1 + .box, .aside h2.bar + .box { margin-top: -20px; padding-top: 10px; }
#news-list > h1 { margin-top: 14px; }
.aside .box { margin-bottom: 14px; }

.tab { display: none; }
.tab.on { display: block; }

/* Boxes: the kit's frame */
.box {
  border: 12px solid transparent;
  border-image: url(img/frame/box.png) 12 fill / 12px / 0 stretch;
  padding: 4px 6px 6px;
  overflow-x: auto;
}

@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
  .box { border-image-source: url(img/frame/box@2x.png); border-image-slice: 24 fill; }
  .tab > h1, #news-list > h1, .aside h2.bar { border-image-source: url(img/frame/box-title@2x.png); border-image-slice: 0 24 fill; }
}

.prose p { margin: 0 0 10px; }
.prose p:last-child { margin-bottom: 0; }

/* Get started: the three steps of the mock-up */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.steps a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; color: var(--text); font-weight: 600; font-size: 14px; line-height: 1.25; text-decoration: none; }
.steps b { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--accent); color: var(--accent-2); background: var(--bg-0); font-size: 18px; outline: 1px solid var(--navy); }
.steps a:hover b { background: var(--accent); color: var(--bg-0); }

/* The side column: the account, the character search, players online and the top five */
.side-account, .side-search { display: flex; flex-direction: column; gap: 6px; }
.side-search input { width: 100%; min-width: 0; }
.side-online { text-align: center; }
.side-online b { display: block; font-family: var(--display); font-size: 38px; line-height: 1.1; color: var(--accent-2); }
.side-online span { color: var(--dim); font-size: 12px; }
.side-top ol { list-style: none; margin: 0; padding: 0; }
.side-top li { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-bottom: 1px solid var(--surface); }
.side-top li:last-child { border: 0; }
.side-top .pos { width: 16px; color: var(--dim); font: 600 13px var(--display); }
.side-top img { width: 32px; height: 32px; flex: none; image-rendering: pixelated; }
.side-top .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-top .nm small { display: block; color: var(--dim); font-size: 11px; line-height: 1.1; }
.side-top .lv { color: var(--accent-2); font: 600 13px var(--display); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }

/* Number cards: a slot of the game (black well, grey frame) */
.card {
  background: var(--bg-0);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 12px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.6);
  min-width: 0;
}

.card b { display: block; font-size: 26px; line-height: 1.1; font-weight: 700; color: var(--accent-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.card a { color: var(--text); }

.news { padding: 10px 0 14px; border-bottom: 1px solid var(--surface-hi); }
.news:last-child { border-bottom: 0; }
.news h2 { margin: 0 0 4px; font-size: 19px; }
.news time { color: var(--accent-2); font-size: 12px; font-weight: 600; }
.news p { margin: 0 0 8px; color: var(--soft); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 4px; color: var(--dim); font-size: 13px; }

input, select {
  min-height: 44px;
  padding: 8px 12px;
  background: var(--bg-0);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  font: inherit;
  outline: none;
}

input::placeholder { color: #9388BC; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(155, 107, 255, 0.45); }
#char-name { flex: 1; min-width: 0; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.04); }

.empty, .wait { color: var(--dim); padding: 8px 0; margin: 0; }
.error { color: var(--bad); }
.on-dot { color: var(--go); font-size: 13px; }
.free { color: var(--go); }

/* Bars of the vocation chart */
.bars { display: grid; grid-template-columns: max-content 1fr max-content; gap: 8px 12px; align-items: center; }
.bar { height: 14px; border-radius: 2px; background: var(--bg-0); border: 1px solid var(--border); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.two > div { min-width: 0; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.facts dt { color: var(--dim); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

dialog {
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: 2px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 0, 0, 0.5), var(--sh-bevel);
}

dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
dialog h2 { margin-top: 0; }
dialog label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; color: var(--dim); font-size: 13px; }
dialog .msg { min-height: 18px; font-size: 13px; margin: 4px 0; }
.buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.foot { text-align: center; color: var(--dim); font-size: 13px; padding: 0 16px 18px; }
.hazard { height: 3px; margin: 0 -16px 14px; background: var(--navy); }

/* My account and the guild controls (web-guilds.js) */
#guild-tools .box { margin: 16px 0; }
#guild-tools h2:first-child, .manage h2:first-child { margin-top: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 12px; min-width: 0; }
.inline-form label { display: flex; flex-direction: column; gap: 4px; color: var(--dim); font-size: 13px; min-width: 0; flex: 1 1 180px; }
.inline-form input, .inline-form select { min-width: 0; width: 100%; }
.row-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.row-tools .inline-form { margin: 0; gap: 6px; flex-wrap: nowrap; }
.row-tools input { width: 120px; flex: 1 1 90px; }
.row-tools select { width: auto; flex: none; padding: 8px 10px; }
button.small { padding: 0 6px; font-size: 13px; }
button.danger, button.danger:hover { color: var(--bad); }
.note { color: var(--soft); font-size: 13px; border-left: 3px solid var(--accent); padding: 4px 0 4px 10px; margin: 8px 0 14px; }
.motd { background: var(--bg-1); border: 1px solid var(--line); border-radius: 2px; padding: 8px 12px; overflow-wrap: anywhere; }
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.invite .inline-form { margin: 0; }
.invite .msg { flex-basis: 100%; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chips .inline-form { margin: 0; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 4px 4px 4px 12px; }
.msg { min-height: 18px; font-size: 14px; margin: 6px 0; }

/* Phones on their side and small windows: the menu keeps only its icons, the header is lower */
@media (max-width: 900px) {
  html, body { font-size: 14px; }
  .zw-header { height: 122px; }
  .topbar { height: 22px; padding: 2px 10px; font-size: 11px; }
  .head-in { padding: 24px 8px 0; }
  .logo { height: 96px; }
  .head-play { margin-top: 18px; width: 168px; font-size: 20px; }
  .wrap { grid-template-columns: 52px minmax(0, 1fr) 190px; gap: 8px; padding: 8px 8px 20px; }
  .side .zw-menu { justify-content: center; padding: 0; height: 44px; }
  .side .zw-menu span { display: none; }
  .side .zw-menu img { margin: 0; }
  .side h3 { height: 0; margin: 6px 4px; padding: 0; overflow: hidden; }
  .side h3:first-child { display: none; }
  .side-online b { font-size: 28px; }
  .pill, button { min-height: 44px; }
}

/* Phones upright: the side column goes under the section */
@media (max-width: 600px) {
  .wrap { grid-template-columns: 52px minmax(0, 1fr); }
  .aside { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 8px; align-items: start; }
  .head-play { width: 150px; font-size: 18px; }
  .hide-narrow { display: none; }
  th, td { padding: 8px 5px; }
  .two { grid-template-columns: 1fr; }
  .row-tools .inline-form { flex-wrap: wrap; }
}

/* A checkbox with its sentence (accept the terms, the payment consent) */
label.check { display: flex; flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; line-height: 1.4; margin: 10px 0; }
label.check input[type="checkbox"] { width: auto; min-width: 18px; min-height: 0; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--accent); }
.side-account [hidden] { display: none; }
.aside > section { min-width: 0; }
.side-top a { overflow-wrap: anywhere; }

/* Play now: the one button that must jump out. Drawn in CSS (sharp on any screen), no kit image: the orange of the logo,
   a navy outline, a light band on top and a dark one below, and a glow that breathes. */
.head-play, a.play {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 64px; padding: 0 26px 4px; border: 3px solid var(--navy); border-image: none; border-radius: 12px;
  background: linear-gradient(180deg, #FFE27A 0%, #FFB52E 22%, #FF8A1E 58%, #F0600F 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -6px 0 #B5390A, 0 0 0 2px #FFC53D, 0 0 18px rgba(255, 150, 40, 0.75);
  color: #fff; font: 700 26px/1 var(--display); letter-spacing: 1.5px; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  text-shadow: -2px 0 var(--navy), 2px 0 var(--navy), 0 -2px var(--navy), 0 2px var(--navy), -2px -2px var(--navy), 2px -2px var(--navy), -2px 2px var(--navy), 2px 3px var(--navy);
  animation: play-glow 1.8s ease-in-out infinite; transition: transform 0.12s, filter 0.12s;
}
.head-play { width: auto; min-width: 250px; }
.head-play span { display: inline; padding: 0; }
.head-play::before, a.play::before { content: ""; flex: none; width: 0; height: 0; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 0 0 var(--navy)) drop-shadow(1px 0 0 var(--navy)) drop-shadow(-1px 0 0 var(--navy)) drop-shadow(0 1px 0 var(--navy)) drop-shadow(0 -1px 0 var(--navy)); }
.head-play:hover, a.play:hover { color: #fff; transform: scale(1.05); filter: brightness(1.1); }
.head-play:active, a.play:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 #B5390A, 0 0 0 2px #FFC53D; }
@keyframes play-glow {
  50% { box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.75), inset 0 -6px 0 #B5390A, 0 0 0 2px #FFE27A, 0 0 34px rgba(255, 190, 60, 1); }
}
@media (prefers-reduced-motion: reduce) { .head-play, a.play { animation: none; } }
@media (max-width: 900px) { .head-play { min-width: 190px; height: 54px; font-size: 22px; } }
@media (max-width: 600px) { .head-play { min-width: 0; height: 50px; padding: 0 14px 4px; gap: 8px; font-size: 19px; } }

/* The language of the website (web-i18n.js): EN / ES / PT at the left of the top bar */
.langs { display: flex; gap: 4px; margin-right: auto; flex: none; }
.langs button { min-width: 34px; min-height: 0; height: 20px; margin: 0; padding: 0 6px; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 3px; background: transparent; color: var(--dim); font: 700 11px/1 var(--display); letter-spacing: 0.06em; box-shadow: none; cursor: pointer; }
.langs button:hover { color: #fff; border-color: #fff; background: transparent; }
.langs button[aria-pressed="true"] { color: var(--bg-0); background: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) { .langs button { height: 18px; } }
/* On phones the bar stays thin: a taller invisible area makes the three buttons easy to hit */
.langs button { position: relative; }
.langs button::after { content: ""; position: absolute; inset: -12px -2px; }
