:root {
  color-scheme: dark;
  --bg: #111317;
  --surface: #1a1d23;
  --graphite: #252932;
  --line: #343943;
  --line-hover: #58606d;
  --white: #f4f4f6;
  --muted: #aeb5bf;
  --red: #ff1744;
  --red-text: #ff637f;
  --font: Barlow, system-ui, sans-serif;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono: ui-monospace, SFMono-Regular, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--white); font: 15px/1.48 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .56; cursor: default; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin-top: 0; }
h1, h2, h3 { line-height: 1.1; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 3.4vw, 42px); }
h2 { font-size: 18px; margin-bottom: 9px; }
h3 { font-size: 16px; margin-bottom: 4px; }
em { color: var(--red-text); font-style: normal; }
small { color: var(--muted); }
:focus-visible { outline: 2px solid var(--red-text); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -80px; left: 12px; padding: 8px 14px; background: white; color: #111; z-index: 50; }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: 0 0 20px; }
.topbar { position: sticky; top: 0; z-index: 20; background: #17191ded; border-bottom: 1px solid #2c3038; backdrop-filter: blur(15px); }
.top-inner { min-height: 71px; max-width: 1480px; margin: auto; padding-inline: 25px; display: grid; grid-template-columns: 200px minmax(180px, 500px) 1fr; gap: 22px; align-items: center; }
.brand { width: fit-content; padding-block: 6px; }
.brand small { display: block; margin: 1px 0 0 37px; font: 8px/1.2 var(--mono); color: #c4c6cb; letter-spacing: .16em; }
.global-search { position: relative; display: flex; align-items: center; }
.global-search img { position: absolute; left: 12px; pointer-events: none; opacity: .65; }
.global-search input { min-width: 0; width: 100%; padding-left: 40px; height: 40px; }
.top-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #191c22; border-radius: 8px; width: 40px; height: 40px; }
.icon-btn:hover { border-color: var(--line-hover); }
.dot { position: absolute; height: 7px; width: 7px; border-radius: 50%; background: var(--red); right: 8px; top: 8px; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; color: #fff; background: linear-gradient(145deg,#aa2340,#412234); font-weight: 700; border: 1px solid #aa3852; }
.avatar.large { width: 62px; height: 62px; font-size: 26px; flex-basis: 62px; border-radius: 13px; }
.layout { max-width: 1480px; margin-inline: auto; padding: 22px 25px 80px; display: grid; grid-template-columns: 198px minmax(0, 1fr) 284px; gap: 22px; align-items: start; }
.left { position: sticky; top: 92px; display: flex; min-height: min(650px, calc(100dvh - 125px)); flex-direction: column; }
.nav-label { margin: 12px 11px 8px; color: var(--muted); font: 10px/1.25 var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.nav { display: grid; gap: 4px; }
.nav a { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #c1c4cb; font-weight: 600; border: 1px solid transparent; border-radius: 9px; }
.nav a .ico { opacity: .72; }
.nav a:hover { background: var(--surface); }
.nav a.active { color: white; background: linear-gradient(105deg,#692034,#2b1d28); border-color: #713148; }
.nav a.active .ico { opacity: 1; }
.world-mini { width: 31px; height: 28px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.rail-separator { border-top: 1px solid var(--line); margin-top: 16px; }
.rail-profile { margin-top: auto; padding-top: 15px; }
.rail-profile a { display: flex; align-items: center; gap: 10px; padding: 7px; }
.rail-profile b, .rail-profile small { display: block; overflow-wrap: anywhere; }
.main { min-width: 0; display: grid; gap: 16px; }
.right { display: grid; gap: 15px; }
.mobile { display: none; }
.hero { position: relative; isolation: isolate; min-height: 278px; border: 1px solid #40333e; border-radius: 14px; background: radial-gradient(ellipse at 100% 10%,#381221,#171820 63%,#12161c); overflow: hidden; display: flex; align-items: center; }
.hero::before { content: ""; inset: 0 0 0 33%; position: absolute; background: url("/assets/hero.svg") right center / cover no-repeat; z-index: -2; }
.hero::after { content: ""; inset: 0; position: absolute; z-index: -1; background: linear-gradient(90deg,#151820 8%,#151820 26%,#151820b5 47%,#15182008 83%),linear-gradient(0deg,#111317 0%,transparent 33%); }
.hero-content { padding: clamp(20px, 3.4vw, 40px); width: 65%; }
.hero h1 { font: italic 800 clamp(46px, 5.2vw, 82px)/.91 var(--display); text-transform: uppercase; letter-spacing: -.018em; margin-top: 9px; }
.hero h1 em { color: var(--red); font-style: italic; }
.hero p:not(.eyebrow) { color: #d4d6df; max-width: 340px; margin-bottom: 16px; }
.hero-compact { min-height: 225px; }
.hero-compact h1 { font-size: clamp(40px, 4.1vw, 65px); }
.eyebrow { color: var(--red-text); font: 600 10px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 8px; }
.title-row { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.title-row p { color: var(--muted); margin-bottom: 0; }
.card, .right-panel, .post { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.card { padding: 16px; }
.right-panel { padding: 14px; min-width: 0; }
.right-panel h2 { margin: 0 0 10px; font-size: 16px; }
.right-panel p { margin: 8px 0 0; color: var(--muted); }
.right-panel .label-link { display: inline-flex; margin-top: 10px; font-weight: 700; color: var(--red-text); }
.studio { background: linear-gradient(0deg,#101116,transparent 85%),url("/assets/studio-art.svg") center 46% / cover; min-height: 128px; border-radius: 7px; display: flex; align-items: end; padding: 11px; font-weight: 700; }
.right-row { display: flex; gap: 9px; align-items: center; padding-block: 9px; border-bottom: 1px solid #353945; overflow-wrap: anywhere; }
.right-row:last-child { border-bottom: 0; }
.right-row b, .right-row small { display: block; }
.right-row a:hover { color: var(--red-text); }
.world-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.world-grid.all { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
.world-card { min-height: 104px; position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: end; padding: 9px 11px; border: 1px solid #383e48; border-radius: 9px; }
.world-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.world-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg,#090c10 6%,#090c10a3 42%,transparent 100%); }
.world-card:hover { border-color: var(--red-text); }
.world-card small { color: #d3d6dd; }
.page-banner { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; min-height: 225px; display: flex; align-items: center; padding: 26px; background: var(--surface); }
.page-banner > img { position: absolute; inset: 0 0 0 auto; width: 65%; height: 100%; object-fit: cover; object-position: center 40%; z-index: -2; }
.page-banner::after { content: ""; inset: 0; position: absolute; z-index: -1; background: linear-gradient(90deg,#14181e 19%,#14181eb0 61%,transparent),linear-gradient(0deg,#14181e,transparent 45%); }
.page-banner p { color: #d1d4dc; margin-bottom: 13px; max-width: 430px; }
.page-banner h1, .page-title h1 { overflow-wrap: anywhere; }
.button, .ghost, .plain { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; border-radius: 7px; font-weight: 700; line-height: 1.2; text-align: center; }
.button { border: 1px solid #db1238; background: #c91035; color: #fff; }
.button:hover { background: #ad0d2c; }
.ghost { background: #20232b; border: 1px solid #454954; color: #f3f3f6; }
.ghost:hover { border-color: var(--red-text); }
.plain { border: 1px solid transparent; background: transparent; color: var(--muted); }
.plain:hover { color: white; }
.button .ico, .ghost .ico, .plain .ico { width: 16px; height: 16px; flex-basis: 16px; }
.tabbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tabbar button { color: var(--muted); padding: 6px 10px; border: 1px solid #393e49; border-radius: 6px; background: #1b1e25; }
.tabbar button[aria-pressed="true"] { color: white; background: #532033; border-color: #904158; }
.tabs-flat { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.tabs-flat button { background: transparent; border-color: transparent; }
.composer { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.composer button { flex: 1; text-align: left; color: var(--muted); border: 1px solid #393c47; background: #14161c; border-radius: 8px; padding: 9px 12px; }
.composer button:hover { border-color: #8b4155; }
.feed { display: grid; gap: 10px; }
.post { padding: 15px; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 9px; }
.post-head small { display: block; }
.post-head .post-name { font-weight: 700; }
.post-head .post-name:hover { color: var(--red-text); }
.post-kind { margin-left: auto; color: var(--red-text); font: 10px var(--mono); }
.post-body, .message p, .comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-body { margin: 12px 0; }
.post-media { border-radius: 8px; max-height: 470px; width: 100%; object-fit: contain; background: #121418; margin: 9px 0; }
.media-link { display: inline-flex; gap: 8px; align-items: center; padding: 11px; color: #ff91a5; border: 1px solid #503443; border-radius: 8px; font-weight: 700; margin: 2px 0 9px; }
.post-actions { display: flex; flex-wrap: wrap; border-top: 1px solid #363a44; padding-top: 6px; gap: 0 7px; }
.post-actions [aria-pressed="true"] { color: #ff839a; background: #36212c; border-color: #523140; }
.empty { padding: 24px 18px; border: 1px dashed #42444f; border-radius: 10px; color: var(--muted); background: #171a20; text-align: center; }
.empty p { margin: 7px 0 0; }
.empty .button, .empty .ghost { margin-top: 12px; }
.list { display: grid; gap: 9px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); overflow-wrap: anywhere; }
.list-row > div:first-child { min-width: 0; }
.list-row b, .list-row small { display: block; }
.list-row small { margin-top: 2px; }
.list-row p { margin: 5px 0 0; color: var(--muted); }
.list-row .ico { opacity: .75; }
.person { min-width: 0; display: flex; gap: 10px; align-items: center; }
.profile-stack { display: flex; gap: 12px; align-items: center; }
.profile-stack h1 { margin-bottom: 3px; }
.profile-bio { white-space: pre-line; overflow-wrap: anywhere; }
.pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.pills a, .pills span { padding: 4px 9px; border: 1px solid #454a55; border-radius: 99px; color: #d2d6df; }
.search-line, .inline-form { display: flex; gap: 8px; }
.search-line input, .inline-form input { min-width: 0; flex: 1; }
input, textarea, select { border-radius: 7px; border: 1px solid #414651; background: #13161c; padding: 8px 10px; }
input::placeholder, textarea::placeholder { color: #a0a7b1; }
form label { font-weight: 600; display: block; }
.field { display: grid; gap: 5px; }
.field input, .field textarea, .field select { width: 100%; }
textarea { min-height: 94px; resize: vertical; }
.thread { display: grid; min-height: 200px; max-height: min(56vh, 480px); overflow-y: auto; gap: 8px; padding: 12px; align-content: start; }
.message { background: #262b34; padding: 8px 10px; border-radius: 8px; min-width: 76px; max-width: 83%; justify-self: start; }
.message.mine { background: #592237; justify-self: end; }
.message p { margin: 0 0 2px; }
.message small { display: block; text-align: right; }
.comment { border-bottom: 1px solid var(--line); padding-block: 7px; }
.comment p { margin: 3px 0 0; }
.dialog-form { display: grid; gap: 12px; }
.dialog-form p { margin: 0; color: var(--muted); }
.dialog-form .field-tip { font-size: 12px; color: var(--muted); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 9px; }
.dialog-heading h2 { margin-bottom: 0; font-size: 24px; }
.dialog-heading .icon-btn { width: 31px; height: 31px; }
.dialog-actions { display: flex; justify-content: end; gap: 7px; flex-wrap: wrap; }
dialog { padding: 21px; width: min(530px, calc(100% - 26px)); max-height: calc(100dvh - 28px); color: var(--white); background: #20232b; border: 1px solid #525462; border-radius: 14px; box-shadow: 0 20px 70px #0008; }
dialog::backdrop { background: #06080dcc; }
dialog .dialog-content { margin-top: 14px; }
.form-error { color: #ff9daf !important; min-height: 0; }
.toast { position: fixed; z-index: 35; right: 16px; bottom: 18px; max-width: min(370px,calc(100% - 32px)); color: #fff; background: #2d232c; border: 1px solid #915267; border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 25px #0007; }
.guest-intro { background: linear-gradient(130deg,#241b23,#1a1d23); }
.guest-intro p { margin-bottom: 8px; color: var(--muted); }
@media (max-width: 1190px) {
  .layout { grid-template-columns: 174px minmax(0,1fr) 233px; gap: 13px; padding-inline: 16px; }
  .top-inner { grid-template-columns: 174px minmax(180px, 480px) 1fr; gap: 13px; padding-inline: 16px; }
}
@media (max-width: 930px) {
  .layout { grid-template-columns: 164px minmax(0,1fr); }
  .right { display: none; }
}
@media (max-width: 680px) {
  .top-inner { grid-template-columns: auto 1fr; min-height: 0; gap: 6px 10px; padding: 8px 11px; }
  .top-inner .brand img { width: 125px; height: auto; }
  .top-inner .brand small { margin-left: 31px; font-size: 7px; }
  .global-search { grid-row: 2; grid-column: 1 / -1; }
  .global-search input { height: 34px; }
  .top-actions { gap: 5px; }
  .top-actions .button, .top-actions .ghost { padding-inline: 7px; min-height: 32px; font-size: 13px; }
  .top-actions .icon-btn, .top-actions .avatar { width: 34px; height: 34px; }
  .layout { display: block; padding: 12px 10px 83px; }
  .left { display: none; }
  .main { gap: 12px; }
  .mobile { display: grid; grid-template-columns: repeat(5,1fr); position: fixed; inset: auto 0 0; z-index: 22; background: #181a20; border-top: 1px solid #424652; padding: 6px 3px calc(6px + env(safe-area-inset-bottom)); }
  .mobile a { display: grid; place-items: center; text-align: center; align-content: center; gap: 3px; min-height: 40px; color: var(--muted); font-size: 12px; }
  .mobile a.active { color: #ff91a4; }
  .mobile .ico { width: 19px; height: 19px; }
  .hero { min-height: 252px; }
  .hero::before { left: 29%; background-position: 54% 50%; }
  .hero::after { background: linear-gradient(90deg,#151820 6%,#151820df 31%,#15182015 81%),linear-gradient(0deg,#151820 6%,transparent 46%); }
  .hero-content { width: 82%; padding: 18px; }
  .hero h1 { font-size: clamp(45px, 10vw, 59px); }
  .hero p:not(.eyebrow) { font-size: 14px; }
  .world-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .world-grid.all { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-banner { min-height: 194px; padding: 15px; }
  .page-banner p { font-size: 14px; }
  .title-row { flex-wrap: wrap; }
  .toast { bottom: calc(67px + env(safe-area-inset-bottom)); }
  .post { padding: 12px; }
}

/* Photo feed, Moments and shared play. */
.feed-header, .moments-header {
  padding: 20px 22px;
  border: 1px solid #40313c;
  border-radius: 13px;
  background: radial-gradient(ellipse at 100% 0%, #38212d, transparent 68%), #1a1d23;
}
.feed-header h1, .moments-header h1 { font-size: clamp(31px,3.6vw,47px); }
.feed-composer .compose-text { text-align: left; justify-content: start; }
.feed-composer .compose-photo { flex: 0 0 auto; min-width: 103px; border-color: #67505b; color: #fff; }
.photo-post { padding: 0; overflow: hidden; }
.photo-post .post-head { padding: 12px 15px; }
.photo-open { display: block; width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: #121419; }
.photo-post .post-media { display: block; width: 100%; max-height: min(67vh,720px); margin: 0; border-radius: 0; background: #101116; }
.photo-post .post-actions { padding: 7px 10px 6px; margin: 0; border-top-color: #2b2d34; }
.photo-post .post-body { margin: 0; padding: 2px 16px 14px; }
.save-post { margin-left: auto; }
.moment-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.moment-switch .current { border-color: #ad3851; background: #3c1e29; }
.moments-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.moment-tile {
  position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 1;
  border-radius: 9px; border: 1px solid #3b3f49; background: #1b1e24; padding: 0; color: #fff;
}
.moment-tile:hover { border-color: var(--red-text); }
.moment-tile > img { width: 100%; height: 100%; object-fit: cover; }
.moment-tile-caption {
  position: absolute; display: flex; align-items: end; padding: 16px 8px 8px; gap: 7px; text-align: left;
  inset: auto 0 0; min-width: 0; background: linear-gradient(0deg,#0d0e14ee,transparent);
}
.moment-tile-caption > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.moment-tile-caption .avatar { width: 27px; height: 27px; flex-basis: 27px; border-radius: 7px; font-size: 12px; }
.moment-tile-caption b, .moment-tile-caption small { display: block; }
.moments-empty {
  padding: 26px;
  background: linear-gradient(90deg,#161921 15%,#161921bb 70%,#1619213d),url("/assets/world-art.svg") right 46% / cover no-repeat;
  border: 1px solid #3f3844; border-radius: 12px;
}
.moments-empty .empty { background: #14161cdd; max-width: 460px; text-align: left; }
dialog.moment-modal { width: min(780px,calc(100% - 20px)); }
dialog.moment-modal .photo-post .post-media { max-height: 58dvh; }
.upload-preview { max-width: 100%; max-height: 244px; width: 100%; margin-top: 9px; object-fit: contain; border-radius: 8px; background: #111317; }
.row-actions { display: flex; align-items: center; justify-content: end; gap: 6px; flex-wrap: wrap; }
.page-banner .row-actions { justify-content: start; }
.squad-row > div:first-child { flex: 1 1 155px; }
.squad-row .row-actions { flex: 1 1 252px; }
.social-badge {
  display: inline-block; color: #ff9eae; background: #35202d; border: 1px solid #634052;
  border-radius: 99px; padding: 2px 8px; font-size: 12px; margin: 3px 4px 0 0;
}
.social-badge.muted { background: #22262f; color: var(--muted); border-color: #434751; }
.invite-choices { display: grid; max-height: 166px; overflow-y: auto; gap: 5px; border: 1px solid var(--line); border-radius: 7px; margin: 0; padding: 7px 9px; }
.invite-choices legend { font-weight: 700; padding-inline: 4px; }
.invite-choices label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.invite-choices input { accent-color: #ce1137; }
.steam-signal { display: block; margin-top: 8px; }
.hashtag { color: #ff91a5; font-weight: 600; }
.hashtag:hover { text-decoration: underline; text-underline-offset: 2px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.tag-chips a, .tag-chips button {
  display: inline-flex; align-items: center; gap: 5px; color: #ffc0cc; border: 1px solid #654150;
  background: #2d2028; border-radius: 99px; padding: 4px 9px; font-weight: 600; font-size: 13px;
}
.tag-chips a:hover, .tag-chips button:hover { border-color: var(--red-text); }
.tag-chips small { color: #d9bbc3; }

@media (max-width:680px) {
  .feed-header, .moments-header { padding: 14px; }
  .moments-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .moments-empty { padding: 14px; }
  .social-person, .squad-row { flex-wrap: wrap; }
  .squad-row .row-actions { justify-content: start; flex: 1 0 100%; }
  .row-actions button, .row-actions a { min-height: 34px; }
  .photo-post .post-head { padding: 10px; }
  .photo-post .post-body { padding-inline: 10px; }
  .photo-post .post-actions { padding-inline: 4px; gap: 0 2px; }
  .photo-post .post-actions button { padding-inline: 6px; }
  .save-post { margin-left: 0; }
}
