/* 2016-style layout: blue top bar, white left column, light grey page. Written from scratch for OpenRevivalFramework. */
:root {
  --blue: #0074bd; --blue-dark: #005b94; --bar: var(--blue); --green: #02b757; --green-dark: #01963f;
  --page: #e3e3e3; --panel: #fff; --text: #191919; --muted: #757575; --line: #d8d8d8; --error: #c0473f;
  --link: var(--blue); --hover: #f2f2f2; --placeholder: #d0d0d0; --field: #fff; --field-line: #b8b8b8; --line-strong: #888;
  --notice-bg: #e2f3e2; --notice-line: #9c9; --limited: #a05f35; --minus: #c4281c;
  color-scheme: light;
  font-family: "Source Sans Pro", "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
}
/* Dark theme (not in 2016; Roblox's later dark theme colours): follows the system unless the footer switch picked one. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #232527; --panel: #393b3d; --text: #e6e6e6; --muted: #b8b8b8; --line: #4a4d50; --link: #5aaeff;
    --hover: #45484b; --placeholder: #4a4d50; --field: #2b2d2f; --field-line: #6a6c6e; --line-strong: #8a8c8e;
    --notice-bg: #1f3a28; --notice-line: #3f7a50; --limited: #e0a070; --minus: #ff8a80; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #232527; --panel: #393b3d; --text: #e6e6e6; --muted: #b8b8b8; --line: #4a4d50; --link: #5aaeff;
  --hover: #45484b; --placeholder: #4a4d50; --field: #2b2d2f; --field-line: #6a6c6e; --line-strong: #8a8c8e;
  --notice-bg: #1f3a28; --notice-line: #3f7a50; --limited: #e0a070; --minus: #ff8a80; color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); font-size: 16px; line-height: 1.4; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 32px; font-weight: 400; margin: 0 0 12px; }
h2 { font-size: 22px; font-weight: 400; margin: 0 0 10px; display: flex; align-items: baseline; gap: 12px; }
img { display: block; }

.rbx-header { background: var(--bar); color: #fff; height: 56px; display: flex; align-items: center; gap: 20px; padding: 0 16px; position: sticky; top: 0; z-index: 10; }
.rbx-header a, .rbx-header .link { color: #fff; }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { display: block; height: 40px; width: auto; }
.brand:hover img { filter: brightness(1.15); } /* the 2016 logo lit up on hover */
.nav-main { display: flex; gap: 20px; }
.nav-search { flex: 1; max-width: 420px; }
.nav-search input { width: 100%; border: 0; border-radius: 3px; padding: 6px 10px; font: inherit; }
.nav-user { display: flex; align-items: center; gap: 14px; margin-left: auto; white-space: nowrap; }
.nav-user form { margin: 0; }
.link { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.rbx-left-col { position: fixed; top: 56px; bottom: 0; left: 0; width: 175px; background: var(--panel); border-right: 1px solid var(--line); padding: 12px 0; }
.rbx-left-col a { display: block; padding: 9px 20px; color: var(--text); }
.rbx-left-col a:hover { background: var(--hover); text-decoration: none; }
.content { max-width: 970px; margin: 0 auto; padding: 20px 16px 40px; }
.signed-in .content, .signed-in .rbx-footer { margin-left: max(175px, calc((100% - 970px) / 2)); }
.banner { padding: 9px 16px; text-align: center; font-weight: 600; color: #fff; background: var(--blue); border-bottom: 1px solid rgba(0,0,0,.15); }
.signed-in .banner { margin-left: 175px; }
.banner a { color: #fff; text-decoration: underline; }
.banner-warning { background: #f68802; }
.banner-danger { background: var(--error); }
.rbx-footer { text-align: center; color: var(--muted); font-size: 14px; padding: 20px 16px 30px; border-top: 1px solid var(--line); }

.panel { background: var(--panel); padding: 16px; margin-bottom: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.center { text-align: center; }
.center-col { max-width: 400px; margin: 30px auto; }
.muted { color: var(--muted); }
.error { color: #fff; background: var(--error); padding: 8px 10px; border-radius: 3px; }
label { display: block; margin-bottom: 12px; font-size: 15px; }
input { display: block; width: 100%; padding: 8px 10px; margin-top: 4px; border: 1px solid var(--field-line); border-radius: 3px; font: inherit; background: var(--field); color: var(--text); }
input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #ffbf00; outline-offset: 1px; }

.btn, .btn-play, .btn-secondary, .btn-small, .btn-danger { display: inline-block; border: 1px solid; border-radius: 3px; padding: 8px 16px; font: inherit; cursor: pointer; text-align: center; }
.btn { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn:hover { background: var(--blue-dark); text-decoration: none; }
.btn-play { background: var(--green); border-color: var(--green); color: #fff; font-size: 20px; padding: 10px 40px; }
.btn-play:hover { background: var(--green-dark); text-decoration: none; }
.btn-secondary { background: var(--panel); border-color: var(--field-line); color: var(--text); }
.btn-small { padding: 4px 12px; background: var(--green); border-color: var(--green); }
.btn-wide { width: 100%; }
button:disabled { opacity: .6; cursor: default; }

.landing { display: flex; gap: 40px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 30px 0; }
.landing-text h1 { font-size: 56px; font-weight: 700; }
.landing.has-bg { background-size: cover; background-position: center; padding: 30px; border-radius: 4px; }
.landing.has-bg .landing-text { color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.lead { font-size: 22px; }
.signup { width: 360px; max-width: 100%; }

.see-all { font-size: 16px; }
.home-header { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-head { width: 100px; height: 100px; border-radius: 50%; background: var(--placeholder); }
.friend-row { list-style: none; padding: 0; margin: 0; display: flex; gap: 14px; overflow-x: auto; }
.friend-row a { display: block; width: 90px; text-align: center; color: var(--text); font-size: 14px; }
.friend-row img { width: 90px; height: 90px; border-radius: 50%; background: var(--placeholder); }

.game-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.game-card a { display: block; background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.game-card a:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.game-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--placeholder); }
.game-name { display: block; padding: 6px 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.nav-search { display: flex; gap: 4px; }
.nav-search select { border: 0; border-radius: 3px; padding: 4px; font: inherit; }
.browse { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: start; }
.category-menu { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.category-menu a { padding: 6px 12px; color: var(--text); }
.category-menu a:hover { background: var(--hover); text-decoration: none; }
.category-menu a[aria-current="page"] { font-weight: 700; border-left: 3px solid var(--blue); }
@media (max-width: 640px) { .browse { grid-template-columns: 1fr; } .category-menu { flex-direction: row; flex-wrap: wrap; } }
.search-bar input { margin: 0; }
.search-bar { flex-wrap: wrap; }
.search-bar .price-input { width: 6em; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 18px; }

.game-detail { display: flex; gap: 20px; flex-wrap: wrap; }
.game-thumb { width: 576px; max-width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--placeholder); }
.game-info { flex: 1; min-width: 240px; }
.game-info .btn-play { width: 100%; margin: 8px 0; }
.game-stats { display: flex; gap: 24px; margin: 16px 0 0; }
.game-stats dt { color: var(--muted); font-size: 14px; }
.game-stats dd { margin: 0; font-size: 20px; }
.description { white-space: pre-wrap; }

.profile-header { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar-full { width: 220px; height: 220px; background: var(--placeholder); }
.badge-list { padding-left: 20px; }

@media (max-width: 760px) {
  .rbx-header { height: auto; flex-wrap: wrap; padding: 8px 16px; gap: 10px; }
  .nav-search { order: 5; flex-basis: 100%; max-width: none; }
  .rbx-left-col { position: static; width: auto; border: 0; display: flex; overflow-x: auto; padding: 0; }
  .rbx-left-col a { padding: 10px 14px; white-space: nowrap; }
  .signed-in .content, .signed-in .rbx-footer { margin-left: auto; }
  .signed-in .banner { margin-left: 0; }
  .landing-text h1 { font-size: 40px; }
}

.price { display: block; padding: 0 8px 6px; font-size: 14px; color: var(--green-dark); }
.price-big { font-size: 22px; color: var(--green-dark); }
.item-thumb { width: 420px; max-width: 100%; aspect-ratio: 1; background: var(--placeholder); }
.limited { color: var(--limited); }
.owned { color: var(--green-dark); font-weight: 600; }
.balance { margin: 0 0 12px; }
select { padding: 8px; border: 1px solid var(--field-line); border-radius: 3px; font: inherit; background: var(--field); color: var(--text); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }

.avatar-editor { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.avatar-preview .avatar-full { width: 100%; height: auto; aspect-ratio: 1; }
fieldset { border: 1px solid var(--line); margin: 12px 0; padding: 8px 12px; }
.rig label { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; }
.rig input { width: auto; margin: 0; }
/* 2016 Mannequin ColorChooserFrame: head 44, torso 88, limbs 40/44 x 88 */
.cc-figure { display: grid; grid-template-columns: 40px 44px 44px 40px; grid-template-rows: 44px 88px 88px; gap: 2px; justify-content: center; margin: 8px 0; }
.cc-part { border: 1px solid var(--line-strong); padding: 0; cursor: pointer; min-width: 0; }
.cc-part:hover, .cc-part:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.cc-Head { grid-area: 1 / 2 / 2 / 4; width: 44px; justify-self: center; }
.cc-Torso { grid-area: 2 / 2 / 3 / 4; }
.cc-RightArm { grid-area: 2 / 1; }
.cc-LeftArm { grid-area: 2 / 4; }
.cc-RightLeg { grid-area: 3 / 2; }
.cc-LeftLeg { grid-area: 3 / 3; }
.color-picker { border: 1px solid var(--line-strong); padding: 12px; }
.color-picker h2 { font-size: 16px; margin: 0 0 8px; }
.cc-grid { display: grid; grid-template-columns: repeat(8, 26px); gap: 2px; margin-bottom: 10px; }
.cc-item { width: 26px; height: 26px; padding: 0; border: 2px solid var(--panel); outline: 1px solid var(--line-strong); cursor: pointer; }
.cc-item:hover { border-color: var(--line); }
.cc-item.selected { border-color: var(--text); }
.wear { display: block; background: var(--panel); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.12); position: relative; }
.wear input { position: absolute; top: 6px; left: 6px; width: auto; margin: 0; }
.wear.worn { outline: 3px solid var(--green); }
@media (max-width: 760px) { .avatar-editor { grid-template-columns: 1fr; } }
.friend-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.friend-list li { text-align: center; }
.friend-list img { width: 100px; height: 100px; display: block; margin: 0 auto 4px; }
.friend-list a span { display: block; margin-bottom: 6px; }
.nav-money { color: #fff; font-size: 13px; margin-right: 12px; white-space: nowrap; }
.admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; align-items: end; margin-bottom: 16px; }
.admin-form label { display: flex; flex-direction: column; font-size: 13px; gap: 4px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: 8px; border-top: 1px solid var(--line); vertical-align: top; }
.tabs { display: flex; gap: 4px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs > a { padding: 8px 14px; color: var(--text); border-bottom: 3px solid transparent; }
.tabs > a.active, .tabs > a[aria-current] { border-color: var(--link); font-weight: 600; }
.tabs-actions { margin-left: auto; padding-bottom: 6px; }
.thumb-small { width: 64px; height: 64px; object-fit: cover; display: block; }
.thumb-large { width: 100%; max-width: 420px; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-bottom: 12px; background: var(--placeholder); }
.admin-table td.right { text-align: right; }
.stack-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.stack-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-line); padding: 8px 12px; }
.group-list { list-style: none; margin: 0 0 16px; padding: 0; }
.group-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.group-list p { margin: 4px 0 0; }
.shout { border-left: 4px solid var(--blue); }
.pre { white-space: pre-wrap; }
.forum-post { display: grid; grid-template-columns: 140px 1fr; gap: 16px; }
.forum-post aside { text-align: center; font-size: 13px; }
.forum-post aside img { width: 100px; height: 100px; display: block; margin: 0 auto 4px; }
.forum-post aside strong, .forum-post aside small { display: block; }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; background: var(--page); border-radius: 3px; vertical-align: middle; }
.actions { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.unread td { font-weight: 700; }
.count { background: var(--error); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
@media (max-width: 760px) { .forum-post { grid-template-columns: 1fr; } }
.launch-dialog { max-width: 440px; width: calc(100% - 32px); border: 0; border-radius: 4px; padding: 20px 24px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.launch-dialog::backdrop { background: rgba(0,0,0,.5); }
.launch-dialog h2 { margin-top: 0; }
.launch-dialog ol { padding-left: 20px; }
.launch-dialog .launch-download { display: inline-block; margin: 4px 0 8px; }
.group-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.group-head h1 { margin: 0 0 4px; }
.group-emblem { width: 150px; height: 150px; flex: none; background: var(--placeholder); object-fit: cover; }
.row-forms { display: flex; gap: 8px; }
.role-list { list-style: none; padding: 0; margin: 0 0 16px; }
.role-list > li { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.perm-list { border: 1px solid var(--line); border-radius: 4px; display: grid; gap: 4px; }
.perm-list .check { display: flex; gap: 6px; align-items: center; font-weight: normal; }
.rank-form { display: inline-flex; gap: 4px; }
@media (max-width: 520px) { .group-emblem { width: 80px; height: 80px; } }
.post-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; align-items: start; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.post-list img { width: 48px; height: 48px; background: var(--placeholder); }
.post-list p { margin: 4px 0; overflow-wrap: anywhere; }
.post-actions { display: flex; gap: 12px; font-size: 13px; align-items: center; }
.favorite-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.user-row a { display: inline-flex; gap: 10px; align-items: center; }
.user-row img { width: 48px; height: 48px; background: var(--placeholder); }
.prose { max-width: 760px; line-height: 1.5; }
.plus { color: var(--green-dark); }
.minus { color: var(--minus); }
.trade-list { list-style: none; padding: 0; }
.blurb { max-width: 60ch; }
.totp-key { font-size: 18px; letter-spacing: 1px; user-select: all; overflow-wrap: anywhere; }
.trade-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 12px; }
.trade-side legend { font-weight: bold; }
.trade-items { list-style: none; margin: 0 0 8px; padding: 0; max-height: 420px; overflow: auto; }
.trade-items label { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.trade-items input:checked + img { outline: 2px solid var(--link); }
.thumb-icon { width: 150px; height: 150px; object-fit: cover; background: var(--placeholder); }
.theme-switch { margin: 8px 0 0; } .theme-switch .link { color: var(--link); } .theme-switch [aria-pressed="true"] { font-weight: 700; color: var(--text); }
.game-stats { flex-wrap: wrap; }
.badge-list, .pass-list, .server-list, .server-players { list-style: none; margin: 0; padding: 0; }
.badge-list li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.badge-list p { margin: 2px 0 0; font-size: 14px; }
.badge-list img, .pass-list img, .server-players img { background: var(--placeholder); }
.pass-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.pass-list li { display: flex; flex-direction: column; gap: 4px; }
.server-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.server-list p { margin: 0; min-width: 120px; }
.server-players { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.server-players img { border-radius: 50%; }
.mini-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px; }
.mini-grid a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; color: var(--text); overflow-wrap: anywhere; }
.mini-grid img { width: 90px; height: 90px; object-fit: cover; background: var(--placeholder); }
.mini-grid img.round { border-radius: 50%; }
.see-all { font-size: 14px; margin-left: auto; }
.user-ad { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px auto 0; max-width: 728px; padding: 0 16px; }
.user-ad img { display: block; width: 100%; height: auto; }
.user-ad span { font-size: 12px; align-self: flex-end; }
.trade-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.trade-sides h3 { font-size: 15px; margin: 0 0 4px; }
.trade-sides ul { margin: 0; padding-left: 18px; }
.btn-danger { background: var(--error); border-color: var(--error); color: #fff; }
.violation-list { list-style: none; margin: 0; padding: 0; }
.violation-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.violation-list p { margin: 4px 0; }
.badge-tiles img { object-fit: contain; background: none; }
/* 2016 AvatarImage: the Builders Club overlay sits on the avatar's bottom-left corner */
.av { position: relative; display: inline-block; line-height: 0; }
.av img.bc-overlay { position: absolute; left: 0; bottom: 0; width: auto; height: auto; background: none; border-radius: 0; }
