/* FitSharing for Roblox: neutral grey UI. The colors are the checkerboard
   items sit on (it reads as "transparent PNG"), role badges and the Discord button. */

:root {
  /* Greys from DBM Host, structure from top.gg and Rolimons. */
  --bg: #1f1f1f;
  --panel: #262626;
  --raise: #2f2f2f;
  --raise-hover: #383838;
  --line: #363636;
  --text: #f0f0f0;
  --muted: #a1a1a1;
  --ink: #181818;
  --primary: #f0f0f0;
  --primary-hover: #ffffff;
  --chk-a: #333333;
  --chk-b: #2b2b2b;
  --danger-text: #ff9a9a;
  --discord: #5865f2;
  --discord-hover: #4752c4;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-bold: "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-panel: 10px;
  --r-tile: 8px;
  --r-control: 8px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.inline { display: inline; }

.checker {
  background: repeating-conic-gradient(var(--chk-a) 0 25%, var(--chk-b) 0 50%) 0 0 / 22px 22px;
}

.icon { flex: none; }

/* Buttons and fields */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: var(--r-control);
  background: var(--raise); color: var(--text);
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--raise-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { color: var(--danger-text); }
.btn-small { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.is-on { background: var(--primary); color: var(--ink); border-color: var(--primary); }
.btn.is-on .icon { fill: currentColor; }

.link-button { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.link-button:hover { text-decoration: underline; }

label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-control);
  font: inherit;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f7076; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--muted); }
.input-small { min-height: 34px !important; padding: 4px 8px !important; width: 140px !important; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; min-width: 0; }

.stack > * + * { margin-top: 12px; }
.stack label { margin-bottom: -6px; }
.help { font-size: .8rem; color: var(--muted); margin: 0; }
.form-error { color: var(--danger-text); font-size: .9rem; margin: 8px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; padding: 0; }
.radio, .check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0 0 6px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 18px; height: 18px; }

altcha-widget {
  display: block;
  --altcha-color-base: var(--ink);
  --altcha-color-base-content: var(--text);
  --altcha-color-neutral: var(--muted);
  --altcha-color-primary: var(--primary);
  --altcha-color-primary-content: var(--ink);
  --altcha-border-color: var(--line);
  --altcha-border-radius: var(--r-control);
  --altcha-max-width: 100%;
}

/* Header */

.topbar { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; view-transition-name: topbar; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; justify-self: start; }
.brand img { width: 52px; height: 52px; border-radius: 6px; }
.brand-name { font: 800 1.35rem/1 var(--font-display); letter-spacing: -0.01em; }
.brand-name span { color: var(--muted); font-weight: 600; }

.nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.account { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.nav-box {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px;
  background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-control);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; cursor: pointer;
}
.nav-box:hover { background: var(--raise-hover); }
.nav-box[aria-current] { background: var(--ink); border-color: #5b5c62; }
.nav-primary { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.nav-primary:hover { background: var(--primary-hover); }

.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.profile-button { padding: 0 12px 0 6px; }
.profile-pic { width: 30px; height: 30px; border-radius: 4px; background: var(--ink); object-fit: cover; flex: none; }
.profile-letter { display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.profile-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.profile-name { font-size: .9rem; }
.role-text { font-size: .72rem; font-weight: 700; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; z-index: 6;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel);
  padding: 6px; box-shadow: 0 16px 40px -12px #000;
}
.menu-list a, .menu-list button {
  display: block; width: 100%; padding: 9px 10px; border-radius: 4px; border: 0; background: none;
  color: var(--text); text-align: left; text-decoration: none; font: 600 .9rem/1.2 var(--font-body); cursor: pointer;
}
.menu-list a:hover, .menu-list button:hover { background: var(--raise); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-label { margin: 0; padding: 4px 10px 2px; font-size: .75rem; color: var(--muted); }
.menu-list .menu-danger { color: var(--danger-text); }

.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--r-control); background: var(--raise); border: 1px solid var(--line); margin: 0 0 8px; }
.flash-error { border-color: #6b3b3b; }
.flash-success { border-color: #5b5c62; }

/* Sections */

.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.section-head a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0; flex-basis: 100%; }

/* Hero: the headline is the brand; the Discord card shows what a link becomes. */

.hero { padding: clamp(40px, 8vw, 96px) 0 32px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 7rem);
  line-height: .9;
  letter-spacing: -0.045em;
  margin-bottom: .3em;
}
.lead { font-size: 1.15rem; color: #c9cace; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 16px; }
.hero-stats { font-size: .9rem; }
.hero-demo { transform: rotate(-1.5deg); }

/* Discord message preview */

.chat { display: flex; gap: 14px; background: #313338; border-radius: var(--r-panel); padding: 18px; font-size: .95rem; box-shadow: 0 24px 60px -24px #000; }
.chat-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--raise-hover); display: grid; place-items: center; font-weight: 700; }
.chat-body { min-width: 0; flex: 1; }
.chat-head { margin: 0 0 2px; }
.chat-head span { color: var(--muted); font-size: .75rem; margin-left: 4px; }
.chat-link { color: #b9bbc0; text-decoration: underline; margin: 0 0 8px; word-break: break-all; }
.embed { background: #2b2d31; border-left: 4px solid #1e1f22; border-radius: 4px; padding: 12px 14px 14px; max-width: 420px; }
.embed p { margin: 0 0 6px; }
.embed-site { font-size: .75rem; color: var(--muted); }
.embed-title { font-weight: 700; color: var(--text); }
.embed-text { font-size: .875rem; color: #c9cace; }
.embed-image { margin-top: 10px; border-radius: 6px; display: grid; grid-template-columns: repeat(2, 1fr); aspect-ratio: 1200 / 630; overflow: hidden; }
.embed-image[data-count="0"], .embed-image[data-count="1"] { grid-template-columns: 1fr; }
.embed-image img { width: 100%; height: 100%; object-fit: contain; }
.embed-image[data-count="2"] img, .embed-image[data-count="1"] img { grid-row: span 2; }
.embed-image:not([data-count]), .x-image, .im-image { grid-template-columns: 1fr !important; display: block; background: #2a2a2c; }
.embed-image:not([data-count]) img, .x-image img, .im-image img { width: 100%; height: 100%; object-fit: cover; }
.wa-thumb { object-fit: cover !important; background: #2a2a2c; }

/* Outfit tiles */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden; text-decoration: none; }
.tile:hover { border-color: #55565c; }
.tile-stage { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: 1; }
.tile-stage[data-count="0"], .tile-stage[data-count="1"] { grid-template-columns: 1fr; }
.tile-stage[data-count="3"] img:first-child { grid-row: span 2; }
.tile-stage img { width: 100%; height: 100%; object-fit: contain; }
.tile-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .85rem; }
.tile-likes { display: inline-flex; align-items: center; gap: 4px; }
.code-chip {
  position: absolute; top: 8px; left: 8px;
  background: var(--ink); color: var(--text); border-radius: 6px; padding: 2px 7px;
  font: 600 .75rem/1.5 var(--font-body); letter-spacing: .06em; font-variant-numeric: tabular-nums;
}
.code-inline { font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; background: var(--raise); border-radius: 6px; padding: 1px 6px; text-decoration: none; }

.empty { border-radius: var(--r-panel); padding: 48px 24px; text-align: center; border: 1px solid var(--line); }
.empty-title { font: 800 1.5rem/1.2 var(--font-display); margin-bottom: 8px; }
.empty-inline { color: var(--muted); padding: 20px 0; }

.steps-section h2 { margin-bottom: 20px; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: step; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 20px; color: #c9cace; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--ink); font: 800 1rem/1 var(--font-display); margin-bottom: 12px; }
.steps strong { color: var(--text); display: block; }

/* Tabs (DiscoTools-style editor panel) */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel-tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.panel-tabs [role=tab] {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 14px; white-space: nowrap;
  background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted);
  font: 600 .9rem/1 var(--font-body); cursor: pointer;
}
.panel-tabs [role=tab]:hover { color: var(--text); }
.panel-tabs [role=tab][aria-selected=true] { color: var(--text); border-bottom-color: var(--text); background: #232427; }
.panel-tabs [role=tab]:first-child { border-top-left-radius: var(--r-panel); }
.panel-tabs [role=tab]:last-child { border-top-right-radius: var(--r-panel); }
.pane { padding: 16px; }

.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tab { padding: 8px 14px; border-radius: var(--r-control); background: var(--raise); text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); }
.tab[aria-current] { background: var(--primary); color: var(--ink); }

.search { position: relative; display: flex; align-items: center; gap: 8px; width: min(100%, 460px); }
.search input[type=search] { flex: 1; min-width: 0; }
.search > .icon { position: absolute; left: 12px; color: var(--muted); }
.search input[type=search] { padding-left: 40px; }
.search-inline { gap: 8px; margin-bottom: 16px; max-width: 520px; }
.search-inline input { padding-left: 12px; }
.pager { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }

/* Outfit page */

.outfit-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.viewer { position: sticky; top: 80px; }
/* 2D preview: one transparent box per item */
.flat { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.flat[data-count="1"] { grid-template-columns: minmax(0, 360px); justify-content: center; }
.flat[data-count="2"], .flat[data-count="4"] { grid-template-columns: 1fr 1fr; }
.flat-item { margin: 0; display: flex; flex-direction: column; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-tile); overflow: hidden; }
.flat-img { display: block; border-bottom: 1px solid var(--line); }
.flat-img img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.flat-item figcaption { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; font-size: .78rem; }
.flat-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stage { position: relative; aspect-ratio: 1; border-radius: var(--r-tile); overflow: hidden; touch-action: none; cursor: grab; }
.stage:active { cursor: grabbing; }
.stage canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-hint { position: absolute; left: 12px; bottom: 10px; margin: 0; font-size: .8rem; color: var(--muted); pointer-events: none; z-index: 1; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.pane-note { margin: 10px 0 0; }

.tryon-form { margin-bottom: 16px; }
.tryon-result { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; align-items: start; }
.tryon-now { margin: 0; border-radius: var(--r-tile); overflow: hidden; position: relative; }
.tryon-now img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.tryon-now figcaption { position: absolute; left: 8px; bottom: 8px; font-size: .75rem; color: var(--muted); }

.outfit-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: .2em; overflow-wrap: anywhere; }
.outfit-by { color: var(--muted); }
.outfit-desc { color: #c9cace; white-space: normal; overflow-wrap: anywhere; }
.share-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 14px; margin: 18px 0; }
.share-row { display: flex; gap: 8px; }
.share-row input { flex: 1; min-width: 0; font-weight: 600; }
.outfit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; }
.stat { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .95rem; }
.side-heading { font-size: 1.15rem; margin: 24px 0 12px; }

.item-list { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.item-list li { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 8px 12px 8px 8px; }
.item-list img { width: 56px; height: 56px; border-radius: 10px; object-fit: contain; flex: none; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-text a, .item-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

.outfit-tools { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.report summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; }
.report form { margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 14px; }
.staff-inline { display: flex; align-items: center; gap: 8px; }
.staff-inline .muted { display: inline-flex; align-items: center; gap: 4px; }

/* Editor */

.editor { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.picker-bar { display: flex; gap: 8px; margin-bottom: 14px; }
.picker-bar select { width: auto; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; min-height: 240px; align-content: start; }
.pick {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0 0 8px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.pick:hover { border-color: #5b5c62; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pick-name { font-size: .78rem; font-weight: 600; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-price { font-size: .75rem; color: var(--muted); padding: 0 8px; }
.pick[aria-pressed=true] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.pick[aria-pressed=true]::after { content: "Added"; position: absolute; top: 6px; right: 6px; background: var(--primary); color: var(--ink); font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.picker-status { grid-column: 1 / -1; color: var(--muted); padding: 32px 0; text-align: center; }
[data-more] { margin-top: 12px; }
.editor-picker textarea { margin-bottom: 10px; }

.editor-outfit { padding: 16px; position: sticky; top: 80px; }
.editor-preview { display: grid; grid-template-columns: repeat(4, 1fr); border-radius: var(--r-tile); overflow: hidden; min-height: 120px; margin-bottom: 14px; }
.editor-preview img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.editor-empty { grid-column: 1 / -1; align-self: center; text-align: center; color: var(--muted); margin: 0; padding: 40px 0; }
.item-list-edit li { padding: 6px 6px 6px 6px; }
.item-list-edit img { width: 44px; height: 44px; }
.remove { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 8px; border-radius: 8px; display: grid; }
.remove:hover { color: var(--text); background: var(--raise); }
.editor-total { margin: 4px 0 16px; font-size: .9rem; }
.editor-details { border-top: 1px solid var(--line); padding-top: 16px; }

/* Auth */

.auth { display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 420px; padding: 28px; margin: 0 16px; }

/* Profile */

.profile-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; padding: 20px; }
.profile-head h1 { margin: 0 0 6px; }
.profile-info { flex: 1; min-width: 0; }
.profile-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.profile-bio { margin: 0 0 6px; color: #c9cace; overflow-wrap: anywhere; }
.profile-edit { align-self: flex-start; }
.profile-avatar { width: 88px; height: 88px; border-radius: 6px; background: var(--raise); display: grid; place-items: center; font: 800 2.2rem/1 var(--font-display); flex: none; object-fit: cover; }
/* Role colors: Admin red, Mod blue, Helper green, Member grey (set per role in the staff panel). */
.role-badge {
  --role: #8a8b91;
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 4px;
  color: var(--role); background: color-mix(in srgb, var(--role) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--role) 45%, transparent);
  font-weight: 700; font-size: .8rem; white-space: nowrap;
}

.error-page { max-width: 560px; margin: 0 auto; }
.error-code { font: 800 5rem/1 var(--font-display); letter-spacing: -0.04em; margin-bottom: 8px; }

.prose { max-width: 720px; }
.prose h2 { font-size: 1.25rem; margin-top: 1.6em; }
.prose p, .prose li { color: #c9cace; }

/* Staff panel */

.staff { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.staff-nav { padding: 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.staff-nav a { padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 600; }
.staff-nav a:hover { color: var(--text); background: var(--raise); }
.staff-nav a[aria-current] { background: var(--raise); color: var(--text); }
.staff-role { display: flex; align-items: center; gap: 6px; font-weight: 700; padding: 6px 12px 10px; margin: 0; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.staff-nav-group { font-size: .8rem; color: var(--muted); padding: 14px 12px 4px; margin: 0; }
.staff-main h1 { font-size: 2rem; }
.staff-main h2 { margin-top: 32px; font-size: 1.2rem; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); padding: 16px; color: var(--muted); text-decoration: none; }
.stat-card strong { display: block; font: 800 2rem/1.1 var(--font-display); color: var(--text); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-tile); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { background: var(--panel); color: var(--muted); font-weight: 600; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.report-list { display: flex; flex-direction: column; gap: 10px; }
.report-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; }
.report-card img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.report-text p { margin: 0 0 4px; }
.report-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }

.role-card { padding: 0; margin-bottom: 10px; }
.role-card > summary { padding: 14px 16px; cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.role-form { padding: 0 16px 16px; }
.role-fields { display: grid; grid-template-columns: 2fr 90px 1fr; gap: 12px; margin-bottom: 14px; }
.role-fields input[type=color] { padding: 4px; height: 44px; cursor: pointer; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 16px; margin-bottom: 14px; }
.perm-grid legend { grid-column: 1 / -1; }
.perm-grid:disabled .check { color: var(--muted); }
.role-buttons { display: flex; gap: 8px; }

.member-add { display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; align-items: end; padding: 16px; margin-bottom: 8px; }

/* Footer */

.footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: 48px; padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { font: 800 1.1rem/1 var(--font-display); margin-bottom: 8px; }
.footer-inner .small { max-width: 46em; margin: 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: .9rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* Prices */

.robux { display: inline-flex; align-items: center; gap: 4px; }
.robux-icon { flex: none; }
.price-off { color: var(--muted); font-weight: 600; }
.img-missing { visibility: hidden; }

/* Creator: mode choice */

.creator-step > .btn { margin-top: 20px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.choice-grid-small { max-width: 640px; }
.choice {
  position: relative; display: flex; flex-direction: column; margin: 0; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; font-weight: 400;
}
.choice:hover { border-color: #5b5c62; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.choice:has(input:checked)::after { content: "Selected"; position: absolute; top: 10px; right: 10px; background: var(--primary); color: var(--ink); font-size: .75rem; font-weight: 700; border-radius: 4px; padding: 2px 8px; }
.choice-art { display: block; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--line); }
.choice-art svg { width: 100%; height: 100%; display: block; }
.choice-grid-small .choice-art { aspect-ratio: 16 / 9; }
.choice-text { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.choice-title { font: 800 1.25rem/1.1 var(--font-display); }
.avatar-options { margin-top: 28px; }
.h2-like { font: 800 1.25rem/1.1 var(--font-display); margin: 0 0 12px; padding: 0; }
.avatar-options .h2-like + .choice-grid { margin-bottom: 24px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; margin: 0; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span:not(.visually-hidden) { display: block; width: 40px; height: 40px; border-radius: 4px; border: 2px solid var(--line); }
.swatch input:checked + span { border-color: var(--primary); box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.swatch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 4px; }

.picker-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.picker-filters label { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.picker-filters select { min-height: 38px; padding: 6px 8px; font-size: .9rem; }
.link-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.link-row { display: flex; gap: 6px; align-items: center; }
.link-row input { flex: 1; min-width: 0; }
.link-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-stage { margin-bottom: 14px; aspect-ratio: 4 / 5; }

/* Welcome and settings */

.welcome-head { max-width: 760px; margin-bottom: 28px; }
.welcome-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.welcome-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.welcome-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); text-decoration: none;
}
.welcome-card:hover { border-color: #5b5c62; background: #222326; }
.welcome-card .icon { margin-bottom: 6px; }
.welcome-card-title { font: 800 1.15rem/1.2 var(--font-display); }
.narrow { max-width: 640px; }
.settings-card { padding: 22px; }
.settings-avatar { display: flex; align-items: center; gap: 16px; }
.settings-avatar img { width: 96px; height: 96px; border-radius: 6px; flex: none; }
.settings-avatar p { margin: 0; }

/* Link previews */

.previews { display: flex; flex-direction: column; gap: 12px; }
.segmented { display: flex; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r-control); padding: 3px; gap: 3px; }
.segmented [role=tab] { flex: 1; min-height: 34px; border: 0; border-radius: 4px; background: none; color: var(--muted); font: 600 .85rem/1 var(--font-body); cursor: pointer; }
.segmented [role=tab][aria-selected=true] { background: var(--raise-hover); color: var(--text); }
.pv { font-size: .92rem; }
.pv p { margin: 0; }
.x-post { background: #000; border: 1px solid #2f3336; border-radius: var(--r-panel); padding: 14px; color: #e7e9ea; display: flex; flex-direction: column; gap: 8px; }
.x-head span { color: #71767b; }
.x-card { border: 1px solid #2f3336; border-radius: 12px; overflow: hidden; position: relative; }
.x-image { display: grid; grid-template-columns: repeat(2, 1fr); aspect-ratio: 1200 / 630; }
.x-image[data-count="0"], .x-image[data-count="1"] { grid-template-columns: 1fr; }
.x-image img { width: 100%; height: 100%; object-fit: contain; }
.x-domain { color: #71767b; font-size: .8rem; padding: 8px 12px 0; }
.x-title { padding: 0 12px 10px; }
.wa-bubble { background: #005c4b; color: #e9edef; border-radius: 8px; padding: 5px; max-width: 360px; margin-left: auto; }
.wa-card { display: flex; gap: 8px; background: #025144; border-radius: 6px; overflow: hidden; }
.wa-thumb { width: 72px; height: 72px; object-fit: contain; flex: none; }
.wa-card > div { padding: 6px 8px 6px 0; min-width: 0; }
.wa-title { font-weight: 700; }
.wa-text { font-size: .8rem; color: #c7d3d0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-domain { font-size: .75rem; color: #9fb3ae; }
.wa-link { padding: 6px 4px 0; color: #53bdeb; text-decoration: underline; word-break: break-all; font-size: .85rem; }
.wa-time { text-align: right; font-size: .7rem; color: #9fb3ae; padding: 0 4px; }
.im-bubble { max-width: 300px; margin-left: auto; border-radius: 18px; overflow: hidden; background: #3a3a3c; color: #fff; }
.im-image { display: grid; grid-template-columns: repeat(2, 1fr); aspect-ratio: 1.6; }
.im-image[data-count="0"], .im-image[data-count="1"] { grid-template-columns: 1fr; }
.im-image img { width: 100%; height: 100%; object-fit: contain; }
.im-meta { padding: 8px 12px 10px; }
.im-title { font-weight: 600; }
.im-domain { font-size: .8rem; color: #a1a1a6; }

/* Legal pages: one box per rule */

.legal { max-width: 820px; }
.rule-list { list-style: none; counter-reset: rule; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 10px; }
.rule { counter-increment: rule; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 16px 18px 16px 58px; }
.rule::before { content: counter(rule); position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; background: var(--raise); font: 800 .9rem/1 var(--font-display); }
.rule h2 { font-size: 1.1rem; margin: 3px 0 6px; }
.rule p { margin: 0; color: #c9cace; }

/* Cookie notice */

.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; padding: 14px 16px;
  background: var(--panel); border: 1px solid #5b5c62; border-radius: var(--r-panel); box-shadow: 0 20px 50px -16px #000;
}
.cookie-banner p { margin: 0; font-size: .9rem; color: #c9cace; }

/* Page transitions (browsers that support cross-page View Transitions) */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms ease-out both page-out; }
::view-transition-new(root) { animation: 220ms ease-out both page-in; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

/* Rolimons-style blocks: icon, small label, bold value, a line on top */

.nav-stack { flex-direction: column; justify-content: center; gap: 2px; min-height: 54px; min-width: 76px; padding: 4px 12px; font-size: .78rem; }
.nav-stack .icon { color: var(--muted); }
.nav-stack:hover .icon, .nav-stack[aria-current] .icon { color: var(--text); }

.stat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.stat-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0;
  background: var(--panel); border: 1px solid var(--line); border-top: 3px solid #5b5c62; border-radius: var(--r-tile);
}
.stat-tile > .icon, .stat-tile > .robux-icon, .stat-tile button > .icon { color: var(--muted); flex: none; }
.stat-tile > span, .stat-tile button > span { display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: .75rem; color: var(--muted); }
.stat-value { font: 800 1.15rem/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-like { padding: 0; }
.stat-like button { display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; padding: 12px 14px; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.stat-like button:hover { background: var(--raise); }
.stat-like button.is-on .icon { color: var(--text); fill: currentColor; }
.stat-like:has(.is-on) { border-top-color: var(--text); }

.item-cards { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.item-card { display: flex; gap: 12px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-tile); }
.item-card > img { width: 80px; height: 80px; border-radius: 4px; object-fit: contain; flex: none; border: 1px solid var(--line); }
.item-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.item-card-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; overflow: hidden; }
.item-card-name:hover { text-decoration: underline; }
.item-card-name .icon { color: var(--muted); flex: none; }
.item-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
.item-facts div { min-width: 0; }
.item-facts dt { font-size: .7rem; color: var(--muted); }
.item-facts dd { margin: 0; font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Creator steps */

.step-count { font-size: .85rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.btn-large { min-height: 52px; padding: 0 26px; font-size: 1rem; }
.step-buttons { display: flex; gap: 10px; margin-top: 24px; }
.editor-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.editor-head h1 { margin: 0; }
.mode-box { display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 8px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid #5b5c62; border-radius: var(--r-tile); }
.mode-box-art { width: 76px; height: 57px; border-radius: 4px; overflow: hidden; flex: none; }
.mode-box-art svg { width: 100%; height: 100%; display: block; }
.mode-box-text { display: flex; flex-direction: column; min-width: 110px; }
.mode-box-text strong { font: 800 1.1rem/1.2 var(--font-display); }
.app-icon { flex: none; }
.segmented [role=tab] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* Motion: answers to what people do. Nothing moves on its own except the 3D turntable. */

.btn:active, .nav-box:active, .pick:active, .choice:active { transform: scale(.97); }
.btn, .nav-box, .pick, .choice { transition: transform .12s ease, background-color .15s, border-color .15s; }

.menu[open] .menu-list { animation: menu-in .16s cubic-bezier(.2, .9, .3, 1.2) both; transform-origin: top right; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.menu-list > * { animation: menu-item-in .2s ease-out both; }
.menu-list > *:nth-child(2) { animation-delay: .03s; }
.menu-list > *:nth-child(3) { animation-delay: .06s; }
.menu-list > *:nth-child(4) { animation-delay: .08s; }
.menu-list > *:nth-child(5) { animation-delay: .1s; }
@keyframes menu-item-in { from { opacity: 0; transform: translateX(6px); } }

.pane:not([hidden]), .pv:not([hidden]) { animation: pane-in .22s ease-out both; }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }

.creator-step:not([hidden]) { animation: step-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.creator-step.from-left:not([hidden]) { animation-name: step-back; }
@keyframes step-in { from { opacity: 0; transform: translateX(28px); } }
@keyframes step-back { from { opacity: 0; transform: translateX(-28px); } }

.flash { animation: flash-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes flash-in { from { opacity: 0; transform: translateY(-8px); } }
.cookie-banner { animation: banner-in .4s .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes banner-in { from { opacity: 0; transform: translateY(16px); } }

.flat-item, .item-card { animation: rise-in .35s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
.item-list-edit li { animation: pop-in .22s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } }
.pick[aria-pressed=true]::after { animation: pop-in .2s cubic-bezier(.2, .9, .3, 1.3) both; }

/* Shell: top bar, left sidebar (like Roblox), content */

.topbar-inner { display: flex; align-items: center; gap: 20px; min-height: 72px; padding: 0 24px; grid-template-columns: none; }
.brand img { width: 48px; height: 48px; }
.top-search { position: relative; flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; }
.top-search .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.top-search input[type=search] { padding-left: 42px; background: var(--raise); border-color: var(--line); min-height: 42px; }
.top-search input[type=search]:focus { background: var(--ink); }
.account { margin-left: auto; }
.sidebar-toggle { display: none; background: var(--raise); border: 1px solid var(--line); border-radius: var(--r-control); color: var(--text); width: 44px; height: 44px; place-items: center; cursor: pointer; flex: none; }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); flex: 1; }
.sidebar {
  position: sticky; top: 72px; align-self: start; height: calc(100vh - 72px);
  display: flex; flex-direction: column; gap: 14px; padding: 20px 14px;
  background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto;
}
.side-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-tile); text-decoration: none; }
.side-user:hover { background: var(--raise); }
.side-user .profile-pic { width: 36px; height: 36px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px;
  border-radius: var(--r-tile); color: var(--muted); text-decoration: none; font-weight: 700; font-size: 1rem;
  transition: background-color .18s, color .18s;
}
.side-nav a .icon { transition: transform .25s cubic-bezier(.2, .9, .3, 1.4); }
.side-nav a:hover { background: var(--raise); color: var(--text); }
.side-nav a:hover .icon { transform: translateX(3px) scale(1.08); }
.side-nav a[aria-current] { background: var(--raise-hover); color: var(--text); }
.side-nav a[aria-current]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--text); animation: bar-in .3s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes bar-in { from { transform: scaleY(0); } }
.side-foot { margin-top: auto; padding: 12px; font-size: .78rem; color: var(--muted); }
.side-foot p { margin: 8px 0 0; }
.side-legal { display: flex; gap: 12px; flex-wrap: wrap; }
.side-legal a { color: var(--muted); }
.sidebar-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 8; animation: fade-in .2s both; }
@keyframes fade-in { from { opacity: 0; } }
.shell-main { min-width: 0; display: flex; flex-direction: column; }
.shell-main main { flex: 1; }
.footer { margin-top: 56px; }
.footer-inner { align-items: baseline; }

/* Staff panel tabs sit on top now that the site has its own sidebar */
.staff { grid-template-columns: 1fr; gap: 20px; }
.staff-nav { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px; }
.staff-role { border-bottom: 0; margin: 0 8px 0 4px; padding: 0; }
.staff-nav-group { padding: 0 4px 0 12px; border-left: 1px solid var(--line); }

/* More room everywhere */
.section { padding: 52px 0; }
.section-head { margin-bottom: 24px; }
.page-head { margin-bottom: 28px; }
.grid { gap: 22px; }
.pane { padding: 22px; }
.picker-grid { gap: 12px; }
.picker-filters { gap: 12px; margin-bottom: 18px; }
.picker-bar { margin-bottom: 18px; }
.flat { gap: 16px; }
.item-cards { gap: 12px; }
.item-card { padding: 12px; gap: 16px; }
.stat-tiles { gap: 12px; margin: 24px 0; }
.stat-tile { padding: 16px 18px; }
.share-box { padding: 18px; margin: 24px 0; }
.side-heading { margin: 32px 0 16px; }
.outfit-layout { gap: 36px; }
.editor { gap: 28px; }
.editor-outfit { padding: 22px; }
.choice-grid { gap: 20px; }
.welcome-grid { gap: 16px; }
.welcome-card { padding: 24px; }
.rule-list { gap: 14px; }
.rule { padding: 20px 22px 20px 62px; }
.tile-body { padding: 12px 14px 14px; gap: 4px; }
.item-list-edit { gap: 10px; }
.stack > * + * { margin-top: 16px; }

/* In construction */
.soon-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; background: var(--ink); border: 1px dashed #6f7076; color: var(--muted); font: 700 .7rem/1.4 var(--font-body); white-space: nowrap; }
.panel-tabs [role=tab] .soon-badge { margin-left: 2px; }
.choice.is-soon { cursor: not-allowed; }
.choice.is-soon .choice-art, .choice.is-soon .choice-text { opacity: .45; filter: grayscale(1); }
.choice-soon { position: absolute; top: 12px; right: 12px; font-size: .78rem; padding: 4px 10px; background: var(--panel); }
.soon { display: grid; place-items: center; text-align: center; gap: 6px; min-height: 340px; padding: 32px; border-radius: var(--r-tile); border: 1px solid var(--line); }
.soon-title { font: 800 1.5rem/1.2 var(--font-display); margin: 6px 0 0; }

/* Loading: grey shimmer, like Roblox, until each picture arrives */
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skeleton, .checker img:not(.is-loaded), img.checker:not(.is-loaded), .tile-stage img:not(.is-loaded) {
  background: linear-gradient(100deg, #2f3034 30%, #45464c 50%, #2f3034 70%) 0 0 / 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.checker img:not(.is-loaded), img.checker:not(.is-loaded) { color: transparent; }
img.is-loaded { animation: img-in .35s ease-out both; }
@keyframes img-in { from { opacity: 0; transform: scale(.96); } }
.pick-skeleton { pointer-events: none; display: flex; flex-direction: column; gap: 8px; padding: 0 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); overflow: hidden; }
.pick-skeleton .skeleton:first-child { aspect-ratio: 1; }
.pick-skeleton .skeleton:not(:first-child) { height: 10px; margin: 0 8px; border-radius: 3px; }
.pick-skeleton .skeleton:last-child { width: 55%; }

/* Motion you can see: page entrance, cards, hovers */
main > section > .wrap > *, main > .section > .wrap > * { animation: page-rise .5s cubic-bezier(.2, .8, .2, 1) both; }
main > section > .wrap > *:nth-child(2) { animation-delay: .06s; }
main > section > .wrap > *:nth-child(3) { animation-delay: .12s; }
main > section > .wrap > *:nth-child(4) { animation-delay: .18s; }
@keyframes page-rise { from { opacity: 0; transform: translateY(16px); } }
.grid > * { animation: rise-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.grid > *:nth-child(2) { animation-delay: .05s; }
.grid > *:nth-child(3) { animation-delay: .1s; }
.grid > *:nth-child(4) { animation-delay: .15s; }
.grid > *:nth-child(5) { animation-delay: .2s; }
.grid > *:nth-child(6) { animation-delay: .25s; }
.grid > *:nth-child(n+7) { animation-delay: .3s; }
.tile, .welcome-card, .choice, .pick, .item-card, .stat-tile { transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s, border-color .2s, background-color .2s; }
.tile:hover, .welcome-card:hover, .choice:not(.is-soon):hover, .item-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px -14px #000; }
.pick:hover { transform: translateY(-3px); }
.tile:hover .tile-stage img { transform: scale(1.06); }
.tile-stage img { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.btn-primary:hover { box-shadow: 0 6px 18px -8px rgba(255, 255, 255, .5); }
.topbar { animation: drop-in .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-12px); } }
.sidebar { animation: slide-in .45s .05s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes slide-in { from { opacity: 0; transform: translateX(-16px); } }

/* Small screens */

@media (max-width: 1100px) {
  .hero-inner, .outfit-layout, .editor { grid-template-columns: 1fr; }
  .hero-demo { transform: none; }
  .viewer, .editor-outfit { position: static; }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar-toggle { display: grid; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: min(290px, 85vw); z-index: 9;
    transform: translateX(-105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); animation: none;
  }
  .sidebar.is-open { transform: none; box-shadow: 20px 0 50px -10px #000; }
  .brand-name span { display: none; }
  .topbar-inner { padding: 0 16px; gap: 12px; }
}

@media (max-width: 640px) {
  .top-search { display: none; }
  .brand img { width: 40px; height: 40px; }
  .brand-name { font-size: 1.1rem; }
  .profile-text { display: none; }
  .profile-button { padding: 0 6px; }
  .choice-grid, .picker-filters { grid-template-columns: 1fr; }
  .profile-head { flex-wrap: wrap; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .member-add, .role-fields { grid-template-columns: 1fr; }
  .panel-tabs [role=tab] { font-size: .8rem; padding: 0 10px; }
  .panel-tabs [role=tab] .icon { display: none; }
  .item-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------
   v4 look: DBM Host type and greys, top.gg search and separators,
   Rolimons category tiles and item cards.
   --------------------------------------------------------------- */

/* Unbounded is wide: keep it for real headings, Onest for small bold text. */
h1, .page-title, .section-title, .box-head h2, .box-title, .outfit-title, .brand-name, .error-code, .empty-title { font-family: var(--font-display); letter-spacing: -0.03em; }
h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.stat-value, .welcome-card-title, .choice-title, .h2-like, .mode-box-text strong, .rule::before, .profile-avatar, .footer-brand, .steps li::before, .soon-title, .side-heading, .tile-title, .discord-card-title, .rule h2, .staff-main h2 { font-family: var(--font-bold); letter-spacing: -0.01em; }
.brand-name { font-size: 1.15rem; font-weight: 800; }
.brand-name span { font-family: var(--font-bold); font-weight: 600; letter-spacing: 0; }

/* Separators */
.sep { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.side-sep { margin: 10px 6px; }
.side-foot .sep { margin: 14px 0; }

/* Hero: DBM pill, big type, top.gg search and hashtags */
.hero { padding: clamp(44px, 7vw, 84px) 0 26px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: .95; letter-spacing: -0.045em; margin: 18px 0 .3em; }
.pill-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); text-decoration: none; font-weight: 700; font-size: .85rem;
}
.pill-link:hover { background: var(--raise); }
.lead { max-width: 40em; color: #c8c8c8; font-size: 1.1rem; }

.big-search { display: flex; gap: 10px; margin: 26px 0 14px; max-width: 920px; }
.big-search input[type=search] {
  flex: 1; min-width: 0; min-height: 62px; padding: 0 20px; font-size: 1.05rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel);
}
.big-search input[type=search]:focus { border-color: #5a5a5a; background: var(--ink); }
.big-search button {
  flex: none; width: 62px; height: 62px; display: grid; place-items: center; cursor: pointer;
  background: var(--primary); color: var(--ink); border: 0; border-radius: var(--r-panel);
  transition: transform .12s, background-color .15s;
}
.big-search button:hover { background: var(--primary-hover); }
.big-search button:active { transform: scale(.95); }
.hashtags { display: flex; flex-wrap: wrap; gap: 8px; }
.hashtag {
  display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-control);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .88rem;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.hashtag span { color: var(--muted); font-weight: 800; }
.hashtag:hover { background: var(--raise); transform: translateY(-2px); }
.hashtag[aria-current] { background: var(--primary); color: var(--ink); border-color: var(--primary); }
.hashtag[aria-current] span { color: var(--ink); }
.hero-stats { margin-top: 16px; }
.page-title { margin-bottom: 4px; }

/* top.gg underline tabs */
.tabs-line { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; }
.tabs-line a { padding: 10px 0 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 1.05rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line a:hover { color: var(--text); }
.tabs-line a[aria-current] { color: var(--text); border-bottom-color: var(--text); }

/* Rolimons category tiles */
.section-tight { padding: 26px 0; }
.section-title { font-size: 1.35rem; margin-bottom: 18px; }
.category-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.category-tile {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px 18px;
  background: linear-gradient(135deg, #2c2c2c, #232323); border: 1px solid var(--line); border-radius: var(--r-tile);
  color: var(--text); text-decoration: none; font-weight: 700;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), border-color .2s, box-shadow .2s;
}
/* The faint diagonal facets Rolimons puts on its tiles, in grey. */
.category-tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(120deg, transparent 55%, rgba(255, 255, 255, .04) 55% 70%, transparent 70%),
              linear-gradient(60deg, transparent 72%, rgba(255, 255, 255, .03) 72% 86%, transparent 86%);
}
.category-tile .icon { flex: none; transition: transform .3s cubic-bezier(.2, .9, .3, 1.4); }
.category-tile:hover { transform: translateY(-4px); border-color: #555; box-shadow: 0 14px 30px -14px #000; }
.category-tile:hover .icon { transform: rotate(-8deg) scale(1.1); }

/* Home: boxed sections with a line under the title, and a side column */
.home-columns { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.home-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.home-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 92px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px; }
.box > .sep { margin: 18px -22px 22px; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.box-head h2 { margin: 0; font-size: 1.2rem; }
.box-title { font-size: 1.1rem; margin: 0; }
.pill-button {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 18px; border-radius: 999px;
  background: var(--raise); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-size: .88rem;
  transition: background-color .15s, transform .12s;
}
.pill-button:hover { background: var(--raise-hover); }
.pill-button:active { transform: scale(.96); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.box .empty { border: 0; }
.check-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 20px; display: flex; flex-direction: column; gap: 14px; }
.check-steps li { counter-increment: step; position: relative; padding-left: 34px; color: #c8c8c8; font-size: .92rem; }
.check-steps li::before { content: counter(step) "."; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--text); width: 24px; }
.check-steps strong { color: var(--text); }

/* Discord: the one place the brand color shows */
.btn-discord { background: var(--discord); border-color: var(--discord); color: #fff; }
.btn-discord:hover { background: var(--discord-hover); border-color: var(--discord-hover); }
.btn-discord svg { width: 18px; height: 18px; fill: #fff; flex: none; }
.discord-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: radial-gradient(120% 80% at 100% 0%, rgba(88, 101, 242, .22), transparent 60%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-panel);
}
.discord-card > div p { margin: 0; }
.discord-card-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px !important; }
.discord-card-icon { width: 46px; height: 46px; border-radius: 10px; display: grid; place-items: center; background: var(--discord); }
.discord-card-icon svg { width: 26px; height: 26px; fill: #fff; }

/* Rolimons item cards for outfits: title on top, picture, then facts */
.tile { border-radius: var(--r-tile); }
.tile-title { display: block; padding: 10px 12px; background: var(--raise); font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line); }
.tile-stage { position: relative; }
.tile-rows { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; font-size: .86rem; }
.tile-row { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.tile-row > span:last-child, .tile-row > .robux { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.code-chip { top: auto; bottom: 8px; left: 8px; }

/* Outfit page: top.gg action row */
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.action-row form { margin: 0; }
.btn-icon { width: 52px; padding: 0; }
.btn.is-copied { background: var(--primary); color: var(--ink); }
.stat-tiles { margin: 0; }
.share-box { margin: 18px 0 0; }

/* Pop-up window with a blurred page behind it */
.modal {
  width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--text); box-shadow: 0 30px 80px -20px #000;
}
.modal[open] { animation: modal-in .25s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.modal::backdrop { background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal[open]::backdrop { animation: fade-in .25s both; }
.modal-body { padding: 22px; }
.modal-body .sep { margin: 6px -22px 4px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; }
.modal-close { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--r-control); border: 1px solid var(--line); background: var(--raise); color: var(--text); cursor: pointer; }
.modal-close:hover { background: var(--raise-hover); }
.reason-list { display: flex; flex-direction: column; gap: 8px; }
.reason { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 0; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--raise); font-weight: 600; cursor: pointer; transition: border-color .15s, background-color .15s; }
.reason:hover { background: var(--raise-hover); }
.reason:has(input:checked) { border-color: var(--primary); background: #343434; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }

@media (max-width: 1100px) {
  .home-columns { grid-template-columns: 1fr; }
  .home-side { position: static; }
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .category-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .big-search input[type=search] { min-height: 54px; }
  .big-search button { width: 54px; height: 54px; }
  .hero h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
}

/* Discord login page */
.auth-card { text-align: left; }
.auth-icon { margin-bottom: 16px; }
.auth-card .btn-discord { margin-top: 4px; }
.auth-note { margin: 14px 0 0; }
.topbar .btn-discord { min-height: 42px; }
