/* Just Better v2 — the new design (the original one by Evan stays in assets/css, see views/v1). */

:root {
    --bg: #1E1E1E;
    --card: #343434;
    --panel: #2B2B2B;
    --well: #292929;
    --line: #4A4A4A;
    --text: #F2F2F2;
    --body: #E6E6E6;
    --muted: #C8C8C8;
    --muted-2: #BDBDBD;
    --icon: #A8A8A8;
    --danger-bg: #5C141B;
    --danger-fg: #FDE2E5;
    --danger: #FF6369;
    --danger-text: #FF9AA0;
    --warning-bg: #B99015;
    --warning-fg: #1F1A0A;
    --ok: #3DD68C;
    --ok-text: #7EE2A8;
    --info: #18769B;
    --info-hover: #13627F;
    --discord: #5865F2;
    --discord-hover: #4752C4;
    --gutter: 16px;
    --mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color-scheme: dark;
}

/* the colours of each service; the page starts on Jellyfin Better */
.t-jellyfinbetter { --primary: #868DDC; --secondary: #666CA9; --on: #FFFFFF; --on2: #FFFFFF; --link: #A0A6E8; }
.t-minecraftbetter { --primary: #FF5050; --secondary: #CC4040; --on: #FFFFFF; --on2: #FFFFFF; --link: #FF7A7A; }
.t-gameyfin { --primary: #FF9932; --secondary: #E3702D; --on: #1A1A1A; --on2: #1A1A1A; --link: #FF9932; }
.t-retrofin { --primary: #A7C637; --secondary: #91AC33; --on: #1A1A1A; --on2: #1A1A1A; --link: #A7C637; }
.t-betterplace { --primary: #47CC5D; --secondary: #359945; --on: #1A1A1A; --on2: #1A1A1A; --link: #47CC5D; }
.t-neutral { --primary: #2B2B2B; --secondary: #424348; --on: #FFFFFF; --on2: #FFFFFF; --link: #F08787; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 108px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg);
    background-image: linear-gradient(rgba(30, 30, 30, .97), rgba(30, 30, 30, .97)), url("img/background.jpg");
    background-size: auto, 560px 560px;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; color: #FFFFFF; }
strong { color: #FFFFFF; }
code, .jb-code { font-family: var(--mono); font-style: italic; font-size: .9em; color: var(--link); background-color: var(--well); padding: .2em .5em; border-radius: 4px; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, summary:focus-visible, label:focus-within { outline: 3px solid var(--focus, #FFFFFF); outline-offset: 3px; }
[hidden] { display: none !important; } /* the display of a component (.jb-alert, flex…) must not show what is hidden */
.jb-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.fa-fw-inline { display: inline-flex; width: 1.1em; justify-content: center; }

/* ---------- links, buttons ---------- */
.jb-link { color: var(--link); font-weight: 500; text-decoration: none; }
.jb-link:hover { color: #FFFFFF; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.t-neutral .jb-link { font-weight: 600; }
.t-neutral .jb-link:hover { color: #FFB0B0; text-decoration-color: currentColor; }
.jb-alert-link { color: #FFFFFF; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.jb-alert-link:hover { text-decoration-thickness: 2px; }

.jb-btn { appearance: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 16px; border-radius: 8px; text-decoration: none; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease; }
.jb-btn[disabled] { opacity: .6; cursor: progress; }
.jb-btn--info { background-color: var(--info); color: #FFFFFF; height: 48px; }
.jb-btn--info:hover { background-color: var(--info-hover); }
.jb-btn--discord { background-color: var(--discord); color: #FFFFFF; width: 100%; }
.jb-btn--discord:hover { background-color: var(--discord-hover); }
.jb-btn--soft { background-color: #424348; color: #FFFFFF; font-size: 14px; }
.jb-btn--soft:hover { background-color: #50515A; }
.jb-btn--dark { background-color: var(--well); color: #FFFFFF; width: 100%; font-size: 15px; }
.jb-btn--dark:hover { background-color: #222222; }
.jb-btn--primary { background-color: var(--primary); color: var(--on); font-size: 14px; }
.jb-btn--primary:hover { background-color: var(--secondary); color: var(--on2); }
.jb-btn--block { width: 100%; }
.jb-btn.is-error { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--danger); }
.jb-iconbtn { appearance: none; background: transparent; border: 0; color: #CFCFCF; cursor: pointer; width: 40px; height: 40px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; transition: background-color .2s ease, color .2s ease; }
.jb-iconbtn:hover { color: #FFFFFF; background-color: #3A3A3A; }
.jb-iconbtn.is-done { color: var(--ok-text); }
.jb-float { transition: transform .5s ease; }
.jb-float:hover { transform: translateY(-4px); }

/* ---------- cards, alerts, pills ---------- */
.jb-card { background-color: var(--card); border-radius: 16px; box-shadow: 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12), 0 8px 10px -5px rgba(0, 0, 0, .2); }
.jb-alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.jb-alert > .fas, .jb-alert > .far { font-size: 17px; margin-top: 3px; flex-shrink: 0; }
.jb-alert__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.jb-alert strong { color: inherit; }
.jb-alert--danger { background-color: var(--danger-bg); color: var(--danger-fg); }
.jb-alert--warning { background-color: var(--warning-bg); color: var(--warning-fg); font-weight: 500; }
.jb-alert--info { background-color: #404040; color: var(--body); }
.jb-alert--info > .fas { color: #CFCFCF; }
.jb-alert--round { border-radius: 16px; padding: 16px 18px; font-size: 14px; line-height: 1.55; }
.jb-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px; background-color: var(--well); color: var(--body); font-size: 13px; font-weight: 600; white-space: nowrap; }
.jb-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background-color: var(--ok); box-shadow: 0 0 0 3px rgba(61, 214, 140, .2); }
.jb-pill--closed::before { background-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 99, 105, .2); }
.jb-pill--maintenance::before { background-color: #F8C655; box-shadow: 0 0 0 3px rgba(248, 198, 85, .2); }
.jb-announcement { width: min(1200px, 100%); border-radius: 14px; font-size: 16px; }

/* ---------- the services hub: header ---------- */
.jb-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    width: min(1200px, calc(100% - 2 * var(--gutter)));
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-radius: 0 0 16px 16px;
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    color: var(--on);
    --focus: var(--on);
    transition: background-color .45s ease, box-shadow .45s ease, color .45s ease;
}
.jb-brand { display: flex; width: 48px; height: 48px; }
.jb-brand img { width: 48px; height: 48px; }
.jb-tabs { display: flex; justify-content: center; gap: 8px; }
.jb-tab { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 6px 14px 6px 8px; border-radius: 8px; font-size: 16px; font-weight: 500; text-decoration: none; white-space: nowrap; background-color: var(--secondary); color: var(--on2); transition: transform .5s ease, filter .3s ease, background-color .45s ease, color .45s ease; }
.jb-tab img { width: 34px; height: 34px; transition: transform .5s ease; }
.jb-tab:hover { transform: scale(1.1); }
.jb-tab:hover img { transform: translateY(-10%); }
.jb-tab.is-active { filter: brightness(85%); box-shadow: inset 0 -3px 0 currentColor; }
.jb-tab.is-active:hover { transform: none; }
.jb-header__title { display: none; margin: 0; text-align: center; font-size: 19px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-account { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; justify-self: end; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 40px; color: var(--on); transition: color .45s ease, opacity .2s ease; }
.jb-account:hover { opacity: .8; }
.jb-account img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--on); }

/* ---------- the services hub: cards ---------- */
.jb-hub { display: flex; flex-direction: column; align-items: center; gap: 32px; padding: 108px var(--gutter) 0; flex-grow: 1; }
.jb-service { width: min(1200px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 28px; scroll-margin-top: 92px; }
.jb-service__head { display: flex; align-items: center; gap: 16px; }
.jb-service__logo { width: 75px; height: 75px; flex-shrink: 0; }
.jb-service__names { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.jb-service__names h2 { font-size: 32px; font-weight: 500; line-height: 1.2; }
.jb-service__names p { font-size: 16px; color: var(--muted); }
.jb-service__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.jb-service__text { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.6; color: var(--body); }
.jb-service__text h3 { margin-top: 12px; font-size: 20px; font-weight: 600; line-height: 1.4; }
.jb-clients { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; }
.jb-client { background-color: var(--panel); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.jb-client__os { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #FFFFFF; }
.jb-client__os > i { font-size: 15px; color: var(--muted-2); width: 18px; text-align: center; }
.jb-client .jb-link { font-size: 15px; }
.jb-client__note { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: #FFB3B3; }
.jb-client__note > i { margin-top: 3px; }
.jb-client__note--warn { color: #F5D37A; }
.jb-client__note strong { color: inherit; }
.jb-aside { background-color: var(--panel); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.jb-aside__item { display: flex; flex-direction: column; gap: 6px; }
.jb-aside__label { font-size: 13px; font-weight: 600; color: var(--muted-2); }
.jb-aside__item .jb-link { font-size: 15px; overflow-wrap: anywhere; }
.jb-copyfield { display: flex; align-items: center; gap: 4px; background-color: var(--well); border-radius: 8px; padding: 2px 2px 2px 12px; }
.jb-copyfield code { flex-grow: 1; background: transparent; padding: 0; font-size: 13px; overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-cta { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; border-radius: 10px; font-size: 19px; font-weight: 700; text-decoration: none; background-color: var(--primary); color: var(--on); transition: background-color .2s ease, color .2s ease; }
.jb-cta:hover { background-color: var(--secondary); color: var(--on2); }

/* the Minecraft trailer: a picture until it is played (nothing loaded from YouTube before) */
.jb-video { position: relative; width: min(600px, 100%); aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background-color: #2F2F2F; }
.jb-video img, .jb-video iframe { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; }
.jb-video img { filter: brightness(70%); }
.jb-video__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; border-radius: 50%; border: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 0 6px; font-size: 28px; cursor: pointer; background-color: var(--primary); color: var(--on); transform: translate(-50%, -50%); transition: transform .3s ease; }
.jb-video__play:hover { transform: translate(-50%, -50%) scale(1.08); }
.jb-video__caption { position: absolute; left: 16px; bottom: 14px; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #FFFFFF; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); pointer-events: none; }
.jb-video__caption i { font-size: 18px; }

/* ---------- footer ---------- */
.jb-footer { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px var(--gutter) 32px; text-align: center; }
.jb-footer__credit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 14px; color: var(--muted-2); }
.jb-credit { color: #FFFFFF; font-weight: 600; text-decoration: none; }
.jb-credit:hover { text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.jb-heart { color: var(--primary); transition: color .45s ease; }
.t-neutral .jb-heart, .t-neutral .jb-credit:hover { color: #CD5C5C; text-decoration-color: #CD5C5C; }
.t-neutral .jb-credit:hover { color: #FFFFFF; }
.jb-og { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 7px 0 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: #E6E6E6; text-decoration: none; border: 2px solid transparent; background: linear-gradient(#292929, #292929) padding-box, linear-gradient(#3A3A3A, #3A3A3A) border-box; transition: color .2s ease; }
.jb-og:hover { color: #FFFFFF; background: linear-gradient(#292929, #292929) padding-box, linear-gradient(90deg, #FF6458, #FF9658, #F8C655, #98CA4F, #4CA6C5, #4B67B4, #9248A3, #F25569) border-box; }
.jb-og__tag { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 999px; background-color: var(--bg); color: #CFCFCF; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.jb-footer__tagline { font-size: 13px; color: #8C8C8C; }

/* ---------- mobile: the bottom bar ---------- */
.jb-bottombar { display: none; }

/* ---------- toast ---------- */
.jb-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; background-color: #1A1A1A; color: #FFFFFF; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .25s ease, transform .25s ease; }
.jb-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.jb-toast i { color: var(--ok-text); }
.jb-toast.is-error i { color: var(--danger-text); }

/* ---------- account drawer ---------- */
.jb-scrim { position: fixed; inset: 0; z-index: 40; background-color: rgba(10, 10, 10, .62); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s ease; }
.jb-scrim.is-open { opacity: 1; }
.jb-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(440px, 100%); background-color: var(--card); box-shadow: -16px 0 40px rgba(0, 0, 0, .45); border-radius: 16px 0 0 16px; padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; transform: translateX(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.jb-drawer.is-open { transform: none; }
.jb-drawer > * { flex-shrink: 0; } /* a short screen scrolls the drawer instead of squashing its buttons */
.jb-drawer[hidden], .jb-scrim[hidden] { display: none; }
.jb-drawer__grab { display: none; }
.jb-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.jb-drawer__head h2 { font-size: 22px; font-weight: 600; }
.jb-drawer__head .jb-iconbtn { width: 44px; height: 44px; font-size: 18px; border-radius: 8px; }
.jb-me { display: flex; align-items: center; gap: 18px; }
.jb-avatar { position: relative; width: 84px; height: 84px; flex-shrink: 0; }
.jb-avatar__btn { position: relative; width: 84px; height: 84px; border-radius: 50%; border: 0; padding: 0; overflow: hidden; cursor: pointer; background-color: var(--secondary); background-size: cover; background-position: center; color: #FFFFFF; font: inherit; font-size: 34px; font-weight: 600; }
.jb-avatar__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 700; background-color: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .25s ease; }
.jb-avatar__overlay i { font-size: 16px; }
.jb-avatar__btn:hover .jb-avatar__overlay, .jb-avatar__btn:focus-visible .jb-avatar__overlay, .jb-avatar__btn.is-busy .jb-avatar__overlay { opacity: 1; }
.jb-avatar__badge { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background-color: var(--well); border: 3px solid var(--card); display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--body); pointer-events: none; }
.jb-me__names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jb-me__names p:first-child { font-size: 20px; font-weight: 600; color: #FFFFFF; overflow-wrap: anywhere; }
.jb-me__names p:last-child { font-size: 14px; font-style: italic; color: var(--muted-2); }
.jb-facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #CFCFCF; }
.jb-facts p { display: flex; align-items: center; gap: 10px; overflow-wrap: anywhere; }
.jb-facts i { color: var(--icon); width: 16px; text-align: center; }
.jb-hr { margin: 0; border: 0; border-top: 1px solid var(--line); }
.jb-drawer .jb-field__label { font-size: 15px; font-weight: 600; color: #FFFFFF; }
.jb-drawer .jb-hint { font-size: 13px; }
.jb-invite { display: flex; gap: 8px; }
.jb-invite .jb-input { flex-grow: 1; min-width: 0; font-size: 14px; }
.jb-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 15px; font-weight: 600; color: #FFFFFF; }
.jb-summary::-webkit-details-marker { display: none; }
.jb-summary > i:first-child { color: var(--icon); }
.jb-summary > span { flex-grow: 1; }
.jb-summary > i:last-child { font-size: 13px; color: var(--icon); transition: transform .25s ease; }
details[open] > .jb-summary > i:last-child { transform: rotate(180deg); }
.jb-drawer form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.jb-drawer .jb-og { align-self: center; margin-top: auto; }

/* ---------- simple pages (login, invitation, migration) ---------- */
.jb-topbar { width: min(1200px, calc(100% - 2 * var(--gutter))); margin: 0 auto; height: 68px; flex-shrink: 0; display: flex; align-items: center; padding: 0 20px; border-radius: 0 0 16px 16px; background-color: var(--primary); box-shadow: 0 0 10px var(--primary); }
.jb-topbar img { width: 188px; height: 40px; display: block; }
.jb-page { width: 100%; padding: 48px var(--gutter) 0; display: flex; flex-direction: column; align-items: center; gap: 16px; flex-grow: 1; }
.jb-page--narrow > * { width: min(480px, 100%); }
.jb-page--wide > * { width: min(820px, 100%); }
.jb-form-card { padding: 36px 32px; display: flex; flex-direction: column; gap: 28px; }
.jb-page--wide .jb-form-card { padding: 40px; gap: 32px; }
.jb-form-card__head { display: flex; flex-direction: column; gap: 10px; }
.jb-form-card__head h1 { font-size: 28px; font-weight: 500; line-height: 1.25; }
.jb-form-card__head p { font-size: 15px; color: var(--muted); }
.jb-form-card__icons { display: flex; gap: 6px; margin-top: 6px; }
.jb-form-card__icons img { width: 30px; height: 30px; }
.jb-migrate-head { display: flex; align-items: center; gap: 20px; }
.jb-migrate-head__icons { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: #8C8C8C; }
.jb-migrate-head__icons img { width: 52px; height: 52px; }
.jb-form { display: flex; flex-direction: column; gap: 16px; }
.jb-form--grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px 24px; align-items: start; }
.jb-form--grid > .jb-field__label { padding-top: 12px; }
.jb-form--grid > .jb-span { grid-column: 1 / -1; }
.jb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.jb-field__label { font-size: 14px; font-weight: 500; color: var(--body); }
.jb-input { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 8px; outline: none; font: inherit; font-size: 15px; background-color: var(--secondary); color: #FFFFFF; }
.jb-input::placeholder { color: #C4C5CB; opacity: 1; }
.jb-drawer .jb-input::placeholder { color: var(--on2); opacity: .7; }
.jb-input:focus { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--link); }
.jb-input.is-error { box-shadow: inset 0 0 0 2px var(--danger); }
.jb-input.is-error:focus { box-shadow: inset 0 0 0 2px var(--danger), 0 0 0 3px var(--card), 0 0 0 5px var(--link); }
.jb-hint { font-size: 13px; line-height: 1.5; color: var(--muted-2); }
.jb-err { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--danger-text); }
.jb-err[hidden] { display: none; }
.jb-rule { height: 1px; background-color: var(--line); margin: 8px 0; }
.jb-terms { font-size: 14px; line-height: 1.6; color: #D6D6D6; }
.jb-actions { display: flex; justify-content: flex-end; }
.jb-actions .jb-btn--info { padding: 0 28px; }
.jb-errors ul { margin: 4px 0 0; padding-left: 18px; }

/* Discord: the button, then the linked account */
.jb-discord { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 8px 8px 12px; border-radius: 8px; background-color: var(--panel); box-shadow: inset 0 0 0 1px #3F9A62; }
.jb-discord[hidden] { display: none; }
.jb-discord__icon { width: 36px; height: 36px; border-radius: 50%; background-color: var(--discord); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; }
.jb-discord__icon img { width: 100%; height: 100%; object-fit: cover; }
.jb-discord__who { display: flex; flex-direction: column; gap: 1px; flex-grow: 1; min-width: 0; }
.jb-discord__who > span:first-child { font-size: 15px; font-weight: 600; color: #FFFFFF; overflow-wrap: anywhere; }
.jb-discord__who > span:first-child span { font-weight: 400; color: var(--muted-2); }
.jb-discord__who > span:last-child { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ok-text); }
.jb-discord .jb-btn--soft { height: 40px; padding: 0 12px; font-size: 13px; }

/* avatar picker */
.jb-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.jb-picker__preview { width: 56px; height: 56px; border-radius: 50%; background-color: #424348; background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--icon); flex-shrink: 0; }
.jb-picker__preview.has-image i { display: none; }
.jb-picker .jb-btn--soft { position: relative; }
.jb-picker__name { font-size: 14px; color: var(--icon); overflow-wrap: anywhere; }
.jb-picker__name.has-file { color: #FFFFFF; }

/* the invitation that cannot be used */
.jb-state { padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.jb-state__icon { width: 52px; height: 52px; border-radius: 50%; background-color: var(--danger-bg); color: var(--danger-fg); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.jb-state h1 { font-size: 24px; font-weight: 500; line-height: 1.25; }
.jb-state p { font-size: 15px; line-height: 1.6; color: #D6D6D6; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
    .jb-tab span { display: none; }
    .jb-tab { padding: 6px 8px; }
    .jb-service__body { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
    .jb-clients { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .jb-service__body { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .jb-page--wide .jb-form-card { padding: 32px 28px; }
    .jb-form--grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .jb-form--grid > .jb-field__label { padding-top: 10px; }
    .jb-form--grid > .jb-field__label:first-child { padding-top: 0; }
}
@media (max-width: 760px) {
    html { scroll-padding-top: 80px; }
    .jb-header { left: 0; transform: none; width: 100%; height: 64px; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; padding: 0 16px; }
    .jb-brand { width: 44px; height: 44px; align-items: center; justify-content: center; }
    .jb-brand img { width: 40px; height: 40px; }
    .jb-tabs { display: none; }
    .jb-header__title { display: block; }
    .jb-account { width: 44px; height: 44px; font-size: 34px; }
    .jb-account img { width: 36px; height: 36px; }
    .jb-hub { padding-top: 80px; gap: 16px; }
    .jb-service { padding: 20px; gap: 16px; scroll-margin-top: 76px; }
    .jb-service__head { gap: 12px; flex-wrap: wrap; }
    .jb-service__logo { width: 56px; height: 56px; }
    .jb-service__names { flex-basis: calc(100% - 68px); }
    .jb-service__names h2 { font-size: 24px; }
    .jb-service__names p { font-size: 14px; }
    .jb-service__head .jb-pill { padding: 5px 11px 5px 9px; font-size: 12px; }
    .jb-service__text { font-size: 15px; line-height: 1.55; gap: 10px; }
    .jb-service__text h3 { margin-top: 8px; font-size: 18px; }
    .jb-clients { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .jb-aside { padding: 0; background: none; gap: 14px; }
    .jb-aside__item { background-color: var(--panel); border-radius: 12px; padding: 14px 16px; }
    .jb-cta { height: 52px; font-size: 17px; }
    .jb-footer { padding: 40px var(--gutter) 24px; }
    body.has-bottombar .jb-footer { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
    .jb-bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; height: calc(84px + env(safe-area-inset-bottom)); padding: 0 4px calc(10px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; background-color: #262626; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); border-top: 2px solid var(--primary); transition: border-color .45s ease; }
    .jb-btab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 5px; font-size: 11px; font-weight: 600; color: var(--icon); text-decoration: none; transition: color .3s ease; }
    .jb-btab img { width: 30px; height: 30px; opacity: .72; transition: transform .35s ease, opacity .35s ease; }
    .jb-btab__pip { width: 20px; height: 4px; border-radius: 0 0 4px 4px; margin-bottom: 6px; background-color: transparent; transition: background-color .45s ease; }
    .jb-btab.is-active { color: #FFFFFF; }
    .jb-btab.is-active img { opacity: 1; transform: translateY(-3px) scale(1.12); }
    .jb-btab.is-active .jb-btab__pip { background-color: var(--primary); }
    .jb-toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
    body:not(.has-bottombar) .jb-toast { bottom: 24px; }

    .jb-drawer { top: auto; left: 0; right: 0; width: 100%; max-height: calc(100% - 64px); height: calc(100% - 80px); border-radius: 16px 16px 0 0; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); transform: translateY(105%); }
    .jb-drawer__grab { display: block; align-self: center; width: 40px; height: 4px; border-radius: 2px; background-color: #5A5A5A; margin-bottom: 4px; flex-shrink: 0; }
    .jb-invite .jb-btn--primary span { display: none; }
    .jb-invite .jb-btn--primary { width: 48px; padding: 0; }

    .jb-topbar { width: 100%; height: 64px; padding: 0 16px; }
    .jb-topbar img { width: 151px; height: 32px; }
    .jb-page { padding-top: 24px; gap: 14px; }
    .jb-form-card, .jb-page--wide .jb-form-card { padding: 28px 20px; gap: 20px; }
    .jb-form-card__head h1 { font-size: 24px; }
    .jb-input { height: 48px; font-size: 16px; }
    .jb-btn--info { height: 50px; }
    .jb-actions .jb-btn--info { width: 100%; }
    .jb-migrate-head { flex-direction: column; align-items: flex-start; gap: 14px; }
    .jb-migrate-head__icons img { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
