/* The Libroxel website: the same look as the app's home screen, a bright
   sky over green hills, with bubbles, glass bars and glossy buttons. */

@font-face { font-family: "Selawik"; font-weight: 300; font-display: swap; src: url("fonts/Selawik-Semilight.woff2") format("woff2"); }
@font-face { font-family: "Selawik"; font-weight: 400; font-display: swap; src: url("fonts/Selawik-Regular.woff2") format("woff2"); }
@font-face { font-family: "Selawik"; font-weight: 600; font-display: swap; src: url("fonts/Selawik-Semibold.woff2") format("woff2"); }
@font-face { font-family: "Selawik"; font-weight: 700; font-display: swap; src: url("fonts/Selawik-Bold.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url("fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2"); }
@font-face { font-family: "Phosphor"; font-display: block; src: url("fonts/Phosphor-Bold.woff2") format("woff2"); }

:root {
  /* The app's colours (crates/libroxel/src/theme.rs). */
  --back: rgb(214, 232, 247);
  --panel: rgb(241, 246, 252);
  --card: rgb(255, 255, 255);
  --well: rgb(229, 243, 252);
  --line: rgb(180, 204, 228);
  --text: rgb(28, 36, 48);
  --heading: rgb(30, 57, 91);
  --muted: rgb(92, 108, 128);
  --accent: rgb(36, 128, 222);
  --accent-deep: rgb(18, 78, 158);
  --green: rgb(52, 158, 48);
  --link: rgb(0, 102, 204);
  --red: rgb(204, 46, 46);
  --amber: rgb(196, 122, 0);
  --corner: 5px;
  --display: "Selawik", "Atkinson Hyperlegible", system-ui, sans-serif;
  --body: "Selawik", "Atkinson Hyperlegible", system-ui, sans-serif;
  --gloss: linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 51%);
  --pane: rgba(255, 255, 255, 0.9);
  --pane-shadow: 0 4px 16px rgba(10, 40, 80, 0.18);
  --glow: 0 0 12px rgba(90, 180, 255, 0.75);
  /* A little sky with a sunny corner, behind game pictures. */
  --sky-pic: radial-gradient(ellipse 70% 60% at 85% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0)), linear-gradient(rgb(76, 158, 226), rgb(178, 222, 248) 70%, rgb(214, 240, 222));
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  /* Bubbles, a sunny glow and soft hills over a sky fading to the horizon. */
  background-color: var(--back);
  background-image:
    radial-gradient(circle at 8% 22%, rgba(255, 255, 255, 0) 38px, rgba(255, 255, 255, 0.55) 46px, rgba(255, 255, 255, 0) 48px),
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0) 52px, rgba(255, 255, 255, 0.5) 62px, rgba(255, 255, 255, 0) 64px),
    radial-gradient(circle at 64% 64%, rgba(255, 255, 255, 0) 70px, rgba(255, 255, 255, 0.4) 84px, rgba(255, 255, 255, 0) 86px),
    radial-gradient(circle at 30% 82%, rgba(255, 255, 255, 0) 30px, rgba(255, 255, 255, 0.5) 37px, rgba(255, 255, 255, 0) 39px),
    radial-gradient(ellipse 60% 45% at 80% 0%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)),
    radial-gradient(ellipse 80% 22% at 25% 104%, rgb(120, 200, 80) 60%, rgba(120, 200, 80, 0) 61%),
    radial-gradient(ellipse 70% 20% at 85% 106%, rgb(150, 214, 110) 60%, rgba(150, 214, 110, 0) 61%),
    linear-gradient(rgb(28, 112, 196), rgb(94, 172, 232) 42%, rgb(196, 230, 250) 78%, rgb(226, 244, 252));
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.4;
  min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea { font: inherit; color: inherit; }
.icon { font-family: "Phosphor"; font-style: normal; font-weight: normal; line-height: 1; display: inline-block; }
.hidden { display: none !important; }

/* --- The bar along the top ------------------------------------------------ */

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 28px;
  height: 68px; padding: 0 28px;
  /* Sky-tinted glass with a gloss over its upper half. */
  background: var(--gloss), linear-gradient(rgba(126, 194, 250, 0.85), rgba(86, 156, 214, 0.9));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(20, 70, 130, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 10px rgba(10, 40, 80, 0.2);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--heading); font: 700 24px var(--display); text-shadow: 0 0 8px rgba(255, 255, 255, 0.9); }
.brand:hover { text-decoration: none; }
/* The mark is the Home button: a glossy pill while you're on Home, as in the app. */
.brand { padding: 5px 10px; border-radius: 9px; border: 1px solid transparent; }
.brand:hover { background: rgba(220, 240, 255, 0.45); }
.brand.active { background: linear-gradient(rgb(250, 253, 255), rgb(196, 228, 250)); border-color: rgb(70, 130, 190); box-shadow: 0 0 16px rgba(160, 220, 255, 0.8); }
.who .tab.iconbtn { padding: 6px 10px; }
.brand svg { width: 30px; height: 32px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; height: 100%; align-items: center; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 34px;
  color: rgb(12, 34, 62); font: 600 15px var(--display); text-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
  border: 1px solid transparent; border-radius: 7px; white-space: nowrap;
}
.tab:hover { text-decoration: none; background: var(--gloss), rgba(220, 240, 255, 0.35); border-color: rgba(255, 255, 255, 0.6); }
.tab.active {
  color: var(--heading);
  background: var(--gloss), linear-gradient(rgb(250, 253, 255), rgb(196, 228, 250));
  border-color: rgb(70, 130, 190); box-shadow: 0 0 14px rgba(160, 220, 255, 0.9), inset 0 1px 0 #fff;
}
.tab .icon { font-size: 15px; }
.who { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.caps { font: 600 13px var(--display); color: var(--heading); text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }
.who .name {
  min-width: 130px; padding: 5px 9px; border: 1px solid rgb(120, 150, 180); border-radius: 3px;
  background: #fff; color: var(--text); font: 400 15px var(--display);
}

/* --- Page ------------------------------------------------------------------ */

/* The page sits on a big frosted pane over the sky, like a window. */
main {
  max-width: 1400px; margin: 18px 22px; padding: 22px 26px 50px;
  background: linear-gradient(rgba(255, 255, 255, 0.94), rgba(244, 250, 255, 0.88));
  border: 1px solid rgba(40, 100, 170, 0.55); border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 6px 22px rgba(10, 40, 80, 0.28);
  backdrop-filter: blur(6px);
}
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; color: var(--heading); }
.title { font-size: 28px; font-weight: 300; margin-bottom: 6px; }
.section { font-size: 20px; display: flex; align-items: baseline; gap: 12px; margin: 26px 0 8px; }
.section a { font: 400 14px var(--body); }
.soft { color: var(--muted); }
.note { color: var(--muted); margin: 0 0 14px; }
.status { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--green); }
.status::before {
  content: ""; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 55%), currentColor;
  box-shadow: inset 0 -1px 2px rgba(0, 0, 0, 0.25);
}
.status.error { color: var(--red); }
.status.wait { color: var(--amber); }
.status .report { margin-left: 4px; font-size: 13px; }
.crash { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 4px 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
.crash .status { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.empty { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }

/* --- Buttons --------------------------------------------------------------- */

/* Glossy, rounded buttons that glow blue under the pointer. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 22px; border: 1px solid rgb(132, 142, 156); border-radius: 9px; cursor: pointer;
  font: 600 17px var(--display); color: var(--text);
  background: var(--gloss), linear-gradient(rgb(252, 252, 252), rgb(214, 220, 228));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(10, 40, 80, 0.2);
  margin-bottom: 4px; white-space: nowrap;
}
.btn:hover {
  text-decoration: none; border-color: rgb(60, 127, 177);
  background: var(--gloss), linear-gradient(rgb(234, 246, 253), rgb(178, 224, 250));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), var(--glow);
}
.btn:active { background: linear-gradient(rgb(200, 228, 246), rgb(160, 206, 238)); box-shadow: inset 0 2px 4px rgba(0, 40, 90, 0.3); }
.btn.go {
  color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); border-color: rgb(26, 100, 24);
  background: var(--gloss), linear-gradient(rgb(140, 220, 96), rgb(46, 150, 36));
}
.btn.go:hover { background: var(--gloss), linear-gradient(rgb(166, 232, 124), rgb(70, 170, 56)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 14px rgba(120, 220, 90, 0.8); }
.btn.go:active { background: linear-gradient(rgb(70, 160, 52), rgb(40, 130, 30)); box-shadow: inset 0 2px 4px rgba(0, 40, 0, 0.35); }
.btn.big { height: 52px; font-size: 21px; padding: 0 34px; min-width: 194px; border-radius: 11px; }
.btn.small { height: 30px; padding: 0 14px; font-size: 14px; gap: 7px; border-radius: 6px; }
.btn[disabled] { background: linear-gradient(rgb(244, 245, 247), rgb(226, 229, 233)); color: rgb(150, 156, 166); border-color: rgb(186, 192, 200); box-shadow: none; cursor: default; text-shadow: none; }
.link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; cursor: pointer;
  background: linear-gradient(rgb(250, 250, 250), rgb(232, 236, 240)); border: 1px solid rgb(160, 168, 178); border-radius: 3px; color: var(--text); font-size: 14px;
}
.chip:hover { background: linear-gradient(rgb(244, 250, 255), rgb(216, 237, 252)); border-color: rgb(60, 127, 177); }
.chip.on { background: linear-gradient(rgb(220, 238, 252), rgb(178, 216, 246)); border-color: rgb(102, 167, 232); color: var(--accent-deep); }
.iconbtn { padding: 3px 8px; }

input[type=text], input[type=password], input[type=search], input[type=email], textarea {
  width: 100%; padding: 7px 9px; background: #fff; border: 1px solid rgb(171, 173, 179); border-top-color: rgb(140, 150, 160); border-radius: 3px;
}
input:focus, textarea:focus { outline: none; border-color: rgb(61, 123, 173); box-shadow: 0 0 4px rgba(90, 170, 240, 0.7); }
label.field { display: block; margin: 12px 0; }
label.field span { display: block; margin-bottom: 4px; }

/* --- Home ------------------------------------------------------------------ */

.hello { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.hello h1 { font: 700 30px var(--display); color: var(--heading); }
.hello .body-pic { margin-left: auto; width: 150px; height: 200px; }
.portrait { position: relative; display: inline-block; flex: none; border-radius: 50%; overflow: hidden; background: radial-gradient(circle, rgb(236, 248, 255), rgb(160, 208, 244)); box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px rgba(30, 80, 140, 0.43); }
.portrait img { display: block; width: 100%; height: 100%; }
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 45%); box-shadow: inset 0 0 0 2px #fff; }
.friend-row { display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 6px; }
.friend-tile { width: 86px; flex: none; text-align: center; color: var(--text); }
.friend-tile:hover { text-decoration: none; }
.friend-tile .face { position: relative; width: 78px; height: 78px; margin: 0 auto 6px; }
.friend-tile .dot { position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; background-image: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 55%) !important; }
.friend-tile b { display: block; font: 600 15px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-tile small { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-face { display: flex; align-items: center; justify-content: center; width: 78px; height: 78px; margin: 0 auto 6px; border-radius: 50%; background: radial-gradient(circle at 50% 62%, #fff, rgb(196, 226, 248)); border: 2px solid rgb(120, 170, 220); color: var(--accent); font-size: 26px; box-shadow: 0 2px 6px rgba(10, 40, 80, 0.2); }
.friend-tile:hover .add-face, .friend-tile:hover .face .portrait { box-shadow: var(--glow); }
.waiting { color: var(--amber); font-size: 14px; display: flex; gap: 6px; align-items: center; }

.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 18px 16px; max-width: 1100px; }
.game { color: var(--text); display: block; }
.game:hover { text-decoration: none; }
.game .pic {
  position: relative; aspect-ratio: 188 / 150; border-radius: 8px; overflow: hidden;
  border: 1px solid rgb(130, 176, 222); transition: transform 0.1s, box-shadow 0.1s;
  background: var(--sky-pic); box-shadow: 0 4px 14px rgba(10, 40, 80, 0.25);
}
.game .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 32%); pointer-events: none; }
.game:hover .pic { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 6px 16px rgba(10, 40, 80, 0.3), var(--glow); }
.game .pic svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.game .badge { position: absolute; left: 8px; top: 8px; width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; background-image: var(--gloss); border: 1px solid rgba(0, 0, 0, 0.3); z-index: 1; }
.game .faces { position: absolute; right: 8px; top: 8px; display: flex; z-index: 1; }
.game .faces .portrait { margin-left: -6px; box-shadow: 0 0 0 2px #fff; }
.game h3 { font-size: 16px; color: var(--heading); margin: 12px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .meta { font-size: 13px; color: var(--link); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game .meta.live { color: var(--green); }
.game .meta.idle { color: var(--muted); }

/* --- A game's page ---------------------------------------------------------- */

.back { display: inline-flex; gap: 6px; align-items: center; margin-bottom: 14px; }
.hero { display: flex; gap: 34px; flex-wrap: wrap; }
.hero .pic { width: 440px; max-width: 100%; aspect-ratio: 440 / 248; border: 1px solid rgb(130, 176, 222); border-radius: 10px; background: var(--sky-pic); box-shadow: 0 4px 14px rgba(10, 40, 80, 0.25); overflow: hidden; }
.hero .pic svg { width: 100%; height: 100%; display: block; }
.hero h1 { font: 700 38px var(--display); margin-top: 4px; }
.stats { display: flex; gap: 38px; margin: 18px 0 22px; }
.stats b { display: block; font: 600 22px var(--display); }
.actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.about { margin-top: 22px; white-space: pre-wrap; max-width: 760px; }

.servers-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 28px 0 12px; }
.servers-head h2 { font-size: 24px; }
.servers-head label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.group { margin: 16px 0 8px; }
.server {
  display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 10px;
  background: linear-gradient(#fff, rgb(244, 249, 254)); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 2px 6px rgba(10, 40, 80, 0.08);
}
.server:hover { border-color: rgb(158, 205, 242); }
.server.friends { background: linear-gradient(rgb(240, 248, 255), rgb(220, 238, 252)); border-color: rgb(102, 167, 232); }
.server .mini { width: 52px; height: 52px; flex: none; background: var(--sky-pic); border-radius: 6px; border: 1px solid rgb(130, 176, 222); }
.server .what { flex: 1; min-width: 0; }
.server .what b { font: 600 17px var(--display); color: var(--heading); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server .what small { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; margin-top: 4px; }
.kind-player { color: var(--link); }
.kind-community { color: var(--green); }
.kind-official { color: var(--amber); }
.tag { padding: 0 7px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background-image: var(--gloss); }
.tag.admin { background-color: rgb(232, 140, 20); }
.tag.verified { background-color: var(--accent); }
.tag.group { background-color: rgb(120, 80, 200); text-transform: none; }
.group-list { display: flex; flex-wrap: wrap; gap: 8px; }
.post { padding: 8px 0; border-bottom: 1px solid var(--line); }
.post .link { float: right; }
.report-card { display: grid; gap: 6px; padding: 10px 12px; margin-bottom: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.report-card .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-card .reasons { margin: 0; padding-left: 18px; font-size: 13px; }
.report-card .buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.report-card input { flex: 1; min-width: 140px; }
.report-card pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.tag.kind { background-color: var(--muted); }
.form { display: flex; flex-direction: column; gap: 8px; }
.fill { width: 120px; flex: none; font-size: 13px; }
.fill .bar { height: 6px; background: linear-gradient(rgb(230, 230, 230), rgb(250, 250, 250)); border: 1px solid rgb(178, 178, 178); border-radius: 3px; margin-top: 3px; overflow: hidden; }
.fill .bar i { display: block; height: 100%; background: var(--gloss), linear-gradient(rgb(110, 220, 80), rgb(40, 160, 30)); }
.fill.full .bar i { background: var(--gloss), linear-gradient(rgb(246, 124, 112), rgb(196, 40, 34)); }

/* --- Friends ---------------------------------------------------------------- */

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; align-items: start; }
.person {
  display: flex; align-items: center; gap: 14px; padding: 9px 12px; margin-bottom: 10px;
  background: linear-gradient(#fff, rgb(244, 249, 254)); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 2px 6px rgba(10, 40, 80, 0.08);
}
.person:hover { border-color: rgb(158, 205, 242); }
.person .what { flex: 1; min-width: 0; }
.person .what b { display: block; font: 600 16px var(--display); color: var(--heading); }
.person .what small { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .buttons { display: flex; gap: 8px; align-items: center; }
.subhead { font: 600 19px var(--display); margin: 0 0 12px; color: var(--heading); }
.rating { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.rating .ratio { width: 120px; height: 6px; border-radius: 3px; background: rgb(214, 90, 80); overflow: hidden; }
.rating .ratio i { display: block; height: 100%; background: var(--green); }
.chip[disabled] { cursor: default; opacity: 0.6; }
.comment-box { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; max-width: 760px; }
.comment-box textarea { flex: 1; resize: vertical; }
.comment { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); max-width: 760px; }
.comment .what { flex: 1; min-width: 0; }
.comment .text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.comment .buttons { display: flex; gap: 6px; }
.subhead.sun { color: var(--amber); }
.search { display: flex; gap: 10px; margin-bottom: 10px; }
.search-results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px 24px; align-items: start; margin-top: 8px; }

/* --- Messages --------------------------------------------------------------- */

.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.chats { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
a.person.chat { color: inherit; text-decoration: none; }
.person.chat.on { border-color: var(--accent); box-shadow: var(--glow); }
.chat-log { height: 420px; overflow-y: auto; padding: 12px; margin-bottom: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 75%; align-self: flex-start; }
.bubble .text { padding: 7px 12px; border-radius: 12px; background: var(--well); border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine { align-self: flex-end; text-align: right; }
.bubble.mine .text { background: linear-gradient(rgb(90, 170, 240), var(--accent)); border-color: var(--accent-deep); color: #fff; text-align: left; }
.bubble small { font-size: 11px; }
.bubble .flag { font-size: 12px; color: var(--muted); }
.chats .search input { flex: 1; }

/* --- Avatar ----------------------------------------------------------------- */

.avatar-page { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.figure { padding: 14px; background: rgba(255, 255, 255, 0.894); border: 1px solid rgb(160, 196, 230); border-radius: 8px; box-shadow: 0 3px 14px rgba(10, 50, 100, 0.157); line-height: 0; }
.figure-name { font: 13px var(--body); color: var(--muted); text-align: center; line-height: 1.4; margin-top: 6px; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.swatch { width: 26px; height: 26px; border-radius: 5px; border: 0; cursor: pointer; padding: 0; background: rgb(var(--c)); box-shadow: 0 2px 0 rgba(var(--c), 0.55); }
.swatch.on { transform: translateY(-2px); outline: 2px solid var(--text); box-shadow: 0 4px 0 rgba(var(--c), 0.55); }
.swatch.pick { width: 40px; height: 26px; box-shadow: none; background: none; border: 1px solid var(--line); border-radius: 3px; }
.catalog { display: flex; flex-wrap: wrap; gap: 10px; }
.catalog .item { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: rgba(255, 255, 255, 0.894); border: 1px solid rgb(160, 196, 230); border-radius: 8px; }
.catalog .item small { font-size: 12px; }
.hats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.panel { background: rgba(255, 255, 255, 0.9); border: 1px solid rgb(160, 196, 230); border-radius: 8px; padding: 16px 18px; margin-bottom: 16px; max-width: 760px; box-shadow: 0 3px 14px rgba(10, 50, 100, 0.15); }
.panel h3 { font-size: 18px; margin-bottom: 6px; }
.signins { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
.codes { margin: 8px 0; padding: 10px 14px; border-radius: 8px; background: var(--panel); font-family: ui-monospace, monospace; }

/* --- Sign in, download ------------------------------------------------------ */

.narrow { max-width: 460px; }
.form-actions { display: flex; gap: 14px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.check { display: flex; gap: 8px; align-items: center; margin-top: 10px; color: var(--muted); }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; max-width: 900px; margin: 18px 0 30px; }
.download { padding: 18px; background: linear-gradient(#fff, rgb(240, 247, 254)); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 3px 12px rgba(10, 50, 100, 0.12); }
.download.mine { border-color: var(--green); box-shadow: 0 0 12px rgba(120, 220, 90, 0.6); }
.download h3 { font-size: 20px; }
.download p { color: var(--muted); font-size: 14px; margin: 6px 0 14px; }
ol.steps { padding-left: 20px; max-width: 760px; }
ol.steps li { margin-bottom: 8px; }
code { font-family: ui-monospace, "IBM Plex Mono", monospace; font-size: 13px; background: rgb(246, 249, 252); border: 1px solid var(--line); padding: 1px 5px; border-radius: var(--corner); }

/* --- The "opening Libroxel" box ------------------------------------------- */

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20, 60, 110, 0.35); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 440px; max-width: 100%; padding: 26px; background: linear-gradient(#fff, rgb(240, 247, 254)); border: 1px solid rgb(110, 150, 190); border-radius: 10px; box-shadow: inset 0 0 0 1px #fff, 0 8px 30px rgba(10, 40, 80, 0.4); text-align: center; }
.dialog h2 { font-size: 24px; margin: 10px 0 6px; }
.dialog p { color: var(--muted); margin: 0 0 18px; }
.dialog .actions { justify-content: center; }
.spinner { width: 34px; height: 34px; margin: 0 auto; border: 4px solid rgb(210, 228, 246); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

footer { padding: 14px 36px 40px; color: var(--heading); font-size: 13px; text-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }
footer a { color: var(--heading); text-decoration: underline; }

.privacy { max-width: 760px; }
.privacy ul { padding-left: 22px; }
.privacy li { margin: 6px 0; }

/* --- Phones ----------------------------------------------------------------- */

@media (max-width: 860px) {
  .topbar { gap: 14px; padding: 0 16px; height: auto; min-height: 60px; flex-wrap: wrap; padding-top: 8px; }
  .brand span { display: none; }
  .tabs { order: 3; flex-basis: 100%; height: 44px; }
  .who { margin-left: auto; }
  .who .caps { display: none; }
  .who .name { min-width: 0; }
  main { margin: 12px 8px; padding: 18px 14px 40px; }
  .columns { grid-template-columns: 1fr; }
  .search-results { grid-template-columns: 1fr; }
  .chats { grid-template-columns: 1fr; }
  .chat-log { height: 340px; }
  .games { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .server { flex-wrap: wrap; }
  .server .what { flex-basis: calc(100% - 70px); }
  .fill { margin-left: 66px; }
  .hero h1 { font-size: 30px; }
  footer { padding: 20px 16px 30px; }
}

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 6px 0 8px; }
.tiles > div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.tiles b { display: block; font: 600 22px var(--display); color: var(--heading); }
.chart { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 10px 4px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { font: 11px var(--body); fill: var(--muted); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .area { fill: var(--accent); opacity: 0.12; }
.chart .mark { fill: var(--accent); }
.chart .cross { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.chart .dot { fill: var(--accent); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.chart .tip { position: absolute; top: 2px; transform: translateX(-50%); background: var(--heading); color: #fff; font-size: 13px; padding: 3px 8px; border-radius: 5px; pointer-events: none; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.numbers { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.numbers th, .numbers td { padding: 8px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.numbers th { font: 600 13px var(--display); color: var(--heading); }
.numbers th:first-child, .numbers td:first-child { text-align: left; }
.games.row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 188px; overflow-x: auto; max-width: none; padding-bottom: 6px; }
.rank { position: absolute; right: 8px; top: 8px; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; background: rgba(10, 40, 80, 0.75); color: #fff; font: 700 15px/28px var(--body); text-align: center; }

.donate { max-width: 520px; margin: 10px auto 20px; text-align: center; }
.donate .title { font-size: 34px; font-weight: 600; }
.donate-heart { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 34px; background: var(--gloss), linear-gradient(rgb(255, 128, 150), rgb(214, 46, 86)); border: 1px solid rgb(160, 30, 64); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 18px rgba(255, 110, 140, 0.6); }
.segs { display: inline-flex; margin: 10px 0 18px; border: 1px solid rgb(132, 142, 156); border-radius: 9px; overflow: hidden; box-shadow: 0 2px 6px rgba(10, 40, 80, 0.15); }
.seg { padding: 9px 26px; border: 0; cursor: pointer; font: 600 15px var(--display); color: var(--text); background: var(--gloss), linear-gradient(rgb(252, 252, 252), rgb(214, 220, 228)); }
.seg + .seg { border-left: 1px solid rgb(160, 168, 178); }
.seg.on { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); background: var(--gloss), linear-gradient(rgb(96, 176, 246), rgb(30, 110, 200)); }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.amount, .other { height: 54px; border: 1px solid var(--line); border-radius: 9px; background: linear-gradient(#fff, rgb(240, 247, 254)); font: 600 20px var(--display); color: var(--heading); cursor: pointer; }
.amount:hover, .other:focus-within { border-color: rgb(60, 127, 177); box-shadow: var(--glow); }
.amount.on { color: #fff; border-color: rgb(26, 100, 24); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); background: var(--gloss), linear-gradient(rgb(140, 220, 96), rgb(46, 150, 36)); }
.other { display: flex; align-items: center; gap: 4px; padding: 0 12px; cursor: text; }
.other input[type=text] { border: 0; padding: 0; background: none; box-shadow: none; font: inherit; color: inherit; min-width: 0; }
.givers { display: flex; flex-direction: column; gap: 10px; }
.givers .btn { width: 100%; min-width: 0; height: auto; min-height: 52px; padding: 8px 18px; white-space: normal; }
.btn.donate-btn { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); border-color: rgb(160, 30, 64); background: var(--gloss), linear-gradient(rgb(255, 120, 146), rgb(214, 40, 84)); }
.btn.donate-btn:hover { background: var(--gloss), linear-gradient(rgb(255, 146, 168), rgb(230, 62, 104)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 0 14px rgba(255, 110, 140, 0.8); }
.btn.donate-btn:active { background: linear-gradient(rgb(200, 40, 80), rgb(170, 24, 62)); box-shadow: inset 0 2px 4px rgba(60, 0, 20, 0.35); }
.who .btn.donate-btn { margin-bottom: 0; }
@media (max-width: 480px) {
  .who { gap: 4px; }
  .who .btn.small { padding: 0 9px; gap: 5px; }
  .who .chip { padding: 4px 7px; }
}

.manage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.manage-head > div:nth-child(2) { flex: 1; min-width: 0; }
.manage-head .title { margin: 0; }
.manage-head .mini { width: 64px; height: 64px; flex: none; background: var(--sky-pic); border-radius: 8px; border: 1px solid rgb(130, 176, 222); overflow: hidden; }
.manage { max-width: 560px; }
.manage input[type=number] { width: 120px; padding: 7px 9px; background: #fff; border: 1px solid rgb(171, 173, 179); border-radius: 3px; }
.versions { max-width: 560px; display: flex; flex-direction: column; gap: 8px; }
